refactor: remove enable_multimodal and adjust parent-child configuration

- Removed the `enable_multimodal` field from the `ChunkingConfigOverride` interface and related components to streamline configuration.
- Updated the logic in `UploadConfirmDialog.vue` to default `enableParentChild` to false when initializing from knowledge base info.
- Modified the `mergeChunkingConfig` function to ensure that `EnableParentChild` is authoritative, allowing explicit control over its state.
- Added a new test case in `knowledge_process_config_test.go` to verify the behavior of parent-child toggles in process configuration resolution.
This commit is contained in:
wizardchen
2026-06-09 20:13:49 +08:00
committed by lyingbug
parent 76dc23226d
commit d8a26f7c23
6 changed files with 28 additions and 24 deletions
@@ -149,15 +149,12 @@ func mergeChunkingConfig(base types.ChunkingConfig, override *types.ChunkingConf
if len(override.Separators) > 0 {
result.Separators = override.Separators
}
if override.EnableMultimodal {
result.EnableMultimodal = override.EnableMultimodal
}
if len(override.ParserEngineRules) > 0 {
result.ParserEngineRules = override.ParserEngineRules
}
if override.EnableParentChild {
result.EnableParentChild = override.EnableParentChild
}
// EnableParentChild is authoritative: callers send a full chunking snapshot,
// so an explicit false must be able to turn parent-child off (not just on).
result.EnableParentChild = override.EnableParentChild
if override.ParentChunkSize != 0 {
result.ParentChunkSize = override.ParentChunkSize
}