Ver Fonte

Fix diff editor not opening on slow machines

Saoud Rizwan há 1 ano atrás
pai
commit
5a94f6434b
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      src/integrations/editor/DiffViewProvider.ts

+ 3 - 3
src/integrations/editor/DiffViewProvider.ts

@@ -288,11 +288,11 @@ export class DiffViewProvider {
 				uri,
 				uri,
 				`${fileName}: ${fileExists ? "Original ↔ Cline's Changes" : "New File"} (Editable)`
 				`${fileName}: ${fileExists ? "Original ↔ Cline's Changes" : "New File"} (Editable)`
 			)
 			)
-			// This should never happen but if it does it's worth investigating
+			// This may happen on very slow machines ie project idx
 			setTimeout(() => {
 			setTimeout(() => {
 				disposable.dispose()
 				disposable.dispose()
-				reject(new Error("Failed to open diff editor"))
-			}, 5_000)
+				reject(new Error("Failed to open diff editor, please try again..."))
+			}, 10_000)
 		})
 		})
 	}
 	}