mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
feat(diff): improve progress indicator for apply_diff tool (#2758)
Add animated dots to progress indicator based on content length Optimize when progress updates are shown (every 10 characters) Move searchBlockCount calculation inside conditional blocks Skip unnecessary ask operations when toolProgressStatus is empty
This commit is contained in:
parent
c228e638b9
commit
3b65023d0b
2 changed files with 7 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue