From 358d7a8484bf8ad45a4936e168c422e0a1860d17 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 03 一月 2025 17:28:29 +0800 Subject: [PATCH] 历史查询 不展示 多轮对话提示 --- src/components/chat/hooks/useScrollLoad.ts | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/chat/hooks/useScrollLoad.ts b/src/components/chat/hooks/useScrollLoad.ts index 4d63095..145f1d0 100644 --- a/src/components/chat/hooks/useScrollLoad.ts +++ b/src/components/chat/hooks/useScrollLoad.ts @@ -26,9 +26,10 @@ title: processItem.value, } as StepItem; }; -export const convertProcessToStep = (process: any[]) => { +export const convertProcessToStep = (process: any[],isHistory = false) => { const stepList = (process ?? []).reduce((preVal, curVal) => { - if (curVal.mode === 'question') { + if (curVal.mode === 'question' ) { + if(isHistory) return preVal; const last = preVal.at(-1); if (!last.subStep) { last.subStep = []; @@ -137,7 +138,7 @@ createTime: answerTime, isStopMsg: false, stepGroup: (item?.answer?.reports ?? []).map((item) => ({ - value: convertProcessToStep(item?.exec_process), + value: convertProcessToStep(item?.exec_process,true), isShow: false, })), -- Gitblit v1.9.3