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