Merge pull request #1087 from shriyaMadan/main

Fix streaming issue on new conversation ID
This commit is contained in:
Alex authored and GitHub committed 2024-08-22 11:22:42 +01:00
commit 7502e1881f
1 file changed
+3 -7
+3 -7
View File
@@ -54,13 +54,9 @@ export default function Conversation() {
}
}, []);
useEffect(() => {
return () => {
if (status !== 'idle') {
fetchStream.current && fetchStream.current.abort(); //abort previous stream
}
};
}, [status]);
useEffect(()=>{
fetchStream.current && fetchStream.current.abort();
},[conversationId]);
useEffect(() => {
const observerCallback: IntersectionObserverCallback = (entries) => {