mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
parent
85dd1a1977
commit
78be1b8977
3 changed files with 13 additions and 14 deletions
|
|
@ -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.` }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,5 @@ export interface HumanRelayCancelMessage {
|
|||
export type ClineApiReqCancelReason = "streaming_failed" | "user_cancelled"
|
||||
|
||||
export type ToolProgressStatus = {
|
||||
icon?: string
|
||||
text?: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue