diff --git a/api/app/clients/OpenAIClient.js b/api/app/clients/OpenAIClient.js index 3554f4d6543..9cde8b56e98 100644 --- a/api/app/clients/OpenAIClient.js +++ b/api/app/clients/OpenAIClient.js @@ -423,6 +423,7 @@ class OpenAIClient extends BaseClient { promptPrefix: this.options.promptPrefix, resendFiles: this.options.resendFiles, imageDetail: this.options.imageDetail, + modelLabel: this.options.modelLabel, iconURL: this.options.iconURL, greeting: this.options.greeting, spec: this.options.spec, diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.js index 09e3dc5adc4..7259eb56f28 100644 --- a/api/app/clients/PluginsClient.js +++ b/api/app/clients/PluginsClient.js @@ -43,6 +43,7 @@ class PluginsClient extends OpenAIClient { return { artifacts: this.options.artifacts, chatGptLabel: this.options.chatGptLabel, + modelLabel: this.options.modelLabel, promptPrefix: this.options.promptPrefix, tools: this.options.tools, ...this.modelOptions, diff --git a/api/app/clients/specs/OpenAIClient.test.js b/api/app/clients/specs/OpenAIClient.test.js index 2fa37957d17..ab70d4c9070 100644 --- a/api/app/clients/specs/OpenAIClient.test.js +++ b/api/app/clients/specs/OpenAIClient.test.js @@ -412,6 +412,7 @@ describe('OpenAIClient', () => { it('should return the correct save options', () => { const options = client.getSaveOptions(); expect(options).toHaveProperty('chatGptLabel'); + expect(options).toHaveProperty('modelLabel'); expect(options).toHaveProperty('promptPrefix'); }); }); diff --git a/api/models/Agent.js b/api/models/Agent.js index 206c983f979..5f448502a51 100644 --- a/api/models/Agent.js +++ b/api/models/Agent.js @@ -200,6 +200,7 @@ const getListAgents = async (searchParameter) => { avatar: 1, author: 1, projectIds: 1, + description: 1, isCollaborative: 1, }).lean() ).map((agent) => { diff --git a/api/server/middleware/buildEndpointOption.js b/api/server/middleware/buildEndpointOption.js index 7559fcca56c..a0ce754a1c4 100644 --- a/api/server/middleware/buildEndpointOption.js +++ b/api/server/middleware/buildEndpointOption.js @@ -63,6 +63,10 @@ async function buildEndpointOption(req, res, next) { } try { + currentModelSpec.preset.spec = spec; + if (currentModelSpec.iconURL != null && currentModelSpec.iconURL !== '') { + currentModelSpec.preset.iconURL = currentModelSpec.iconURL; + } parsedBody = parseCompactConvo({ endpoint, endpointType, diff --git a/client/src/a11y/LiveAnnouncer.tsx b/client/src/a11y/LiveAnnouncer.tsx index 9df48bf2e98..29912b49af7 100644 --- a/client/src/a11y/LiveAnnouncer.tsx +++ b/client/src/a11y/LiveAnnouncer.tsx @@ -1,6 +1,6 @@ // client/src/a11y/LiveAnnouncer.tsx import React, { useState, useCallback, useRef, useEffect, useMemo } from 'react'; -import type { AnnounceOptions } from '~/Providers/AnnouncerContext'; +import type { AnnounceOptions } from '~/common'; import AnnouncerContext from '~/Providers/AnnouncerContext'; import useLocalize from '~/hooks/useLocalize'; import Announcer from './Announcer'; diff --git a/client/src/components/Audio/Voices.tsx b/client/src/components/Audio/Voices.tsx index ab6b0a86090..963ff250d86 100644 --- a/client/src/components/Audio/Voices.tsx +++ b/client/src/components/Audio/Voices.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { useRecoilState } from 'recoil'; import type { Option } from '~/common'; -import DropdownNoState from '~/components/ui/DropdownNoState'; import { useLocalize, useTTSBrowser, useTTSEdge, useTTSExternal } from '~/hooks'; import { Dropdown } from '~/components/ui'; import { logger } from '~/utils'; diff --git a/client/src/components/Auth/AuthLayout.tsx b/client/src/components/Auth/AuthLayout.tsx index 0ff99f357cf..6df73d2cf94 100644 --- a/client/src/components/Auth/AuthLayout.tsx +++ b/client/src/components/Auth/AuthLayout.tsx @@ -9,8 +9,9 @@ import Footer from './Footer'; const ErrorRender = ({ children }: { children: React.ReactNode }) => (
{children}
@@ -36,8 +37,9 @@ function AuthLayout({ }) { const localize = useLocalize(); + const hasStartupConfigError = startupConfigError !== null && startupConfigError !== undefined; const DisplayError = () => { - if (startupConfigError !== null && startupConfigError !== undefined) { + if (hasStartupConfigError) { return {localize('com_auth_error_login_server')}; } else if (error === 'com_auth_error_invalid_reset_token') { return ( @@ -49,7 +51,7 @@ function AuthLayout({ {localize('com_auth_to_try_again')} ); - } else if (error) { + } else if (error != null && error) { return {localize(error)}; } return null; @@ -60,7 +62,11 @@ function AuthLayout({
- Logo + {localize('com_ui_logo',
@@ -70,7 +76,7 @@ function AuthLayout({
- {!startupConfigError && !isFetching && ( + {!hasStartupConfigError && !isFetching && (

(
{children}
diff --git a/client/src/components/Chat/ExportAndShareMenu.tsx b/client/src/components/Chat/ExportAndShareMenu.tsx index 420c7533108..349658a41e4 100644 --- a/client/src/components/Chat/ExportAndShareMenu.tsx +++ b/client/src/components/Chat/ExportAndShareMenu.tsx @@ -1,11 +1,11 @@ -import { useState, useId } from 'react'; +import { useState, useId, useRef } from 'react'; import { useRecoilValue } from 'recoil'; import * as Ariakit from '@ariakit/react'; import { Upload, Share2 } from 'lucide-react'; import { ShareButton } from '~/components/Conversations/ConvoOptions'; import { useMediaQuery, useLocalize } from '~/hooks'; +import ExportModal from '~/components/Nav/ExportConversation/ExportModal'; import { DropdownPopup } from '~/components/ui'; -import { ExportModal } from '../Nav'; import store from '~/store'; export default function ExportAndShareMenu({ @@ -19,6 +19,7 @@ export default function ExportAndShareMenu({ const [showShareDialog, setShowShareDialog] = useState(false); const menuId = useId(); + const exportButtonRef = useRef(null); const isSmallScreen = useMediaQuery('(max-width: 768px)'); const conversation = useRecoilValue(store.conversationByIndex(0)); @@ -68,6 +69,7 @@ export default function ExportAndShareMenu({ setIsOpen={setIsPopoverActive} trigger={ )} diff --git a/client/src/components/Chat/Menus/EndpointsMenu.tsx b/client/src/components/Chat/Menus/EndpointsMenu.tsx index f4ac27ccc4b..fc92c89d984 100644 --- a/client/src/components/Chat/Menus/EndpointsMenu.tsx +++ b/client/src/components/Chat/Menus/EndpointsMenu.tsx @@ -5,6 +5,7 @@ import type { FC } from 'react'; import { useChatContext, useAgentsMapContext, useAssistantsMapContext } from '~/Providers'; import { mapEndpoints, getEntity } from '~/utils'; import EndpointItems from './Endpoints/MenuItems'; +import useLocalize from '~/hooks/useLocalize'; import TitleButton from './UI/TitleButton'; const EndpointsMenu: FC = () => { @@ -12,6 +13,7 @@ const EndpointsMenu: FC = () => { select: mapEndpoints, }); + const localize = useLocalize(); const agentsMap = useAgentsMapContext(); const assistantMap = useAssistantsMapContext(); const { conversation } = useChatContext(); @@ -51,6 +53,9 @@ const EndpointsMenu: FC = () => { diff --git a/client/src/components/Chat/Menus/Models/MenuButton.tsx b/client/src/components/Chat/Menus/Models/MenuButton.tsx index aa568231e40..24ef1e94520 100644 --- a/client/src/components/Chat/Menus/Models/MenuButton.tsx +++ b/client/src/components/Chat/Menus/Models/MenuButton.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react'; import { Trigger } from '@radix-ui/react-popover'; import type { TModelSpec, TEndpointsConfig } from 'librechat-data-provider'; import { useLocalize } from '~/hooks'; @@ -20,6 +21,8 @@ export default function MenuButton({ endpointsConfig: TEndpointsConfig; }) { const localize = useLocalize(); + const [isExpanded, setIsExpanded] = useState(false); + return (