diff --git a/projects/app/src/components/core/app/DatasetSelectModal.tsx b/projects/app/src/components/core/app/DatasetSelectModal.tsx index 418d19fe224e..7e3584581b66 100644 --- a/projects/app/src/components/core/app/DatasetSelectModal.tsx +++ b/projects/app/src/components/core/app/DatasetSelectModal.tsx @@ -55,6 +55,9 @@ export const DatasetSelectModal = ({ ) }; }, [datasets, allDatasets, selectedDatasets]); + const activeVectorModel = allDatasets.find( + (dataset) => dataset._id === selectedDatasets[0]?.datasetId + )?.vectorModel?.model; return ( dataset._id === selectedDatasets[0]?.datasetId - )?.vectorModel?.model; - - if (vectorModel && vectorModel !== item.vectorModel.model) { + if (activeVectorModel && activeVectorModel !== item.vectorModel.model) { return toast({ status: 'warning', title: t('common:dataset.Select Dataset Tips') @@ -168,13 +167,20 @@ export const DatasetSelectModal = ({ {item.name} - + {item.type === DatasetTypeEnum.folder ? ( {t('common:Folder')} ) : ( <> - {item.vectorModel.name} + {item.vectorModel.name} )}