ai-chatbot
ai-chatbot copied to clipboard
feat: add chat search implementation
This PR implements the ability to search chats, inspired by how it works in the ChatGPT user interface.
- Supports keyboard shortcuts
CMD+KorCTRL+Kto open search dialog depending on the operating system used - Shows a preview of the search results by matching any message titles or content
- Allows users to quickly create a new chat from the search dialog
https://github.com/user-attachments/assets/cf4214e2-58ec-4038-9d1f-35131b9a4f14
Potential future improvements:
- support semantic search / fuzzy search or even something like LLM-powered search
- better support for searching through tool call results & generating a preview instead of saying "No preview available"
- removing markdown formatting in search preview so that we can use bold text to highlight the matched search query in the preview
- adding test cases (Shall I add test cases for e.g., the utils, the
chat-search.tsxcomponent to thetests/folder?) - if a search result is found opening it could auto-scroll to the message the user was searching for and highlight the matched search term in the message for a few seconds
- search filtering similar to how it works in GitHub e.g.,:
- searching for particular artifact types =>
artifact:sheetorartifact:text - searching for public chats =>
visibility:public
- searching for particular artifact types =>
@jeremyphilemon & @jaredpalmer: please let me know what else you'd like me to add / change in this PR 🙏
@tobiasbueschel is attempting to deploy a commit to the Vercel Team on Vercel.
A member of the Team first needs to authorize it.
New dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/[email protected] | Transitive: environment | +30 |
1.27 MB | paco |
This is pretty cool
+1
Hi @jeremyphilemon 👋 happy Tuesday - I've fixed up any recent merge conflicts. Let me know if there's any other change you'd like me to make? Thanks!
Hi @jeremyphilemon & @dancer what do you think about this PR? Wanted to follow up to see if this is something you'd like to bring in? :)
This seems like a nice feature that has been thoughtfully implemented.