From 6e09e21b98b487621e7f19e1b91012a0e9e617ed Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 21 三月 2025 13:06:26 +0800
Subject: [PATCH] 	z-index: 1;

---
 src/components/chat/Chat.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue
index e5a1199..accfaf2 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 = () => {
@@ -147,6 +148,10 @@
 		params.tables = JSON.stringify(tableList);
 	}
 
+	const metricList = attachList.value.filter((item) => item.type === 'metric').map((item) => item.model);
+	if (metricList?.length > 0) {
+		params.metrics = JSON.stringify(metricList);
+	}
 	// if (!position) {
 	// 	const loadingInstance = ElLoadingService({
 	// 		text: '鑾峰彇浣嶇疆涓�...',
@@ -225,6 +230,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') {
@@ -407,7 +419,7 @@
 	lastAxiosSource?.cancel();
 	isTalking.value = false;
 	chatListLoading.value = false;
-
+	streamOutputIsStart = false;
 	computedMessageList.value.at(-1).isStopMsg = true;
 };
 
@@ -424,7 +436,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