Skip to content

Commit ac57bd0

Browse files
committed
fix: properly handle streaming state when api_req_started has no cost
When api_req_started exists without cost or cancelReason fields, the API request is still in progress and should be treated as streaming. Only return false when cost (completed) or cancelReason (cancelled) are present.
1 parent 4ef7968 commit ac57bd0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
560560
if ("cost" in info && info.cost !== undefined) {
561561
return false // API request has finished.
562562
}
563+
564+
// If we have api_req_started without cost or cancelReason, streaming is in progress
565+
return true
563566
}
564567
}
565568
}

0 commit comments

Comments
 (0)