feat: add save feedback prompts, featured agent fields, dynamic Dify API config, and chat improvements
- Add success/error feedback messages near submit buttons in all admin forms - Display success prompt for 1s before redirect after save - Show API error details on save failure - Add isFeatured/featuredOrder fields to Agent model and admin UI - Add difyApiUrl/difyApiKey fields for per-agent Dify API configuration - Show featured badge column in agent admin list - Display featured agents on homepage sorted by order - Refactor chat page streaming with AbortController and stable userId - Improve Dify API proxy to use per-agent credentials
This commit is contained in:
@@ -39,6 +39,7 @@ export default async function AdminAgentsPage() {
|
||||
<tr>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">名称</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">分类</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">热门</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">状态</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">使用次数</th>
|
||||
<th className="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase">操作</th>
|
||||
@@ -59,6 +60,15 @@ export default async function AdminAgentsPage() {
|
||||
<td className="px-6 py-4 text-sm text-gray-600">
|
||||
{agent.category?.name || "-"}
|
||||
</td>
|
||||
<td className="px-6 py-4">
|
||||
{agent.isFeatured ? (
|
||||
<span className="inline-flex px-2 py-1 text-xs font-medium rounded-full bg-orange-100 text-orange-700">
|
||||
热门
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-sm text-gray-400">-</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-6 py-4">
|
||||
<span className={`inline-flex px-2 py-1 text-xs font-medium rounded-full ${
|
||||
agent.status === "active"
|
||||
|
||||
Reference in New Issue
Block a user