fix: clear approval buttons when API request starts (ROO-526) (#10702)

This commit is contained in:
Daniel 2026-01-13 18:15:04 -05:00 committed by GitHub
parent 83037104c6
commit 440924ad62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -402,12 +402,14 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
setSendingDisabled(true)
break
case "api_req_started":
if (secondLastMessage?.ask === "command_output") {
setSendingDisabled(true)
setSelectedImages([])
setClineAsk(undefined)
setEnableButtons(false)
}
// Clear button state when a new API request starts
// This fixes buttons persisting when the task continues
setSendingDisabled(true)
setSelectedImages([])
setClineAsk(undefined)
setEnableButtons(false)
setPrimaryButtonText(undefined)
setSecondaryButtonText(undefined)
break
case "api_req_finished":
case "error":