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.

828 B
Raw Blame
import type { RelatedAppListResponse } from '@dify/contracts/api/console/datasets/types.gen'
import * as React from 'react'
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
import ApiAccess from './api-access'
import Statistics from './statistics'

type IExtraInfoProps = {
  relatedApps?: RelatedAppListResponse
  documentCount?: number
  expand: boolean
}

const ExtraInfo = ({ relatedApps, documentCount, expand }: IExtraInfoProps) => {
  const apiEnabled = useDatasetDetailContextWithSelector((state) => state.dataset?.enable_api)

  return (
    <>
      {expand && (
        <Statistics expand={expand} documentCount={documentCount} relatedApps={relatedApps} />
      )}
      <ApiAccess expand={expand} apiEnabled={apiEnabled ?? false} />
    </>
  )
}

export default React.memo(ExtraInfo)