feat: upgrade knowledge metadata (#16063)
Support filter knowledge by metadata. Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: NFish <douxc512@gmail.com>
This commit is contained in:
parent
475b8d731e
commit
20376ca951
72 changed files with 4775 additions and 101 deletions
31
web/app/components/datasets/metadata/add-metadata-button.tsx
Normal file
31
web/app/components/datasets/metadata/add-metadata-button.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import Button from '../../base/button'
|
||||
import { RiAddLine } from '@remixicon/react'
|
||||
import cn from '@/utils/classnames'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
const AddedMetadataButton: FC<Props> = ({
|
||||
className,
|
||||
onClick,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<Button
|
||||
className={cn('w-full flex items-center', className)}
|
||||
size='small'
|
||||
variant='tertiary'
|
||||
onClick={onClick}
|
||||
>
|
||||
<RiAddLine className='mr-1 size-3.5' />
|
||||
<div>{t('dataset.metadata.addMetadata')}</div>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
export default React.memo(AddedMetadataButton)
|
||||
Loading…
Add table
Add a link
Reference in a new issue