mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 02:23:53 +02:00
Merge pull request #430 from CREDO23/feat/chat-pannel
[Feature] Add the chat panel
This commit is contained in:
commit
0835a192a2
38 changed files with 1219 additions and 72 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue