From 0269f404613314ab61031030afa6ccc364022181 Mon Sep 17 00:00:00 2001 From: 2991692032 Date: Sat, 31 May 2025 00:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=ACai=E5=AF=B9=E8=AF=9D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/ai/AIAssistantView.vue | 339 +++++++++++++++++- .../service/AiChatSessionHistoryService.java | 7 + .../impl/AiChatSessionHistoryServiceImpl.java | 20 +- .../unilife/service/impl/AiServiceImpl.java | 21 +- .../resources/mappers/AiChatSessionMapper.xml | 2 +- 5 files changed, 368 insertions(+), 21 deletions(-) diff --git a/unilife-frontend/src/views/ai/AIAssistantView.vue b/unilife-frontend/src/views/ai/AIAssistantView.vue index f7d05ed..1744a92 100644 --- a/unilife-frontend/src/views/ai/AIAssistantView.vue +++ b/unilife-frontend/src/views/ai/AIAssistantView.vue @@ -36,11 +36,39 @@ v-for="chat in chatHistory" :key="chat.id" class="chat-item" - :class="{ active: currentChatId === chat.id }" - @click="loadChat(chat.id)" + :class="{ + active: currentChatId === chat.id, + loading: isLoadingChat && currentChatId === chat.id + }" + @click="handleChatItemClick(chat.id)" > -
{{ chat.title }}
-
{{ formatTime(chat.updatedAt) }}
+
+
+ {{ chat.title }} +
+
{{ formatTime(chat.updatedAt) }}
+
+ +
+ + + + + + +
@@ -209,11 +237,52 @@
+ + + + + + + + + + +