mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-14 14:38:51 +01:00
* refactor: conversation search fetch * refactor: Message and Convo fetch with paramters and search * refactor: update search states and cleanup old store states * refactor: re-enable search API; fix: search conversation * fix: message's convo fetch * fix: redirect when searching * chore: use logger instead of console * fix: search message loading * feat: small optimizations * feat(Message): remove cache for search path * fix: handle delete of all archivedConversation and sharedLinks * chore: cleanup * fix: search messages * style: update ConvoOptions styles * refactor(SearchButtons): streamline conversation fetching and remove unused state * fix: ensure messages are invalidated after fetching conversation data * fix: add iconURL to conversation query selection --------- Co-authored-by: Danny Avila <danny@librechat.ai>
24 lines
394 B
TypeScript
24 lines
394 B
TypeScript
import { atom } from 'recoil';
|
|
|
|
export type SearchState = {
|
|
enabled: boolean | null;
|
|
query: string;
|
|
debouncedQuery: string;
|
|
isSearching: boolean;
|
|
isTyping: boolean;
|
|
};
|
|
|
|
export const search = atom<SearchState>({
|
|
key: 'search',
|
|
default: {
|
|
enabled: null,
|
|
query: '',
|
|
debouncedQuery: '',
|
|
isSearching: false,
|
|
isTyping: false,
|
|
},
|
|
});
|
|
|
|
export default {
|
|
search,
|
|
};
|