diff --git a/web/app/components/app-sidebar/dataset-info.tsx b/web/app/components/app-sidebar/dataset-info.tsx index 6c94650213..e6bb15152f 100644 --- a/web/app/components/app-sidebar/dataset-info.tsx +++ b/web/app/components/app-sidebar/dataset-info.tsx @@ -8,6 +8,7 @@ import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail' import { DOC_FORM_ICON_WITH_BG, DOC_FORM_TEXT } from '@/models/datasets' import { useKnowledge } from '@/hooks/use-knowledge' import Badge from '../base/badge' +import cn from '@/utils/classnames' type Props = { expand: boolean @@ -31,46 +32,57 @@ const DatasetInfo: FC = ({ const Icon = isExternal ? DOC_FORM_ICON_WITH_BG.external : DOC_FORM_ICON_WITH_BG[dataset!.doc_form] return ( -
- -
-
- -
- -
-
- {expand && dataset && ( - <> -
-
- {dataset.name} -
-
- {isExternal && t('dataset.externalTag')} - {!isExternal && ( -
- {t(`dataset.chunkingMode.${DOC_FORM_TEXT[dataset.doc_form]}`)} - {formatIndexingTechniqueAndMethod(dataset.indexing_technique, dataset.retrieval_model_dict?.search_method)} -
- )} +
+ {expand && ( + <> + +
+
+ +
+
-

- {dataset.description} -

- - )} -
+ <> +
+
+ {dataset!.name} +
+
+ {isExternal && t('dataset.externalTag')} + {!isExternal && ( +
+ {t(`dataset.chunkingMode.${DOC_FORM_TEXT[dataset!.doc_form]}`)} + {formatIndexingTechniqueAndMethod(dataset!.indexing_technique, dataset!.retrieval_model_dict?.search_method)} +
+ )} +
+
+

+ {dataset!.description} +

+ +
+ + )} + {!expand && ( + + )} {extraInfo}
)