ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

feat: add chat search implementation

Open tobiasbueschel opened this issue 8 months ago • 4 comments

This PR implements the ability to search chats, inspired by how it works in the ChatGPT user interface.

  • Supports keyboard shortcuts CMD + K or CTRL + K to 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.tsx component to the tests/ 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:sheet or artifact:text
    • searching for public chats => visibility:public

@jeremyphilemon & @jaredpalmer: please let me know what else you'd like me to add / change in this PR 🙏

tobiasbueschel avatar Mar 10 '25 08:03 tobiasbueschel

@tobiasbueschel is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 10 '25 08:03 vercel[bot]

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

View full report↗︎

socket-security[bot] avatar Mar 10 '25 08:03 socket-security[bot]

This is pretty cool

+1

solomonshalom avatar Mar 10 '25 09:03 solomonshalom

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!

tobiasbueschel avatar Mar 18 '25 06:03 tobiasbueschel

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? :)

tobiasbueschel avatar Sep 20 '25 08:09 tobiasbueschel

This seems like a nice feature that has been thoughtfully implemented.

nwp avatar Sep 20 '25 09:09 nwp