演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
828 B
TypeScript
27 lines
828 B
TypeScript
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)
|