Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/core/tools/searchAndReplaceTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
26 changes: 2 additions & 24 deletions webview-ui/src/components/chat/ChatRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,36 +323,14 @@ export const ChatRowContent = ({
case "searchAndReplace":
return (
<>
<div className="flex items-center gap-2.5 mb-2.5">
<div style={headerStyle}>
{toolIcon("replace")}
<span className="font-bold">
<span style={{ fontWeight: "bold" }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use tailwind here ?

Copy link
Collaborator Author

@mrubens mrubens Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it just made it consistent with the other chatrows (that's what I asked it to do, though I meant visually and not necessarily switching away from tailwind). Maybe we should update them all as a follow-up?

{message.type === "ask"
? t("chat:fileOperations.wantsToSearchReplace")
: t("chat:fileOperations.didSearchReplace")}
</span>
</div>
<div className="mb-2.5">
<div className="flex items-center gap-2.5 mb-1.5">
<span className="text-vscode-descriptionForeground">Search:</span>
<code>{tool.search}</code>
{tool.useRegex && <span className="text-vscode-descriptionForeground">(regex)</span>}
{tool.ignoreCase && (
<span className="text-vscode-descriptionForeground">(case-insensitive)</span>
)}
</div>
<div className="flex items-center gap-2.5 mb-1.5">
<span className="text-vscode-descriptionForeground">Replace:</span>
<code>{tool.replace}</code>
</div>
{(tool.startLine !== undefined || tool.endLine !== undefined) && (
<div className="flex items-center gap-2.5">
<span className="text-vscode-descriptionForeground">Lines:</span>
<code>
{tool.startLine ?? 1} - {tool.endLine ?? "end"}
</code>
</div>
)}
</div>
<CodeAccordian
progressStatus={message.progressStatus}
isLoading={message.partial}
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/i18n/locales/de/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"wantsToEdit": "Roo möchte diese Datei bearbeiten:",
"wantsToEditOutsideWorkspace": "Roo möchte diese Datei außerhalb des Arbeitsbereichs bearbeiten:",
"wantsToCreate": "Roo möchte eine neue Datei erstellen:",
"wantsToSearchReplace": "Roo möchte Suchen und Ersetzen in dieser Datei durchführen:",
"wantsToSearchReplace": "Roo möchte in dieser Datei suchen und ersetzen:",
"didSearchReplace": "Roo hat Suchen und Ersetzen in dieser Datei durchgeführt:",
"wantsToInsert": "Roo möchte Inhalte in diese Datei einfügen:",
"wantsToInsertWithLineNumber": "Roo möchte Inhalte in diese Datei in Zeile {{lineNumber}} einfügen:",
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/i18n/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"wantsToEdit": "Roo wants to edit this file:",
"wantsToEditOutsideWorkspace": "Roo wants to edit this file outside of the workspace:",
"wantsToCreate": "Roo wants to create a new file:",
"wantsToSearchReplace": "Roo wants to perform search and replace on this file:",
"wantsToSearchReplace": "Roo wants to search and replace in this file:",
"didSearchReplace": "Roo performed search and replace on this file:",
"wantsToInsert": "Roo wants to insert content into this file:",
"wantsToInsertWithLineNumber": "Roo wants to insert content into this file at line {{lineNumber}}:",
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/i18n/locales/ja/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"wantsToEdit": "Rooはこのファイルを編集したい:",
"wantsToEditOutsideWorkspace": "Rooはワークスペース外のこのファイルを編集したい:",
"wantsToCreate": "Rooは新しいファイルを作成したい:",
"wantsToSearchReplace": "Rooはこのファイルで検索と置換を実行したい:",
"wantsToSearchReplace": "Rooはこのファイルで検索と置換を行う:",
"didSearchReplace": "Rooはこのファイルで検索と置換を実行しました:",
"wantsToInsert": "Rooはこのファイルにコンテンツを挿入したい:",
"wantsToInsertWithLineNumber": "Rooはこのファイルの{{lineNumber}}行目にコンテンツを挿入したい:",
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/i18n/locales/zh-CN/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"wantsToEdit": "需要编辑文件:",
"wantsToEditOutsideWorkspace": "需要编辑外部文件:",
"wantsToCreate": "需要新建文件:",
"wantsToSearchReplace": "需要执行搜索和替换:",
"wantsToSearchReplace": "需要在此文件中搜索和替换:",
"didSearchReplace": "已完成搜索和替换:",
"wantsToInsert": "需要在此文件中插入内容:",
"wantsToInsertWithLineNumber": "需要在第 {{lineNumber}} 行插入内容:",
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/i18n/locales/zh-TW/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"wantsToEdit": "Roo 想要編輯此檔案:",
"wantsToEditOutsideWorkspace": "Roo 想要編輯此工作區外的檔案:",
"wantsToCreate": "Roo 想要建立新檔案:",
"wantsToSearchReplace": "Roo 想要在此檔案執行搜尋和取代:",
"wantsToSearchReplace": "Roo 想要在此檔案中搜尋和取代:",
"didSearchReplace": "Roo 已在此檔案執行搜尋和取代:",
"wantsToInsert": "Roo 想要在此檔案中插入內容:",
"wantsToInsertWithLineNumber": "Roo 想要在此檔案第 {{lineNumber}} 行插入內容:",
Expand Down