-
Notifications
You must be signed in to change notification settings - Fork 313
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
fix(ai-sidebar): Pass additional props to BoxAISidebarContent #3820
Conversation
@@ -80,6 +81,7 @@ const BoxAISidebar = (props: BoxAISidebarProps) => { | |||
fileID, | |||
getSuggestedQuestions, | |||
isIntelligentQueryMode, | |||
isOpen, |
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.
When looking at the corresponding EUA change, I've come to a conclusion, that I've approved this prematurely :)
Do we need to get this prop from outside? I believe we could pass it to toBoxAISidebarContent
always as true
, because if the sidebar is closed, BoxAISidebarContent
component will never be rendered.
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.
I agree, let's remove it from props here.
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.
Updated
@@ -116,6 +118,8 @@ const BoxAISidebar = (props: BoxAISidebarProps) => { | |||
value={{ cache, contentName, elementId, isStopResponseEnabled, setCacheValue, recordAction, userInfo }} | |||
> | |||
<BoxAISidebarContent | |||
getSuggestedQuestions={getSuggestedQuestions} | |||
isOpen={isOpen} |
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.
isOpen={isOpen} | |
isOpen |
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.
Updated
55536cf
to
ed885fa
Compare
ed885fa
to
88d0131
Compare
Description
Pass
isOpen
andgetSuggestedQuestions
toBoxAISidebarContent
allowing suggested questions to load correctly for xlsx files.isOpen
indicates whether the AI Sidebar is open or closed.getSuggestedQuestions
It either returns a function to fetch suggested questions under certain conditions or null when no questions are available.Both props are utilized by
BoxAISidebarContent
when wrapped inwithApiWrapper
, to handle the logic for fetching and displaying suggested questions based on the file type and Sidebar state.Suggested question for xlsx file: