-
Notifications
You must be signed in to change notification settings - Fork 408
frontend: move create AI Agent form to use Field component #2101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this skill will be part of the UI registry in the future.
| placeholder="You are a helpful AI agent that..." | ||
| rows={8} | ||
| {...form.register('systemPrompt')} | ||
| aria-invalid={!!form.formState.errors.systemPrompt} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we add aria-describedby if we add aria-invalid if we can, since we're doing it properly now?
| value={field.value || []} | ||
| /> | ||
| ) : ( | ||
| <MCPEmpty> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add test-ids for these empty states for e2e?
| id="model" | ||
| placeholder="Enter model name (e.g., llama-3.1-70b)" | ||
| {...field} | ||
| aria-invalid={!!form.formState.errors[fieldNames.model]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here, aria-describedby is doable I think.
Form component migration to new Field pattern:
Added form-refactorer skill with migration docs & patterns
Total: 8 files changed, replaced FormField/FormItem/FormLabel/FormMessage with Field/FieldLabel/FieldDescription/FieldError across forms