fix: reset user response flag on new ask messages to fix auto-approval (#5508)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This commit is contained in:
Daniel 2025-07-09 08:54:26 -05:00 committed by GitHub
parent 0e0da80f88
commit 58cacc3cf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Fix bug where auto-approval was intermittently failing

View file

@ -240,6 +240,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
if (lastMessage) {
switch (lastMessage.type) {
case "ask":
// Reset user response flag when a new ask arrives to allow auto-approval
userRespondedRef.current = false
const isPartial = lastMessage.partial === true
switch (lastMessage.ask) {
case "api_req_failed":