Merge pull request #430 from CREDO23/feat/chat-pannel

[Feature] Add the chat panel
This commit is contained in:
Rohan Verma 2025-11-11 17:04:39 -08:00 committed by GitHub
commit 0835a192a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1219 additions and 72 deletions

View file

@ -1,5 +1,6 @@
import type { Message } from "@ai-sdk/react";
import { useCallback, useEffect, useState } from "react";
import type { ChatDetails } from "@/app/dashboard/[search_space_id]/chats/chats-client";
import type { ResearchMode } from "@/components/chat";
import type { Document } from "@/hooks/use-documents";
@ -52,7 +53,7 @@ interface UseChatAPIProps {
export function useChatAPI({ token, search_space_id }: UseChatAPIProps) {
const fetchChatDetails = useCallback(
async (chatId: string) => {
async (chatId: string): Promise<ChatDetails | null> => {
if (!token) return null;
try {