From 1613eadbce9d474fac2c476427ae9cbc7f30e024 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 17 Dec 2024 15:32:01 +0800 Subject: [PATCH] chore: not free plan show auto disabled --- web/app/components/datasets/documents/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/datasets/documents/index.tsx b/web/app/components/datasets/documents/index.tsx index b30aea1ee0..cb998e1406 100644 --- a/web/app/components/datasets/documents/index.tsx +++ b/web/app/components/datasets/documents/index.tsx @@ -22,6 +22,7 @@ import type { NotionPage } from '@/models/common' import type { CreateDocumentReq } from '@/models/datasets' import { DataSourceType } from '@/models/datasets' import IndexFailed from '@/app/components/datasets/common/document-status-with-action/index-failed' +import { useProviderContext } from '@/context/provider-context' const FolderPlusIcon = ({ className }: React.SVGProps) => { return @@ -77,6 +78,8 @@ const DEFAULT_LIMIT = 15 const Documents: FC = ({ datasetId }) => { const { t } = useTranslation() + const { plan } = useProviderContext() + const isFreePlan = plan.type === 'sandbox' const [inputValue, setInputValue] = useState('') // the input value const [searchValue, setSearchValue] = useState('') const [currPage, setCurrPage] = React.useState(0) @@ -232,7 +235,7 @@ const Documents: FC = ({ datasetId }) => { onClear={() => handleInputChange('')} />
- + {!isFreePlan && } {embeddingAvailable && (