mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: reset UI state when canceling during streaming to prevent frozen cancel button
This fixes issue #9529 where the cancel button would get stuck/frozen when attempting to cancel a task during an API request. The UI state variables (sendingDisabled, clineAsk, enableButtons) are now properly reset when canceling during streaming, allowing the UI to return to the correct state and show the "new task" and "terminate" buttons. Fixes #9529
This commit is contained in:
parent
becdb1ac1c
commit
3ff10faede
1 changed files with 4 additions and 0 deletions
|
|
@ -682,6 +682,10 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
if (isStreaming) {
|
||||
vscode.postMessage({ type: "cancelTask" })
|
||||
setDidClickCancel(true)
|
||||
// Reset UI state to prevent frozen UI after canceling
|
||||
setSendingDisabled(true)
|
||||
setClineAsk(undefined)
|
||||
setEnableButtons(false)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue