
Recent supporters

RasmusMalver bought 3 coffees.
AI command palette is brilliant! With fuzzy search, it would be twice as amazing.
Thanks so much for the support, I really do appreciate it! As for fuzzy search, I once looked into implementing it but moved on at some point... Now that you've mentioned it, I'll see if I can make that happen soon.

No rush. If I have time, I may look at it myself 🙂
So, I now remember why I stopped working on fuzzy search, the implementation using Levenshtein Distance was pretty slow compared to the custom scoring system I developed. I just pushed a new 'fuzzy' branch to the repo which you can find at the link below. If you want to check it out, you can see what I mean by slow. I haven't tested it very much, but results are spot on with the current implementation. Where fuzzy matching really shines is when a word is misspelled, or abbreviated. My current implementation takes a very naive approach to this, so it doesn't work well as I asuume you have discovered.https://github.com/joshbduncan/AiCommandPalette/tree/fuzzy

Ok, this is interesting: I don't have a big difference in speed, but it just doesn't quite work. I have, however, realised that the version on the main branch *does* allow for a sort of fuzzy matching, if I separate the words with a space.I use fuzzy matching to get things like “newt” → “New from Template”, “exa” → “Export As...” and “exs” → “Export for Screens”.I can achieve that with the script on the main branch, by changing to “new t”, “ex a” and “ex s”.By the way; where is the place to discuss this? I feel a GitHub issue or PR is passive agressive, but it's good to have these information available to others in the future 🙂
Oh, I always put spaces so that is why what I made wasn't working for you. There are a handful of different fuzzy algos, each with their strengths and weaknesses. I chose Levenshtein Distance because it was the easiest to implement quickly. A note about the speed, you really don't notice it unless you type your query really fast or if you backspace quickly over your query. And about discussion, I agree this isn't the place and unfortunately, I don't have anywhere better than Github. I went ahead and created an issue (link below) and tied it to the 'fuzzy' branch. I'll add some comments later to explain how the current solution works and some info on how the first version of fuzzy matching works. Next, I want to try and implement something more along the lines of FZF since it seems to work good with your 'newt' and 'exa' examples. Cheers!https://github.com/joshbduncan/AiCommandPalette/issues/26
I just pushed a new commit to the 'fuzzy' branch that implements a much better fuzzy search algorithm based on John Hawthorn's [fzy](https://github.com/jhawthorn/fzy)...It should provide much better results for searches like 'exa' and 'newt' (mentioned in the above [comment](https://github.com/joshbduncan/AiCommandPalette/issues/26#issuecomment-2007875708)).