From 73d3f164b94053253fa7819754f6155c99dc0a09 Mon Sep 17 00:00:00 2001 From: zoujing Date: Sun, 3 Aug 2025 13:53:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E7=9A=84=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/ChatCardAI.vue | 2 +- pages/chat/ChatMainList.vue | 14 ++++- pages/chat/ChatTopWelcome.vue | 2 +- pages/module/attach/AttachListComponent.vue | 65 +++++++++++++++++++++ 4 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 pages/module/attach/AttachListComponent.vue diff --git a/pages/chat/ChatCardAI.vue b/pages/chat/ChatCardAI.vue index 8893fda..81cd12e 100644 --- a/pages/chat/ChatCardAI.vue +++ b/pages/chat/ChatCardAI.vue @@ -1,7 +1,7 @@ @@ -93,6 +94,7 @@ import DiscoveryCardComponent from '../module/discovery/DiscoveryCardComponent.vue'; import ActivityListComponent from '../module/banner/ActivityListComponent.vue'; import RecommendPostsComponent from '../module/recommend/RecommendPostsComponent.vue'; + import AttachListComponent from '../module/attach/AttachListComponent.vue'; import CreateServiceOrder from '@/components/CreateServiceOrder/index.vue' @@ -365,7 +367,6 @@ if (chunk && chunk.finish) { // 结尾处理:确保剩余内容全部输出 const finishInterval = setInterval(() => { - console.log('aiMsgBuffer.length:', aiMsgBuffer.length) if (aiMsgBuffer.length === 0) { clearInterval(finishInterval); clearInterval(loadingTimer); @@ -382,12 +383,19 @@ chatMsgList.value[aiMsgIndex].msg = ''; } } - + // 如果有组件 if(chunk.toolCall) { console.log('chunk.toolCall:', chunk.toolCall) chatMsgList.value[aiMsgIndex].toolCall = chunk.toolCall } + console.log("============>", chunk.question) + + // 如果有问题,则设置问题 + if(chunk.question && chunk.question.length > 0) { + chatMsgList.value[aiMsgIndex].question = chunk.question + } + isSessionActive = false; scrollToBottom(); } diff --git a/pages/chat/ChatTopWelcome.vue b/pages/chat/ChatTopWelcome.vue index 0e9022d..f940814 100644 --- a/pages/chat/ChatTopWelcome.vue +++ b/pages/chat/ChatTopWelcome.vue @@ -4,7 +4,7 @@ - {{ currentDate }} 多云 -3~6℃ cc + {{ currentDate }} 多云 -3~6℃ ff diff --git a/pages/module/attach/AttachListComponent.vue b/pages/module/attach/AttachListComponent.vue new file mode 100644 index 0000000..204257b --- /dev/null +++ b/pages/module/attach/AttachListComponent.vue @@ -0,0 +1,65 @@ + + + + +