LibreChat/client/src/hooks
Danny Avila cde5079886
🎯 fix: Use Agents Endpoint Config for Agent Panel File Upload Validation (#11992)
* fix: Use correct endpoint for file validation in agent panel uploads

  Agent panel file uploads (FileSearch, FileContext, Code/Files) were validating against the active conversation's endpoint config instead of the agents endpoint config. This caused incorrect file size limits when the active chat used a different endpoint.

  Add endpointOverride option to useFileHandling so callers can specify the correct endpoint for validation independent of the active conversation.

* fix: Use agents endpoint config for agent panel file upload validation

Agent panel file uploads (FileSearch, FileContext, Code/Files) validated
against the active conversation's endpoint config instead of the agents
endpoint config. This caused wrong file size limits when the active chat
used a different endpoint.

Adds endpointOverride to useFileHandling so callers can specify the
correct endpoint for both validation and upload routing, independent of
the active conversation.

* test: Add unit tests for useFileHandling hook to validate endpoint overrides

Introduced comprehensive tests for the useFileHandling hook, ensuring correct behavior when using endpoint overrides for file validation and upload routing. The tests cover various scenarios, including fallback to conversation endpoints and proper handling of agent-specific configurations, enhancing the reliability of file handling in the application.
2026-02-28 15:01:51 -05:00
..
__tests__ 🪃 fix: Prevent Recursive Login Redirect Loop (#11964) 2026-02-26 16:10:14 -05:00
Agents 🗂️ refactor: Artifacts via Model Specs & Scope Badge Persistence by Spec Context (#11796) 2026-02-14 13:56:50 -05:00
Artifacts feat: Artifact Management Enhancements, Version Control, and UI Refinements (#10318) 2025-11-12 13:32:47 -05:00
Assistants 📢 fix: Invalid engineTTS and Conversation State on Navigation (#6904) 2025-04-15 21:00:06 -04:00
Audio 👋 feat: remove Edge TTS (#6885) 2025-04-14 22:39:01 -04:00
Chat 🪹 fix: Prevent whitespace-only Chat input Submissions (#11838) 2026-02-17 20:53:22 -05:00
Config 🧩 refactor: Decouple MCP Config from Startup Config (#10689) 2025-12-11 16:36:34 -05:00
Conversations 📋 chore: Document Uncaught Exception Config and Fix Empty Text Export (#11812) 2026-02-16 16:47:07 -05:00
Endpoint 🌙 feat: Moonshot Provider Support (#11621) 2026-02-04 10:53:57 +01:00
Files 🎯 fix: Use Agents Endpoint Config for Agent Panel File Upload Validation (#11992) 2026-02-28 15:01:51 -05:00
Generic 🪄 refactor: UI Polish and Admin Dialog Unification (#11108) 2025-12-28 11:01:25 -05:00
Input 🔊 refactor: Audio Chunk Handling for STT (#11140) 2025-12-29 11:32:17 -05:00
MCP ♻️ refactor: On-demand MCP connections: remove proactive reconnect, default to available (#11839) 2026-02-17 22:33:57 -05:00
Mermaid 📊 feat: Render Inline Mermaid Diagrams (#11112) 2025-12-26 19:53:06 -05:00
Messages ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
Nav 🪄 refactor: UI Polish and Admin Dialog Unification (#11108) 2025-12-28 11:01:25 -05:00
Plugins 🗂️ refactor: Artifacts via Model Specs & Scope Badge Persistence by Spec Context (#11796) 2026-02-14 13:56:50 -05:00
Prompts 🗨️ refactor: Only Allow Prompt Queries with Access (#9688) 2025-09-18 10:00:33 -04:00
Roles 🪺 refactor: Nest Permission fields for Roles (#6487) 2025-04-04 19:47:14 -04:00
Sharing 🛸 feat: Remote Agent Access with External API Support (#11503) 2026-01-28 17:44:33 -05:00
SSE 🆔 fix: Atomic File Dedupe, Bedrock Tokens Fix, and Allowed MIME Types (#11675) 2026-02-07 13:26:18 -05:00
ApiErrorBoundaryContext.tsx 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
AuthContext.tsx 🧩 fix: Redirect Stability and Build Chunking (#11965) 2026-02-26 16:43:24 -05:00
index.ts 📊 feat: Render Inline Mermaid Diagrams (#11112) 2025-12-26 19:53:06 -05:00
ScreenshotContext.tsx 🌒 refactor: Theme Handling to use isDark Utility (#9405) 2025-09-03 02:56:36 -04:00
useChatBadges.ts 🖥️ feat: Code Interpreter API for Non-Agent Endpoints (#6803) 2025-04-09 16:11:16 -04:00
useDocumentTitle.ts refactor: Settings/Presets UI Restructure, convert many files to TS (#740) 2023-08-04 13:56:44 -04:00
useFavorites.ts 📌 feat: Pin Agents and Models in the Sidebar (#10634) 2025-12-11 16:38:20 -05:00
useGenerationsByLatest.ts 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
useInfiniteScroll.ts 🪟 fix: Auto-fetch agents to fill Viewport in Marketplace Scroll (#9591) 2025-09-12 10:59:15 -04:00
useLocalize.ts 💸 feat: Balance Tab in Settings Dialog (#6537) 2025-05-29 08:25:37 -04:00
useLocalizedConfig.ts ⚙️ feat: Add configurable trust checkbox labels for MCP Server Dialog (#10820) 2025-12-11 16:38:40 -05:00
useLocalStorage.tsx refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874) 2023-09-06 10:46:27 -04:00
useLocalStorageAlt.tsx 🔧 fix: MCP Selection Persist and UI Flicker Issues (#9324) 2025-08-28 00:44:49 -04:00
useNewConvo.ts 🎭 feat: Override Custom Endpoint Schema with Specified Params Endpoint (#11788) 2026-02-13 23:04:51 -05:00
usePersonalizationAccess.ts 🧠 feat: User Memories for Conversational Context (#7760) 2025-06-07 18:52:22 -04:00
useResourcePermissions.ts 💻 feat: Deeper MCP UI integration in the Chat UI (#9669) 2025-12-11 16:41:11 -05:00
useScrollToRef.ts feat: Optimize Scroll Handling with Intersection Observer (#3564) 2024-08-06 16:18:15 -04:00
useTimeout.tsx 🔧 fix: URL params, package mismatch, typing, shared link redirect, and o1 (azure) (#4899) 2024-12-07 16:55:17 -05:00
useVirtualGrid.ts 🖼️ style: Improve Marketplace & Sharing Dialog UI 2025-08-13 16:24:24 -04:00
useWakeLock.ts feat: Prevent Screen Sleep During Response Generation (#10597) 2025-11-21 09:14:32 -05:00