diff --git a/web/src/pages/agent/form/begin-form/begin-dynamic-options.tsx b/web/src/pages/agent/form/begin-form/begin-dynamic-options.tsx
index bcc9c5788..3531f8927 100644
--- a/web/src/pages/agent/form/begin-form/begin-dynamic-options.tsx
+++ b/web/src/pages/agent/form/begin-form/begin-dynamic-options.tsx
@@ -1,68 +1,61 @@
-import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
-import { Button, Form, Input } from 'antd';
+'use client';
+
+import { BlockButton, Button } from '@/components/ui/button';
+import {
+ FormControl,
+ FormField,
+ FormItem,
+ FormMessage,
+} from '@/components/ui/form';
+import { Input } from '@/components/ui/input';
+import { X } from 'lucide-react';
+import { useFieldArray, useFormContext } from 'react-hook-form';
+import { useTranslation } from 'react-i18next';
+
+export function BeginDynamicOptions() {
+ const { t } = useTranslation();
+ const form = useFormContext();
+ const name = 'options';
+
+ const { fields, remove, append } = useFieldArray({
+ name: name,
+ control: form.control,
+ });
-const BeginDynamicOptions = () => {
return (
-
{
- if (!names || names.length < 1) {
- return Promise.reject(new Error('At least 1 option'));
- }
- },
- },
- ]}
- >
- {(fields, { add, remove }, { errors }) => (
- <>
- {fields.map((field, index) => (
-
-
-
-
- {fields.length > 1 ? (
- remove(field.name)}
- />
- ) : null}
-
- ))}
-
-