feat(skills): 新增技能详情字段并统一发布图标

- 技能新增 detail 字段(skills 表新增列 + Alembic 迁移),
  由管理员或技能发布者编辑,内置/公开技能仅管理员可编辑
- 新增 PUT /api/skills/{name}/detail 接口,GET/列表接口返回 detail
- 新增可复用的技能详情弹窗组件,支持 Markdown 渲染与内联编辑
- 智能体创建/编辑选技能、智能体卡片技能徽章均可查看技能详情
- 将定时任务/智能体/技能的发布图标统一为 Globe/Lock

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
吉鑫升andClaude Opus 4.7 committed 2026-05-18 10:03:37 +08:00
1 parent 3b951efd13
commit f61d053010
17 files changed
+694 -77

No files matched your search

@@ -63,6 +63,7 @@ class SkillRepository(SkillStore):
name=data["name"],
owner_user_id=data.get("owner_user_id"),
published=bool(data.get("published", False)),
detail=data.get("detail"),
created_at=now,
updated_at=now,
)
@@ -81,6 +82,7 @@ class SkillRepository(SkillStore):
name=data["name"],
owner_user_id=data.get("owner_user_id"),
published=bool(data.get("published", True)),
detail=data.get("detail"),
created_at=now,
updated_at=now,
)
@@ -101,6 +103,8 @@ class SkillRepository(SkillStore):
return None
if "published" in data:
row.published = bool(data["published"])
if "detail" in data:
row.detail = data["detail"]
row.updated_at = datetime.now(UTC)
await session.commit()
await session.refresh(row)
@@ -115,6 +119,8 @@ class SkillRepository(SkillStore):
row.published = bool(data["published"])
if "owner_user_id" in data:
row.owner_user_id = data["owner_user_id"]
if "detail" in data:
row.detail = data["detail"]
row.updated_at = datetime.now(UTC)
await session.commit()
await session.refresh(row)