fix: do not migrate extensions from quick ask window (#2336)
This commit is contained in:
parent
2082b81d64
commit
e5369ed151
@ -4,6 +4,8 @@ import { PropsWithChildren, useEffect, useState } from 'react'
|
||||
|
||||
import { Toaster } from 'react-hot-toast'
|
||||
|
||||
import { usePathname } from 'next/navigation'
|
||||
|
||||
import { TooltipProvider } from '@janhq/uikit'
|
||||
|
||||
import GPUDriverPrompt from '@/containers/GPUDriverPromptModal'
|
||||
@ -29,6 +31,7 @@ import { extensionManager } from '@/extension'
|
||||
|
||||
const Providers = (props: PropsWithChildren) => {
|
||||
const { children } = props
|
||||
const pathname = usePathname()
|
||||
|
||||
const [setupCore, setSetupCore] = useState(false)
|
||||
const [activated, setActivated] = useState(false)
|
||||
@ -40,6 +43,11 @@ const Providers = (props: PropsWithChildren) => {
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!isCoreExtensionInstalled()) {
|
||||
// TODO: Proper window handle
|
||||
// Do not migrate extension from quick ask window
|
||||
if (pathname === '/search') {
|
||||
return
|
||||
}
|
||||
setSettingUp(true)
|
||||
await setupBaseExtensions()
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user