From 2a7d34f4dfe7c4533f4c4fbd82f206f95fed4ba1 Mon Sep 17 00:00:00 2001 From: n4ze3m Date: Fri, 24 May 2024 19:58:02 +0530 Subject: [PATCH] chore: Update SidepanelForm to include chat mode checkbox for normal and rag modes --- src/components/Sidepanel/Chat/form.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Sidepanel/Chat/form.tsx b/src/components/Sidepanel/Chat/form.tsx index 08c0659..148ebfd 100644 --- a/src/components/Sidepanel/Chat/form.tsx +++ b/src/components/Sidepanel/Chat/form.tsx @@ -95,7 +95,8 @@ export const SidepanelForm = ({ dropedFile }: Props) => { chatMode, speechToTextLanguage, stopStreamingRequest, - streaming + streaming, + setChatMode } = useMessage() const { isListening, start, stop, transcript } = useSpeechRecognition() @@ -264,6 +265,18 @@ export const SidepanelForm = ({ dropedFile }: Props) => { {t("sendWhenEnter")} ) + }, + { + key: 2, + label: ( + { + setChatMode(e.target.checked ? "rag" : "normal") + }}> + {t("common:chatWithCurrentPage")} + + ) } ] }}>