feat(chat): implement search functionality for chat sessions

- Added search capability to the chat interface, allowing users to find sessions by title or message content.
- Integrated debounce logic for search input to enhance performance and user experience.
- Updated the sidebar to include a search input field and loading indicator during search operations.
- Implemented full-text search in the database for efficient session retrieval based on user queries.
- Enhanced session management by filtering out orphan sessions during search results.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-27 17:58:33 -03:00
1 parent 8c546f6474
commit 6a7eeaf7af
5 files changed
+589 -12

No files matched your search

+5 -1
View File
@@ -54,7 +54,9 @@ export default function ChatPage() {
loadSessions,
saveSession,
deleteSession,
isGeneratingTitle
isGeneratingTitle,
searchSessions,
isSearching
} = useChatStorage();
const { isDownloading, progress } = useAutoLabelingModel();
@@ -949,6 +951,8 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
}}
onDeleteSession={deleteSession}
onNewChat={handleNewChat}
onSearch={searchSessions}
isSearching={isSearching}
/>
</ResizablePanel>