Skip to content

Commit 58cacc3

Browse files
daniel-lxsmrubens
andauthored
fix: reset user response flag on new ask messages to fix auto-approval (#5508)
Co-authored-by: Matt Rubens <[email protected]>
1 parent 0e0da80 commit 58cacc3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/ninety-birds-appear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Fix bug where auto-approval was intermittently failing

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)