From f996c7437b0a7d4e7bafeb7c71b7c86b7170c8bd Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 27 二月 2025 17:15:13 +0800 Subject: [PATCH] 地图图标展示 --- src/components/chat/Chat.vue | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue index 66e1ebb..caccc96 100644 --- a/src/components/chat/Chat.vue +++ b/src/components/chat/Chat.vue @@ -85,7 +85,7 @@ const scrollToBottom = () => { containerRef.value?.scrollToBottom(); }; -const { loadReplyData, parseContent, parseExtraContent, convertProcessItem, convertProcessToStep, formatShowTimeYear } = useLoadData(); +const { loadReplyData, parseContent, parseExtraContent, convertProcessItem, convertProcessToStep, formatShowTimeYear, getStepGroupList } = useLoadData(); const voicePageIsShow = ref(false); let isTalking = ref(false); const chatWidth = computed(() => containerRef.value?.chatWidth); @@ -308,7 +308,7 @@ }); lastIsResult = false; } - const lastGroup = computedMessageList.value.at(-1).stepGroup[0]; + const lastGroup = getLastGroup(); const stepList = lastGroup?.value ?? []; const currentTimeStamp = new Date().getTime(); if (chunkRes.mode === 'finish') { @@ -323,15 +323,7 @@ const ms = toMyFixed(currentTimeStamp - lastTimestamp, 2) + ' ms'; stepList.at(-1).ms = ms; - } else { - const stepGroup = computedMessageList.value.at(-1).stepGroup; - if (stepGroup.length > 1) { - const lastStepList = stepGroup.at(-2).value; - const ms = toMyFixed(currentTimeStamp - lastTimestamp, 2) + ' ms'; - - lastStepList.at(-1).ms = ms; - } - } + } if (!streamOutputIsStart) { lastTimestamp = currentTimeStamp; @@ -541,10 +533,8 @@ historyId: msgValue.history_id, role: RoleEnum.assistant, content: parseContent(msgValue), - stepGroup: (msgValue?.reports ?? []).map((item) => ({ - value: convertProcessToStep(item?.exec_process), - isShow: false, - })), + stepGroup: getStepGroupList(msgValue?.reports ?? []), + isStopMsg: false, conclusion: msgValue.conclusion ?? [], -- Gitblit v1.9.3