diff --git a/src/core/diff/strategies/multi-search-replace.ts b/src/core/diff/strategies/multi-search-replace.ts index b7c2dffe8a..00cebd2bea 100644 --- a/src/core/diff/strategies/multi-search-replace.ts +++ b/src/core/diff/strategies/multi-search-replace.ts @@ -574,12 +574,13 @@ Only use a single line of '=======' between search and replacement content, beca const diffContent = toolUse.params.diff if (diffContent) { const icon = "diff-multiple" - const searchBlockCount = (diffContent.match(/SEARCH/g) || []).length if (toolUse.partial) { - if (diffContent.length < 1000 || (diffContent.length / 50) % 10 === 0) { + if (Math.floor(diffContent.length / 10) % 10 === 0) { + const searchBlockCount = (diffContent.match(/SEARCH/g) || []).length return { icon, text: `${searchBlockCount}` } } } else if (result) { + const searchBlockCount = (diffContent.match(/SEARCH/g) || []).length if (result.failParts?.length) { return { icon, diff --git a/src/core/tools/applyDiffTool.ts b/src/core/tools/applyDiffTool.ts index f8fd5944b8..967b881d31 100644 --- a/src/core/tools/applyDiffTool.ts +++ b/src/core/tools/applyDiffTool.ts @@ -42,6 +42,10 @@ export async function applyDiffTool( toolProgressStatus = cline.diffStrategy.getProgressStatus(block) } + if (toolProgressStatus && Object.keys(toolProgressStatus).length === 0) { + return + } + const partialMessage = JSON.stringify(sharedMessageProps) await cline.ask("tool", partialMessage, block.partial, toolProgressStatus).catch(() => {}) return