feat: Agent技能市场 — 公开/发布/分类/精选/评分
- AgentCreate 新增 category/tags/is_public/is_featured 字段 - 迁移 011 添加 agents 市场相关列(category/tags/is_public/rating_avg 等) - agent_market API:按分类/标签/精选筛选,排序,分页 - 前端 AgentMarket.vue:市场浏览页,搜索/筛选/安装 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,10 @@ class AgentCreate(BaseModel):
|
||||
description: Optional[str] = None
|
||||
workflow_config: Dict[str, Any] # 包含nodes和edges
|
||||
budget_config: Optional[Dict[str, Any]] = None
|
||||
category: Optional[str] = None
|
||||
tags: Optional[List[str]] = None
|
||||
is_public: bool = False
|
||||
is_featured: bool = False
|
||||
|
||||
|
||||
class AgentUpdate(BaseModel):
|
||||
@@ -218,7 +222,11 @@ async def create_agent(
|
||||
workflow_config=agent_data.workflow_config,
|
||||
budget_config=agent_data.budget_config,
|
||||
user_id=current_user.id,
|
||||
status="draft"
|
||||
status="draft",
|
||||
category=agent_data.category,
|
||||
tags=agent_data.tags,
|
||||
is_public=1 if agent_data.is_public else 0,
|
||||
is_featured=1 if agent_data.is_featured else 0,
|
||||
)
|
||||
db.add(agent)
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user