Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Update the logic for segment type settings to support parent-child mode selection. (#21278)

onlylhff2f6e958805a
diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx
index c931addd1a9..ec053ccbe60 100644
--- a/web/app/components/datasets/create/step-two/index.tsx
+++ b/web/app/components/datasets/create/step-two/index.tsx
@@ -207,7 +207,14 @@ 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()
}