LibreChat/api/app/clients/tools/structured
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
..
specs 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
AzureAISearch.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
credentials.js 🎥 feat: YouTube Tool (#5582) 2025-01-31 19:11:04 -05:00
DALLE3.js 🧱 fix: DALL-E Proxy Bypass (#9971) 2025-10-05 06:56:21 -04:00
FluxAPI.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
GoogleSearch.js 🚧 chore: merge latest dev build (#4288) 2024-09-30 17:17:57 -04:00
OpenAIImageTools.js 🔄 refactor: OAI Image Edit Proxy, Speech Settings Handling, Import Query Data Usage (#10281) 2025-10-28 09:36:03 -04:00
OpenWeather.js 🌤️ feat: Add OpenWeather Tool for Weather Data Retrieval (#5246) 2025-01-10 08:54:08 -05:00
StableDiffusion.js 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
TavilySearch.js 🎥 feat: YouTube Tool (#5582) 2025-01-31 19:11:04 -05:00
TavilySearchResults.js 🔍 feat: Additional Tavily API Tool Parameters (#7232) 2025-05-06 22:50:11 -04:00
TraversaalSearch.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
Wolfram.js 🧹 chore: Cleanup Logger and Utility Imports (#9935) 2025-10-01 23:30:47 -04:00
YouTube.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00