diff --git a/src/core/diff/strategies/multi-search-replace.ts b/src/core/diff/strategies/multi-search-replace.ts index 0462629b9b..bcf2f65430 100644 --- a/src/core/diff/strategies/multi-search-replace.ts +++ b/src/core/diff/strategies/multi-search-replace.ts @@ -368,18 +368,20 @@ Only use a single line of '=======' between search and replacement content, beca getProgressStatus(toolUse: ToolUse, result?: DiffResult): ToolProgressStatus { 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) { - return { text: `progressing ${(diffContent.match(/SEARCH/g) || []).length} blocks...` } + return { icon, text: `${searchBlockCount}` } } } else if (result) { - const searchBlockCount = (diffContent.match(/SEARCH/g) || []).length - if (result.failParts) { + if (result.failParts?.length) { return { - text: `progressed ${searchBlockCount - result.failParts.length}/${searchBlockCount} blocks.`, + icon, + text: `${searchBlockCount - result.failParts.length}/${searchBlockCount}`, } } else { - return { text: `progressed ${searchBlockCount} blocks.` } + return { icon, text: `${searchBlockCount}` } } } } diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index c051aab5a6..4e76b0abbc 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -277,5 +277,6 @@ export interface HumanRelayCancelMessage { export type ClineApiReqCancelReason = "streaming_failed" | "user_cancelled" export type ToolProgressStatus = { + icon?: string text?: string } diff --git a/webview-ui/src/components/common/CodeAccordian.tsx b/webview-ui/src/components/common/CodeAccordian.tsx index defafdc869..9d2f224ffb 100644 --- a/webview-ui/src/components/common/CodeAccordian.tsx +++ b/webview-ui/src/components/common/CodeAccordian.tsx @@ -99,14 +99,12 @@ const CodeAccordian = ({ )}
{progressStatus && progressStatus.text && ( - - {progressStatus.text} - + <> + {progressStatus.icon && } + + {progressStatus.text} + + > )}