wujingjing
2025-01-03 358d7a8484bf8ad45a4936e168c422e0a1860d17
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,
                     })),