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
fix: enhance chat streaming logic with abort handling (#140)
This PR fixes the issue where you start a new conversation and if one
happens to already be streaming in, it continues to stream in in the new
chat.
The fix introduces an AbortController to manage streaming cancellations
effectively. It prevents unnecessary processing of stream chunks when
the stream is aborted or cancelled, improving performance and error
handling. The chat component now properly handles stream cancellation,
ensuring that no errors are logged if the stream is intentionally
stopped. We can use this in future for a stop streaming button feature
in a current chat, a common pattern in Chat apps.
Fixes#107
**Before**

**After**

0 commit comments