-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Ensure shared assistants accessible via query params #2740
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This PR ensures shared assistants are accessible via query parameters by updating the ChatPage component and fetchChatData function.
- Modified
web/src/app/chat/ChatPage.tsx
to improve assistant selection logic - Updated
web/src/lib/chat/fetchChatData.ts
to handle shared and hidden assistants correctly - Changes affect how assistants are displayed and used in the chat interface
- Improves accessibility of shared assistants through query parameters
2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
setSelectedAssistant( | ||
finalAssistants.find((persona) => persona.id === defaultAssistantId) | ||
availableAssistants.find((persona) => persona.id === defaultAssistantId) | ||
); |
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.
logic: Changing from finalAssistants
to availableAssistants
might include assistants that were previously filtered out. Verify this is the intended behavior.
); | ||
} | ||
}, [defaultAssistantId, finalAssistants, messageHistory.length]); | ||
}, [defaultAssistantId, availableAssistants, messageHistory.length]); |
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.
style: The dependency array now includes availableAssistants
instead of finalAssistants
. Ensure this doesn't cause unnecessary re-renders.
Description
[Provide a brief description of the changes in this PR]
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Accepted Risk
[Any know risks or failure modes to point out to reviewers]
Related Issue(s)
[If applicable, link to the issue(s) this PR addresses]
Checklist: