You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Nebula] Remove presence message when adding an error message (#5711)
Fixes: DASH-614
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving error handling in the `setMessages` function within the `ChatPageContent` component. It modifies how error messages are added to the message list, ensuring that the previous messages are preserved correctly.
### Detailed summary
- Refactored `setMessages` to create a new array `newMessages` based on previous messages.
- Added a condition to exclude the last message if its type is "presence".
- Pushed a new error message object containing the error details to `newMessages`.
- Returned `newMessages` from `setMessages`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
0 commit comments