Skip to content

Commit 55dabfe

Browse files
committed
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
1 parent 38d8edf commit 55dabfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export async function presentAssistantMessage(cline: Task) {
379379
// Handle repetition similar to mistake_limit_reached pattern.
380380
const { response, text, images } = await cline.ask(
381381
repetitionCheck.askUser.messageKey as ClineAsk,
382-
repetitionCheck.askUser.messageDetail.replace("{toolName}", block.name),
382+
repetitionCheck.askUser.messageDetail,
383383
)
384384

385385
if (response === "messageResponse") {

0 commit comments

Comments
 (0)