Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion webview-ui/src/components/chat/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1493,10 +1493,23 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
return currentValue !== "" ? `${currentValue} \n${suggestion.answer}` : suggestion.answer
})
} else {
// Don't clear the input value when sending a follow-up choice
// The message should be sent but the text area should preserve what the user typed
const preservedInput = inputValue
handleSendMessage(suggestion.answer, [])
// Restore the input value after sending
setInputValue(preservedInput)
}
},
[handleSendMessage, setInputValue, switchToMode, alwaysAllowModeSwitch, clineAsk, markFollowUpAsAnswered],
[
handleSendMessage,
setInputValue,
switchToMode,
alwaysAllowModeSwitch,
clineAsk,
markFollowUpAsAnswered,
inputValue,
],
)

const handleBatchFileResponse = useCallback((response: { [key: string]: boolean }) => {
Expand Down
Loading