mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Parallelize extensions auto-update + add a toast
This commit is contained in:
		| @@ -846,12 +846,15 @@ async function checkForExtensionUpdates(force) { | |||||||
| } | } | ||||||
|  |  | ||||||
| async function autoUpdateExtensions() { | async function autoUpdateExtensions() { | ||||||
|  |     toastr.info('Auto-updating extensions. This may take several minutes.', 'Please wait...', { timeOut: 10000, extendedTimeOut: 20000 }); | ||||||
|  |     const promises = []; | ||||||
|     for (const [id, manifest] of Object.entries(manifests)) { |     for (const [id, manifest] of Object.entries(manifests)) { | ||||||
|         if (manifest.auto_update && id.startsWith('third-party')) { |         if (manifest.auto_update && id.startsWith('third-party')) { | ||||||
|             console.debug(`Auto-updating 3rd-party extension: ${manifest.display_name} (${id})`); |             console.debug(`Auto-updating 3rd-party extension: ${manifest.display_name} (${id})`); | ||||||
|             await updateExtension(id.replace('third-party', ''), true); |             promises.push(updateExtension(id.replace('third-party', ''), true)); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |     await Promise.allSettled(promises); | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user