From e2a2b0cc6897afc877678a853e80aa1c6c981325 Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Wed, 22 Jan 2025 10:28:17 -0500 Subject: [PATCH] allow passing chatid --- src/components/AiChat/AiChat.tsx | 2 ++ src/components/AiChat/types.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/components/AiChat/AiChat.tsx b/src/components/AiChat/AiChat.tsx index 0a7ae64..1c752ec 100644 --- a/src/components/AiChat/AiChat.tsx +++ b/src/components/AiChat/AiChat.tsx @@ -121,6 +121,7 @@ const classes = { } const AiChat: React.FC = function AiChat({ + chatId, className, conversationStarters, requestOpts, @@ -143,6 +144,7 @@ const AiChat: React.FC = function AiChat({ isLoading, } = useAiChat(requestOpts, { initialMessages: initialMessages, + id: chatId, }) const messages = React.useMemo(() => { diff --git a/src/components/AiChat/types.ts b/src/components/AiChat/types.ts index 2117c8d..6f97002 100644 --- a/src/components/AiChat/types.ts +++ b/src/components/AiChat/types.ts @@ -29,6 +29,7 @@ type RequestOpts = { } type AiChatProps = { + chatId?: string className?: string initialMessages: Omit[] conversationStarters?: { content: string }[]