From d742e97dc6f32e0424f648a3bd9d98b9a00d787d Mon Sep 17 00:00:00 2001 From: aqiu <819110812@qq.com> Date: Sun, 29 Jun 2025 14:45:55 +0800 Subject: [PATCH] refactor hardcode string into enum --- web/app/components/datasets/create/step-two/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index 0260281748..ebd8552a99 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -507,7 +507,7 @@ const StepTwo = ({ const separator = rules.segmentation.separator const max = rules.segmentation.max_tokens const overlap = rules.segmentation.chunk_overlap - const isHierarchicalDocument = documentDetail.doc_form === 'hierarchical_model' + const isHierarchicalDocument = documentDetail.doc_form === ChunkingMode.parentChild || (rules.parent_mode && rules.subchunk_segmentation) setSegmentIdentifier(separator) setMaxChunkLength(max)