-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(ui): add agents import #183
base: main
Are you sure you want to change the base?
Conversation
PetrBulanek
commented
Feb 25, 2025
- if the user closes the modal during the import, the notification will not pop up (needs to be fixed)
# Conflicts: # apps/beeai-ui/src/modules/agents/components/AgentTags.tsx # apps/beeai-ui/src/modules/agents/components/AgentsFilters.tsx # apps/beeai-ui/src/modules/agents/components/ImportAgentsModal.tsx # apps/beeai-ui/src/modules/providers/api/mutations/useCreateProvider.ts # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
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.
addToast({ title: 'Provider was imported successfuly' }); | ||
onRequestClose(); | ||
const [createdProviderId, setCreatedProviderId] = useState<string>(); | ||
const [providerSource, setProviderSource] = useState(ProviderSource.LocalPath); |
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.
Is there a reason for not including providerSource
in the useForm
values?
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.
It is just a UI "helper" and actually nothing that is processed outside this component or sent to server, so I thought the form will be cleaner.
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.
But there's no other deeper reason for it, so we might as well change it if you have a strong opinion on it. :-)
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.
Since you actually use it in onSubmit
of the form, it would be cleaner to be present in the form values. In very edge (probably almost impossible :) ) scenario you could have an old value in onSubmit, because the state haven't updated yet. And it actually is a form item. But no big deal :)
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.
And the value actually is sent to the server as part of the location
prop