feat: added posthog

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-25 13:25:13 -08:00
parent 80e4f1b798
commit c96be7d9e1
18 changed files with 506 additions and 19 deletions

View file

@ -146,7 +146,7 @@ export function AppSidebarProvider({
setIsDeletingThread(true);
try {
await deleteThread(threadToDelete.id);
await deleteThread(threadToDelete.id, searchSpaceId);
// Invalidate threads query to refresh the list
queryClient.invalidateQueries({ queryKey: ["threads", searchSpaceId] });
} catch (error) {

View file

@ -121,7 +121,7 @@ export function AllChatsSidebar({ open, onOpenChange, searchSpaceId }: AllChatsS
async (threadId: number) => {
setDeletingThreadId(threadId);
try {
await deleteThread(threadId);
await deleteThread(threadId, searchSpaceId);
toast.success(t("chat_deleted") || "Chat deleted successfully");
queryClient.invalidateQueries({ queryKey: ["all-threads", searchSpaceId] });
queryClient.invalidateQueries({ queryKey: ["search-threads", searchSpaceId] });