mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	[WIP} infinity context
This commit is contained in:
		| @@ -4,6 +4,7 @@ export { | ||||
|     getContext, | ||||
|     getApiUrl, | ||||
|     loadExtensionSettings, | ||||
|     runGenerationInterceptors, | ||||
|     defaultRequestArgs, | ||||
|     modules, | ||||
|     extension_settings, | ||||
| @@ -26,6 +27,7 @@ const extension_settings = { | ||||
|     dice: {}, | ||||
|     tts: {}, | ||||
|     sd: {}, | ||||
|     chromadb: {}, | ||||
| }; | ||||
|  | ||||
| let modules = []; | ||||
| @@ -317,6 +319,19 @@ async function loadExtensionSettings(settings) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| async function runGenerationInterceptors() { | ||||
|     for (const manifest of Object.values(manifests)) { | ||||
|         const interceptorKey = manifest.generate_interceptor; | ||||
|         if (typeof window[interceptorKey] === 'function') { | ||||
|             try { | ||||
|                 await window[interceptorKey](); | ||||
|             } catch(e) { | ||||
|                 console.error(`Failed running interceptor for ${manifest.display_name}`, e); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| $(document).ready(async function () { | ||||
|     setTimeout(function () { addExtensionsButtonAndMenu(); }, 100) | ||||
|     $("#extensions_connect").on('click', connectClickHandler); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user