Fix: Some bugs (#14734)

### What problem does this PR solve?

Fix: Some bugs
- Error during batch modification of metadata in the Knowledge Base
- Manually configured metadata is not displayed in search settings

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-05-09 17:40:22 +08:00
committed by GitHub
parent c11650bb4c
commit 8ac14b597f
2 changed files with 19 additions and 3 deletions

View File

@@ -50,10 +50,18 @@ export function MetadataFilter({
const methodName = prefix + 'meta_data_filter.method';
const kbIds: string[] = useWatch({
const datasetIds: string[] = useWatch({
control: form.control,
name: prefix + 'dataset_ids',
});
const oldKbIds: string[] = useWatch({
control: form.control,
name: prefix + 'kb_ids',
});
const kbIds = datasetIds || oldKbIds || [];
const metadata = useWatch({
control: form.control,
name: methodName,