mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-30 03:16:25 +02:00
parent
c96be7d9e1
commit
d9e6947fbd
18 changed files with 19 additions and 506 deletions
|
|
@ -146,7 +146,7 @@ export function AppSidebarProvider({
|
|||
|
||||
setIsDeletingThread(true);
|
||||
try {
|
||||
await deleteThread(threadToDelete.id, searchSpaceId);
|
||||
await deleteThread(threadToDelete.id);
|
||||
// Invalidate threads query to refresh the list
|
||||
queryClient.invalidateQueries({ queryKey: ["threads", searchSpaceId] });
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ export function AllChatsSidebar({ open, onOpenChange, searchSpaceId }: AllChatsS
|
|||
async (threadId: number) => {
|
||||
setDeletingThreadId(threadId);
|
||||
try {
|
||||
await deleteThread(threadId, searchSpaceId);
|
||||
await deleteThread(threadId);
|
||||
toast.success(t("chat_deleted") || "Chat deleted successfully");
|
||||
queryClient.invalidateQueries({ queryKey: ["all-threads", searchSpaceId] });
|
||||
queryClient.invalidateQueries({ queryKey: ["search-threads", searchSpaceId] });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue