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:
@ -18,7 +18,7 @@ import {
|
||||
} from '../script.js';
|
||||
import { persona_description_positions, power_user } from './power-user.js';
|
||||
import { getTokenCountAsync } from './tokenizers.js';
|
||||
import { debounce, delay, download, parseJsonFile } from './utils.js';
|
||||
import { debounce, debounce_timeout, delay, download, parseJsonFile } from './utils.js';
|
||||
|
||||
const GRID_STORAGE_KEY = 'Personas_GridView';
|
||||
|
||||
@ -175,7 +175,7 @@ const countPersonaDescriptionTokens = debounce(async () => {
|
||||
const description = String($('#persona_description').val());
|
||||
const count = await getTokenCountAsync(description);
|
||||
$('#persona_description_token_count').text(String(count));
|
||||
}, 1000);
|
||||
}, debounce_timeout.relaxed);
|
||||
|
||||
export function setPersonaDescription() {
|
||||
if (power_user.persona_description_position === persona_description_positions.AFTER_CHAR) {
|
||||
|
Reference in New Issue
Block a user