feat: Add option to enable internet search by default

This commit is contained in:
n4ze3m
2025-01-12 00:19:39 +05:30
parent 84e123bf38
commit 48b7a2824a
23 changed files with 148 additions and 27 deletions

View File

@@ -39,7 +39,8 @@ export const PlaygroundForm = ({ dropedFile }: Props) => {
selectedKnowledge,
temporaryChat,
useOCR,
setUseOCR
setUseOCR,
defaultInternetSearchOn
} = useMessageOption()
const isMobile = () => {
@@ -71,8 +72,17 @@ export const PlaygroundForm = ({ dropedFile }: Props) => {
React.useEffect(() => {
textAreaFocus()
if (defaultInternetSearchOn) {
setWebSearch(true)
}
}, [])
React.useEffect(() => {
if (defaultInternetSearchOn) {
setWebSearch(true)
}
}, [defaultInternetSearchOn])
const onInputChange = async (
e: React.ChangeEvent<HTMLInputElement> | File
) => {