🧩 fix: Redirect Stability and Build Chunking (#11965)

* 🔧 chore: Update Vite configuration to include additional package checks

- Enhanced the Vite configuration to recognize 'dnd-core' and 'flip-toolkit' alongside existing checks for 'react-dnd' and 'react-flip-toolkit' for improved handling of React interactions.
- Updated the markdown highlighting logic to also include 'lowlight' in addition to 'highlight.js' for better syntax highlighting support.

* 🔧 fix: Update AuthContextProvider to prevent infinite re-fire of useEffect

- Modified the dependency array of the useEffect hook in AuthContextProvider to an empty array, preventing unnecessary re-executions and potential infinite loops. Added an ESLint comment to clarify the decision regarding stable dependencies at mount.

* chore: import order
This commit is contained in:
Danny Avila 2026-02-26 16:43:24 -05:00 committed by GitHub
parent 09d5b1a739
commit b01f3ccada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 8 deletions

View file

@ -11,8 +11,8 @@ import { debounce } from 'lodash';
import { useRecoilState } from 'recoil';
import { useNavigate } from 'react-router-dom';
import { setTokenHeader, SystemRoles } from 'librechat-data-provider';
import type { ReactNode } from 'react';
import type * as t from 'librechat-data-provider';
import type { ReactNode } from 'react';
import {
useGetRole,
useGetUserQuery,
@ -167,7 +167,8 @@ const AuthContextProvider = ({
navigate(buildLoginRedirectUrl());
},
});
}, [authConfig?.test, refreshToken, setUserContext, navigate]);
// eslint-disable-next-line react-hooks/exhaustive-deps -- deps are stable at mount; adding refreshToken causes infinite re-fire
}, []);
useEffect(() => {
if (userQuery.data) {