feat: 技能库改为数据库存储 (Prisma Skill 模型 + seed)
- Prisma 新增 Skill 模型 (id/name/description/icon/category/difficulty/systemPrompt/starters/tasks/tags/prerequisiteIds) - SkillsService 从 DB 读取替代硬编码常量 - seed.ts 新增 seedSkills() 写入 8 个技能 - SkillsController 保持不变,API 返回 JSON 解析后的 starters/tasks
This commit is contained in:
@@ -292,7 +292,16 @@ function SandboxPage() {
|
||||
}).then(() => alert('分享成功!')).catch(() => alert('分享失败'));
|
||||
}
|
||||
|
||||
const currentScene = SCENES.find(s => s.id === scene) || SCENES[0];
|
||||
const currentScene = SCENES.find(s => s.id === scene) || SCENES[0] || null;
|
||||
|
||||
if (skillsLoading) return (
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div className="animate-pulse space-y-4">
|
||||
<div className="h-8 w-48 bg-muted rounded-lg" />
|
||||
<div className="h-[65vh] bg-muted rounded-2xl" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
const isNewChat = messages.length <= 1 && messages[0]?.role === 'assistant';
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user