Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

686 B
Raw Blame
import { useQuery } from '@tanstack/react-query'
import { useAtomValue } from 'jotai'
import { deploymentEditionAtom } from '@/features/system-features/state'
import { consoleQuery } from '@/service/console'

export function useKnowledgeBatchUpload() {
  const deploymentEdition = useAtomValue(deploymentEditionAtom)
  const { data: plan } = useQuery(
    consoleQuery.features.get.queryOptions({
      enabled: deploymentEdition === 'CLOUD',
      select: (data) => data.billing.subscription.plan,
    }),
  )

  // Match the legacy RAG uploader, including the conservative loading/error fallback.
  return deploymentEdition !== 'CLOUD' || plan === 'professional' || plan === 'team'
}