LibreChat/client/src/components/Chat
Danny Avila 026890cd27
🛡️ fix: Improve Error Handling and Null Safety in SSE Event Processing (#10751)
* 🔧 fix: Handle null content parts in message processing

- Added checks to filter out null content parts in various message handling functions, ensuring robustness against undefined values.
- Updated the `extractMessageContent`, `useContentHandler`, `useEventHandlers`, and `useStepHandler` hooks to prevent errors caused by null parts.
- Enhanced the `getAllContentText` utility to only include valid content types, improving overall message integrity.

* 🔧 fix: Enhance error handling in event and SSE handlers

- Wrapped critical sections in try-catch blocks within `useEventHandlers` and `useSSE` hooks to improve error management and prevent application crashes.
- Added console error logging for better debugging and tracking of issues during message processing and conversation aborting.
- Ensured that UI states like `setIsSubmitting` and `setShowStopButton` are correctly updated in case of errors, maintaining a consistent user experience.

* 🔧 fix: Filter out null and empty content in message export

- Enhanced the `useExportConversation` hook to filter out null content parts and empty strings during message processing, ensuring only valid content is included in the export.
- This change improves the integrity of exported conversations by preventing unnecessary empty entries in the output.
2025-12-01 14:05:50 -05:00
..
Input 🪄 style: Improved Input Collapse UI (#10659) 2025-11-25 17:02:52 -05:00
Menus 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
Messages 🛡️ fix: Improve Error Handling and Null Safety in SSE Event Processing (#10751) 2025-12-01 14:05:50 -05:00
AddMultiConvo.tsx 📦 feat: Move Shared Components to @librechat/client (#8685) 2025-07-27 12:19:01 -04:00
ChatView.tsx 🐛 fix: String Interpolation in Messages Endpoint from #9155 (#9312) 2025-08-27 13:48:48 -04:00
ExportAndShareMenu.tsx 📦 feat: Move Shared Components to @librechat/client (#8685) 2025-07-27 12:19:01 -04:00
Footer.tsx 🎨 style: Fix Footer Centering 2025-04-01 04:07:01 -04:00
Header.tsx 📢 fix: Remove Side Panel Elements from Screen Reader when Hidden (#10648) 2025-11-25 13:56:32 -05:00
Landing.tsx 📢 fix: Resolved Screen Reader Issues with TooltipAnchor (#10580) 2025-11-19 17:10:10 -05:00
Presentation.tsx feat: Artifact Management Enhancements, Version Control, and UI Refinements (#10318) 2025-11-12 13:32:47 -05:00
TemporaryChat.tsx 📦 feat: Move Shared Components to @librechat/client (#8685) 2025-07-27 12:19:01 -04:00