From cc85b9a8f6a1f97fd019c3a3de29e7fa5c844a7b Mon Sep 17 00:00:00 2001 From: perf3ct Date: Sun, 16 Mar 2025 20:55:55 +0000 Subject: [PATCH] fix autoupdate name inconsistency --- src/routes/api/options.ts | 1 - src/services/llm/index_service.ts | 6 +++--- src/services/options_interface.ts | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/routes/api/options.ts b/src/routes/api/options.ts index 7d74c7244..c26a94589 100644 --- a/src/routes/api/options.ts +++ b/src/routes/api/options.ts @@ -95,7 +95,6 @@ const ALLOWED_OPTIONS = new Set([ "aiTemperature", "aiSystemPrompt", // Embedding options - "embeddingAutoUpdate", "embeddingAutoUpdateEnabled", "embeddingBatchSize", "embeddingUpdateInterval", diff --git a/src/services/llm/index_service.ts b/src/services/llm/index_service.ts index e1469eeef..64e2b3665 100644 --- a/src/services/llm/index_service.ts +++ b/src/services/llm/index_service.ts @@ -70,10 +70,10 @@ class IndexService { const shouldProcessEmbeddings = embeddingLocation === 'client' || isSyncServer; // Setup automatic indexing if enabled and this instance should process embeddings - if (await options.getOptionBool('embeddingAutoUpdate') && shouldProcessEmbeddings) { + if (await options.getOptionBool('embeddingAutoUpdateEnabled') && shouldProcessEmbeddings) { this.setupAutomaticIndexing(); log.info(`Index service: Automatic indexing enabled, processing embeddings ${isSyncServer ? 'as sync server' : 'as client'}`); - } else if (await options.getOptionBool('embeddingAutoUpdate')) { + } else if (await options.getOptionBool('embeddingAutoUpdateEnabled')) { log.info("Index service: Automatic indexing enabled, but this instance is not configured to process embeddings"); } @@ -179,7 +179,7 @@ class IndexService { const shouldProcessEmbeddings = embeddingLocation === 'client' || isSyncServer; // Update automatic indexing setting - const autoIndexing = await options.getOptionBool('embeddingAutoUpdate'); + const autoIndexing = await options.getOptionBool('embeddingAutoUpdateEnabled'); if (autoIndexing && shouldProcessEmbeddings && !this.automaticIndexingInterval) { this.setupAutomaticIndexing(); log.info(`Index service: Automatic indexing enabled, processing embeddings ${isSyncServer ? 'as sync server' : 'as client'}`); diff --git a/src/services/options_interface.ts b/src/services/options_interface.ts index 8a704b0ca..f0d132dc9 100644 --- a/src/services/options_interface.ts +++ b/src/services/options_interface.ts @@ -67,7 +67,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions