Revert "Clean up the tool progress UX"

This reverts commit 1c8071bbb3.
This commit is contained in:
Matt Rubens 2025-03-09 18:35:48 -04:00
parent 85dd1a1977
commit 78be1b8977
3 changed files with 13 additions and 14 deletions

View file

@ -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.` }
}
}
}

View file

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

View file

@ -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>