Skip to content

Commit bc91daa

Browse files
committed
fix: prevent notification sound on attempt_completion with queued messages
- Added check for messageQueue.length before playing celebration sound - Only plays sound when both !isPartial and messageQueue is empty - Added comprehensive tests to verify the fix - Fixes #8537
1 parent 5a3f911 commit bc91daa

File tree

2 files changed

+524
-1
lines changed

2 files changed

+524
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
394394
break
395395
case "completion_result":
396396
// extension waiting for feedback. but we can just present a new task button
397-
if (!isPartial) {
397+
// Only play celebration sound if there are no queued messages
398+
if (!isPartial && messageQueue.length === 0) {
398399
playSound("celebration")
399400
}
400401
setSendingDisabled(isPartial)

0 commit comments

Comments
 (0)