defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
253 stars 29 forks source link

chore(ui): server side search #691

Open andrewrisse opened 3 months ago

andrewrisse commented 3 months ago

Searching through threads is currently done with Fuse.js, a lightweight client side fuzzy search tool.

Over time, this will not be performant as the number of threads the user has grows. We currently have to fetch all threads, and all messages for this to work.

Implement server side search on the SvelteKit backend using this: https://supabase.com/docs/guides/database/full-text-search?queryGroups=language&language=js

As part of this story, also refactor the frontend to paginate the user's threads and only the X last threads. Scrolling down in the sidenav should show a loading spinner and load more threads (paginate).

andrewrisse commented 3 months ago

@gregclark-defenseunicorns - we will need design for this sidenav functionality, should be pretty simple and straightforward though