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.

669 B
Raw Blame
'use client'

import { atom } from 'jotai'
import { atomWithQuery } from 'jotai-tanstack-query'
import { knowledgeFsFeaturesQueryOptions } from './client'

const knowledgeFsFeaturesQueryAtom = atomWithQuery(() => knowledgeFsFeaturesQueryOptions())

// Every capability stays unavailable until the authenticated query resolves, and after it fails.
const knowledgeFsFeaturesAtom = atom((get) => get(knowledgeFsFeaturesQueryAtom).data)

export const knowledgeFsUploadEnabledAtom = atom(
  (get) => get(knowledgeFsFeaturesAtom)?.upload_enabled ?? false,
)

export const agentKnowledgeFsEnabledAtom = atom(
  (get) => get(knowledgeFsFeaturesAtom)?.agent_enabled ?? false,
)