From dea9dd542189369166c6f1950673de340208cf82 Mon Sep 17 00:00:00 2001 From: onlylhf <27225745+onlylhf@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:07:30 +0800 Subject: [PATCH] fix: Update the logic for segment type settings to support parent-child mode selection. --- web/app/components/datasets/create/step-two/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index c931addd1a..f32df86272 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -207,7 +207,16 @@ const StepTwo = ({ } if (value === ChunkingMode.parentChild && indexType === IndexingType.ECONOMICAL) setIndexType(IndexingType.QUALIFIED) + setDocForm(value) + + if (value === ChunkingMode.parentChild) { + setSegmentationType(ProcessMode.parentChild) + } + else { + setSegmentationType(ProcessMode.general) + } + // eslint-disable-next-line ts/no-use-before-define currentEstimateMutation.reset() }