From c66fe250601a2d38282334b1d37958502bdd2329 Mon Sep 17 00:00:00 2001 From: Justin Quan Date: Mon, 16 Dec 2024 09:30:20 -0800 Subject: [PATCH] ignore command and mcp asks with no text --- webview-ui/src/components/chat/ChatView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index a959cdb..604285d 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -139,7 +139,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSecondaryButtonText("Reject") break case "command": - if (!isAutoApproved(lastMessage)) { + if (lastMessage.text && !isAutoApproved(lastMessage)) { playSound("notification") } setTextAreaDisabled(isPartial) @@ -156,7 +156,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSecondaryButtonText(undefined) break case "use_mcp_server": - if (!isAutoApproved(lastMessage)) { + if (lastMessage.text && !isAutoApproved(lastMessage)) { playSound("notification") } setTextAreaDisabled(isPartial)