From 05e63f745d89c9a16280428208c28a98258f9391 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 07 三月 2025 17:53:48 +0800
Subject: [PATCH] 选择列记忆

---
 src/components/chat/Chat.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue
index e5a1199..60c0d18 100644
--- a/src/components/chat/Chat.vue
+++ b/src/components/chat/Chat.vue
@@ -80,6 +80,7 @@
 import { useLoadData } from './hooks/useLoadData';
 import { useSyncMsg } from './hooks/useSyncMsg';
 import { getCurrentPosition } from '/@/utils/brower';
+import { deepClone } from '/@/utils/other';
 const containerRef = useCompRef(ChatContainer);
 const chatListDom = computed(() => containerRef.value?.chatListDom);
 const scrollToBottom = () => {
@@ -225,6 +226,13 @@
 					triggerRefresh();
 					return;
 					// chunkRes.value = '鍑嗗鏁版嵁鍒嗘瀽';
+				}
+
+				if (chunkRes.mode === 'create_work_order') {
+					const lastMsg = computedMessageList.value.at(-1);
+					lastMsg.modeContent = chunkRes;
+					triggerRefresh();
+					return;
 				}
 
 				if (chunkRes.mode === 'summary') {
@@ -424,7 +432,7 @@
 
 const addChatItem = (content: ChatContent) => {
 	isTalking.value = true;
-	const userItem: ChatMessage = { role: RoleEnum.user, content, isChecked: false, attachList: attachList.value } as any;
+	const userItem: ChatMessage = { role: RoleEnum.user, content, isChecked: false, attachList: deepClone(attachList.value) } as any;
 	const assistantItem: ChatMessage = {
 		role: RoleEnum.assistant,
 		content: {

--
Gitblit v1.9.3