fix: correct isStreaming logic when cost is defined

The logic was inverted - when cost is defined in api_req_started, it means the API request has finished (streaming is complete), so should return false, not true.
This commit is contained in:
daniel-lxs 2025-11-03 10:55:21 -05:00
parent f37deb4557
commit 4ef796822c
No known key found for this signature in database
GPG key ID: 21C74479048B3AA6

View file

@ -558,7 +558,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
// Otherwise, check if cost is defined to determine if streaming is complete
if ("cost" in info && info.cost !== undefined) {
return true // API request has not finished yet.
return false // API request has finished.
}
}
}