feat(api): enhance organization shared knowledge base and agent functionalities
- Introduced new interfaces for handling shared knowledge bases and agents, including visibility and selection modes for agents. - Added API functions to list shared knowledge bases and agents within an organization, improving data retrieval for UI components. - Updated existing components to utilize the new API endpoints and interfaces, ensuring accurate representation of shared resources. - Enhanced error handling in API calls to provide clearer feedback on failures. This update improves the functionality and user experience by providing better access to shared resources and enhancing the overall data structure within the application.
This commit is contained in:
@@ -502,6 +502,10 @@ func RegisterOrganizationRoutes(r *gin.RouterGroup, orgHandler *handler.Organiza
|
||||
orgs.GET("/:id/shares", orgHandler.ListOrgShares)
|
||||
// List agents shared to this organization
|
||||
orgs.GET("/:id/agent-shares", orgHandler.ListOrgAgentShares)
|
||||
// List all knowledge bases in this organization (including mine) for list-page space view
|
||||
orgs.GET("/:id/shared-knowledge-bases", orgHandler.ListOrganizationSharedKnowledgeBases)
|
||||
// List all agents in this organization (including mine) for list-page space view
|
||||
orgs.GET("/:id/shared-agents", orgHandler.ListOrganizationSharedAgents)
|
||||
}
|
||||
|
||||
// Knowledge base sharing routes (add to existing kb routes)
|
||||
@@ -530,4 +534,6 @@ func RegisterOrganizationRoutes(r *gin.RouterGroup, orgHandler *handler.Organiza
|
||||
// Shared agents route
|
||||
r.GET("/shared-agents", orgHandler.ListSharedAgents)
|
||||
r.POST("/shared-agents/disabled", orgHandler.SetSharedAgentDisabledByMe)
|
||||
// Per-org resource counts for list sidebar (one request)
|
||||
r.GET("/me/resource-counts", orgHandler.GetMeResourceCounts)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user