liudong
2024-08-24 8189c098dba177425bcdb24d0a8a827f37b23e79
agent名称修改
2个文件已修改
12 ■■■■■ 已修改文件
src/views/sessionManager/components/agentSession.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/historySession.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sessionManager/components/agentSession.vue
@@ -221,6 +221,7 @@
const streamStr = ref('');
const inputMsg = ref('');
const activeSessionId = ref('');
const conversation_id = ref('');
const fieldNames = { value: 'id', label: 'name' };
const agentObj = reactive({});
const agentList = ref([]);
@@ -255,8 +256,8 @@
  if(errors) return;
  console.log(agentObj, 'agentObj');
  let chatData = {
    id:agentObj.id,
    conversation_id:agentObj.id,
    id:conversation_id.value,
    conversation_id:conversation_id.value,
    name: from.name
  }
  const { code, data } = await addSessionApi(chatData);
@@ -301,6 +302,7 @@
  });
  // console.log(res,'agentSet');
  if (res.code == 0) {
    conversation_id.value = res.data.conversation_id;
    agentReset();
  }
}
@@ -378,7 +380,7 @@
// 历史记录跳转获取agent会话详情
const querySessionDetail = async (session) => {
  activeSessionId.value = session.id;
  conversation_id.value = session.id;
  from.name = session.name;
  const { code, data } = await getSessionDetailsApi(session.id);
  if (code == 200) {
src/views/sessionManager/components/historySession.vue
@@ -221,11 +221,11 @@
const querySessionDetail = async (session) => {
  console.log(session, 'session');
  // 查询历史记录 app_type 1:智能体 2:agent
  if (session.app_type == '1') {
  if (!session.base) {
    // 生成智能体新的对话
    emit('changeAgentType','1');
    emit('querySessionDetail',session);
  } else  if (session.app_type == '2'){
  } else  if (session.base == 'agent'){
    // agent对象数据封装
    // const { code, data } = await getAgentSessionDetailsApi(session.dialog_id);
    // if (code == 0) {