From d2f00fd328fd9ce9edadcb2b19866a8c41ec5abc Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 23 Oct 2025 19:26:41 +0200 Subject: [PATCH] fix fetchChatDetails return type --- surfsense_web/hooks/use-chat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {