chore: Update SidepanelForm to include chat mode checkbox for normal and rag modes

This commit is contained in:
n4ze3m 2024-05-24 19:58:02 +05:30
parent 8899a42331
commit 2a7d34f4df

View File

@ -95,7 +95,8 @@ export const SidepanelForm = ({ dropedFile }: Props) => {
chatMode, chatMode,
speechToTextLanguage, speechToTextLanguage,
stopStreamingRequest, stopStreamingRequest,
streaming streaming,
setChatMode
} = useMessage() } = useMessage()
const { isListening, start, stop, transcript } = useSpeechRecognition() const { isListening, start, stop, transcript } = useSpeechRecognition()
@ -264,6 +265,18 @@ export const SidepanelForm = ({ dropedFile }: Props) => {
{t("sendWhenEnter")} {t("sendWhenEnter")}
</Checkbox> </Checkbox>
) )
},
{
key: 2,
label: (
<Checkbox
checked={chatMode === "rag"}
onChange={(e) => {
setChatMode(e.target.checked ? "rag" : "normal")
}}>
{t("common:chatWithCurrentPage")}
</Checkbox>
)
} }
] ]
}}> }}>