mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 06:46:40 +08:00
### What problem does this PR solve? Feat: Create empty agent #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { ButtonLoading } from '@/components/ui/button';
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogFooter,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
} from '@/components/ui/dialog';
|
|
import { IModalProps } from '@/interfaces/common';
|
|
import { TagRenameId } from '@/pages/add-knowledge/constant';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { CreateAgentForm } from './create-agent-form';
|
|
|
|
export function CreateAgentDialog({
|
|
hideModal,
|
|
onOk,
|
|
loading,
|
|
}: IModalProps<any>) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Dialog open onOpenChange={hideModal}>
|
|
<DialogContent className="sm:max-w-[425px]">
|
|
<DialogHeader>
|
|
<DialogTitle>{t('flow.createGraph')}</DialogTitle>
|
|
</DialogHeader>
|
|
<CreateAgentForm hideModal={hideModal} onOk={onOk}></CreateAgentForm>
|
|
<DialogFooter>
|
|
<ButtonLoading type="submit" form={TagRenameId} loading={loading}>
|
|
{t('common.save')}
|
|
</ButtonLoading>
|
|
</DialogFooter>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|