feat: adapt preloaded skills to smart-reasoning agent

This commit is contained in:
nullkey
2026-02-04 03:40:09 +08:00
committed by lyingbug
parent 33f7e7da66
commit 3f21345546
32 changed files with 2194 additions and 719 deletions
+11
View File
@@ -48,6 +48,7 @@ type RouterParams struct {
FAQHandler *handler.FAQHandler
TagHandler *handler.TagHandler
CustomAgentHandler *handler.CustomAgentHandler
SkillHandler *handler.SkillHandler
}
// NewRouter 创建新的路由
@@ -112,6 +113,7 @@ func NewRouter(params RouterParams) *gin.Engine {
RegisterMCPServiceRoutes(v1, params.MCPServiceHandler)
RegisterWebSearchRoutes(v1, params.WebSearchHandler)
RegisterCustomAgentRoutes(v1, params.CustomAgentHandler)
RegisterSkillRoutes(v1, params.SkillHandler)
}
return r
@@ -439,3 +441,12 @@ func RegisterCustomAgentRoutes(r *gin.RouterGroup, agentHandler *handler.CustomA
agents.POST("/:id/copy", agentHandler.CopyAgent)
}
}
// RegisterSkillRoutes registers skill routes
func RegisterSkillRoutes(r *gin.RouterGroup, skillHandler *handler.SkillHandler) {
skills := r.Group("/skills")
{
// List all preloaded skills
skills.GET("", skillHandler.ListSkills)
}
}