Skip to content

Commit 32d2726

Browse files
committed
Handle cases like questions and resuming
1 parent 7dd9bdc commit 32d2726

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
170170
setSecondaryButtonText(t("chat:startNewTask.title"))
171171
break
172172
case "followup":
173+
if (!isPartial) {
174+
playSound("notification")
175+
}
173176
setTextAreaDisabled(isPartial)
174177
setClineAsk("followup")
175178
// setting enable buttons to `false` would trigger a focus grab when
@@ -234,6 +237,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
234237
setSecondaryButtonText(t("chat:killCommand.title"))
235238
break
236239
case "use_mcp_server":
240+
if (!isAutoApproved(lastMessage) && !isPartial) {
241+
playSound("notification")
242+
}
237243
setTextAreaDisabled(isPartial)
238244
setClineAsk("use_mcp_server")
239245
setEnableButtons(!isPartial)
@@ -252,6 +258,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
252258
setSecondaryButtonText(undefined)
253259
break
254260
case "resume_task":
261+
if (!isAutoApproved(lastMessage) && !isPartial) {
262+
playSound("notification")
263+
}
255264
setTextAreaDisabled(false)
256265
setClineAsk("resume_task")
257266
setEnableButtons(true)
@@ -260,6 +269,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
260269
setDidClickCancel(false) // special case where we reset the cancel button state
261270
break
262271
case "resume_completed_task":
272+
if (!isPartial) {
273+
playSound("celebration")
274+
}
263275
setTextAreaDisabled(false)
264276
setClineAsk("resume_completed_task")
265277
setEnableButtons(true)

0 commit comments

Comments
 (0)