-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
✨ feat(agents): persist Marketplace agents via per-user Favorites in Model dropdown #9488
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
base: dev
Are you sure you want to change the base?
Conversation
* Added endpoints for managing favorite agents: getFavoriteAgents, addFavoriteAgent, and removeFavoriteAgent in UserController. * Updated user routes to include favorite agents operations. * Enhanced AgentCard and EndpointModelItem components to support favoriting agents with UI toggle. * Introduced hooks for fetching and managing favorite agents in the data provider. * Updated user schema to include favoriteAgents field for user personalization. * Implemented logic to handle favorite agents in the agents list and model selector context.
* Refactored UserController to streamline favorite agent responses. * Updated AgentCard and EndpointModelItem components to manage favorite state with local component state. * Implemented useEffect hooks to synchronize favorite agent state with server data. * Added event listeners for marketplace updates to refresh favorite agents list. * Improved error handling in favorite agent operations.
client/src/components/Chat/Menus/Endpoints/components/EndpointModelItem.tsx
Fixed
Show fixed
Hide fixed
client/src/components/Chat/Menus/Endpoints/components/EndpointModelItem.tsx
Fixed
Show fixed
Hide fixed
* Updated AgentCard and EndpointModelItem components to include error handling with ignored errors. * Reformatted code for better readability in ModelSelectorContext by adjusting query options. * Ensured consistent error handling across components managing favorite agents.
* Replaced Star icon with SVG in AgentCard and EndpointModelItem for improved performance and consistency. * Enhanced accessibility by adding role and aria attributes to favorite toggle buttons. * Streamlined favorite agent toggle functionality across components.
…tModelItem * Removed dynamic imports of dataService in favor of direct imports for improved performance and consistency. * Streamlined favorite agent toggle logic to enhance readability and maintainability across components.
client/src/components/Chat/Menus/Endpoints/components/EndpointModelItem.tsx
Fixed
Show fixed
Hide fixed
…tModelItem * Updated favorite agent data retrieval to use a consistent query format. * Removed unnecessary dynamic imports of dataService for improved performance. * Enhanced readability of favorite agent toggle logic across components.
… windows * Updated chunking logic in vite.config.ts to normalize paths by replacing backslashes with forward slashes. * Ensured consistent checks for module inclusion across various libraries to improve chunking efficiency.
@danny-avila I really didn’t want to touch the Vite config, but the Windows CI builds were treating Rollup module IDs with Windows path separators, so our To fix this without raising the Workbox limit, I normalized the Rollup ID inside If there’s a preferred alternative to path normalization in |
…king for windows" This reverts commit 87ed1aa.
Summary
agents.mp4
Addresses the request for Marketplace agents to persist in the Model dropdown across sessions without listing all public agents. #9482
This PR introduces a per-user “Favorites” mechanism:
Endpoints added:
/api/user/favorites/agents
/api/user/favorites/agents
{ agent_id }/api/user/favorites/agents/:agent_id
Agents listing now supports filtering by IDs:
/api/agents?requiredPermission=1&ids=agent_...,agent_...
Change Type
Testing
/api/user/favorites/agents
returns the user’s favorite IDs./api/agents?requiredPermission=1&ids=...
returns the specified agents (if viewable).Test Configuration:
personalization.favoriteAgents
defaults to [].Checklist
Impact summary:
personalization.favoriteAgents
; user favorites routes; agents listids
filter.