feat: conditionally initialize VectorStoreManager and enhance relevant notes handling based on semantic search setting (#1817)

This commit is contained in:
Logan Yang 2025-09-12 18:26:18 -07:00 committed by GitHub
parent 0d477f869e
commit b18782040e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -83,7 +83,7 @@ export default class CopilotPlugin extends Plugin {
// Initialize ProjectManager
this.projectManager = ProjectManager.getInstance(this.app, this);
// Initialize VectorStoreManager
// Always construct VectorStoreManager; it internally no-ops when semantic search is disabled
this.vectorStoreManager = VectorStoreManager.getInstance();
// Initialize FileParserManager early with other core services

View file

@ -61,6 +61,11 @@ export default class VectorStoreManager {
}
private async initialize(): Promise<void> {
// Do not initialize or show notices if semantic search is disabled
const settings = getSettings();
if (!settings.enableSemanticSearchV3) {
return;
}
try {
let retries = 3;
while (retries > 0) {