diff --git a/src/core/tools/searchAndReplaceTool.ts b/src/core/tools/searchAndReplaceTool.ts index f371901e5f..7a503b5f1e 100644 --- a/src/core/tools/searchAndReplaceTool.ts +++ b/src/core/tools/searchAndReplaceTool.ts @@ -41,7 +41,7 @@ async function validateParams( return false } - if (!replace) { + if (replace === undefined) { cline.consecutiveMistakeCount++ cline.recordToolError("search_and_replace") pushToolResult(await cline.sayAndCreateMissingParamError("search_and_replace", "replace")) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 486183c150..8c09b101b1 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -323,36 +323,14 @@ export const ChatRowContent = ({ case "searchAndReplace": return ( <> -
+
{toolIcon("replace")} - + {message.type === "ask" ? t("chat:fileOperations.wantsToSearchReplace") : t("chat:fileOperations.didSearchReplace")}
-
-
- Search: - {tool.search} - {tool.useRegex && (regex)} - {tool.ignoreCase && ( - (case-insensitive) - )} -
-
- Replace: - {tool.replace} -
- {(tool.startLine !== undefined || tool.endLine !== undefined) && ( -
- Lines: - - {tool.startLine ?? 1} - {tool.endLine ?? "end"} - -
- )} -