mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
Don't synchronize vectors while streaming
This commit is contained in:
parent
9a5e667674
commit
0bdd350b8d
@ -77,18 +77,18 @@ async function onVectorizeAllClick() {
|
||||
let syncBlocked = false;
|
||||
|
||||
async function synchronizeChat(batchSize = 5) {
|
||||
if (!settings.enabled) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
try {
|
||||
await waitUntilCondition(() => !syncBlocked, 500);
|
||||
await waitUntilCondition(() => !syncBlocked && !is_send_press, 1000);
|
||||
} catch {
|
||||
console.log('Vectors: Synchronization blocked by another process');
|
||||
return -1;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!settings.enabled) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
syncBlocked = true;
|
||||
const context = getContext();
|
||||
const chatId = getCurrentChatId();
|
||||
|
Loading…
Reference in New Issue
Block a user