fix: prevent focus grab when follow-up question is presented

This commit is contained in:
Roo Code 2025-12-04 04:54:49 +00:00
parent d065b881e3
commit c0f3df0418

View file

@ -788,7 +788,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
case "action":
switch (message.action!) {
case "didBecomeVisible":
if (!isHidden && !sendingDisabled && !enableButtons) {
if (!isHidden && !sendingDisabled && !enableButtons && clineAsk !== "followup") {
textAreaRef.current?.focus()
}
break
@ -849,6 +849,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
isHidden,
sendingDisabled,
enableButtons,
clineAsk,
currentTaskItem,
handleChatReset,
handleSendMessage,
@ -975,12 +976,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
useDebounceEffect(
() => {
if (!isHidden && !sendingDisabled && !enableButtons) {
if (!isHidden && !sendingDisabled && !enableButtons && clineAsk !== "followup") {
textAreaRef.current?.focus()
}
},
50,
[isHidden, sendingDisabled, enableButtons],
[isHidden, sendingDisabled, enableButtons, clineAsk],
)
useEffect(() => {