Browse Source

Revert "Clean up the tool progress UX"

This reverts commit 1c8071bbb371f019994c0bf7849ba37df2ef67e7.
Matt Rubens 1 year ago
parent
commit
78be1b8977

+ 5 - 7
src/core/diff/strategies/multi-search-replace.ts

@@ -368,20 +368,18 @@ 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 { icon, text: `${searchBlockCount}` }
+					return { text: `progressing ${(diffContent.match(/SEARCH/g) || []).length} blocks...` }
 				}
 			} else if (result) {
-				if (result.failParts?.length) {
+				const searchBlockCount = (diffContent.match(/SEARCH/g) || []).length
+				if (result.failParts) {
 					return {
-						icon,
-						text: `${searchBlockCount - result.failParts.length}/${searchBlockCount}`,
+						text: `progressed ${searchBlockCount - result.failParts.length}/${searchBlockCount} blocks.`,
 					}
 				} else {
-					return { icon, text: `${searchBlockCount}` }
+					return { text: `progressed ${searchBlockCount} blocks.` }
 				}
 			}
 		}

+ 0 - 1
src/shared/ExtensionMessage.ts

@@ -277,6 +277,5 @@ export interface HumanRelayCancelMessage {
 export type ClineApiReqCancelReason = "streaming_failed" | "user_cancelled"
 
 export type ToolProgressStatus = {
-	icon?: string
 	text?: string
 }

+ 8 - 6
webview-ui/src/components/common/CodeAccordian.tsx

@@ -99,12 +99,14 @@ const CodeAccordian = ({
 					)}
 					<div style={{ flexGrow: 1 }}></div>
 					{progressStatus && progressStatus.text && (
-						<>
-							{progressStatus.icon && <span className={`codicon codicon-${progressStatus.icon} mr-1`} />}
-							<span className="mr-1 ml-auto text-vscode-descriptionForeground">
-								{progressStatus.text}
-							</span>
-						</>
+						<span
+							style={{
+								color: "var(--vscode-descriptionForeground)",
+								borderTop: isExpanded ? "1px solid var(--vscode-editorGroup-border)" : "none",
+								marginLeft: "auto", // Right-align the text
+							}}>
+							{progressStatus.text}
+						</span>
 					)}
 					<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
 				</div>