diff --git a/web/src/components/chunk-method-modal/index.tsx b/web/src/components/chunk-method-modal/index.tsx index db780e513..1806fc81c 100644 --- a/web/src/components/chunk-method-modal/index.tsx +++ b/web/src/components/chunk-method-modal/index.tsx @@ -24,6 +24,7 @@ import { useTranslate } from '@/hooks/common-hooks'; import { IParserConfig } from '@/interfaces/database/document'; import { IChangeParserConfigRequestBody } from '@/interfaces/request/document'; import { AutoKeywordsItem, AutoQuestionsItem } from '../auto-keywords-item'; +import { DatasetConfigurationContainer } from '../dataset-configuration-container'; import Delimiter from '../delimiter'; import EntityTypesItem from '../entity-types-item'; import ExcelToHtml from '../excel-to-html'; @@ -105,10 +106,6 @@ const ChunkMethodModal: React.FC = ({ selectedTag === DocumentParserType.Naive || selectedTag === DocumentParserType.KnowledgeGraph; - const hideDivider = [showPages, showOne, showMaxTokenNumber].every( - (x) => x === false, - ); - const showEntityTypes = selectedTag === DocumentParserType.KnowledgeGraph; const showExcelToHtml = @@ -151,8 +148,13 @@ const ChunkMethodModal: React.FC = ({ /> - {hideDivider || } -
+ + {showPages && ( <> @@ -257,7 +259,7 @@ const ChunkMethodModal: React.FC = ({ )} - {showOne && } + {showPages && ( = ({ } )} - {showMaxTokenNumber && ( - <> - - - - )} - {showAutoKeywords(selectedTag) && ( - <> - - - - )} - {showExcelToHtml && } + + {showOne && } + {showMaxTokenNumber && ( + <> + + + + )} + + + {showAutoKeywords(selectedTag) && ( + <> + + + + )} + {showExcelToHtml && } + {showRaptorParseConfiguration(selectedTag) && ( - + + + )} {showGraphRagItems(selectedTag) && } {showEntityTypes && } diff --git a/web/src/components/dataset-configuration-container.tsx b/web/src/components/dataset-configuration-container.tsx index 52758c069..84aecc219 100644 --- a/web/src/components/dataset-configuration-container.tsx +++ b/web/src/components/dataset-configuration-container.tsx @@ -3,13 +3,15 @@ import { PropsWithChildren } from 'react'; type DatasetConfigurationContainerProps = { className?: string; + show?: boolean; } & PropsWithChildren; export function DatasetConfigurationContainer({ children, className, + show = true, }: DatasetConfigurationContainerProps) { - return ( + return show ? (
{children}
+ ) : ( + children ); }