Closed tcarwash closed 5 months ago
As far as I see and understand this happens only on new directory creation. I do not see any value trying to index an empty directory, and if you create files in it, it should be indexing them rather.
So if you do not think otherwise I will just exclude create dirs from generating a call to the indexer. WDYT?
I will fix folders here: https://github.com/brumik/ollama-obsidian-indexer/issues/16
The exact issue (on creation) is now fixed in 0.1.2 (released).
https://github.com/brumik/obsidian-ollama-chat/commit/6e74af9b2c67bfc00113eb433b6981f818e213d5
I was getting a 500 error from the indexer on directory creation, seems like it doesn't know what to do with a directory path.
I have a rough fix in my own main.js, basically just check to see if the file object passed to the
createEvent
hook has achildren
key, if it does it's a directory... don't index it, if it doesn't it's a file and it gets indexed.I'm not sure if you want that fix here, or if you want me to take a look at the indexer. I'm not sure if there's any benefit to indexing directories.
Let me know how/if you want me to proceed. I'm not great with javascript/typescript, so it might take me a bit to get a PR in, but I'm happy to do it.