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

@ -1,6 +1,28 @@
// 投放账号计划
import Http from '@/api';
// 获取聊天智能体
export const getChatAgent = (id: number) => {
return Http.get(`/v1/agent/getChatAgent/${id}`);
};
// 获取历史聊天
export const getHistoryChat = (params: any) => {
return Http.get(`/v1/agent/getConversations`, { params });
};
// 获取智能体分类
export const getCategoriesMenus = () => {
return Http.get(`/v1/agent/getCategoriesMenus`);
};
export const getAgentList = () => {
return Http.get(`/v1/agent/getAgentList`);
};
// 获取工作流详情
export const getWorkFlowInfo = (id: number) => {
return Http.get(`/v1/agent/getWorkFlowInfo/${id}`);
};
// 执行工作流
export const executeWorkFlow = (params: any) => {
return Http.post(`/v1/agent/executeWorkFlow`, params);
};