Skip to content

Commit 1695f3b

Browse files
committed
fix: reset user response flag on new ask messages to fix auto-approval
After update_todo_list tool execution, subsequent tools were not being auto-approved even when auto-approval was enabled. This was because userRespondedRef.current remained true after the first auto-approval. The fix resets this flag when any new ask message arrives, allowing each tool request to be evaluated for auto-approval independently.
1 parent 0e0da80 commit 1695f3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
240240
if (lastMessage) {
241241
switch (lastMessage.type) {
242242
case "ask":
243+
// Reset user response flag when a new ask arrives to allow auto-approval
244+
userRespondedRef.current = false
243245
const isPartial = lastMessage.partial === true
244246
switch (lastMessage.ask) {
245247
case "api_req_failed":

0 commit comments

Comments
 (0)