From ac3496e681061e976d850fdb690d2c77150f36b0 Mon Sep 17 00:00:00 2001 From: Rhon Joe Date: Mon, 20 Nov 2023 15:57:31 +0800 Subject: [PATCH] fix(web): Sidebar create new chat context (#1569) --- web/app/components/share/chat/index.tsx | 1 + web/app/components/share/chat/sidebar/index.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/share/chat/index.tsx b/web/app/components/share/chat/index.tsx index 39a1a733336c94..2c68ac64da5120 100644 --- a/web/app/components/share/chat/index.tsx +++ b/web/app/components/share/chat/index.tsx @@ -668,6 +668,7 @@ const Main: FC = ({ onUnpin={handleUnpin} controlUpdateList={controlUpdateConversationList} onDelete={handleDelete} + onStartChat={handleStartChat} /> ) } diff --git a/web/app/components/share/chat/sidebar/index.tsx b/web/app/components/share/chat/sidebar/index.tsx index d1f69272fbe9b3..51b564ace1b340 100644 --- a/web/app/components/share/chat/sidebar/index.tsx +++ b/web/app/components/share/chat/sidebar/index.tsx @@ -35,6 +35,7 @@ export type ISidebarProps = { onUnpin: (id: string) => void controlUpdateList: number onDelete: (id: string) => void + onStartChat: (inputs: Record) => void } const Sidebar: FC = ({ @@ -59,6 +60,7 @@ const Sidebar: FC = ({ onUnpin, controlUpdateList, onDelete, + onStartChat, }) => { const { t } = useTranslation() const [hasPinned, setHasPinned] = useState(false) @@ -104,7 +106,7 @@ const Sidebar: FC = ({ )}