fix: make search_and_replace tool use Save/Cancel buttons for consistency

- Add searchAndReplace to the case that handles write tools
- This ensures search_and_replace uses Save/Cancel buttons like other write tools
- Fixes issue where Approve/Reject buttons cleared textarea content instead of sending it to chat
- Maintains consistent UX across all write operations

Fixes #5756
This commit is contained in:
Roo Code 2025-07-15 19:29:43 +00:00
parent 9db64de363
commit 4c215a01d9

View file

@ -295,6 +295,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
case "appliedDiff":
case "newFileCreated":
case "insertContent":
case "searchAndReplace":
setPrimaryButtonText(t("chat:save.title"))
setSecondaryButtonText(t("chat:reject.title"))
break