diff --git a/surfsense_web/hooks/use-chat.ts b/surfsense_web/hooks/use-chat.ts index 95ec3a374..77c33b386 100644 --- a/surfsense_web/hooks/use-chat.ts +++ b/surfsense_web/hooks/use-chat.ts @@ -1,5 +1,6 @@ import type { Message } from "@ai-sdk/react"; import { useCallback, useEffect, useState } from "react"; +import { Chat, type ChatDetails } from "@/app/dashboard/[search_space_id]/chats/chats-client"; import type { ResearchMode } from "@/components/chat"; import type { Document } from "@/hooks/use-documents"; @@ -49,7 +50,7 @@ interface UseChatAPIProps { export function useChatAPI({ token, search_space_id }: UseChatAPIProps) { const fetchChatDetails = useCallback( - async (chatId: string) => { + async (chatId: string): Promise => { if (!token) return null; try {