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
Move data provider to shared package (#582)
Dan Orlando04e42590053e
diff --git a/.eslintrc.js b/.eslintrc.jsindex e7631e686e..d79aac226f 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -24,7 +24,7 @@ module.exports = {plugins: ['react', 'react-hooks', '@typescript-eslint'],rules: {'react/react-in-jsx-scope': 'off',- '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],+ '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow' }],indent: ['error', 2, { SwitchCase: 1 }],'max-len': ['error',@@ -42,12 +42,6 @@ module.exports = {// 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],'no-console': 'off','import/extensions': 'off',- 'no-use-before-define': [- 'error',- {- functions: false- }- ],'no-promise-executor-return': 'off','no-param-reassign': 'off','no-continue': 'off',@@ -103,6 +97,18 @@ module.exports = {'plugin:@typescript-eslint/eslint-recommended','plugin:@typescript-eslint/recommended']+ },+ {+ files: './packages/data-provider/**/*.ts',+ overrides: [+ {+ files: "**/*.ts",+ parser: "@typescript-eslint/parser",+ parserOptions: {+ project: "./packages/data-provider/tsconfig.json"+ }+ }+ ]}],settings: {diff --git a/.github/workflows/frontend-review.yml b/.github/workflows/frontend-review.ymlindex 6652d686c3..acc43b503e 100644--- a/.github/workflows/frontend-review.yml+++ b/.github/workflows/frontend-review.yml@@ -25,10 +25,10 @@ jobs:cache: 'npm'- name: Install dependencies- run: npm ci --ignore-scripts+ run: npm ci- name: Build Client- run: cd client && npm run build:ci+ run: npm run frontend:ci- name: Run unit testsrun: cd client && npm run test:ci\ No newline at end of filediff --git a/.gitignore b/.gitignoreindex ba54ad5474..2bf3b872ef 100644--- a/.gitignore+++ b/.gitignore@@ -39,6 +39,7 @@ meili_data/api/node_modules/client/node_modules/bower_components/+types/# Floobits.floo@@ -72,3 +73,5 @@ junit.xmlmeilisearchdata.ms/*auth.json++/packages/ux-shared/diff --git a/client/package.json b/client/package.jsonindex 784453410d..7ac7694ee6 100644--- a/client/package.json+++ b/client/package.json@@ -3,6 +3,7 @@"version": "0.5.2","description": "","scripts": {+ "data-provider": "cd .. && npm run build:data-provider","build": "cross-env NODE_ENV=production dotenv -e ../.env -- vite build","build:ci": "cross-env NODE_ENV=dev vite build --mode ci","dev": "cross-env NODE_ENV=dev dotenv -e ../.env -- vite",@@ -75,7 +76,8 @@"tailwind-merge": "^1.9.1","tailwindcss-animate": "^1.0.5","tailwindcss-radix": "^2.8.0",- "url": "^0.11.0"+ "url": "^0.11.0",+ "@librechat/data-provider": "*"},"devDependencies": {"@babel/cli": "^7.20.7",diff --git a/client/src/components/Auth/Login.tsx b/client/src/components/Auth/Login.tsxindex 5d2b2625d8..d894266dc4 100644--- a/client/src/components/Auth/Login.tsx+++ b/client/src/components/Auth/Login.tsx@@ -2,7 +2,7 @@ import { useEffect } from 'react';import LoginForm from './LoginForm';import { useAuthContext } from '~/hooks/AuthContext';import { useNavigate } from 'react-router-dom';-import { useGetStartupConfig } from '~/data-provider';+import { useGetStartupConfig } from '@librechat/data-provider';function Login() {const { login, error, isAuthenticated } = useAuthContext();diff --git a/client/src/components/Auth/LoginForm.tsx b/client/src/components/Auth/LoginForm.tsxindex 582ab3b21c..c013ae2cad 100644--- a/client/src/components/Auth/LoginForm.tsx+++ b/client/src/components/Auth/LoginForm.tsx@@ -1,5 +1,5 @@import { useForm } from 'react-hook-form';-import { TLoginUser } from '~/data-provider';+import { TLoginUser } from '@librechat/data-provider';type TLoginFormProps = {onSubmit: (data: TLoginUser) => void;diff --git a/client/src/components/Auth/Registration.tsx b/client/src/components/Auth/Registration.tsxindex 29cf776a10..c977c955d0 100644--- a/client/src/components/Auth/Registration.tsx+++ b/client/src/components/Auth/Registration.tsx@@ -1,7 +1,11 @@import { useState, useEffect } from 'react';import { useNavigate } from 'react-router-dom';import { useForm } from 'react-hook-form';-import { useRegisterUserMutation, TRegisterUser, useGetStartupConfig } from '~/data-provider';+import {+ useRegisterUserMutation,+ TRegisterUser,+ useGetStartupConfig+} from '@librechat/data-provider';function Registration() {const navigate = useNavigate();@@ -27,7 +31,9 @@ function Registration() {},onError: (error) => {setError(true);+ //@ts-ignore - error is of type unknownif (error.response?.data?.message) {+ //@ts-ignore - error is of type unknownsetErrorMessage(error.response?.data?.message);}}diff --git a/client/src/components/Auth/RequestPasswordReset.tsx b/client/src/components/Auth/RequestPasswordReset.tsxindex a94c587a86..6b992c0d8b 100644--- a/client/src/components/Auth/RequestPasswordReset.tsx+++ b/client/src/components/Auth/RequestPasswordReset.tsx@@ -1,6 +1,10 @@import { useState } from 'react';import { useForm } from 'react-hook-form';-import { useRequestPasswordResetMutation, TRequestPasswordReset } from '~/data-provider';+import {+ useRequestPasswordResetMutation,+ TRequestPasswordReset,+ TRequestPasswordResetResponse+} from '@librechat/data-provider';function RequestPasswordReset() {const {@@ -15,7 +19,7 @@ function RequestPasswordReset() {const onSubmit = (data: TRequestPasswordReset) => {requestPasswordReset.mutate(data, {- onSuccess: (data) => {+ onSuccess: (data: TRequestPasswordResetResponse) => {setSuccess(true);setResetLink(data.link);},diff --git a/client/src/components/Auth/ResetPassword.tsx b/client/src/components/Auth/ResetPassword.tsxindex 452799fe0f..34c7f9fa18 100644--- a/client/src/components/Auth/ResetPassword.tsx+++ b/client/src/components/Auth/ResetPassword.tsx@@ -1,6 +1,6 @@import { useState } from 'react';import { useForm } from 'react-hook-form';-import { useResetPasswordMutation, TResetPassword } from '~/data-provider';+import { useResetPasswordMutation, TResetPassword } from '@librechat/data-provider';import { useNavigate, useSearchParams } from 'react-router-dom';function ResetPassword() {@@ -73,12 +73,14 @@ function ResetPassword() {<inputtype="hidden"id="token"+ // @ts-ignore - Type 'string | null' is not assignable to type 'string | number | readonly string[] | undefined'value={params.get('token')}{...register('token', { required: 'Unable to process: No valid reset token' })}/><inputtype="hidden"id="userId"+ // @ts-ignore - Type 'string | null' is not assignable to type 'string | number | readonly string[] | undefined'value={params.get('userId')}{...register('userId', { required: 'Unable to process: No valid user id' })}/>diff --git a/client/src/components/Auth/__tests__/Login.spec.tsx b/client/src/components/Auth/__tests__/Login.spec.tsxindex cf9b0fa41a..6c6d4c9edd 100644--- a/client/src/components/Auth/__tests__/Login.spec.tsx+++ b/client/src/components/Auth/__tests__/Login.spec.tsx@@ -1,9 +1,9 @@import { render, waitFor } from 'layout-test-utils';import userEvent from '@testing-library/user-event';import Login from '../Login';-import * as mockDataProvider from '~/data-provider';+import * as mockDataProvider from '@librechat/data-provider';-jest.mock('~/data-provider');+jest.mock('@librechat/data-provider');const setup = ({useGetUserQueryReturnValue = {diff --git a/client/src/components/Auth/__tests__/Registration.spec.tsx b/client/src/components/Auth/__tests__/Registration.spec.tsxindex 6a373be685..b720116fd7 100644--- a/client/src/components/Auth/__tests__/Registration.spec.tsx+++ b/client/src/components/Auth/__tests__/Registration.spec.tsx@@ -1,9 +1,9 @@import { render, waitFor } from 'layout-test-utils';import userEvent from '@testing-library/user-event';import Registration from '../Registration';-import * as mockDataProvider from '~/data-provider';+import * as mockDataProvider from '@librechat/data-provider';-jest.mock('~/data-provider');+jest.mock('@librechat/data-provider');const setup = ({useGetUserQueryReturnValue = {diff --git a/client/src/components/Conversations/Conversation.jsx b/client/src/components/Conversations/Conversation.jsxindex 0d4f7ccbf1..9c2503e30a 100644--- a/client/src/components/Conversations/Conversation.jsx+++ b/client/src/components/Conversations/Conversation.jsx@@ -1,6 +1,6 @@import { useState, useRef, useEffect } from 'react';import { useRecoilState, useSetRecoilState } from 'recoil';-import { useUpdateConversationMutation } from '~/data-provider';+import { useUpdateConversationMutation } from '@librechat/data-provider';import RenameButton from './RenameButton';import DeleteButton from './DeleteButton';import ConvoIcon from '../svg/ConvoIcon';diff --git a/client/src/components/Conversations/DeleteButton.jsx b/client/src/components/Conversations/DeleteButton.jsxindex 09b73fdb47..217aab0b34 100644--- a/client/src/components/Conversations/DeleteButton.jsx+++ b/client/src/components/Conversations/DeleteButton.jsx@@ -2,7 +2,7 @@ import { useEffect } from 'react';import TrashIcon from '../svg/TrashIcon';import CrossIcon from '../svg/CrossIcon';import { useRecoilValue } from 'recoil';-import { useDeleteConversationMutation } from '~/data-provider';+import { useDeleteConversationMutation } from '@librechat/data-provider';import store from '~/store';diff --git a/client/src/components/Endpoints/BingAI/Settings.jsx b/client/src/components/Endpoints/BingAI/Settings.jsxindex daf5ab25b7..65438edb04 100644--- a/client/src/components/Endpoints/BingAI/Settings.jsx+++ b/client/src/components/Endpoints/BingAI/Settings.jsx@@ -5,7 +5,7 @@ import { Checkbox } from '~/components/ui/Checkbox.tsx';import SelectDropDown from '../../ui/SelectDropDown';import { cn } from '~/utils/';import useDebounce from '~/hooks/useDebounce';-import { useUpdateTokenCountMutation } from '~/data-provider';+import { useUpdateTokenCountMutation } from '@librechat/data-provider';const defaultTextProps ='rounded-md border border-gray-200 focus:border-slate-400 focus:bg-gray-50 bg-transparent text-sm shadow-[0_0_10px_rgba(0,0,0,0.05)] outline-none placeholder:text-gray-400 focus:outline-none focus:ring-gray-400 focus:ring-opacity-20 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:bg-gray-700 focus:dark:bg-gray-600 dark:text-gray-50 dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] dark:focus:border-gray-400 dark:focus:outline-none dark:focus:ring-0 dark:focus:ring-gray-400 dark:focus:ring-offset-0';@@ -43,7 +43,7 @@ function Settings(props) {}, [debouncedContext]);return (- <div className="md:h-[350px] h-[490px] overflow-y-auto">+ <div className="h-[490px] overflow-y-auto md:h-[350px]"><div className="grid gap-6 sm:grid-cols-2"><div className="col-span-1 flex flex-col items-center justify-start gap-6"><div className="grid w-full items-center gap-2">@@ -113,7 +113,8 @@ function Settings(props) {<ahref="https://github.com/danny-avila/LibreChat/blob/main/client/defaultSystemMessage.md"target="_blank"- className="text-blue-500 transition-colors duration-200 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-500" rel="noreferrer"+ className="text-blue-500 transition-colors duration-200 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-500"+ rel="noreferrer">System Message</a>{' '}diff --git a/client/src/components/Endpoints/SaveAsPresetDialog.jsx b/client/src/components/Endpoints/SaveAsPresetDialog.jsxindex f2d2e7db6b..a371ff080b 100644--- a/client/src/components/Endpoints/SaveAsPresetDialog.jsx+++ b/client/src/components/Endpoints/SaveAsPresetDialog.jsx@@ -1,9 +1,9 @@import React, { useEffect, useState } from 'react';import { useRecoilValue } from 'recoil';-import {Dialog, DialogTemplate, Input, Label} from '../ui/';+import { Dialog, DialogTemplate, Input, Label } from '../ui/';import { cn } from '~/utils/';import cleanupPreset from '~/utils/cleanupPreset';-import { useCreatePresetMutation } from '~/data-provider';+import { useCreatePresetMutation } from '@librechat/data-provider';import store from '~/store';const SaveAsPresetDialog = ({ open, onOpenChange, preset }) => {diff --git a/client/src/components/Input/Footer.tsx b/client/src/components/Input/Footer.tsxindex 28c61736a2..bc13159f53 100644--- a/client/src/components/Input/Footer.tsx+++ b/client/src/components/Input/Footer.tsx@@ -1,5 +1,5 @@import React from 'react';-import { useGetStartupConfig } from '~/data-provider';+import { useGetStartupConfig } from '@librechat/data-provider';export default function Footer() {const { data: config } = useGetStartupConfig();diff --git a/client/src/components/Input/NewConversationMenu/index.jsx b/client/src/components/Input/NewConversationMenu/index.jsxindex 4255be976b..3b3d64774e 100644--- a/client/src/components/Input/NewConversationMenu/index.jsx+++ b/client/src/components/Input/NewConversationMenu/index.jsx@@ -9,7 +9,7 @@ import { Trash2 } from 'lucide-react';import FileUpload from './FileUpload';import getIcon from '~/utils/getIcon';import getDefaultConversation from '~/utils/getDefaultConversation';-import { useDeletePresetMutation, useCreatePresetMutation } from '~/data-provider';+import { useDeletePresetMutation, useCreatePresetMutation } from '@librechat/data-provider';import {Button,DropdownMenu,@@ -19,7 +19,8 @@ import {DropdownMenuSeparator,DropdownMenuTrigger,DialogTemplate,- Dialog, DialogTrigger+ Dialog,+ DialogTrigger} from '../../ui/';import { cn } from '~/utils/';@@ -87,8 +88,9 @@ export default function NewConversationMenu() {// set the current modelconst onSelectEndpoint = (newEndpoint) => {setMenuOpen(false);- if (!newEndpoint) { return; }- else {+ if (!newEndpoint) {+ return;+ } else {newConversation({}, { endpoint: newEndpoint });}};@@ -101,7 +103,7 @@ export default function NewConversationMenu() {const currentConvo = getDefaultConversation({conversation,endpointsConfig,- preset: newPreset,+ preset: newPreset});setConversation(currentConvo);@@ -153,7 +155,7 @@ export default function NewConversationMenu() {</Button></DropdownMenuTrigger><DropdownMenuContent- className="w-96 dark:bg-gray-900 z-[100]"+ className="z-[100] w-96 dark:bg-gray-900"onCloseAutoFocus={(event) => event.preventDefault()}><DropdownMenuLabel@@ -166,11 +168,15 @@ export default function NewConversationMenu() {<DropdownMenuRadioGroupvalue={endpoint}onValueChange={onSelectEndpoint}- className="overflow-y-auto gap-1 flex flex-col"+ className="flex flex-col gap-1 overflow-y-auto">{showEndpoints &&(availableEndpoints.length ? (- <EndpointItems selectedEndpoint={endpoint} endpoints={availableEndpoints} onSelect={onSelectEndpoint} />+ <EndpointItems+ selectedEndpoint={endpoint}+ endpoints={availableEndpoints}+ onSelect={onSelectEndpoint}+ />) : (<DropdownMenuLabel className="dark:text-gray-300">No endpoint available.@@ -217,7 +223,10 @@ export default function NewConversationMenu() {<DropdownMenuSeparator /><DropdownMenuRadioGrouponValueChange={onSelectPreset}- className={cn('overflow-y-auto overflow-x-hidden', showEndpoints ? 'max-h-[210px]' : 'max-h-[315px]')}+ className={cn(+ 'overflow-y-auto overflow-x-hidden',+ showEndpoints ? 'max-h-[210px]' : 'max-h-[315px]'+ )}>{showPresets &&(presets.length ? (diff --git a/client/src/components/Input/PluginsOptions/index.jsx b/client/src/components/Input/PluginsOptions/index.jsxindex 62408db8ae..d6fdb70d70 100644--- a/client/src/components/Input/PluginsOptions/index.jsx+++ b/client/src/components/Input/PluginsOptions/index.jsx@@ -14,7 +14,7 @@ import { Settings, AgentSettings } from '../../Endpoints/Plugins/';import { cn } from '~/utils/';import store from '~/store';import { useAuthContext } from '~/hooks/AuthContext';-import { useAvailablePluginsQuery } from '~/data-provider';+import { useAvailablePluginsQuery } from '@librechat/data-provider';function PluginsOptions() {const { data: allPlugins } = useAvailablePluginsQuery();diff --git a/client/src/components/MessageHandler/index.jsx b/client/src/components/MessageHandler/index.jsxindex 7a11fe5b09..a3e04a0fc7 100644--- a/client/src/components/MessageHandler/index.jsx+++ b/client/src/components/MessageHandler/index.jsx@@ -1,7 +1,6 @@import { useEffect } from 'react';import { useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil';-import { SSE } from '~/data-provider/sse.mjs';-import createPayload from '~/data-provider/createPayload';+import { SSE, createPayload } from '@librechat/data-provider';import store from '~/store';import { useAuthContext } from '~/hooks/AuthContext';@@ -224,7 +223,8 @@ export default function MessageHandler() {events.onopen = () => console.log('connection is opened');- events.oncancel = () => abortConversation(message?.conversationId || submission?.conversationId);+ events.oncancel = () =>+ abortConversation(message?.conversationId || submission?.conversationId);events.onerror = function (e) {console.log('error in opening conn.');diff --git a/client/src/components/Messages/Message.jsx b/client/src/components/Messages/Message.jsxindex 31cd9921cd..635127e7dd 100644--- a/client/src/components/Messages/Message.jsx+++ b/client/src/components/Messages/Message.jsx@@ -10,7 +10,7 @@ import HoverButtons from './HoverButtons';import SiblingSwitch from './SiblingSwitch';import getIcon from '~/utils/getIcon';import { useMessageHandler } from '~/utils/handleSubmit';-import { useGetConversationByIdQuery } from '~/data-provider';+import { useGetConversationByIdQuery } from '@librechat/data-provider';import { cn } from '~/utils/';import store from '~/store';import getError from '~/utils/getError';@@ -192,7 +192,7 @@ export default function Message({<div className="markdown prose dark:prose-invert light w-full break-words">{!isCreatedByUser ? (<>- <Content content={text} message={message}/>+ <Content content={text} message={message} /></>) : (<>{text}</>diff --git a/client/src/components/Nav/ClearConvos.tsx b/client/src/components/Nav/ClearConvos.tsxindex da51542d63..2055e62ef6 100644--- a/client/src/components/Nav/ClearConvos.tsx+++ b/client/src/components/Nav/ClearConvos.tsx@@ -1,7 +1,7 @@import { useState, useEffect, useCallback } from 'react';import { Dialog, DialogTemplate } from '../ui/';import { ClearChatsButton } from './SettingsTabs/';-import { useClearConversationsMutation } from '~/data-provider';+import { useClearConversationsMutation } from '@librechat/data-provider';import store from '~/store';const ClearConvos = ({ open, onOpenChange }) => {@@ -32,7 +32,9 @@ const ClearConvos = ({ open, onOpenChange }) => {<DialogTemplatetitle="Clear conversations"description="Are you sure you want to clear all conversations? This is irreversible."- leftButtons={<ClearChatsButton showText={false} confirmClear={confirmClear} onClick={clearConvos} />}+ leftButtons={+ <ClearChatsButton showText={false} confirmClear={confirmClear} onClick={clearConvos} />+ }/></Dialog>);diff --git a/client/src/components/Nav/Settings.jsx b/client/src/components/Nav/Settings.jsxindex 2fbdf0dc8e..88dbd079fc 100644--- a/client/src/components/Nav/Settings.jsx+++ b/client/src/components/Nav/Settings.jsx@@ -4,7 +4,7 @@ import { General } from './SettingsTabs/';import { CogIcon } from '~/components/svg';import { useEffect, useState } from 'react';import { cn } from '~/utils/';-import { useClearConversationsMutation } from '~/data-provider';+import { useClearConversationsMutation } from '@librechat/data-provider';import store from '~/store';export default function Settings({ open, onOpenChange }) {diff --git a/client/src/components/Nav/SettingsTabs/General.tsx b/client/src/components/Nav/SettingsTabs/General.tsxindex 1d2633e3e5..d3d8907b06 100644--- a/client/src/components/Nav/SettingsTabs/General.tsx+++ b/client/src/components/Nav/SettingsTabs/General.tsx@@ -2,9 +2,15 @@ import * as Tabs from '@radix-ui/react-tabs';import { CheckIcon } from 'lucide-react';import { ThemeContext } from '~/hooks/ThemeContext';import React, { useState, useContext, useCallback } from 'react';-import { useClearConversationsMutation } from '~/data-provider';+import { useClearConversationsMutation } from '@librechat/data-provider';-export const ThemeSelector = ({ theme, onChange }: { theme: string, onChange: (value: string) => void }) => (+export const ThemeSelector = ({+ theme,+ onChange+}: {+ theme: string;+ onChange: (value: string) => void;+}) => (<div className="flex items-center justify-between"><div>Theme</div><select@@ -19,7 +25,15 @@ export const ThemeSelector = ({ theme, onChange }: { theme: string, onChange: (v</div>);-export const ClearChatsButton = ({ confirmClear, showText = true, onClick }: { confirmClear: boolean, showText: boolean, onClick: () => void }) => (+export const ClearChatsButton = ({+ confirmClear,+ showText = true,+ onClick+}: {+ confirmClear: boolean;+ showText: boolean;+ onClick: () => void;+}) => (<div className="flex items-center justify-between">{showText && <div>Clear all chats</div>}<button@@ -45,7 +59,7 @@ function General() {const { theme, setTheme } = useContext(ThemeContext);const clearConvosMutation = useClearConversationsMutation();const [confirmClear, setConfirmClear] = useState(false);-+const clearConvos = useCallback(() => {if (confirmClear) {console.log('Clearing conversations...');@@ -56,18 +70,21 @@ function General() {}}, [confirmClear, clearConvosMutation]);- const changeTheme = useCallback((value: string) => {- setTheme(value);- }, [setTheme]);+ const changeTheme = useCallback(+ (value: string) => {+ setTheme(value);+ },+ [setTheme]+ );return (- <Tabs.Content value="general" role="tabpanel" className="w-full md:min-h-[300px]" >+ <Tabs.Content value="general" role="tabpanel" className="w-full md:min-h-[300px]"><div className="flex flex-col gap-3 text-sm text-gray-600 dark:text-gray-300"><div className="border-b pb-3 last-of-type:border-b-0 dark:border-gray-700"><ThemeSelector theme={theme} onChange={changeTheme} /></div><div className="border-b pb-3 last-of-type:border-b-0 dark:border-gray-700">- <ClearChatsButton confirmClear={confirmClear} onClick={clearConvos} showText={true}/>+ <ClearChatsButton confirmClear={confirmClear} onClick={clearConvos} showText={true} /></div></div></Tabs.Content>diff --git a/client/src/components/Nav/index.jsx b/client/src/components/Nav/index.jsxindex aa78502824..9810197a4a 100644--- a/client/src/components/Nav/index.jsx+++ b/client/src/components/Nav/index.jsx@@ -1,6 +1,6 @@/* eslint-disable react-hooks/exhaustive-deps */import { useCallback, useEffect, useRef, useState } from 'react';-import { useGetConversationsQuery, useSearchQuery } from '~/data-provider';+import { useGetConversationsQuery, useSearchQuery } from '@librechat/data-provider';import { useRecoilValue, useSetRecoilState } from 'recoil';import Conversations from '../Conversations';@@ -9,7 +9,6 @@ import NewChat from './NewChat';import Pages from '../Conversations/Pages';import Panel from '../svg/Panel';import Spinner from '../svg/Spinner';-// import { ThemeContext } from '~/hooks/ThemeContext';import { cn } from '~/utils/';import store from '~/store';import { useAuthContext } from '~/hooks/AuthContext';@@ -38,7 +37,6 @@ import useDebounce from '~/hooks/useDebounce';export default function Nav({ navVisible, setNavVisible }) {const [isHovering, setIsHovering] = useState(false);const { isAuthenticated } = useAuthContext();- // const { theme, } = useContext(ThemeContext);const containerRef = useRef(null);const scrollPositionRef = useRef(null);@@ -159,7 +157,8 @@ export default function Nav({ navVisible, setNavVisible }) {const isMobile = () => {const userAgent = typeof window.navigator === 'undefined' ? '' : navigator.userAgent;- const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i;+ const mobileRegex =+ /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i;return mobileRegex.test(userAgent);};diff --git a/client/src/components/Plugins/Store/PluginAuthForm.tsx b/client/src/components/Plugins/Store/PluginAuthForm.tsxindex 3f98450967..9939afb745 100644--- a/client/src/components/Plugins/Store/PluginAuthForm.tsx+++ b/client/src/components/Plugins/Store/PluginAuthForm.tsx@@ -1,4 +1,4 @@-import { TPlugin, TPluginAuthConfig } from '~/data-provider';+import { TPlugin, TPluginAuthConfig } from '@librechat/data-provider';import { Save } from 'lucide-react';import { useForm } from 'react-hook-form';import { TPluginAction } from './PluginStoreDialog';diff --git a/client/src/components/Plugins/Store/PluginStoreDialog.tsx b/client/src/components/Plugins/Store/PluginStoreDialog.tsxindex 4122d4dbc6..7a27d634c5 100644--- a/client/src/components/Plugins/Store/PluginStoreDialog.tsx+++ b/client/src/components/Plugins/Store/PluginStoreDialog.tsx@@ -4,7 +4,11 @@ import { useRecoilState } from 'recoil';import { X } from 'lucide-react';import store from '~/store';import { PluginStoreItem, PluginPagination, PluginAuthForm } from '.';-import { useAvailablePluginsQuery, useUpdateUserPluginsMutation, TPlugin } from '~/data-provider';+import {+ useAvailablePluginsQuery,+ useUpdateUserPluginsMutation,+ TPlugin+} from '@librechat/data-provider';import { useAuthContext } from '~/hooks/AuthContext';type TPluginStoreDialogProps = {@@ -95,8 +99,7 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {if (width < 501) {setItemsPerPage(8);return;- } else- if (width < 640) {+ } else if (width < 640) {columns = 2;} else if (width < 1024) {columns = 3;@@ -140,7 +143,7 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {<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 max-sm:h-full overflow-y-auto transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all dark:bg-gray-900 sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl">+ <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"><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">diff --git a/client/src/components/Plugins/Store/PluginStoreItem.tsx b/client/src/components/Plugins/Store/PluginStoreItem.tsxindex 542e64bdc4..af2641fd5c 100644--- a/client/src/components/Plugins/Store/PluginStoreItem.tsx+++ b/client/src/components/Plugins/Store/PluginStoreItem.tsx@@ -1,4 +1,4 @@-import { TPlugin } from '~/data-provider';+import { TPlugin } from '@librechat/data-provider';import { XCircle, DownloadCloud } from 'lucide-react';type TPluginStoreItemProps = {diff --git a/client/src/components/Plugins/Store/__tests__/PluginStoreDialog.spec.tsx b/client/src/components/Plugins/Store/__tests__/PluginStoreDialog.spec.tsxindex 4c17d4e421..e0e4471ff3 100644--- a/client/src/components/Plugins/Store/__tests__/PluginStoreDialog.spec.tsx+++ b/client/src/components/Plugins/Store/__tests__/PluginStoreDialog.spec.tsx@@ -1,9 +1,9 @@import { render } from 'layout-test-utils';import PluginStoreDialog from '../PluginStoreDialog';import userEvent from '@testing-library/user-event';-import * as mockDataProvider from '~/data-provider';+import * as mockDataProvider from '@librechat/data-provider';-jest.mock('~/data-provider');+jest.mock('@librechat/data-provider');class ResizeObserver {observe() {diff --git a/client/src/components/ui/Landing.tsx b/client/src/components/ui/Landing.tsxindex 26745b5c45..0a4a04a515 100644--- a/client/src/components/ui/Landing.tsx+++ b/client/src/components/ui/Landing.tsx@@ -5,7 +5,7 @@ import SunIcon from '../svg/SunIcon';import LightningIcon from '../svg/LightningIcon';import CautionIcon from '../svg/CautionIcon';import store from '~/store';-import { useGetStartupConfig } from '~/data-provider';+import { useGetStartupConfig } from '@librechat/data-provider';export default function Landing() {const { data: config } = useGetStartupConfig();diff --git a/client/src/hooks/AuthContext.tsx b/client/src/hooks/AuthContext.tsxindex e6f8d4f73f..be3fc41c32 100644--- a/client/src/hooks/AuthContext.tsx+++ b/client/src/hooks/AuthContext.tsx@@ -16,7 +16,7 @@ import {useGetUserQuery,useRefreshTokenMutation,TLoginUser-} from '~/data-provider';+} from '@librechat/data-provider';import { useNavigate } from 'react-router-dom';export type TAuthContext = {@@ -35,10 +35,20 @@ export type TUserContext = {redirect?: string;};+export type TAuthConfig = {+ loginRedirect: string;+};+//@ts-ignore - index expression is not of type numberwindow['errorTimeout'] = undefined;const AuthContext = createContext<TAuthContext | undefined>(undefined);-const AuthContextProvider = ({ children }: { children: ReactNode }) => {+const AuthContextProvider = ({+ authConfig,+ children+}: {+ authConfig: TAuthConfig;+ children: ReactNode;+}) => {const [user, setUser] = useState<TUser | undefined>(undefined);const [token, setToken] = useState<string | undefined>(undefined);const [error, setError] = useState<string | undefined>(undefined);@@ -60,7 +70,7 @@ const AuthContextProvider = ({ children }: { children: ReactNode }) => {setError(error);}, 400);}- }+ };const setUserContext = useCallback((userContext: TUserContext) => {@@ -79,7 +89,7 @@ const AuthContextProvider = ({ children }: { children: ReactNode }) => {[navigate]);- const getCookieValue = (key) => {+ const getCookieValue = (key: string) => {let keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');return keyValue ? keyValue[2] : null;};@@ -157,7 +167,7 @@ const AuthContextProvider = ({ children }: { children: ReactNode }) => {// setError(error.message);// }// });- //+ //// }, [setUserContext]);// useEffect(() => {diff --git a/client/src/routes/Chat.jsx b/client/src/routes/Chat.jsxindex bed43b7f67..9b6cef6d01 100644--- a/client/src/routes/Chat.jsx+++ b/client/src/routes/Chat.jsx@@ -11,7 +11,7 @@ import {useGetMessagesByConvoId,useGetConversationByIdMutation,useGetStartupConfig-} from '~/data-provider';+} from '@librechat/data-provider';export default function Chat() {const [shouldNavigate, setShouldNavigate] = useState(true);diff --git a/client/src/routes/Root.jsx b/client/src/routes/Root.jsxindex 902fd8e2b7..31bdae8025 100644--- a/client/src/routes/Root.jsx+++ b/client/src/routes/Root.jsx@@ -4,7 +4,7 @@ import {useGetEndpointsQuery,useGetPresetsQuery,useGetSearchEnabledQuery-} from '~/data-provider';+} from '@librechat/data-provider';import MessageHandler from '../components/MessageHandler';import MobileNav from '../components/Nav/MobileNav';diff --git a/package-lock.json b/package-lock.jsonindex 8f5a2dafe4..a61580e9df 100644--- a/package-lock.json+++ b/package-lock.json@@ -11,7 +11,8 @@"license": "ISC","workspaces": ["api",- "client"+ "client",+ "packages/data-provider"],"dependencies": {"axios": "^1.4.0",@@ -370,6 +371,7 @@"@fortawesome/free-solid-svg-icons": "^6.4.0","@fortawesome/react-fontawesome": "^0.2.0","@headlessui/react": "^1.7.13",+ "@librechat/data-provider": "*","@radix-ui/react-alert-dialog": "^1.0.2","@radix-ui/react-checkbox": "^1.0.3","@radix-ui/react-dialog": "^1.0.2",@@ -4902,6 +4904,50 @@"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz","integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="},+ "node_modules/@isaacs/cliui": {+ "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",+ "strip-ansi": "^7.0.1",+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",+ "wrap-ansi": "^8.1.0",+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@isaacs/cliui/node_modules/ansi-regex": {+ "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"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"+ }+ },+ "node_modules/@isaacs/cliui/node_modules/strip-ansi": {+ "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"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"+ }+ },"node_modules/@istanbuljs/load-nyc-config": {"version": "1.1.0","resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",@@ -5760,6 +5806,10 @@"resolved": "api","link": true},+ "node_modules/@librechat/data-provider": {+ "resolved": "packages/data-provider",+ "link": true+ },"node_modules/@librechat/frontend": {"resolved": "client","link": true@@ -5856,6 +5906,16 @@"node": ">= 8"}},+ "node_modules/@pkgjs/parseargs": {+ "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.35.0","resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.35.0.tgz",@@ -6754,6 +6814,140 @@"node": ">=14"}},+ "node_modules/@rollup/plugin-commonjs": {+ "version": "25.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz",+ "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==",+ "dev": true,+ "dependencies": {+ "@rollup/pluginutils": "^5.0.1",+ "commondir": "^1.0.1",+ "estree-walker": "^2.0.2",+ "glob": "^8.0.3",+ "is-reference": "1.2.1",+ "magic-string": "^0.27.0"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "rollup": "^2.68.0||^3.0.0"+ },+ "peerDependenciesMeta": {+ "rollup": {+ "optional": true+ }+ }+ },+ "node_modules/@rollup/plugin-commonjs/node_modules/@rollup/pluginutils": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",+ "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",+ "dev": true,+ "dependencies": {+ "@types/estree": "^1.0.0",+ "estree-walker": "^2.0.2",+ "picomatch": "^2.3.1"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "rollup": "^1.20.0||^2.0.0||^3.0.0"+ },+ "peerDependenciesMeta": {+ "rollup": {+ "optional": true+ }+ }+ },+ "node_modules/@rollup/plugin-commonjs/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==",+ "dev": true,+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "node_modules/@rollup/plugin-commonjs/node_modules/glob": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",+ "dev": true,+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^5.0.1",+ "once": "^1.3.0"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": {+ "version": "5.1.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",+ "dev": true,+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@rollup/plugin-node-resolve": {+ "version": "15.1.0",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz",+ "integrity": "sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==",+ "dev": true,+ "dependencies": {+ "@rollup/pluginutils": "^5.0.1",+ "@types/resolve": "1.20.2",+ "deepmerge": "^4.2.2",+ "is-builtin-module": "^3.2.1",+ "is-module": "^1.0.0",+ "resolve": "^1.22.1"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "rollup": "^2.78.0||^3.0.0"+ },+ "peerDependenciesMeta": {+ "rollup": {+ "optional": true+ }+ }+ },+ "node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",+ "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",+ "dev": true,+ "dependencies": {+ "@types/estree": "^1.0.0",+ "estree-walker": "^2.0.2",+ "picomatch": "^2.3.1"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "rollup": "^1.20.0||^2.0.0||^3.0.0"+ },+ "peerDependenciesMeta": {+ "rollup": {+ "optional": true+ }+ }+ },"node_modules/@rollup/pluginutils": {"version": "4.2.1","resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",@@ -9363,6 +9557,18 @@"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz","integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ=="},+ "node_modules/builtin-modules": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",+ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",+ "dev": true,+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/busboy": {"version": "1.6.0","resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",@@ -12641,6 +12847,34 @@"is-callable": "^1.1.3"}},+ "node_modules/foreground-child": {+ "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"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/foreground-child/node_modules/signal-exit": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz",+ "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==",+ "dev": true,+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/form-data": {"version": "4.0.0","resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",@@ -14247,6 +14481,21 @@"node": ">=4"}},+ "node_modules/is-builtin-module": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",+ "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",+ "dev": true,+ "dependencies": {+ "builtin-modules": "^3.3.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/is-callable": {"version": "1.2.7","resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",@@ -14359,6 +14608,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/is-module": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",+ "dev": true+ },"node_modules/is-negative-zero": {"version": "2.0.2","resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",@@ -14419,6 +14674,15 @@"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==","dev": true},+ "node_modules/is-reference": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",+ "dev": true,+ "dependencies": {+ "@types/estree": "*"+ }+ },"node_modules/is-regex": {"version": "1.1.4","resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",@@ -14718,6 +14982,24 @@"readable-stream": "^3.6.0"}},+ "node_modules/jackspeak": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz",+ "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==",+ "dev": true,+ "dependencies": {+ "@isaacs/cliui": "^8.0.2"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ },+ "optionalDependencies": {+ "@pkgjs/parseargs": "^0.11.0"+ }+ },"node_modules/jake": {"version": "10.8.7","resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz",@@ -18076,6 +18358,18 @@"lz-string": "bin/bin.js"}},+ "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==",+ "dev": true,+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.4.13"+ },+ "engines": {+ "node": ">=12"+ }+ },"node_modules/make-dir": {"version": "2.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",@@ -19117,6 +19411,15 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/minipass": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz",+ "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==",+ "dev": true,+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },"node_modules/mkdirp": {"version": "1.0.4","resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",@@ -20431,6 +20734,31 @@"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz","integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="},+ "node_modules/path-scurry": {+ "version": "1.10.0",+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.0.tgz",+ "integrity": "sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==",+ "dev": true,+ "dependencies": {+ "lru-cache": "^9.1.1 || ^10.0.0",+ "minipass": "^5.0.0 || ^6.0.2"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/path-scurry/node_modules/lru-cache": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",+ "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",+ "dev": true,+ "engines": {+ "node": "14 || >=16.14"+ }+ },"node_modules/path-to-regexp": {"version": "0.1.7","resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",@@ -22965,9 +23293,9 @@}},"node_modules/rollup": {- "version": "3.24.1",- "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.24.1.tgz",- "integrity": "sha512-REHe5dx30ERBRFS0iENPHy+t6wtSEYkjrhwNsLyh3qpRaZ1+aylvMUdMBUHWUD/RjjLmLzEvY8Z9XRlpcdIkHA==",+ "version": "3.26.0",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.0.tgz",+ "integrity": "sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==","dev": true,"bin": {"rollup": "dist/bin/rollup"@@ -22980,6 +23308,91 @@"fsevents": "~2.3.2"}},+ "node_modules/rollup-plugin-typescript2": {+ "version": "0.35.0",+ "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.35.0.tgz",+ "integrity": "sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==",+ "dev": true,+ "dependencies": {+ "@rollup/pluginutils": "^4.1.2",+ "find-cache-dir": "^3.3.2",+ "fs-extra": "^10.0.0",+ "semver": "^7.3.7",+ "tslib": "^2.4.0"+ },+ "peerDependencies": {+ "rollup": ">=1.26.3",+ "typescript": ">=2.4.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/lru-cache": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",+ "dev": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/rollup-plugin-typescript2/node_modules/semver": {+ "version": "7.5.3",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",+ "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",+ "dev": true,+ "dependencies": {+ "lru-cache": "^6.0.0"+ },+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/rollup-plugin-typescript2/node_modules/universalify": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",+ "dev": true,+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/rollup-plugin-typescript2/node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "dev": true+ },"node_modules/run-async": {"version": "3.0.0","resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",@@ -23734,6 +24147,36 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/string-width-cjs": {+ "name": "string-width",+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/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+ },+ "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"+ }+ },"node_modules/string-width/node_modules/ansi-regex": {"version": "6.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",@@ -23834,6 +24277,19 @@"node": ">=8"}},+ "node_modules/strip-ansi-cjs": {+ "name": "strip-ansi",+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/strip-bom": {"version": "4.0.0","resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",@@ -25886,6 +26342,86 @@"url": "https://github.com/chalk/wrap-ansi?sponsor=1"}},+ "node_modules/wrap-ansi-cjs": {+ "name": "wrap-ansi",+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true+ },+ "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+ },+ "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"+ }+ },+ "node_modules/wrap-ansi-cjs/node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/wrap-ansi/node_modules/ansi-regex": {"version": "6.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",@@ -26095,6 +26631,137 @@"type": "github","url": "https://github.com/sponsors/wooorm"}+ },+ "packages/data-provider": {+ "name": "@librechat/data-provider",+ "version": "0.1.0",+ "license": "ISC",+ "dependencies": {+ "@tanstack/react-query": "^4.28.0",+ "axios": "^1.3.4"+ },+ "devDependencies": {+ "@babel/preset-env": "^7.21.5",+ "@babel/preset-react": "^7.18.6",+ "@babel/preset-typescript": "^7.21.0",+ "@rollup/plugin-commonjs": "^25.0.2",+ "@rollup/plugin-node-resolve": "^15.1.0",+ "@tanstack/query-core": "^4.29.19",+ "@types/jest": "^29.5.2",+ "@types/node": "^20.3.0",+ "jest": "^29.5.0",+ "jest-junit": "^16.0.0",+ "rimraf": "^5.0.1",+ "rollup": "^3.26.0",+ "rollup-plugin-typescript2": "^0.35.0",+ "typescript": "^5.0.4"+ }+ },+ "packages/data-provider/node_modules/@tanstack/query-core": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.29.19.tgz",+ "integrity": "sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw==",+ "dev": true,+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },+ "packages/data-provider/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==",+ "dev": true,+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "packages/data-provider/node_modules/glob": {+ "version": "10.3.1",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.1.tgz",+ "integrity": "sha512-9BKYcEeIs7QwlCYs+Y3GBvqAMISufUS0i2ELd11zpZjxI5V9iyRj0HgzB5/cLf2NY4vcYBTYzJ7GIui7j/4DOw==",+ "dev": true,+ "dependencies": {+ "foreground-child": "^3.1.0",+ "jackspeak": "^2.0.3",+ "minimatch": "^9.0.1",+ "minipass": "^5.0.0 || ^6.0.2",+ "path-scurry": "^1.10.0"+ },+ "bin": {+ "glob": "dist/cjs/src/bin.js"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "packages/data-provider/node_modules/minimatch": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.2.tgz",+ "integrity": "sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==",+ "dev": true,+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "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==",+ "dev": true,+ "dependencies": {+ "glob": "^10.2.5"+ },+ "bin": {+ "rimraf": "dist/cjs/src/bin.js"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "packages/ux-shared": {+ "name": "@librechat/ux-shared",+ "version": "0.1.0",+ "extraneous": true,+ "license": "ISC",+ "dependencies": {+ "@headlessui/react": "^1.7.13",+ "lucide-react": "^0.220.0",+ "react": "^18.2.0",+ "react-dom": "^18.2.0",+ "react-hook-form": "^7.43.9",+ "react-router-dom": "^6.11.2",+ "tailwindcss-animate": "^1.0.5"+ },+ "devDependencies": {+ "@babel/preset-env": "^7.21.5",+ "@babel/preset-react": "^7.18.6",+ "@babel/preset-typescript": "^7.21.0",+ "@rollup/plugin-commonjs": "^25.0.2",+ "@rollup/plugin-node-resolve": "^15.1.0",+ "@tanstack/query-core": "^4.29.19",+ "@types/jest": "^29.5.2",+ "@types/node": "^20.3.0",+ "jest": "^29.5.0",+ "jest-junit": "^16.0.0",+ "rimraf": "^5.0.1",+ "rollup": "^3.26.0",+ "rollup-plugin-typescript2": "^0.35.0",+ "tailwindcss": "^3.2.6",+ "typescript": "^5.0.4"+ }}},"dependencies": {@@ -29070,6 +29737,37 @@"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz","integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="},+ "@isaacs/cliui": {+ "version": "8.0.2",+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",+ "dev": true,+ "requires": {+ "string-width": "^5.1.2",+ "string-width-cjs": "npm:string-width@^4.2.0",+ "strip-ansi": "^7.0.1",+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",+ "wrap-ansi": "^8.1.0",+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"+ },+ "dependencies": {+ "ansi-regex": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",+ "dev": true+ },+ "strip-ansi": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",+ "dev": true,+ "requires": {+ "ansi-regex": "^6.0.1"+ }+ }+ }+ },"@istanbuljs/load-nyc-config": {"version": "1.1.0","resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",@@ -29814,6 +30512,75 @@}}},+ "@librechat/data-provider": {+ "version": "file:packages/data-provider",+ "requires": {+ "@babel/preset-env": "^7.21.5",+ "@babel/preset-react": "^7.18.6",+ "@babel/preset-typescript": "^7.21.0",+ "@rollup/plugin-commonjs": "^25.0.2",+ "@rollup/plugin-node-resolve": "^15.1.0",+ "@tanstack/query-core": "^4.29.19",+ "@tanstack/react-query": "^4.28.0",+ "@types/jest": "^29.5.2",+ "@types/node": "^20.3.0",+ "axios": "^1.3.4",+ "jest": "^29.5.0",+ "jest-junit": "^16.0.0",+ "rimraf": "^5.0.1",+ "rollup": "^3.26.0",+ "rollup-plugin-typescript2": "^0.35.0",+ "typescript": "^5.0.4"+ },+ "dependencies": {+ "@tanstack/query-core": {+ "version": "4.29.19",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.29.19.tgz",+ "integrity": "sha512-uPe1DukeIpIHpQi6UzIgBcXsjjsDaLnc7hF+zLBKnaUlh7jFE/A+P8t4cU4VzKPMFB/C970n/9SxtpO5hmIRgw==",+ "dev": true+ },+ "brace-expansion": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dev": true,+ "requires": {+ "balanced-match": "^1.0.0"+ }+ },+ "glob": {+ "version": "10.3.1",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.1.tgz",+ "integrity": "sha512-9BKYcEeIs7QwlCYs+Y3GBvqAMISufUS0i2ELd11zpZjxI5V9iyRj0HgzB5/cLf2NY4vcYBTYzJ7GIui7j/4DOw==",+ "dev": true,+ "requires": {+ "foreground-child": "^3.1.0",+ "jackspeak": "^2.0.3",+ "minimatch": "^9.0.1",+ "minipass": "^5.0.0 || ^6.0.2",+ "path-scurry": "^1.10.0"+ }+ },+ "minimatch": {+ "version": "9.0.2",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.2.tgz",+ "integrity": "sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==",+ "dev": true,+ "requires": {+ "brace-expansion": "^2.0.1"+ }+ },+ "rimraf": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz",+ "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==",+ "dev": true,+ "requires": {+ "glob": "^10.2.5"+ }+ }+ }+ },"@librechat/frontend": {"version": "file:client","requires": {@@ -29831,6 +30598,7 @@"@fortawesome/free-solid-svg-icons": "^6.4.0","@fortawesome/react-fontawesome": "^0.2.0","@headlessui/react": "^1.7.13",+ "@librechat/data-provider": "*","@radix-ui/react-alert-dialog": "^1.0.2","@radix-ui/react-checkbox": "^1.0.3","@radix-ui/react-dialog": "^1.0.2",@@ -30003,6 +30771,13 @@"fastq": "^1.6.0"}},+ "@pkgjs/parseargs": {+ "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+ },"@playwright/test": {"version": "1.35.0","resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.35.0.tgz",@@ -30490,6 +31265,91 @@"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.6.3.tgz","integrity": "sha512-EXJysQ7J3veRECd0kZFQwYYd5sJMcq2O/m60zu1W2l3oVQ9xtub8jTOtYRE0+M2iomyG/W3Ps7+vp2kna0C27Q=="},+ "@rollup/plugin-commonjs": {+ "version": "25.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz",+ "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==",+ "dev": true,+ "requires": {+ "@rollup/pluginutils": "^5.0.1",+ "commondir": "^1.0.1",+ "estree-walker": "^2.0.2",+ "glob": "^8.0.3",+ "is-reference": "1.2.1",+ "magic-string": "^0.27.0"+ },+ "dependencies": {+ "@rollup/pluginutils": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",+ "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",+ "dev": true,+ "requires": {+ "@types/estree": "^1.0.0",+ "estree-walker": "^2.0.2",+ "picomatch": "^2.3.1"+ }+ },+ "brace-expansion": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dev": true,+ "requires": {+ "balanced-match": "^1.0.0"+ }+ },+ "glob": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",+ "dev": true,+ "requires": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^5.0.1",+ "once": "^1.3.0"+ }+ },+ "minimatch": {+ "version": "5.1.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",+ "dev": true,+ "requires": {+ "brace-expansion": "^2.0.1"+ }+ }+ }+ },+ "@rollup/plugin-node-resolve": {+ "version": "15.1.0",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz",+ "integrity": "sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==",+ "dev": true,+ "requires": {+ "@rollup/pluginutils": "^5.0.1",+ "@types/resolve": "1.20.2",+ "deepmerge": "^4.2.2",+ "is-builtin-module": "^3.2.1",+ "is-module": "^1.0.0",+ "resolve": "^1.22.1"+ },+ "dependencies": {+ "@rollup/pluginutils": {+ "version": "5.0.2",+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",+ "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",+ "dev": true,+ "requires": {+ "@types/estree": "^1.0.0",+ "estree-walker": "^2.0.2",+ "picomatch": "^2.3.1"+ }+ }+ }+ },"@rollup/pluginutils": {"version": "4.2.1","resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",@@ -32556,6 +33416,12 @@"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz","integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ=="},+ "builtin-modules": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",+ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",+ "dev": true+ },"busboy": {"version": "1.6.0","resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",@@ -35021,6 +35887,24 @@"is-callable": "^1.1.3"}},+ "foreground-child": {+ "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,+ "requires": {+ "cross-spawn": "^7.0.0",+ "signal-exit": "^4.0.1"+ },+ "dependencies": {+ "signal-exit": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz",+ "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==",+ "dev": true+ }+ }+ },"form-data": {"version": "4.0.0","resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",@@ -36167,6 +37051,15 @@"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz","integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ=="},+ "is-builtin-module": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",+ "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",+ "dev": true,+ "requires": {+ "builtin-modules": "^3.3.0"+ }+ },"is-callable": {"version": "1.2.7","resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",@@ -36231,6 +37124,12 @@"integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==","dev": true},+ "is-module": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",+ "dev": true+ },"is-negative-zero": {"version": "2.0.2","resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",@@ -36267,6 +37166,15 @@"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==","dev": true},+ "is-reference": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",+ "dev": true,+ "requires": {+ "@types/estree": "*"+ }+ },"is-regex": {"version": "1.1.4","resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",@@ -36481,6 +37389,16 @@"readable-stream": "^3.6.0"}},+ "jackspeak": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz",+ "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==",+ "dev": true,+ "requires": {+ "@isaacs/cliui": "^8.0.2",+ "@pkgjs/parseargs": "^0.11.0"+ }+ },"jake": {"version": "10.8.7","resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz",@@ -38860,6 +39778,15 @@"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==","dev": true},+ "magic-string": {+ "version": "0.27.0",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",+ "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",+ "dev": true,+ "requires": {+ "@jridgewell/sourcemap-codec": "^1.4.13"+ }+ },"make-dir": {"version": "2.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",@@ -39538,6 +40465,12 @@"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz","integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="},+ "minipass": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz",+ "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==",+ "dev": true+ },"mkdirp": {"version": "1.0.4","resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",@@ -40500,6 +41433,24 @@"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz","integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="},+ "path-scurry": {+ "version": "1.10.0",+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.0.tgz",+ "integrity": "sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==",+ "dev": true,+ "requires": {+ "lru-cache": "^9.1.1 || ^10.0.0",+ "minipass": "^5.0.0 || ^6.0.2"+ },+ "dependencies": {+ "lru-cache": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",+ "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",+ "dev": true+ }+ }+ },"path-to-regexp": {"version": "0.1.7","resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",@@ -42147,14 +43098,80 @@}},"rollup": {- "version": "3.24.1",- "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.24.1.tgz",- "integrity": "sha512-REHe5dx30ERBRFS0iENPHy+t6wtSEYkjrhwNsLyh3qpRaZ1+aylvMUdMBUHWUD/RjjLmLzEvY8Z9XRlpcdIkHA==",+ "version": "3.26.0",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.0.tgz",+ "integrity": "sha512-YzJH0eunH2hr3knvF3i6IkLO/jTjAEwU4HoMUbQl4//Tnl3ou0e7P5SjxdDr8HQJdeUJShlbEHXrrnEHy1l7Yg==","dev": true,"requires": {"fsevents": "~2.3.2"}},+ "rollup-plugin-typescript2": {+ "version": "0.35.0",+ "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.35.0.tgz",+ "integrity": "sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==",+ "dev": true,+ "requires": {+ "@rollup/pluginutils": "^4.1.2",+ "find-cache-dir": "^3.3.2",+ "fs-extra": "^10.0.0",+ "semver": "^7.3.7",+ "tslib": "^2.4.0"+ },+ "dependencies": {+ "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,+ "requires": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ }+ },+ "jsonfile": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",+ "dev": true,+ "requires": {+ "graceful-fs": "^4.1.6",+ "universalify": "^2.0.0"+ }+ },+ "lru-cache": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",+ "dev": true,+ "requires": {+ "yallist": "^4.0.0"+ }+ },+ "semver": {+ "version": "7.5.3",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",+ "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",+ "dev": true,+ "requires": {+ "lru-cache": "^6.0.0"+ }+ },+ "universalify": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",+ "dev": true+ },+ "yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "dev": true+ }+ }+ },"run-async": {"version": "3.0.0","resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",@@ -42729,6 +43746,31 @@}}},+ "string-width-cjs": {+ "version": "npm:[email protected]",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "requires": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "dependencies": {+ "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+ },+ "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+ }+ }+ },"string.prototype.matchall": {"version": "4.0.8","resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",@@ -42786,6 +43828,15 @@"ansi-regex": "^5.0.1"}},+ "strip-ansi-cjs": {+ "version": "npm:[email protected]",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "dev": true,+ "requires": {+ "ansi-regex": "^5.0.1"+ }+ },"strip-bom": {"version": "4.0.0","resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",@@ -44257,6 +45308,66 @@}}},+ "wrap-ansi-cjs": {+ "version": "npm:[email protected]",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "dev": true,+ "requires": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "dependencies": {+ "ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "requires": {+ "color-convert": "^2.0.1"+ }+ },+ "color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "requires": {+ "color-name": "~1.1.4"+ }+ },+ "color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true+ },+ "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+ },+ "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+ },+ "string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "dev": true,+ "requires": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ }+ }+ }+ },"wrappy": {"version": "1.0.2","resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",diff --git a/package.json b/package.jsonindex b99ffbb125..633e047ca4 100644--- a/package.json+++ b/package.json@@ -4,16 +4,19 @@"description": "","workspaces": ["api",- "client"+ "client",+ "packages/data-provider"],"scripts": {"install": "node config/install.js","upgrade": "node config/upgrade.js","create-user": "node config/create-user.js","backend": "cross-env NODE_ENV=production node api/server/index.js",- "backend-dev": "cross-env NODE_ENV=development npx nodemon api/server/index.js",- "frontend": "cd client && npm run build",- "frontend-dev": "cd client && npm run dev",+ "backend:dev": "cross-env NODE_ENV=development npx nodemon api/server/index.js",+ "build:data-provider": "cd packages/data-provider && npm run build && npm link && cd ../../client && npm link @librechat/data-provider",+ "frontend": "npm run build:data-provider && cd client && npm run build",+ "frontend:ci": "npm run build:data-provider && cd client && npm run build:ci",+ "frontend:dev": "cd client && npm run dev","e2e": "playwright test --config=e2e/playwright.config.local.ts","e2e:ci": "playwright test --config=e2e/playwright.config.ts","e2e:debug": "cross-env PWDEBUG=1 playwright test --config=e2e/playwright.config.local.ts",@@ -66,7 +69,9 @@"ignore": ["api/data/","data",- "client/"+ "client/",+ "admin/",+ "packages/"]}}diff --git a/packages/data-provider/babel.config.js b/packages/data-provider/babel.config.jsnew file mode 100644index 0000000000..82cf589024--- /dev/null+++ b/packages/data-provider/babel.config.js@@ -0,0 +1,4 @@+module.exports = {+ presets: [['@babel/preset-env', {targets: {node: 'current'}}], '@babel/preset-typescript'],+ plugins: ['babel-plugin-replace-ts-export-assignment'],+};diff --git a/packages/data-provider/jest.config.js b/packages/data-provider/jest.config.jsnew file mode 100644index 0000000000..9b19ec82ad--- /dev/null+++ b/packages/data-provider/jest.config.js@@ -0,0 +1,18 @@+module.exports = {+ collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/node_modules/'],+ coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],+ coverageReporters: ['text', 'cobertura'],+ testResultsProcessor: 'jest-junit',+ moduleNameMapper: {+ '^@src/(.*)$': '<rootDir>/src/$1',+ },+ // coverageThreshold: {+ // global: {+ // statements: 58,+ // branches: 49,+ // functions: 50,+ // lines: 57,+ // },+ // },+ restoreMocks: true+};diff --git a/packages/data-provider/package.json b/packages/data-provider/package.jsonnew file mode 100644index 0000000000..321dfe1737--- /dev/null+++ b/packages/data-provider/package.json@@ -0,0 +1,47 @@+{+ "name": "@librechat/data-provider",+ "version": "0.1.0",+ "description": "data services for librechat apps",+ "main": "dist/index.js",+ "module": "dist/index.es.js",+ "types": "types/",+ "private": true,+ "scripts": {+ "clean": "rimraf dist",+ "build": "npm run clean && rollup -c --silent --bundleConfigAsCjs",+ "build:watch": "rollup -c -w",+ "test": "jest --coverage --watch",+ "test:ci": "jest --coverage --ci",+ "verify": "npm run test:ci"+ },+ "repository": {+ "type": "git",+ "url": "git+https://github.com/danny-avila/LibreChat.git"+ },+ "author": "",+ "license": "ISC",+ "bugs": {+ "url": "https://github.com/danny-avila/LibreChat/issues"+ },+ "homepage": "https://github.com/danny-avila/LibreChat#readme",+ "dependencies": {+ "@tanstack/react-query": "^4.28.0",+ "axios": "^1.3.4"+ },+ "devDependencies": {+ "@babel/preset-env": "^7.21.5",+ "@babel/preset-react": "^7.18.6",+ "@babel/preset-typescript": "^7.21.0",+ "@rollup/plugin-commonjs": "^25.0.2",+ "@rollup/plugin-node-resolve": "^15.1.0",+ "@tanstack/query-core": "^4.29.19",+ "@types/jest": "^29.5.2",+ "@types/node": "^20.3.0",+ "jest": "^29.5.0",+ "jest-junit": "^16.0.0",+ "rimraf": "^5.0.1",+ "rollup": "^3.26.0",+ "rollup-plugin-typescript2": "^0.35.0",+ "typescript": "^5.0.4"+ }+}diff --git a/packages/data-provider/rollup.config.js b/packages/data-provider/rollup.config.jsnew file mode 100644index 0000000000..869c44f87b--- /dev/null+++ b/packages/data-provider/rollup.config.js@@ -0,0 +1,31 @@+import typescript from 'rollup-plugin-typescript2';+import resolve from '@rollup/plugin-node-resolve';+import pkg from './package.json';++export default [+ {+ input: 'src/index.ts',+ output: [+ {+ file: pkg.main,+ format: 'cjs',+ },+ {+ file: pkg.module,+ format: 'esm',+ },+ ],+ ...{+ external: [+ ...Object.keys(pkg.dependencies || {}),+ ...Object.keys(pkg.devDependencies || {}),+ ...Object.keys(pkg.peerDependencies || {}),+ ],+ preserveSymlinks: true,+ plugins: [+ resolve(),+ typescript({useTsconfigDeclarationDir: true, tsconfig: './tsconfig.json'}),+ ],+ },+ },+];diff --git a/client/src/data-provider/api-endpoints.ts b/packages/data-provider/src/api-endpoints.tssimilarity index 100%rename from client/src/data-provider/api-endpoints.tsrename to packages/data-provider/src/api-endpoints.tsdiff --git a/client/src/data-provider/createPayload.ts b/packages/data-provider/src/createPayload.tssimilarity index 95%rename from client/src/data-provider/createPayload.tsrename to packages/data-provider/src/createPayload.tsindex 7f47f6f45f..4fc95d9c3b 100644--- a/client/src/data-provider/createPayload.ts+++ b/packages/data-provider/src/createPayload.ts@@ -10,6 +10,7 @@ export default function createPayload(submission: TSubmission) {openAI: '/api/ask/openAI',google: '/api/ask/google',bingAI: '/api/ask/bingAI',+ chatGPT: '/api/ask/chatGPT',chatGPTBrowser: '/api/ask/chatGPTBrowser',gptPlugins: '/api/ask/gptPlugins'};@@ -23,4 +24,4 @@ export default function createPayload(submission: TSubmission) {};return { server, payload };-}+}\ No newline at end of filediff --git a/client/src/data-provider/data-service.ts b/packages/data-provider/src/data-service.tssimilarity index 98%rename from client/src/data-provider/data-service.tsrename to packages/data-provider/src/data-service.tsindex e89e215e87..220742a66a 100644--- a/client/src/data-provider/data-service.ts+++ b/packages/data-provider/src/data-service.ts@@ -96,7 +96,7 @@ export const getLoginGoogle = () => {return request.get(endpoints.loginGoogle());};-export const requestPasswordReset = (payload: t.TRequestPasswordReset) => {+export const requestPasswordReset = (payload: t.TRequestPasswordReset): Promise<t.TRequestPasswordResetResponse> => {return request.post(endpoints.requestPasswordReset(), payload);};diff --git a/client/src/data-provider/headers-helpers.ts b/packages/data-provider/src/headers-helpers.tssimilarity index 100%rename from client/src/data-provider/headers-helpers.tsrename to packages/data-provider/src/headers-helpers.tsdiff --git a/client/src/data-provider/index.ts b/packages/data-provider/src/index.tssimilarity index 65%rename from client/src/data-provider/index.tsrename to packages/data-provider/src/index.tsindex 575dd2d4e1..10511d7bef 100644--- a/client/src/data-provider/index.ts+++ b/packages/data-provider/src/index.ts@@ -1,7 +1,7 @@export * from './data-service';-// export * from './endpoints';export * from './request';export * from './types';export * from './react-query-service';export * from './headers-helpers';-// export * from './events';+export * from './sse.mjs';+export {default as createPayload} from './createPayload';\ No newline at end of filediff --git a/client/src/data-provider/react-query-service.ts b/packages/data-provider/src/react-query-service.tssimilarity index 96%rename from client/src/data-provider/react-query-service.tsrename to packages/data-provider/src/react-query-service.tsindex 128f02f616..89e411beb5 100644--- a/client/src/data-provider/react-query-service.ts+++ b/packages/data-provider/src/react-query-service.ts@@ -140,9 +140,9 @@ export const useClearConversationsMutation = (): UseMutationResult<unknown> => {export const useGetConversationsQuery = (pageNumber: string,- config?: UseQueryOptions<t.TConversation[]>-): QueryObserverResult<t.TConversation[]> => {- return useQuery<t.TConversation[]>(+ config?: UseQueryOptions<t.TGetConversationsResponse>+): QueryObserverResult<t.TGetConversationsResponse> => {+ return useQuery<t.TGetConversationsResponse>([QueryKeys.allConversations, pageNumber],() => dataService.getConversations(pageNumber),{@@ -302,13 +302,19 @@ export const useRefreshTokenMutation = (): UseMutationResult<> => {return useMutation(() => dataService.refreshToken(), {});};-export const useRequestPasswordResetMutation = (): UseMutationResult<unknown> => {++export const useRequestPasswordResetMutation = (): UseMutationResult<t.TRequestPasswordResetResponse, unknown, t.TRequestPasswordReset, unknown> => {return useMutation((payload: t.TRequestPasswordReset) =>dataService.requestPasswordReset(payload));};-export const useResetPasswordMutation = (): UseMutationResult<unknown> => {+export const useResetPasswordMutation = (): UseMutationResult<+ unknown,+ unknown,+ t.TResetPassword,+ unknown+> => {return useMutation((payload: t.TResetPassword) => dataService.resetPassword(payload));};diff --git a/client/src/data-provider/request.ts b/packages/data-provider/src/request.tssimilarity index 100%rename from client/src/data-provider/request.tsrename to packages/data-provider/src/request.tsdiff --git a/client/src/data-provider/sse.mjs b/packages/data-provider/src/sse.mjssimilarity index 100%rename from client/src/data-provider/sse.mjsrename to packages/data-provider/src/sse.mjsdiff --git a/client/src/data-provider/types.ts b/packages/data-provider/src/types.tssimilarity index 92%rename from client/src/data-provider/types.tsrename to packages/data-provider/src/types.tsindex e2cc315c97..7faa1e207a 100644--- a/client/src/data-provider/types.ts+++ b/packages/data-provider/src/types.ts@@ -16,6 +16,52 @@ export type TExample = {output: string;};+export enum EModelEndpoint {+ azureOpenAI = 'azureOpenAI',+ openAI = 'openAI',+ bingAI = 'bingAI',+ chatGPT = 'chatGPT',+ chatGPTBrowser = 'chatGPTBrowser',+ google = 'google',+ gptPlugins = 'gptPlugins',+}++export type TSubmission = {+ clientId?: string;+ context?: string;+ conversationId?: string;+ conversationSignature?: string;+ current: boolean;+ endpoint: EModelEndpoint;+ invocationId: number;+ isCreatedByUser: boolean;+ jailbreak: boolean;+ jailbreakConversationId?: string;+ messageId: string;+ overrideParentMessageId?: string | boolean;+ parentMessageId?: string;+ sender: string;+ systemMessage?: string;+ text: string;+ toneStyle?: string;+ model?: string;+ promptPrefix?: string;+ temperature?: number;+ top_p?: number;+ presence_penalty?: number;+ frequence_penalty?: number;+ conversation: TConversation;+ message: TMessage;+ endpointOption: TEndpointOption;+};++export type TEndpointOption = {+ endpoint: EModelEndpoint;+ model?: string;+ promptPrefix?: string;+ temperature?: number;+}+export type TPluginAuthConfig = {authField: string;label: string;@@ -31,15 +77,11 @@ export type TPlugin = {authenticated: boolean;};-export enum EModelEndpoint {- azureOpenAI = 'azureOpenAI',- openAI = 'openAI',- bingAI = 'bingAI',- chatGPT = 'chatGPT',- chatGPTBrowser = 'chatGPTBrowser',- google = 'google',- gptPlugins = 'gptPlugins'-}+export type TUpdateUserPlugins = {+ pluginKey: string;+ action: string;+ auth?: unknown;+};export type TConversation = {conversationId: string;@@ -76,41 +118,6 @@ export type TConversation = {toneStyle?: string;};-export type TSubmission = {- conversation?: TConversation;- message?: TMessage;- endpointOption?: object;- clientId?: string;- context?: string;- conversationId?: string;- conversationSignature?: string;- current: boolean;- endpoint: EModelEndpoint;- invocationId: number;- isCreatedByUser: boolean;- jailbreak: boolean;- jailbreakConversationId?: string;- messageId: string;- overrideParentMessageId?: string | boolean;- parentMessageId?: string;- sender: string;- systemMessage?: string;- text: string;- toneStyle?: string;- model?: string;- promptPrefix?: string;- temperature?: number;- top_p?: number;- presence_penalty?: number;- frequence_penalty?: number;-};--export type TUpdateUserPlugins = {- pluginKey: string;- action: string;- auth?: unknown;-};-export type TPreset = {title: string;endpoint: EModelEndpoint;@@ -235,15 +242,25 @@ export type TResetPassword = {userId: string;token: string;password: string;+ confirm_password?: string;};export type TStartupConfig = {appTitle: boolean;googleLoginEnabled: boolean;openidLoginEnabled: boolean;+ githubLoginEnabled: boolean;openidLabel: string;openidImageUrl: string;- githubLoginEnabled: boolean;serverDomain: string;registrationEnabled: boolean;}++export type TRefreshTokenResponse = {+ token: string;+ user: TUser;+};++export type TRequestPasswordResetResponse = {+ link: string;+};\ No newline at end of filediff --git a/packages/data-provider/tsconfig.json b/packages/data-provider/tsconfig.jsonnew file mode 100644index 0000000000..203cda7ecd--- /dev/null+++ b/packages/data-provider/tsconfig.json@@ -0,0 +1,27 @@+{+ "compilerOptions": {+ "declaration": true,+ "declarationDir": "./types",+ "module": "esnext",+ "noImplicitAny": true,+ "outDir": "./types",+ "target": "es5",+ "moduleResolution": "node",+ "allowSyntheticDefaultImports": true,+ "lib": ["es2017", "dom"],+ "allowJs": true,+ "skipLibCheck": true,+ "esModuleInterop": true,+ "strict": true,+ "forceConsistentCasingInFileNames": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "noEmit": true,+ "baseUrl": "src",+ "paths": {+ "@src/*": ["./*"]+ }+ },+ "exclude": ["node_modules", "dist", "types"],+ "include": ["src/**/*"]+}