Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
| | |
| | | maxRows: 5, |
| | | }" |
| | | /> |
| | | <div style="height: 40px"></div> |
| | | <div class="btn-send"> |
| | | <!-- <icon-send size="32" /> --> |
| | | <a-button |
| | |
| | | // agentObj.conversation_id = agentObj.id; |
| | | console.log(agentObj, 'agentObj'); |
| | | let chatData = { |
| | | id:agentObj.id, |
| | | conversation_id:agentObj.id, |
| | | id:activeSessionId.value, |
| | | conversation_id:activeSessionId.value, |
| | | name: agentTitle.value |
| | | } |
| | | const { code, data } = await addSessionApi(chatData); |
| | |
| | | createNewAgent(data); |
| | | }); |
| | | EventBus.on('queryAgentSessionDetail', (data) => { |
| | | Object.assign(agentObj, data); |
| | | isHistory.value = true; |
| | | querySessionDetail(data); |
| | | }); |
| | |
| | | |
| | | const querySessionDetail = async (session) => { |
| | | console.log(session, 'session'); |
| | | // 查询历史记录 |
| | | if (session.app_type == '2') { |
| | | // 查询历史记录 app_type 1:智能体 2:agent |
| | | if (session.app_type == '1') { |
| | | // 生成智能体新的对话 |
| | | emit('changeAgentType','1'); |
| | | emit('querySessionDetail',session); |
| | | } else if (session.app_type == '2'){ |
| | | // agent对象数据封装 |
| | | // const { code, data } = await getAgentSessionDetailsApi(session.dialog_id); |
| | | // if (code == 0) { |
| | |
| | | // } |
| | | EventBus.emit("queryAgentSessionDetail",session); |
| | | emit('changeAgentType','2'); |
| | | } else { |
| | | // 生成智能体新的对话 |
| | | emit('changeAgentType','1'); |
| | | emit('querySessionDetail',session); |
| | | } |
| | | } |
| | | |
| | |
| | | EventBus.on("history", () => { |
| | | emit('changeAgentType','3'); |
| | | // DialogList() |
| | | queryPage.page = 1; |
| | | querySessionList(''); |
| | | |
| | | }); |