LibreChat/client/src/routes
catmeme 7aa8d49f3a
🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116)
* fix: add basePath pattern to support login/register and image paths

* Fix linter errors

* refactor: Update import statements for getBasePath and isEnabled, and add path utility functions with tests

- Refactored imports in addImages.js and StableDiffusion.js to use getBasePath from '@librechat/api'.
- Consolidated isEnabled and getBasePath imports in validateImageRequest.js.
- Introduced new path utility functions in path.ts and corresponding unit tests in path.spec.ts to validate base path extraction logic.

* fix: Update domain server base URL in MarkdownComponents and refactor authentication redirection logic

- Changed the domain server base URL in MarkdownComponents.tsx to use the API base URL.
- Refactored the useAuthRedirect hook to utilize React Router's navigate for redirection instead of window.location, ensuring a smoother SPA experience.
- Added unit tests for the useAuthRedirect hook to verify authentication redirection behavior.

* test: Mock isEnabled in validateImages.spec.js for improved test isolation

- Updated validateImages.spec.js to mock the isEnabled function from @librechat/api, ensuring that tests can run independently of the actual implementation.
- Cleared the DOMAIN_CLIENT environment variable before tests to avoid interference with basePath resolution.

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-11-21 11:25:14 -05:00
..
__tests__ 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
Layouts 📦 feat: Move Shared Components to @librechat/client (#8685) 2025-07-27 12:19:01 -04:00
ChatRoute.tsx 🎪 refactor: Allow Last Model Spec Selection without Prioritizing (#10258) 2025-10-26 21:37:55 -04:00
Dashboard.tsx 🗨️ feat: Prompts (#3131) 2024-06-20 20:24:32 -04:00
index.tsx 🔖 fix: Agent Marketplace Bookmark and New Chat buttons (#9549) 2025-09-10 19:01:34 -04:00
Root.tsx 🗨️ refactor: Optimize Prompt Queries 2025-08-13 16:24:25 -04:00
RouteErrorBoundary.tsx fix: Address Accessibility Issues (#10260) 2025-10-27 19:46:43 -04:00
Search.tsx 🕵️ refactor: Optimize Message Search Performance (#9818) 2025-09-24 16:27:34 -04:00
ShareRoute.tsx 🚀 feat: Shared Links (#2772) 2024-05-17 18:13:32 -04:00
useAuthRedirect.ts 🤖 feat: Model Specs & Save Tools per Convo/Preset (#2578) 2024-04-30 22:11:48 -04:00