Skip to content

Commit 4ef7968

Browse files
committed
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.
1 parent f37deb4 commit 4ef7968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
558558

559559
// Otherwise, check if cost is defined to determine if streaming is complete
560560
if ("cost" in info && info.cost !== undefined) {
561-
return true // API request has not finished yet.
561+
return false // API request has finished.
562562
}
563563
}
564564
}

0 commit comments

Comments
 (0)