| | |
| | | <img |
| | | :style="{ width: '16px' }" |
| | | alt="dessert" |
| | | :src="session.avatar || imgSrc" |
| | | :src="session.icon ? httpUrl + session.icon : imgSrc" |
| | | /> |
| | | {{ session.name }} |
| | | </div> |
| | |
| | | const emit = defineEmits(["querySessionDetail","changeAgentType"]); |
| | | import logo from "@/assets/images/model.png"; |
| | | import { deleteKnow } from "@/api/kbList"; |
| | | import { getAgentSessionDetailsApi } from "@/api/agentSession"; |
| | | const sessionList = ref([]); //会话列表 |
| | | const activeSessionId = ref(""); |
| | | const fieldNames = { value: "id", label: "name" }; |
| | |
| | | const searchValue = ref(""); |
| | | const selectValue = ref(""); |
| | | const sectionList = ref({}); |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | const imgSrc = ref(logo); |
| | | const DialogList = async () => { |
| | | const { code, data } = await getDialogListApi(); |
| | |
| | | |
| | | const querySessionDetail = async (session) => { |
| | | console.log(session, 'session'); |
| | | emit('changeAgentType','1'); |
| | | emit('querySessionDetail',session); |
| | | |
| | | |
| | | // 查询历史记录 |
| | | if (session.base == 'agent') { |
| | | // agent对象数据封装 |
| | | // const { code, data } = await getAgentSessionDetailsApi(session.app_id); |
| | | // if (code == 0) { |
| | | // console.log(data,'会话详情'); |
| | | // let sessionObj = { |
| | | // id: session.app_id, |
| | | // dsl: data.dsl, |
| | | // title: session.name, |
| | | // } |
| | | // |
| | | // } |
| | | EventBus.emit("queryAgentSessionDetail",{ |
| | | ...sessionObj, |
| | | id: session.app_id, |
| | | }); |
| | | emit('changeAgentType','2'); |
| | | } else { |
| | | // 生成智能体新的对话 |
| | | emit('changeAgentType','1'); |
| | | emit('querySessionDetail',session); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |