feat: enhance agent system with hot/quick questions, dynamic chat UI, and new enterprise agents

- Add hotQuestions and quickQuestions fields to agent model
- Update admin form with textarea inputs for hot/quick questions
- Make chat page display dynamic agent data (name, icon, questions)
- Widen center chat area to 60% for better readability
- Add enterprise service category and 3 new agents (jiaotou, promotion, group-policy)
- Update Prisma schema formatting and seed data
This commit is contained in:
root
2026-05-07 22:14:43 +08:00
parent 77ad8beb3d
commit 362c37fb42
9 changed files with 177 additions and 88 deletions
+3
View File
@@ -18,11 +18,14 @@ export async function PUT(
icon: data.icon || null,
categoryId: data.categoryId ? parseInt(data.categoryId) : null,
features: data.features || "",
hotQuestions: data.hotQuestions || "[]",
quickQuestions: data.quickQuestions || "[]",
status: data.status || "active",
},
})
return NextResponse.json(agent)
} catch (error) {
console.error('PUT /api/admin/agents error:', error)
return NextResponse.json({ error: "更新失败" }, { status: 500 })
}
}
+2
View File
@@ -13,6 +13,8 @@ export async function POST(request: NextRequest) {
icon: data.icon || null,
categoryId: data.categoryId ? parseInt(data.categoryId) : null,
features: data.features || "",
hotQuestions: data.hotQuestions || "[]",
quickQuestions: data.quickQuestions || "[]",
status: data.status || "active",
},
})