mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Refactor common enum for debounce timeouts
This commit is contained in:
		| @@ -32,7 +32,7 @@ import { | ||||
|     SECRET_KEYS, | ||||
|     secret_state, | ||||
| } from './secrets.js'; | ||||
| import { debounce, getStringHash, isValidUrl } from './utils.js'; | ||||
| import { debounce, debounce_timeout, getStringHash, isValidUrl } from './utils.js'; | ||||
| import { chat_completion_sources, oai_settings } from './openai.js'; | ||||
| import { getTokenCountAsync } from './tokenizers.js'; | ||||
| import { textgen_types, textgenerationwebui_settings as textgen_settings, getTextGenServer } from './textgen-settings.js'; | ||||
| @@ -54,7 +54,7 @@ var retry_delay = 500; | ||||
| let counterNonce = Date.now(); | ||||
|  | ||||
| const observerConfig = { childList: true, subtree: true }; | ||||
| const countTokensDebounced = debounce(RA_CountCharTokens, 1000); | ||||
| const countTokensDebounced = debounce(RA_CountCharTokens, debounce_timeout.relaxed); | ||||
|  | ||||
| const observer = new MutationObserver(function (mutations) { | ||||
|     mutations.forEach(function (mutation) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user