Commit 32c02a2b authored by Joel's avatar Joel

feat: readonly not check api

parent b2c28b0b
......@@ -26,9 +26,12 @@ const Plugins: FC<IPluginsProps> = ({
onChange,
}) => {
const { t } = useTranslation()
const [isLoading, setIsLoading] = React.useState(true)
const [isLoading, setIsLoading] = React.useState(!readonly)
const [isSerpApiValid, setIsSerpApiValid] = React.useState(false)
const checkSerpApiKey = async () => {
if (readonly)
return
const provides: any = await getToolProviders()
const isSerpApiValid = !!provides.find((v: any) => v.tool_name === 'serpapi' && v.is_enabled)
setIsSerpApiValid(isSerpApiValid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment