From 5631aab9e380b83ec8ec6e21390e9386b0e0e852 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期一, 19 八月 2024 20:45:58 +0800 Subject: [PATCH] 智能体会话名称修改 --- src/views/sessionManager/components/agentSession.vue | 88 ++++++++++++++++++++++++-------------------- 1 files changed, 48 insertions(+), 40 deletions(-) diff --git a/src/views/sessionManager/components/agentSession.vue b/src/views/sessionManager/components/agentSession.vue index 26ced11..ff54b11 100644 --- a/src/views/sessionManager/components/agentSession.vue +++ b/src/views/sessionManager/components/agentSession.vue @@ -3,30 +3,30 @@ <div class="header___lEPyH"> <div class="chatHeader"> <div class="chatHeaderBox"> -<!-- <span class="title">{{agentTitle}}</span>--> - <a-popover - position="bottom" - trigger="click" - > - <a-button border - >{{agentTitle}} - <icon-down style="margin-left: 4px" /> - </a-button> - <template #content> - <a-button - type="text" - class="button" - style="color: #2a2a2b" - @click="handleClick()" - > - <template #icon> - <icon-edit /> - </template> - 淇敼鍚嶇О - </a-button> - <!-- <a-divider style="margin: 10px 0" />--> - </template> - </a-popover> + <span class="title">{{agentTitle}}</span> +<!-- <a-popover--> +<!-- position="bottom"--> +<!-- trigger="click"--> +<!-- >--> +<!-- <a-button border--> +<!-- >{{agentTitle}}--> +<!-- <icon-down style="margin-left: 4px" />--> +<!-- </a-button>--> +<!-- <template #content>--> +<!-- <a-button--> +<!-- type="text"--> +<!-- class="button"--> +<!-- style="color: #2a2a2b"--> +<!-- @click="handleClick()"--> +<!-- >--> +<!-- <template #icon>--> +<!-- <icon-edit />--> +<!-- </template>--> +<!-- 淇敼鍚嶇О--> +<!-- </a-button>--> +<!-- <!– <a-divider style="margin: 10px 0" />–>--> +<!-- </template>--> +<!-- </a-popover>--> </div> </div> </div> @@ -108,14 +108,14 @@ > </a-textarea> </template> - <template #actions> - <div class="action" - @click="stopChat" - style="background: var(--color-bg-2);color: var(--color-primary-light-4);" v-if="displayedText != ''"> - <icon-record-stop /> - 鍋滄鐢熸垚 - </div> - </template> +<!-- <template #actions>--> +<!-- <div class="action"--> +<!-- @click="stopChat"--> +<!-- style="background: var(--color-bg-2);color: var(--color-primary-light-4);" v-if="displayedText != ''">--> +<!-- <icon-record-stop />--> +<!-- 鍋滄鐢熸垚--> +<!-- </div>--> +<!-- </template>--> </a-comment> </div> <!-- <div class="chartStart" v-if="isStart" @click="startChat" @@ -229,14 +229,22 @@ const handleSubmit = async({values, errors}) => { if(errors) return; - agentObj.name = agentTitle.value; - agentObj.conversation_id = agentObj.id; - const { code, data } = await addSessionApi(agentObj); - if (data) { - Message.success("淇敼鎴愬姛"); - handleCancel() - queryAgentSessionDetail(agentObj.id); - } + // agentObj.name = agentTitle.value; + // agentObj.conversation_id = agentObj.id; + console.log(agentObj, 'agentObj'); + + + // let chatData = { + // id:agentObj.id, + // conversation_id:agentObj.id, + // name: agentTitle.value + // } + // const { code, data } = await addSessionApi(chatData); + // if (data) { + // Message.success("淇敼鎴愬姛"); + // handleCancel() + // queryAgentSessionDetail(agentObj.id); + // } } const handleClick = () => { -- Gitblit v1.8.0