LibreChat/packages/data-provider/src
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
..
react-query 🔐 refactor: Improve MCP Auth UX for Agent Panel (#9762) 2025-09-22 08:53:19 -04:00
types 🤖 feat: Agent Handoffs (Routing) (#10176) 2025-11-05 17:15:17 -05:00
accessPermissions.ts 🛂 feat: Role as Permission Principal Type 2025-08-13 16:24:23 -04:00
actions.ts 🔒 feat: Implement Cross-Platform IP Validation Functionality 2025-11-19 17:48:29 -05:00
api-endpoints.ts 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
artifacts.ts 🪟 fix: Windows Build (npm) (#3889) 2024-09-02 10:01:09 -04:00
azure.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
bedrock.ts 🪨 feat: Add Bedrock Prompt Caching Support (#8271) 2025-11-13 10:21:50 -05:00
config.ts 🤖 feat: GPT-5.1 (#10491) 2025-11-14 12:28:20 -05:00
createPayload.ts ♻️ fix: Correct Message ID Assignment Logic (#8439) 2025-07-14 00:57:20 -04:00
data-service.ts 🔗 fix: Add branch-specific shared links (targetMessageId) (#10016) 2025-10-10 08:42:05 -04:00
feedback.ts 📈 feat: Chat rating for feedback (#5878) 2025-05-30 12:16:34 -04:00
file-config.spec.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
file-config.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
generate.ts 🪐 feat: Initial OpenAI Responses API Support (#8149) 2025-06-30 18:34:47 -04:00
headers-helpers.ts chore: add back data-provider 2023-07-30 11:50:24 -04:00
index.ts 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
keys.ts 🧰 refactor: Decouple MCP Tools from System Tools (#9748) 2025-09-21 07:56:40 -04:00
mcp.ts 🆔 feat: Add OpenID Connect Federated Provider Token Support (#9931) 2025-11-21 09:51:11 -05:00
messages.ts 🐛 fix: String Interpolation in Messages Endpoint from #9155 (#9312) 2025-08-27 13:48:48 -04:00
models.ts 📛 feat: Chat Badges via Model Specs (#10272) 2025-10-27 19:46:30 -04:00
parameterSettings.ts 🤖 feat: GPT-5.1 (#10491) 2025-11-14 12:28:20 -05:00
parsers.ts 📎 feat: Direct Provider Attachment Support for Multimodal Content (#9994) 2025-10-06 17:30:16 -04:00
permissions.ts 🛂 feat: Role as Permission Principal Type 2025-08-13 16:24:23 -04:00
request.ts 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
roles.ts 🛂 feat: Role as Permission Principal Type 2025-08-13 16:24:23 -04:00
schemas.ts 🤖 refactor: Improve Agent Handoff Context Tracking (#10553) 2025-11-17 16:57:51 -05:00
types.ts 🛝 feat: Default Params via Custom Params (#10457) 2025-11-11 15:31:52 -05:00
utils.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00