diff --git a/src/main.ts b/src/main.ts index 2af90aad..7bfc4d0c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 diff --git a/src/search/vectorStoreManager.ts b/src/search/vectorStoreManager.ts index 076658bf..1fe1fa35 100644 --- a/src/search/vectorStoreManager.ts +++ b/src/search/vectorStoreManager.ts @@ -61,6 +61,11 @@ export default class VectorStoreManager { } private async initialize(): Promise { + // 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) {