feat(agent): 新增智能体应用功能

- 添加智能体列表页面和相关API
- 实现聊天功能,包括历史对话和当前对话
- 新增工作流功能,包括表单提交和结果展示- 优化路由配置,增加智能体相关路由
- 添加全局常量和枚举,用于智能体类型区分
This commit is contained in:
林志军
2025-07-15 15:16:03 +08:00
parent c4b074b775
commit 616665d219
20 changed files with 869 additions and 28 deletions

View File

@ -26,4 +26,5 @@ export const MENU_GROUP_IDS = {
MANAGEMENT_ID: -1, // 管理中心
PROPERTY_ID: 10, // 资产营销平台
WORK_BENCH_ID: -99, // 工作台
AGENT: 2, // 智能体
};

View File

@ -1,7 +1,3 @@
/**
* 智能体应用
*/
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
@ -12,16 +8,46 @@ const COMPONENTS: AppRouteRecordRaw[] = [
path: '/agent',
name: 'Agent',
redirect: 'agent/listData',
component: () => import('@/views/Agent/Chat/index.vue'),
meta: {
locale: '扣子智能体',
icon: IconRepository,
requiresAuth: true,
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.PROPERTY_ID,
id: MENU_GROUP_IDS.AGENT,
},
children: [],
children: [
{
path: 'index',
name: 'AgentListData',
component: () => import('@/views/agent/index'),
meta: {
locale: '智能体列表',
requiresAuth: false,
requireLogin: true,
},
},
{
path: 'chat',
name: 'Chat',
component: () => import('@/views/agent/chat'),
meta: {
hideSidebar: true,
requiresAuth: false,
requireLogin: true,
},
},
{
path: 'workFlow',
name: 'AgentWorkFlow',
component: () => import('@/views/agent/work-flow'),
meta: {
hideSidebar: true,
requiresAuth: false,
requireLogin: true,
},
},
],
},
];