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

Upg: allow selecting specific files in folders for assistants #10071

Conversation

Fraggle
Copy link
Contributor

@Fraggle Fraggle commented Jan 17, 2025

Description

Now that folder documents have their parents correctly set, we can select them individually for assistant !

Risk

Low, worst case, missing files when expanding.

Deploy Plan

Deploy front

@Fraggle Fraggle requested a review from philipperolet January 17, 2025 15:00
Copy link
Contributor

@philipperolet philipperolet left a comment

Choose a reason for hiding this comment

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

LGTM 👍 🔥 thanks a lot 🙏
feels a bit weird to have a function canExpand that is actually just returning existence of a datasource, but that's logic that's out of scope of your PR TBH

// Folders with viewType "documents" are always considered leaf items.
// For viewType "tables", folders are not leaf items because users need to select a specific table.
return !isFolder(ds) || viewType === "tables";
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the function could become just !!ds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I figured we keep it for future ease of usage if we want to disallow expand again for something else.

@Fraggle Fraggle merged commit 7475a86 into main Jan 17, 2025
3 checks passed
@Fraggle Fraggle deleted the 1974-allow-configuring-an-assistant-with-specific-files-from-a-folder branch January 17, 2025 15:22
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