| | |
| | | <!-- ></AddSession>--> |
| | | <!-- <a-card class="top-title">AI会话记录</a-card>--> |
| | | <a-row :gutter="[5, 5]" style="margin-top: 3px;"> |
| | | <!-- <a-col :span="6">--> |
| | | <!-- <a-card class="left-select">--> |
| | | <!-- <a-select--> |
| | | <!-- v-model="selectValue"--> |
| | | <!-- :options="dialogs"--> |
| | | <!-- :field-names="fieldNames"--> |
| | | <!-- @change="dialogChange"--> |
| | | <!-- >--> |
| | | <!-- </a-select>--> |
| | | <!-- </a-card>--> |
| | | <!-- <a-card style="height: 50px">--> |
| | | <!-- <template #cover>--> |
| | | <!-- <div style="display: flex; justify-content: space-between">--> |
| | | <!-- <a-button--> |
| | | <!-- type="primary"--> |
| | | <!-- shape="round"--> |
| | | <!-- class="card-btn-1"--> |
| | | <!-- @click="modalObj.add = true"--> |
| | | <!-- >--> |
| | | <!-- +新建会话--> |
| | | <!-- </a-button>--> |
| | | <!-- <!– <a-button type="text" shape="circle" class="card-btn-2">--> |
| | | <!-- <icon-search />--> |
| | | <!-- </a-button> –>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </a-card>--> |
| | | <!-- <a-card class="left">--> |
| | | <!-- <a-scrollbar--> |
| | | <!-- class="left-list"--> |
| | | <!-- style="--> |
| | | <!-- height: calc(100vh - 350px);--> |
| | | <!-- overflow-y: auto;--> |
| | | <!-- overflow-x: hidden;--> |
| | | <!-- "--> |
| | | <!-- >--> |
| | | <!-- <div--> |
| | | <!-- class="item left-list-item"--> |
| | | <!-- v-for="session in sessionList"--> |
| | | <!-- @click="querySessionDetail(session)"--> |
| | | <!-- :class="{ isLeftActive: activeSessionId === session.id }"--> |
| | | <!-- >--> |
| | | <!-- <div class="text" :class="{ time: theme === 'dark' }"--> |
| | | <!-- >{{ session.name }}--> |
| | | <!-- </div>--> |
| | | <!-- <div class="time"--> |
| | | <!-- >{{--> |
| | | <!-- moment(new Date(session.create_time)).format(--> |
| | | <!-- 'YYYY-MM-DD HH:mm:ss'--> |
| | | <!-- )--> |
| | | <!-- }}--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </a-scrollbar>--> |
| | | <!-- </a-card>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="1"> |
| | | <chatMenu></chatMenu> |
| | | <chatMenu @createSession="createSession" @querySessionDetail="querySessionDetail" @changeAgentType="changeAgentType"></chatMenu> |
| | | </a-col> |
| | | <!-- 智能体会话--> |
| | | <a-col :span="23" v-show="agentType == '1'"> |
| | |
| | | </a-col> |
| | | <a-col :span="23" v-show="agentType == '4'"> |
| | | <div class="center" style="padding: 0"> |
| | | <smartAi @querySessionDetail="querySessionDetail" @changeAgentType="changeAgentType"></smartAi> |
| | | <smartAi @createSession="createSession" @querySessionDetail="querySessionDetail" @changeAgentType="changeAgentType"></smartAi> |
| | | </div> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | dialog_id: id, |
| | | conversation_desc: "未命名会话" |
| | | }); |
| | | console.log(res, "res"); |
| | | // console.log(res, "res"); |
| | | if (res.code == 200) { |
| | | // console.log(res.data.conversation_id); |
| | | activeSessionId.value = res.data?.conversation_id; |
| | |
| | | console.info("done"); |
| | | displayedText.value = ""; |
| | | queryNewSessionDetail(activeSessionId.value); |
| | | EventBus.emit('queryAppUsageList'); |
| | | break; |
| | | } |
| | | } |
| | |
| | | activeSessionId.value = id; |
| | | const { code, data } = await getSessionDetailsApi(id); |
| | | if (code === 200) { |
| | | console.log(data, "新建会话详情"); |
| | | sessionDetailList.value = data.message; |
| | | agentTitle.value = data.name; |
| | | refreshScroll(); //刷新滚动条位置 |
| | |
| | | querySessionList(); |
| | | }; |
| | | onBeforeMount(() => { |
| | | DialogList(); |
| | | // DialogList(); |
| | | //新建会话 |
| | | createSession(''); |
| | | }); |
| | | onMounted(() => { |
| | | EventBus.on("newChat", () => { |
| | | agentType.value = 1; |
| | | createSession(dialogs.value[0].id); |
| | | createSession(''); |
| | | }); |
| | | }); |
| | | onBeforeUnmount(() => { |
| | |
| | | transition: all var(--animation-duration) var(--animation-transition); |
| | | display: flex; |
| | | align-items: flex-end; |
| | | overflow: hidden; /* 隐藏超出的内容 */ |
| | | text-overflow: ellipsis; /* 使用省略号来代替被隐藏的文字 */ |
| | | white-space: nowrap; /* 不换行,使内容在一行内显示 */ |
| | | max-width: 200px; |
| | | } |
| | | } |
| | | </style> |