{children} diff --git a/client/src/components/Endpoints/ConvoIcon.tsx b/client/src/components/Endpoints/ConvoIcon.tsx index faed70a9b9..0ac36924a6 100644 --- a/client/src/components/Endpoints/ConvoIcon.tsx +++ b/client/src/components/Endpoints/ConvoIcon.tsx @@ -1,6 +1,7 @@ import React, { useMemo } from 'react'; +import { getEndpointField } from 'librechat-data-provider'; import type * as t from 'librechat-data-provider'; -import { getEndpointField, getIconKey, getEntity, getIconEndpoint } from '~/utils'; +import { getIconKey, getEntity, getIconEndpoint } from '~/utils'; import ConvoIconURL from '~/components/Endpoints/ConvoIconURL'; import { icons } from '~/hooks/Endpoint/Icons'; diff --git a/client/src/components/Endpoints/EndpointIcon.tsx b/client/src/components/Endpoints/EndpointIcon.tsx index f635388f0e..c32ea12369 100644 --- a/client/src/components/Endpoints/EndpointIcon.tsx +++ b/client/src/components/Endpoints/EndpointIcon.tsx @@ -1,13 +1,13 @@ -import { isAssistantsEndpoint } from 'librechat-data-provider'; +import { getEndpointField, isAssistantsEndpoint } from 'librechat-data-provider'; import type { - TConversation, - TEndpointsConfig, TPreset, + TConversation, TAssistantsMap, + TEndpointsConfig, } from 'librechat-data-provider'; import ConvoIconURL from '~/components/Endpoints/ConvoIconURL'; import MinimalIcon from '~/components/Endpoints/MinimalIcon'; -import { getEndpointField, getIconEndpoint } from '~/utils'; +import { getIconEndpoint } from '~/utils'; export default function EndpointIcon({ conversation, diff --git a/client/src/components/Endpoints/EndpointSettings.tsx b/client/src/components/Endpoints/EndpointSettings.tsx index ce8be90634..d470f53062 100644 --- a/client/src/components/Endpoints/EndpointSettings.tsx +++ b/client/src/components/Endpoints/EndpointSettings.tsx @@ -1,10 +1,11 @@ import { useRecoilValue } from 'recoil'; -import { SettingsViews, TConversation } from 'librechat-data-provider'; import { useGetModelsQuery } from 'librechat-data-provider/react-query'; +import { getEndpointField, SettingsViews } from 'librechat-data-provider'; +import type { TConversation } from 'librechat-data-provider'; import type { TSettingsProps } from '~/common'; import { useGetEndpointsQuery } from '~/data-provider'; -import { cn, getEndpointField } from '~/utils'; import { getSettings } from './Settings'; +import { cn } from '~/utils'; import store from '~/store'; export default function Settings({ diff --git a/client/src/components/Messages/Content/Error.tsx b/client/src/components/Messages/Content/Error.tsx index 43da0e46e7..469e29fe32 100644 --- a/client/src/components/Messages/Content/Error.tsx +++ b/client/src/components/Messages/Content/Error.tsx @@ -43,6 +43,7 @@ const errorMessages = { [ErrorTypes.NO_BASE_URL]: 'com_error_no_base_url', [ErrorTypes.INVALID_ACTION]: `com_error_${ErrorTypes.INVALID_ACTION}`, [ErrorTypes.INVALID_REQUEST]: `com_error_${ErrorTypes.INVALID_REQUEST}`, + [ErrorTypes.REFUSAL]: 'com_error_refusal', [ErrorTypes.MISSING_MODEL]: (json: TGenericError, localize: LocalizeFunction) => { const { info: endpoint } = json; const provider = (alternateName[endpoint ?? ''] as string | undefined) ?? endpoint ?? 'unknown'; diff --git a/client/src/components/Nav/SettingsTabs/Chat/Chat.tsx b/client/src/components/Nav/SettingsTabs/Chat/Chat.tsx index 70858a9b72..5c703922fc 100644 --- a/client/src/components/Nav/SettingsTabs/Chat/Chat.tsx +++ b/client/src/components/Nav/SettingsTabs/Chat/Chat.tsx @@ -1,4 +1,5 @@ import { memo } from 'react'; +import { showThinkingAtom } from '~/store/showThinking'; import FontSizeSelector from './FontSizeSelector'; import { ForkSettings } from './ForkSettings'; import ChatDirection from './ChatDirection'; @@ -28,7 +29,7 @@ const toggleSwitchConfigs = [ key: 'centerFormOnLanding', }, { - stateAtom: store.showThinking, + stateAtom: showThinkingAtom, localizationKey: 'com_nav_show_thinking', switchId: 'showThinking', hoverCardText: undefined, diff --git a/client/src/components/Nav/SettingsTabs/Chat/ShowThinking.tsx b/client/src/components/Nav/SettingsTabs/Chat/ShowThinking.tsx index 949453cb5c..905efcc98c 100644 --- a/client/src/components/Nav/SettingsTabs/Chat/ShowThinking.tsx +++ b/client/src/components/Nav/SettingsTabs/Chat/ShowThinking.tsx @@ -1,18 +1,18 @@ -import { useRecoilState } from 'recoil'; +import { useAtom } from 'jotai'; import { Switch, InfoHoverCard, ESide } from '@librechat/client'; +import { showThinkingAtom } from '~/store/showThinking'; import { useLocalize } from '~/hooks'; -import store from '~/store'; export default function SaveDraft({ onCheckedChange, }: { onCheckedChange?: (value: boolean) => void; }) { - const [showThinking, setSaveDrafts] = useRecoilState(store.showThinking); + const [showThinking, setShowThinking] = useAtom(showThinkingAtom); const localize = useLocalize(); const handleCheckedChange = (value: boolean) => { - setSaveDrafts(value); + setShowThinking(value); if (onCheckedChange) { onCheckedChange(value); } diff --git a/client/src/components/Nav/SettingsTabs/General/General.tsx b/client/src/components/Nav/SettingsTabs/General/General.tsx index ebde274b30..0cb565dad7 100644 --- a/client/src/components/Nav/SettingsTabs/General/General.tsx +++ b/client/src/components/Nav/SettingsTabs/General/General.tsx @@ -68,9 +68,11 @@ export const ThemeSelector = ({ export const LangSelector = ({ langcode, onChange, + portal = true, }: { langcode: string; onChange: (value: string) => void; + portal?: boolean; }) => { const localize = useLocalize(); @@ -124,10 +126,11 @@ export const LangSelector = ({