Compare commits

...

1 Commits

Author SHA1 Message Date
Dennis Bartlett ba0cae3648 Add stub for skipAnimation
Co-authored-by: Mandeep Kumar <mandeep@deepcognition.ai>
2025-03-19 21:08:37 -07:00
3 changed files with 27 additions and 1 deletions
+5
View File
@@ -211,6 +211,11 @@
"type": "boolean",
"default": true,
"description": "Controls whether the MCP Marketplace is enabled."
},
"cline.editor.skipDiffAnimation": {
"type": "boolean",
"default": false,
"description": "Skip the animation when applying diffs in the editor. Useful for faster updates, especially with remote repositories."
}
}
}
+1
View File
@@ -1080,6 +1080,7 @@ export class Cline {
this.urlContentFetcher.closeBrowser()
this.browserSession.closeBrowser()
this.clineIgnoreController.dispose()
this.diffViewProvider.disposeAll()
await this.diffViewProvider.revertChanges() // need to await for when we want to make sure directories/files are reverted before re-starting the task from a checkpoint
}
+21 -1
View File
@@ -21,10 +21,22 @@ export class DiffViewProvider {
private activeDiffEditor?: vscode.TextEditor
private fadedOverlayController?: DecorationController
private activeLineController?: DecorationController
private skipAnimation: boolean
private streamedLines: string[] = []
private preDiagnostics: [vscode.Uri, vscode.Diagnostic[]][] = []
private configWatcher: vscode.Disposable
constructor(private cwd: string) {}
constructor(private cwd: string) {
// Initialize skipAnimation from configuration
this.skipAnimation = vscode.workspace.getConfiguration("cline.editor").get("skipDiffAnimation", false)
// Add configuration watcher
this.configWatcher = vscode.workspace.onDidChangeConfiguration((e) => {
if (e.affectsConfiguration("cline.editor.skipDiffAnimation")) {
this.skipAnimation = vscode.workspace.getConfiguration("cline.editor").get("skipDiffAnimation", false)
}
})
}
async open(relPath: string): Promise<void> {
this.relPath = relPath
@@ -96,6 +108,10 @@ export class DiffViewProvider {
const beginningOfDocument = new vscode.Position(0, 0)
diffEditor.selection = new vscode.Selection(beginningOfDocument, beginningOfDocument)
// Stub for skip Animation
if (this.skipAnimation) {
}
for (let i = 0; i < diffLines.length; i++) {
const currentLine = this.streamedLines.length + i
// Replace all content up to the current line with accumulated lines
@@ -374,4 +390,8 @@ export class DiffViewProvider {
this.streamedLines = []
this.preDiagnostics = []
}
disposeAll() {
this.configWatcher.dispose()
}
}