mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: enhance chat query handling and sidebar updates
- Updated chat query to include ordering by creation date for better organization. - Improved optimistic updates in chat deletion and creation mutations to ensure UI consistency. - Invalidate chat queries after mutations to refresh sidebar and components effectively. - Adjusted cache key structure for chat queries to include additional parameters for better cache management.
This commit is contained in:
parent
5fcaadf60b
commit
ee46a43afc
4 changed files with 40 additions and 13 deletions
|
|
@ -10,7 +10,14 @@ export const cacheKeys = {
|
|||
chats: {
|
||||
activeChat: (chatId: string) => ["active-chat", chatId] as const,
|
||||
globalQueryParams: (queries: GetChatsRequest["queryParams"]) =>
|
||||
["chats", ...(queries ? Object.values(queries) : [])] as const,
|
||||
[
|
||||
"chats",
|
||||
queries?.search_space_id,
|
||||
queries?.limit,
|
||||
queries?.skip,
|
||||
queries?.page,
|
||||
queries?.page_size,
|
||||
] as const,
|
||||
},
|
||||
podcasts: {
|
||||
globalQueryParams: (queries: GetPodcastsRequest["queryParams"]) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue