fix: remove incorrect manual string replacement in tool repetition error message

The ToolRepetitionDetector already handles tool name interpolation via the i18n system when calling t() with the toolName option. The manual .replace() call was trying to replace {toolName} but the actual placeholder is {{toolName}} (double braces), causing the tool name to never be properly interpolated in the error message.

This fix removes the redundant manual replacement and lets the i18n system handle the interpolation correctly.

Fixes #5879
This commit is contained in:
Roo Code 2025-07-18 12:48:17 +00:00
parent 38d8edf05a
commit 55dabfe321

View file

@ -379,7 +379,7 @@ export async function presentAssistantMessage(cline: Task) {
// Handle repetition similar to mistake_limit_reached pattern.
const { response, text, images } = await cline.ask(
repetitionCheck.askUser.messageKey as ClineAsk,
repetitionCheck.askUser.messageDetail.replace("{toolName}", block.name),
repetitionCheck.askUser.messageDetail,
)
if (response === "messageResponse") {