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

Assistant Builder: Tree component for datasources #4065

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Conversation

PopDaph
Copy link
Contributor

@PopDaph PopDaph commented Feb 29, 2024

Description

This PR implements the new Tree view in the Assistant Builder, as part of https://github.com/dust-tt/decisions/issues/164

To be tested on Front Edge: https://front-edge.dust.tt/

To be able to build a Tree view, each connector has been updated to expose a function retrieving the ContentNodes linked to a list of internalIds.

There's now a single button to manage all datasources selection (as opposed to a button to add a new, and 2 buttons per connection to edit or remove the selection).

Here are the changes in the PR:

  • We're calling connector getContentNodes over getResourcesTitles to retrieve the content associated to the internalIds saved on the AssistantBuilderConfiguration. That means everywhere we now deal with ConnectorNode[] over Record<string, string>.
  • Edit the "Add datasource modal" to be a "Manage selection modal".
  • As we don't have a remove button anymore, the "unselect all" with untick all selected resources and if we save with nothing it removes the provider from the selected ones.
  • Display the selected datasources as a Tree.

We discussed it IRL so I implemented as discussed but I still think that it will be confusing for users that we display the list of selected items not taking into account that an item is also selected by a parent selection.

PRs related to this change (no need to look at them, linked for posterity if needed someday):
#4031
#4044
#4050
#4083
#4084
#4118
#4119
#4122
#4125
#4132
#4134
#4136
#4138
#4139

Risk

Easy to rollback until we remove the getResourcesTitles connector route.

Deploy Plan

Nothing special, just deploy front.

@PopDaph PopDaph force-pushed the assistant-ds-tree branch from 4c35576 to 4f0712d Compare March 5, 2024 13:19
@PopDaph PopDaph marked this pull request as ready for review March 5, 2024 13:40
@PopDaph PopDaph merged commit 8038623 into main Mar 5, 2024
9 checks passed
@PopDaph PopDaph deleted the assistant-ds-tree branch March 5, 2024 14:09
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