mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
feat: conditionally initialize VectorStoreManager and enhance relevant notes handling based on semantic search setting (#1817)
This commit is contained in:
parent
0d477f869e
commit
b18782040e
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue