This commit is contained in:
Joel 2025-12-10 15:42:19 +08:00
commit ff40efdc26
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ import NotionConnector from '@/app/components/base/notion-connector'
import type { DataSourceAuth } from '@/app/components/header/account-setting/data-source-page-new/types'
import PlanUpgradeModal from '@/app/components/billing/plan-upgrade-modal'
import { useBoolean } from 'ahooks'
import { Plan } from '@/app/components/billing/type'
type IStepOneProps = {
datasetId?: string
@ -112,7 +113,7 @@ const StepOne = ({
const hasNotin = notionPages.length > 0
const isVectorSpaceFull = plan.usage.vectorSpace >= plan.total.vectorSpace
const isShowVectorSpaceFull = (allFileLoaded || hasNotin) && isVectorSpaceFull && enableBilling
const supportBatchUpload = !enableBilling || plan.type !== 'sandbox'
const supportBatchUpload = !enableBilling || plan.type !== Plan.sandbox
const notSupportBatchUpload = !supportBatchUpload
const [isShowPlanUpgradeModal, {

View File

@ -44,7 +44,7 @@ const SegmentAdd: FC<ISegmentAddProps> = ({
}] = useBoolean(false)
const { plan, enableBilling } = useProviderContext()
const { usage, total } = plan
const canAdd = enableBilling && (usage.vectorSpace < total.vectorSpace)
const canAdd = enableBilling ? (usage.vectorSpace < total.vectorSpace) : true
const withNeedUpgradeCheck = useCallback((fn: () => void) => {
return () => {