update files search methods && semantic search mehtod

This commit is contained in:
duanfuxiang
2025-03-31 17:33:53 +08:00
parent d72c871716
commit 1e85149660
15 changed files with 87 additions and 28 deletions

View File

@@ -142,8 +142,8 @@ export default class InfioPlugin extends Plugin {
this.app.metadataCache.on("changed", (file: TFile) => {
if (file) {
eventListener.handleFileChange(file);
console.log("file changed: filename: ", file.name);
this.ragEngine?.updateFileIndex(file);
// is not worth it to update the file index on every file change
// this.ragEngine?.updateFileIndex(file);
}
})
);
@@ -151,7 +151,6 @@ export default class InfioPlugin extends Plugin {
this.registerEvent(
this.app.metadataCache.on("deleted", (file: TFile) => {
if (file) {
console.log("file deleted: filename: ", file.name)
this.ragEngine?.deleteFileIndex(file);
}
})