Feat: Add type card to create agent dialog #9869 (#10025)

### What problem does this PR solve?

Feat: Add type card to create agent dialog #9869
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-09-10 15:56:10 +08:00
committed by GitHub
parent bbe6ed3b90
commit 7d14455fbe
8 changed files with 151 additions and 50 deletions

View File

@ -6,16 +6,18 @@ import {
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';
import { CreateAgentForm, CreateAgentFormProps } from './create-agent-form';
type CreateAgentDialogProps = CreateAgentFormProps;
export function CreateAgentDialog({
hideModal,
onOk,
loading,
}: IModalProps<any>) {
shouldChooseAgent,
}: CreateAgentDialogProps) {
const { t } = useTranslation();
return (
@ -24,7 +26,11 @@ export function CreateAgentDialog({
<DialogHeader>
<DialogTitle>{t('flow.createGraph')}</DialogTitle>
</DialogHeader>
<CreateAgentForm hideModal={hideModal} onOk={onOk}></CreateAgentForm>
<CreateAgentForm
hideModal={hideModal}
onOk={onOk}
shouldChooseAgent={shouldChooseAgent}
></CreateAgentForm>
<DialogFooter>
<ButtonLoading type="submit" form={TagRenameId} loading={loading}>
{t('common.save')}