Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat(ui): add agents import #183

wants to merge 6 commits into from

Conversation

PetrBulanek
Copy link
Contributor

  • 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
Copy link
Contributor

@kapetr kapetr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modal close button is off:
Screenshot 2025-02-25 at 16 19 29

addToast({ title: 'Provider was imported successfuly' });
onRequestClose();
const [createdProviderId, setCreatedProviderId] = useState<string>();
const [providerSource, setProviderSource] = useState(ProviderSource.LocalPath);
Copy link
Contributor

@kapetr kapetr Feb 25, 2025

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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. :-)

Copy link
Contributor

@kapetr kapetr Feb 25, 2025

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 :)

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants