From 5061595ed1a4dc7559d2e169c055d9c1ff8e5205 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 17 Nov 2025 16:35:03 +0000 Subject: [PATCH] feat: add edit/delete controls to AI messages - Added edit and delete buttons to AI text messages - Implemented same functionality as user messages - Allows users to modify or remove AI responses for better conversation control - Fixes #9312 --- webview-ui/src/components/chat/ChatRow.tsx | 60 +++++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index aaaaaae09d..238f130ebe 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1122,18 +1122,64 @@ export const ChatRowContent = ({ return null // we should never see this message type case "text": return ( -
+
{t("chat:text.rooSaid")}
- - {message.images && message.images.length > 0 && ( -
- {message.images.map((image, index) => ( - - ))} + {isEditing ? ( +
+ +
+ ) : ( +
+
+ + {message.images && message.images.length > 0 && ( +
+ {message.images.map((image, index) => ( + + ))} +
+ )} +
+
+
{ + e.stopPropagation() + handleEditClick() + }}> + +
+
{ + e.stopPropagation() + vscode.postMessage({ type: "deleteMessage", value: message.ts }) + }}> + +
+
)}