diff --git a/client/src/common/types.ts b/client/src/common/types.ts index 406812693bb..a5a8a01c11b 100644 --- a/client/src/common/types.ts +++ b/client/src/common/types.ts @@ -335,6 +335,7 @@ export interface ExtendedFile { export type ContextType = { navVisible: boolean; setNavVisible: (visible: boolean) => void }; export interface SwitcherProps { + endpoint?: EModelEndpoint | null; endpointKeyProvided: boolean; isCollapsed: boolean; } diff --git a/client/src/components/SidePanel/SidePanel.tsx b/client/src/components/SidePanel/SidePanel.tsx index 01874638a32..1f7f07da992 100644 --- a/client/src/components/SidePanel/SidePanel.tsx +++ b/client/src/components/SidePanel/SidePanel.tsx @@ -38,10 +38,10 @@ const SidePanel = ({ const [fullCollapse, setFullCollapse] = useState(fullPanelCollapse); const [collapsedSize, setCollapsedSize] = useState(navCollapsedSize); const { data: endpointsConfig = {} as TEndpointsConfig } = useGetEndpointsQuery(); - const { data: keyExpiry = { expiresAt: undefined } } = useUserKeyQuery(EModelEndpoint.assistants); const isSmallScreen = useMediaQuery('(max-width: 767px)'); const { conversation } = useChatContext(); const { endpoint } = conversation ?? {}; + const { data: keyExpiry = { expiresAt: undefined } } = useUserKeyQuery(endpoint ?? ''); const panelRef = useRef(null); @@ -187,7 +187,11 @@ const SidePanel = ({ isCollapsed ? 'h-[52px]' : 'px-2', )} > - +