From 5334fda26c98806736d26d9ca205810576d8e164 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 7 Jan 2025 11:09:18 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Correct=20Endpoint/Icon?= =?UTF-8?q?=20Handling,=20Update=20Module=20Resolutions=20(#5205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: agent modelSpec iconURLs not being recorded * fix: prioritize message properties over conversation defaults in icon data * fix: determine endpoint type from endpointsConfig * chore: type issue with setting.columnSpan * chore: remove redundant key indexing for keySchema * chore: bump version to 0.7.691 in package.json * chore: add stricter remark-gfm and mdast-util-gfm resolutions/overrides * chore: remove rollup override and bump vite-plugin-pwa * chore: reinstall remark-gfm for correct module resolution * chore: reinstall vite-plugun-pwa --- api/models/schema/key.js | 1 - api/server/controllers/agents/client.js | 1 + api/server/services/Endpoints/agents/build.js | 4 +- .../services/Endpoints/agents/initialize.js | 1 + client/package.json | 2 +- .../components/Chat/Input/HeaderOptions.tsx | 8 +- .../components/Chat/Messages/MessageParts.tsx | 7 +- .../Chat/Messages/ui/MessageRender.tsx | 7 +- .../src/components/Messages/ContentRender.tsx | 7 +- package-lock.json | 350 +++++++++--------- package.json | 9 +- packages/data-provider/package.json | 2 +- packages/data-provider/src/generate.ts | 2 +- 13 files changed, 204 insertions(+), 197 deletions(-) diff --git a/api/models/schema/key.js b/api/models/schema/key.js index a013f01f8f8..513d66ce1c2 100644 --- a/api/models/schema/key.js +++ b/api/models/schema/key.js @@ -16,7 +16,6 @@ const keySchema = mongoose.Schema({ }, expiresAt: { type: Date, - expires: 0, }, }); diff --git a/api/server/controllers/agents/client.js b/api/server/controllers/agents/client.js index fceb917d577..e3c6dd5679c 100644 --- a/api/server/controllers/agents/client.js +++ b/api/server/controllers/agents/client.js @@ -193,6 +193,7 @@ class AgentClient extends BaseClient { resendFiles: this.options.resendFiles, imageDetail: this.options.imageDetail, spec: this.options.spec, + iconURL: this.options.iconURL, }, // TODO: PARSE OPTIONS BY PROVIDER, MAY CONTAIN SENSITIVE DATA runOptions, diff --git a/api/server/services/Endpoints/agents/build.js b/api/server/services/Endpoints/agents/build.js index 90e251a4eaf..027937e7fd0 100644 --- a/api/server/services/Endpoints/agents/build.js +++ b/api/server/services/Endpoints/agents/build.js @@ -3,9 +3,10 @@ const { logger } = require('~/config'); const buildOptions = (req, endpoint, parsedBody) => { const { + spec, + iconURL, agent_id, instructions, - spec, maxContextTokens, resendFiles = true, ...model_parameters @@ -20,6 +21,7 @@ const buildOptions = (req, endpoint, parsedBody) => { const endpointOption = { spec, + iconURL, endpoint, agent_id, resendFiles, diff --git a/api/server/services/Endpoints/agents/initialize.js b/api/server/services/Endpoints/agents/initialize.js index 28f4d8cdd80..d1b69168549 100644 --- a/api/server/services/Endpoints/agents/initialize.js +++ b/api/server/services/Endpoints/agents/initialize.js @@ -225,6 +225,7 @@ const initializeClient = async ({ req, res, endpointOption }) => { collectedUsage, artifactPromises, spec: endpointOption.spec, + iconURL: endpointOption.iconURL, agentConfigs, endpoint: EModelEndpoint.agents, maxContextTokens: primaryConfig.maxContextTokens, diff --git a/client/package.json b/client/package.json index 70bd2daeddc..029ca3cdee1 100644 --- a/client/package.json +++ b/client/package.json @@ -139,6 +139,6 @@ "typescript": "^5.0.4", "vite": "^5.1.1", "vite-plugin-node-polyfills": "^0.17.0", - "vite-plugin-pwa": "^0.20.5" + "vite-plugin-pwa": "^0.21.1" } } diff --git a/client/src/components/Chat/Input/HeaderOptions.tsx b/client/src/components/Chat/Input/HeaderOptions.tsx index 3a7749c181e..69a9e8f282a 100644 --- a/client/src/components/Chat/Input/HeaderOptions.tsx +++ b/client/src/components/Chat/Input/HeaderOptions.tsx @@ -2,6 +2,7 @@ import { useRecoilState } from 'recoil'; import { Settings2 } from 'lucide-react'; import { Root, Anchor } from '@radix-ui/react-popover'; import { useState, useEffect, useMemo } from 'react'; +import { useGetEndpointsQuery } from 'librechat-data-provider/react-query'; import { tConvoUpdateSchema, EModelEndpoint, isParamEndpoint } from 'librechat-data-provider'; import type { TPreset, TInterfaceConfig } from 'librechat-data-provider'; import { EndpointSettings, SaveAsPresetDialog, AlternativeSettings } from '~/components/Endpoints'; @@ -11,6 +12,7 @@ import { useSetIndexOptions, useLocalize } from '~/hooks'; import OptionsPopover from './OptionsPopover'; import PopoverButtons from './PopoverButtons'; import { useChatContext } from '~/Providers'; +import { getEndpointField } from '~/utils'; import store from '~/store'; export default function HeaderOptions({ @@ -18,6 +20,7 @@ export default function HeaderOptions({ }: { interfaceConfig?: Partial; }) { + const { data: endpointsConfig } = useGetEndpointsQuery(); const [saveAsDialogShow, setSaveAsDialogShow] = useState(false); const [showPluginStoreDialog, setShowPluginStoreDialog] = useRecoilState( store.showPluginStoreDialog, @@ -27,8 +30,7 @@ export default function HeaderOptions({ const { showPopover, conversation, latestMessage, setShowPopover, setShowBingToneSetting } = useChatContext(); const { setOption } = useSetIndexOptions(); - - const { endpoint, endpointType, conversationId, jailbreak = false } = conversation ?? {}; + const { endpoint, conversationId, jailbreak = false } = conversation ?? {}; const altConditions: { [key: string]: boolean } = { bingAI: !!(latestMessage && jailbreak && endpoint === 'bingAI'), @@ -65,7 +67,9 @@ export default function HeaderOptions({ ? altSettings[endpoint] : () => setShowPopover((prev) => !prev); + const endpointType = getEndpointField(endpointsConfig, endpoint, 'type'); const paramEndpoint = isParamEndpoint(endpoint, endpointType); + return ( ({ - endpoint: conversation?.endpoint, - model: conversation?.model ?? message?.model, - iconURL: conversation?.iconURL ?? message?.iconURL ?? '', + endpoint: message?.endpoint ?? conversation?.endpoint, + model: message?.model ?? conversation?.model, + iconURL: message?.iconURL ?? conversation?.iconURL, modelLabel: conversation?.chatGptLabel ?? conversation?.modelLabel, isCreatedByUser: message?.isCreatedByUser, } as TMessage & { modelLabel?: string }), @@ -53,6 +53,7 @@ export default function Message(props: TMessageProps) { conversation?.model, message?.model, message?.iconURL, + message?.endpoint, message?.isCreatedByUser, ], ); diff --git a/client/src/components/Chat/Messages/ui/MessageRender.tsx b/client/src/components/Chat/Messages/ui/MessageRender.tsx index 532fe07f63f..a08b8248822 100644 --- a/client/src/components/Chat/Messages/ui/MessageRender.tsx +++ b/client/src/components/Chat/Messages/ui/MessageRender.tsx @@ -69,9 +69,9 @@ const MessageRender = memo( const iconData = useMemo( () => ({ - endpoint: conversation?.endpoint, - model: conversation?.model ?? msg?.model, - iconURL: conversation?.iconURL ?? msg?.iconURL ?? '', + endpoint: msg?.endpoint ?? conversation?.endpoint, + model: msg?.model ?? conversation?.model, + iconURL: msg?.iconURL ?? conversation?.iconURL, modelLabel: conversation?.chatGptLabel ?? conversation?.modelLabel, isCreatedByUser: msg?.isCreatedByUser, } as TMessage & { modelLabel?: string }), @@ -83,6 +83,7 @@ const MessageRender = memo( conversation?.model, msg?.model, msg?.iconURL, + msg?.endpoint, msg?.isCreatedByUser, ], ); diff --git a/client/src/components/Messages/ContentRender.tsx b/client/src/components/Messages/ContentRender.tsx index 923b66ab16d..e5ce3a727e0 100644 --- a/client/src/components/Messages/ContentRender.tsx +++ b/client/src/components/Messages/ContentRender.tsx @@ -68,9 +68,9 @@ const ContentRender = memo( const iconData = useMemo( () => ({ - endpoint: conversation?.endpoint, - model: conversation?.model ?? msg?.model, - iconURL: conversation?.iconURL ?? msg?.iconURL ?? '', + endpoint: msg?.endpoint ?? conversation?.endpoint, + model: msg?.model ?? conversation?.model, + iconURL: msg?.iconURL ?? conversation?.iconURL, modelLabel: conversation?.chatGptLabel ?? conversation?.modelLabel, isCreatedByUser: msg?.isCreatedByUser, } as TMessage & { modelLabel?: string }), @@ -82,6 +82,7 @@ const ContentRender = memo( conversation?.model, msg?.model, msg?.iconURL, + msg?.endpoint, msg?.isCreatedByUser, ], ); diff --git a/package-lock.json b/package-lock.json index 02697d754d6..78f952566b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1029,7 +1029,7 @@ "typescript": "^5.0.4", "vite": "^5.1.1", "vite-plugin-node-polyfills": "^0.17.0", - "vite-plugin-pwa": "^0.20.5" + "vite-plugin-pwa": "^0.21.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -12371,58 +12371,6 @@ } } }, - "node_modules/@rollup/plugin-babel": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", - "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.10.4", - "@rollup/pluginutils": "^3.1.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0" - }, - "peerDependenciesMeta": { - "@types/babel__core": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-babel/node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/plugin-babel/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@rollup/plugin-babel/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, "node_modules/@rollup/plugin-commonjs": { "version": "25.0.7", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", @@ -25450,9 +25398,9 @@ } }, "node_modules/markdown-table": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", - "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -25544,9 +25492,9 @@ } }, "node_modules/mdast-util-find-and-replace": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz", - "integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", + "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==", "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", @@ -25658,9 +25606,9 @@ } }, "node_modules/mdast-util-gfm-autolink-literal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz", - "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.0.tgz", + "integrity": "sha512-FyzMsduZZHSc3i0Px3PQcBT4WJY/X/RCtEJKuybiC6sjPqLv7h1yqAkmILZtuxMSsUyaLUWNp71+vQH2zqp5cg==", "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", @@ -31445,12 +31393,11 @@ } }, "node_modules/remark-gfm/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -31805,12 +31752,11 @@ } }, "node_modules/remark-stringify/node_modules/vfile": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", - "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", "dependencies": { "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" }, "funding": { @@ -33781,12 +33727,12 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.6.tgz", - "integrity": "sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", + "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", "dev": true, "dependencies": { - "fdir": "^6.3.0", + "fdir": "^6.4.2", "picomatch": "^4.0.2" }, "engines": { @@ -33794,9 +33740,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz", - "integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", "dev": true, "peerDependencies": { "picomatch": "^3 || ^4" @@ -35047,16 +34993,16 @@ } }, "node_modules/vite-plugin-pwa": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.20.5.tgz", - "integrity": "sha512-aweuI/6G6n4C5Inn0vwHumElU/UEpNuO+9iZzwPZGTCH87TeZ6YFMrEY6ZUBQdIHHlhTsbMDryFARcSuOdsz9Q==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.21.1.tgz", + "integrity": "sha512-rkTbKFbd232WdiRJ9R3u+hZmf5SfQljX1b45NF6oLA6DSktEKpYllgTo1l2lkiZWMWV78pABJtFjNXfBef3/3Q==", "dev": true, "dependencies": { "debug": "^4.3.6", "pretty-bytes": "^6.1.1", - "tinyglobby": "^0.2.0", - "workbox-build": "^7.1.0", - "workbox-window": "^7.1.0" + "tinyglobby": "^0.2.10", + "workbox-build": "^7.3.0", + "workbox-window": "^7.3.0" }, "engines": { "node": ">=16.0.0" @@ -35066,9 +35012,9 @@ }, "peerDependencies": { "@vite-pwa/assets-generator": "^0.2.6", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0", - "workbox-build": "^7.1.0", - "workbox-window": "^7.1.0" + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "workbox-build": "^7.3.0", + "workbox-window": "^7.3.0" }, "peerDependenciesMeta": { "@vite-pwa/assets-generator": { @@ -35519,28 +35465,28 @@ "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, "node_modules/workbox-background-sync": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-7.1.0.tgz", - "integrity": "sha512-rMbgrzueVWDFcEq1610YyDW71z0oAXLfdRHRQcKw4SGihkfOK0JUEvqWHFwA6rJ+6TClnMIn7KQI5PNN1XQXwQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-7.3.0.tgz", + "integrity": "sha512-PCSk3eK7Mxeuyatb22pcSx9dlgWNv3+M8PqPaYDokks8Y5/FX4soaOqj3yhAZr5k6Q5JWTOMYgaJBpbw11G9Eg==", "dev": true, "dependencies": { "idb": "^7.0.1", - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-broadcast-update": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-7.1.0.tgz", - "integrity": "sha512-O36hIfhjej/c5ar95pO67k1GQw0/bw5tKP7CERNgK+JdxBANQhDmIuOXZTNvwb2IHBx9hj2kxvcDyRIh5nzOgQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-7.3.0.tgz", + "integrity": "sha512-T9/F5VEdJVhwmrIAE+E/kq5at2OY6+OXXgOWQevnubal6sO92Gjo24v6dCVwQiclAF5NS3hlmsifRrpQzZCdUA==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-build": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-7.1.1.tgz", - "integrity": "sha512-WdkVdC70VMpf5NBCtNbiwdSZeKVuhTEd5PV3mAwpTQCGAB5XbOny1P9egEgNdetv4srAMmMKjvBk4RD58LpooA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-7.3.0.tgz", + "integrity": "sha512-JGL6vZTPlxnlqZRhR/K/msqg3wKP+m0wfEUVosK7gsYzSgeIxvZLi1ViJJzVL7CEeI8r7rGFV973RiEqkP3lWQ==", "dev": true, "dependencies": { "@apideck/better-ajv-errors": "^0.3.1", @@ -35565,21 +35511,21 @@ "strip-comments": "^2.0.1", "tempy": "^0.6.0", "upath": "^1.2.0", - "workbox-background-sync": "7.1.0", - "workbox-broadcast-update": "7.1.0", - "workbox-cacheable-response": "7.1.0", - "workbox-core": "7.1.0", - "workbox-expiration": "7.1.0", - "workbox-google-analytics": "7.1.0", - "workbox-navigation-preload": "7.1.0", - "workbox-precaching": "7.1.0", - "workbox-range-requests": "7.1.0", - "workbox-recipes": "7.1.0", - "workbox-routing": "7.1.0", - "workbox-strategies": "7.1.0", - "workbox-streams": "7.1.0", - "workbox-sw": "7.1.0", - "workbox-window": "7.1.0" + "workbox-background-sync": "7.3.0", + "workbox-broadcast-update": "7.3.0", + "workbox-cacheable-response": "7.3.0", + "workbox-core": "7.3.0", + "workbox-expiration": "7.3.0", + "workbox-google-analytics": "7.3.0", + "workbox-navigation-preload": "7.3.0", + "workbox-precaching": "7.3.0", + "workbox-range-requests": "7.3.0", + "workbox-recipes": "7.3.0", + "workbox-routing": "7.3.0", + "workbox-strategies": "7.3.0", + "workbox-streams": "7.3.0", + "workbox-sw": "7.3.0", + "workbox-window": "7.3.0" }, "engines": { "node": ">=16.0.0" @@ -35602,6 +35548,29 @@ "ajv": ">=8" } }, + "node_modules/workbox-build/node_modules/@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + } + } + }, "node_modules/workbox-build/node_modules/@rollup/plugin-replace": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz", @@ -35661,10 +35630,20 @@ "dev": true }, "node_modules/workbox-build/node_modules/fast-uri": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", - "dev": true + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.5.tgz", + "integrity": "sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ] }, "node_modules/workbox-build/node_modules/fs-extra": { "version": "9.1.0", @@ -35741,6 +35720,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/workbox-build/node_modules/rollup": { + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/workbox-build/node_modules/source-map": { "version": "0.8.0-beta.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", @@ -35789,127 +35783,127 @@ } }, "node_modules/workbox-cacheable-response": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-7.1.0.tgz", - "integrity": "sha512-iwsLBll8Hvua3xCuBB9h92+/e0wdsmSVgR2ZlvcfjepZWwhd3osumQB3x9o7flj+FehtWM2VHbZn8UJeBXXo6Q==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-7.3.0.tgz", + "integrity": "sha512-eAFERIg6J2LuyELhLlmeRcJFa5e16Mj8kL2yCDbhWE+HUun9skRQrGIFVUagqWj4DMaaPSMWfAolM7XZZxNmxA==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-core": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-7.1.0.tgz", - "integrity": "sha512-5KB4KOY8rtL31nEF7BfvU7FMzKT4B5TkbYa2tzkS+Peqj0gayMT9SytSFtNzlrvMaWgv6y/yvP9C0IbpFjV30Q==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-7.3.0.tgz", + "integrity": "sha512-Z+mYrErfh4t3zi7NVTvOuACB0A/jA3bgxUN3PwtAVHvfEsZxV9Iju580VEETug3zYJRc0Dmii/aixI/Uxj8fmw==", "dev": true }, "node_modules/workbox-expiration": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-7.1.0.tgz", - "integrity": "sha512-m5DcMY+A63rJlPTbbBNtpJ20i3enkyOtSgYfv/l8h+D6YbbNiA0zKEkCUaMsdDlxggla1oOfRkyqTvl5Ni5KQQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-7.3.0.tgz", + "integrity": "sha512-lpnSSLp2BM+K6bgFCWc5bS1LR5pAwDWbcKt1iL87/eTSJRdLdAwGQznZE+1czLgn/X05YChsrEegTNxjM067vQ==", "dev": true, "dependencies": { "idb": "^7.0.1", - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-google-analytics": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-7.1.0.tgz", - "integrity": "sha512-FvE53kBQHfVTcZyczeBVRexhh7JTkyQ8HAvbVY6mXd2n2A7Oyz/9fIwnY406ZcDhvE4NFfKGjW56N4gBiqkrew==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-7.3.0.tgz", + "integrity": "sha512-ii/tSfFdhjLHZ2BrYgFNTrb/yk04pw2hasgbM70jpZfLk0vdJAXgaiMAWsoE+wfJDNWoZmBYY0hMVI0v5wWDbg==", "dev": true, "dependencies": { - "workbox-background-sync": "7.1.0", - "workbox-core": "7.1.0", - "workbox-routing": "7.1.0", - "workbox-strategies": "7.1.0" + "workbox-background-sync": "7.3.0", + "workbox-core": "7.3.0", + "workbox-routing": "7.3.0", + "workbox-strategies": "7.3.0" } }, "node_modules/workbox-navigation-preload": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-7.1.0.tgz", - "integrity": "sha512-4wyAbo0vNI/X0uWNJhCMKxnPanNyhybsReMGN9QUpaePLTiDpKxPqFxl4oUmBNddPwIXug01eTSLVIFXimRG/A==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-7.3.0.tgz", + "integrity": "sha512-fTJzogmFaTv4bShZ6aA7Bfj4Cewaq5rp30qcxl2iYM45YD79rKIhvzNHiFj1P+u5ZZldroqhASXwwoyusnr2cg==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-precaching": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-7.1.0.tgz", - "integrity": "sha512-LyxzQts+UEpgtmfnolo0hHdNjoB7EoRWcF7EDslt+lQGd0lW4iTvvSe3v5JiIckQSB5KTW5xiCqjFviRKPj1zA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-7.3.0.tgz", + "integrity": "sha512-ckp/3t0msgXclVAYaNndAGeAoWQUv7Rwc4fdhWL69CCAb2UHo3Cef0KIUctqfQj1p8h6aGyz3w8Cy3Ihq9OmIw==", "dev": true, "dependencies": { - "workbox-core": "7.1.0", - "workbox-routing": "7.1.0", - "workbox-strategies": "7.1.0" + "workbox-core": "7.3.0", + "workbox-routing": "7.3.0", + "workbox-strategies": "7.3.0" } }, "node_modules/workbox-range-requests": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-7.1.0.tgz", - "integrity": "sha512-m7+O4EHolNs5yb/79CrnwPR/g/PRzMFYEdo01LqwixVnc/sbzNSvKz0d04OE3aMRel1CwAAZQheRsqGDwATgPQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-7.3.0.tgz", + "integrity": "sha512-EyFmM1KpDzzAouNF3+EWa15yDEenwxoeXu9bgxOEYnFfCxns7eAxA9WSSaVd8kujFFt3eIbShNqa4hLQNFvmVQ==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-recipes": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-7.1.0.tgz", - "integrity": "sha512-NRrk4ycFN9BHXJB6WrKiRX3W3w75YNrNrzSX9cEZgFB5ubeGoO8s/SDmOYVrFYp9HMw6sh1Pm3eAY/1gVS8YLg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-7.3.0.tgz", + "integrity": "sha512-BJro/MpuW35I/zjZQBcoxsctgeB+kyb2JAP5EB3EYzePg8wDGoQuUdyYQS+CheTb+GhqJeWmVs3QxLI8EBP1sg==", "dev": true, "dependencies": { - "workbox-cacheable-response": "7.1.0", - "workbox-core": "7.1.0", - "workbox-expiration": "7.1.0", - "workbox-precaching": "7.1.0", - "workbox-routing": "7.1.0", - "workbox-strategies": "7.1.0" + "workbox-cacheable-response": "7.3.0", + "workbox-core": "7.3.0", + "workbox-expiration": "7.3.0", + "workbox-precaching": "7.3.0", + "workbox-routing": "7.3.0", + "workbox-strategies": "7.3.0" } }, "node_modules/workbox-routing": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-7.1.0.tgz", - "integrity": "sha512-oOYk+kLriUY2QyHkIilxUlVcFqwduLJB7oRZIENbqPGeBP/3TWHYNNdmGNhz1dvKuw7aqvJ7CQxn27/jprlTdg==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-7.3.0.tgz", + "integrity": "sha512-ZUlysUVn5ZUzMOmQN3bqu+gK98vNfgX/gSTZ127izJg/pMMy4LryAthnYtjuqcjkN4HEAx1mdgxNiKJMZQM76A==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-strategies": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-7.1.0.tgz", - "integrity": "sha512-/UracPiGhUNehGjRm/tLUQ+9PtWmCbRufWtV0tNrALuf+HZ4F7cmObSEK+E4/Bx1p8Syx2tM+pkIrvtyetdlew==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-7.3.0.tgz", + "integrity": "sha512-tmZydug+qzDFATwX7QiEL5Hdf7FrkhjaF9db1CbB39sDmEZJg3l9ayDvPxy8Y18C3Y66Nrr9kkN1f/RlkDgllg==", "dev": true, "dependencies": { - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/workbox-streams": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-7.1.0.tgz", - "integrity": "sha512-WyHAVxRXBMfysM8ORwiZnI98wvGWTVAq/lOyBjf00pXFvG0mNaVz4Ji+u+fKa/mf1i2SnTfikoYKto4ihHeS6w==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-7.3.0.tgz", + "integrity": "sha512-SZnXucyg8x2Y61VGtDjKPO5EgPUG5NDn/v86WYHX+9ZqvAsGOytP0Jxp1bl663YUuMoXSAtsGLL+byHzEuMRpw==", "dev": true, "dependencies": { - "workbox-core": "7.1.0", - "workbox-routing": "7.1.0" + "workbox-core": "7.3.0", + "workbox-routing": "7.3.0" } }, "node_modules/workbox-sw": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-7.1.0.tgz", - "integrity": "sha512-Hml/9+/njUXBglv3dtZ9WBKHI235AQJyLBV1G7EFmh4/mUdSQuXui80RtjDeVRrXnm/6QWgRUEHG3/YBVbxtsA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-7.3.0.tgz", + "integrity": "sha512-aCUyoAZU9IZtH05mn0ACUpyHzPs0lMeJimAYkQkBsOWiqaJLgusfDCR+yllkPkFRxWpZKF8vSvgHYeG7LwhlmA==", "dev": true }, "node_modules/workbox-window": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.1.0.tgz", - "integrity": "sha512-ZHeROyqR+AS5UPzholQRDttLFqGMwP0Np8MKWAdyxsDETxq3qOAyXvqessc3GniohG6e0mAqSQyKOHmT8zPF7g==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-7.3.0.tgz", + "integrity": "sha512-qW8PDy16OV1UBaUNGlTVcepzrlzyzNW/ZJvFQQs2j2TzGsg6IKjcpZC1RSquqQnTOafl5pCj5bGfAHlCjOOjdA==", "dev": true, "dependencies": { "@types/trusted-types": "^2.0.2", - "workbox-core": "7.1.0" + "workbox-core": "7.3.0" } }, "node_modules/wrap-ansi": { @@ -36292,7 +36286,7 @@ }, "packages/data-provider": { "name": "librechat-data-provider", - "version": "0.7.69", + "version": "0.7.691", "license": "ISC", "dependencies": { "axios": "^1.7.7", diff --git a/package.json b/package.json index 569bb019471..a2d8d3b4adc 100644 --- a/package.json +++ b/package.json @@ -102,10 +102,13 @@ "prettier-plugin-tailwindcss": "^0.2.2" }, "overrides": { - "vite-plugin-pwa": { - "rollup": "^4.22.4" + "mdast-util-gfm-autolink-literal": "2.0.0", + "remark-gfm": { + "mdast-util-gfm-autolink-literal": "2.0.0" }, - "mdast-util-gfm-autolink-literal": "2.0.0" + "mdast-util-gfm": { + "mdast-util-gfm-autolink-literal": "2.0.0" + } }, "nodemonConfig": { "ignore": [ diff --git a/packages/data-provider/package.json b/packages/data-provider/package.json index 184f4687b07..c38049f031a 100644 --- a/packages/data-provider/package.json +++ b/packages/data-provider/package.json @@ -1,6 +1,6 @@ { "name": "librechat-data-provider", - "version": "0.7.69", + "version": "0.7.691", "description": "data services for librechat apps", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/data-provider/src/generate.ts b/packages/data-provider/src/generate.ts index 3751d65c909..4a83c5aec6b 100644 --- a/packages/data-provider/src/generate.ts +++ b/packages/data-provider/src/generate.ts @@ -414,7 +414,7 @@ export function validateSettingDefinitions(settings: SettingsConfiguration): voi // Default columnSpan if (!setting.columnSpan) { - setting.columnSpan = Math.floor(columns / 2); + setting.columnSpan = Math.floor((columns ?? 0) / 2); } // Default label to key