Speed-up extensions loading. Add tracking of response times

This commit is contained in:
SillyLossy
2023-06-01 14:34:40 +03:00
parent 9774f3b8c1
commit 5b446af6dc
5 changed files with 52 additions and 11 deletions

View File

@ -5,9 +5,12 @@ import {
eventSource,
event_types,
} from "../../../script.js";
import { debounce } from "../../utils.js";
const MODULE_NAME = "Objective"
const saveMetadataDebounced = debounce(async () => await context.saveMetadata(), 1000);
let globalObjective = ""
let globalTasks = []
let currentChatId = ""
@ -201,7 +204,7 @@ function saveState() {
hideTasks: $('#objective-hide-tasks').prop('checked'),
}
context.saveMetadata();
saveMetadataDebounced();
}
// Dump core state