Fix: Metadata,chunk,dataset Related bugs (#13760)

### What problem does this PR solve?

Fix: Metadata,chunk,dataset Related bugs
- metadata not show add button #13731
- chunk edit question style
- dataset modified chunk method bug
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-03-25 10:47:34 +08:00
committed by GitHub
parent 1b29522279
commit a2e6daa8d6
4 changed files with 26 additions and 5 deletions

View File

@ -181,7 +181,7 @@ export function ChunkMethodDialog({
});
const selectedTag = useWatch({
name: 'chunk_method',
name: 'parser_id',
control: form.control,
});
const isMineruSelected =

View File

@ -66,7 +66,7 @@ const EditTag = React.forwardRef<HTMLDivElement, EditTagsProps>(
)}
>
<div className="flex gap-2 items-center">
<div className="max-w-80 overflow-hidden text-ellipsis">
<div className="max-w-80 whitespace-nowrap overflow-hidden text-ellipsis">
{tag}
</div>
{!disabled && (

View File

@ -321,8 +321,29 @@ export const ManageMetadataModal = (props: IManageModalProps) => {
>
<>
<div className="flex flex-col gap-2">
<div className="flex gap-4 items-center justify-between text-truncate">
{secondTitle || t('knowledgeDetails.metadata.metadata')}
<div className="flex items-center justify-between">
<div className="w-1/2 text-truncate">
{secondTitle || t('knowledgeDetails.metadata.metadata')}
</div>
<div>
{isCanAdd &&
activeTab !== 'built-in' &&
!(
metadataType === MetadataType.Setting ||
metadataType === MetadataType.SingleFileSetting
) && (
<Button
variant={'ghost'}
className="border border-border-button"
type="button"
onClick={handAddValueRow}
data-testid={addButtonTestId}
>
<Plus />
{t('common.add')}
</Button>
)}
</div>
</div>
{rowSelectionIsEmpty || (

View File

@ -69,7 +69,7 @@ export function ChunkMethodItem(props: IProps) {
return (
<FormField
control={form.control}
name={'chunk_method'}
name={'parser_id'}
render={({ field }) => (
<FormItem className=" items-center space-y-1">
<div className={line === 1 ? 'flex items-center' : ''}>