mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	stop the log spam
This commit is contained in:
		
							parent
							
								
									8129f8f2b1
								
							
						
					
					
						commit
						1a8ce967d9
					
				@ -322,12 +322,13 @@ async function processEmbeddings(queryEmbedding: Float32Array, embeddings: any[]
 | 
				
			|||||||
        vectorDebugConfig
 | 
					        vectorDebugConfig
 | 
				
			||||||
    } = await import('./vector_utils.js');
 | 
					    } = await import('./vector_utils.js');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Enable debug logging temporarily for testing content-aware adaptation
 | 
					    // Store original debug settings but keep debug disabled
 | 
				
			||||||
    const originalDebugEnabled = vectorDebugConfig.enabled;
 | 
					    const originalDebugEnabled = vectorDebugConfig.enabled;
 | 
				
			||||||
    const originalLogLevel = vectorDebugConfig.logLevel;
 | 
					    const originalLogLevel = vectorDebugConfig.logLevel;
 | 
				
			||||||
    vectorDebugConfig.enabled = true;
 | 
					
 | 
				
			||||||
    vectorDebugConfig.logLevel = 'debug';
 | 
					    // Keep debug disabled for normal operation
 | 
				
			||||||
    vectorDebugConfig.recordStats = true;
 | 
					    vectorDebugConfig.enabled = false;
 | 
				
			||||||
 | 
					    vectorDebugConfig.recordStats = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const similarities = [];
 | 
					    const similarities = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -339,7 +340,7 @@ async function processEmbeddings(queryEmbedding: Float32Array, embeddings: any[]
 | 
				
			|||||||
            let contentType = ContentType.GENERAL_TEXT;
 | 
					            let contentType = ContentType.GENERAL_TEXT;
 | 
				
			||||||
            if (e.mime) {
 | 
					            if (e.mime) {
 | 
				
			||||||
                contentType = detectContentType(e.mime);
 | 
					                contentType = detectContentType(e.mime);
 | 
				
			||||||
                console.log(`Note ID: ${e.noteId}, Mime: ${e.mime}, Detected content type: ${contentType}`);
 | 
					                // Debug logging removed to avoid console spam
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Select performance profile based on embedding size and use case
 | 
					            // Select performance profile based on embedding size and use case
 | 
				
			||||||
@ -376,7 +377,6 @@ async function processEmbeddings(queryEmbedding: Float32Array, embeddings: any[]
 | 
				
			|||||||
        // Restore original debug settings
 | 
					        // Restore original debug settings
 | 
				
			||||||
        vectorDebugConfig.enabled = originalDebugEnabled;
 | 
					        vectorDebugConfig.enabled = originalDebugEnabled;
 | 
				
			||||||
        vectorDebugConfig.logLevel = originalLogLevel;
 | 
					        vectorDebugConfig.logLevel = originalLogLevel;
 | 
				
			||||||
        vectorDebugConfig.recordStats = false;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user