From 8da9e6750cb58e71ef78801c0004b7dea67dd514 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 11 May 2025 11:13:44 +0800 Subject: [PATCH] update --- docker-compose.yml | 2 +- src/views/AIAgentView.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5abc062..80efca1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: . dockerfile: Dockerfile - image: tradus-web:1.2 + image: tradus-web:1.3 container_name: tradus-web ports: - '6000:80' diff --git a/src/views/AIAgentView.vue b/src/views/AIAgentView.vue index 9bb28c8..220e05b 100644 --- a/src/views/AIAgentView.vue +++ b/src/views/AIAgentView.vue @@ -190,12 +190,14 @@ const selectAgent = (agent: Agent) => { showConfirm('切换 Agent', `是否开启新的 Agent:${agent.name}?`, () => { selectedAgent.value = agent clearConversationId(agent.id) + chatHistory.value = [] showConfirmDialog.value = false }) } else { // 点击当前 Agent showConfirm('重新开始对话', '是否重新开启新会话?', () => { clearConversationId(agent.id) + chatHistory.value = [] showConfirmDialog.value = false }) } @@ -298,7 +300,7 @@ const sendMessage = async () => { case 'agent_thought': if (data.tool) { - const thoughtText = `AI正在调用 ${data.tool} 工具来回答问题` + const thoughtText = `Agent 正在调用 ${data.tool} 工具` chatHistory.value[tempMessageIndex].content = currentResponseText.value ? `${thoughtText}\n\n${currentResponseText.value}` : thoughtText