fix autoupdate name inconsistency

This commit is contained in:
perf3ct 2025-03-16 20:55:55 +00:00
parent ab3c6b6fb1
commit cc85b9a8f6
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
3 changed files with 3 additions and 5 deletions

View File

@ -95,7 +95,6 @@ const ALLOWED_OPTIONS = new Set([
"aiTemperature", "aiTemperature",
"aiSystemPrompt", "aiSystemPrompt",
// Embedding options // Embedding options
"embeddingAutoUpdate",
"embeddingAutoUpdateEnabled", "embeddingAutoUpdateEnabled",
"embeddingBatchSize", "embeddingBatchSize",
"embeddingUpdateInterval", "embeddingUpdateInterval",

View File

@ -70,10 +70,10 @@ class IndexService {
const shouldProcessEmbeddings = embeddingLocation === 'client' || isSyncServer; const shouldProcessEmbeddings = embeddingLocation === 'client' || isSyncServer;
// Setup automatic indexing if enabled and this instance should process embeddings // 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(); this.setupAutomaticIndexing();
log.info(`Index service: Automatic indexing enabled, processing embeddings ${isSyncServer ? 'as sync server' : 'as client'}`); 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"); 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; const shouldProcessEmbeddings = embeddingLocation === 'client' || isSyncServer;
// Update automatic indexing setting // Update automatic indexing setting
const autoIndexing = await options.getOptionBool('embeddingAutoUpdate'); const autoIndexing = await options.getOptionBool('embeddingAutoUpdateEnabled');
if (autoIndexing && shouldProcessEmbeddings && !this.automaticIndexingInterval) { if (autoIndexing && shouldProcessEmbeddings && !this.automaticIndexingInterval) {
this.setupAutomaticIndexing(); this.setupAutomaticIndexing();
log.info(`Index service: Automatic indexing enabled, processing embeddings ${isSyncServer ? 'as sync server' : 'as client'}`); log.info(`Index service: Automatic indexing enabled, processing embeddings ${isSyncServer ? 'as sync server' : 'as client'}`);

View File

@ -67,7 +67,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
embeddingUpdateInterval: number; embeddingUpdateInterval: number;
embeddingBatchSize: number; embeddingBatchSize: number;
embeddingDefaultDimension: number; embeddingDefaultDimension: number;
embeddingAutoUpdate: boolean;
embeddingsDefaultProvider: string; embeddingsDefaultProvider: string;
enableAutomaticIndexing: boolean; enableAutomaticIndexing: boolean;
embeddingSimilarityThreshold: string; embeddingSimilarityThreshold: string;