wujingjing
2025-04-07 07f5e49d4031f74c296fe01bb79e913c864979e5
src/components/chat/hooks/useSyncMsg.ts
@@ -42,14 +42,20 @@
         msgList.value.splice(resultItem.index, 0, ...resultItem.item);
      });
   };
   const historyUpdate = async (data: any) => {
      if (!checkCanSync(data)) return;
      if (!data) return;
      Logger.info('sync message notification:\n\n' + JSON.stringify(data));
      if (data?.type === 'chat_start') {
         showTip(data);
         const groupId = unref(historyGroupId);
         const startGroupId = data?.history_group_id;
         if (groupId !== startGroupId) return;
         const isDigitalHuman = data?.is_digital_human;
         if (!isDigitalHuman) {
            showTip(data);
         }
      }
      if (data?.type === 'chat_history_id') {
         const groupId = unref(historyGroupId);
@@ -82,6 +88,7 @@
         updateLoadIndex(unSyncedHistoryIds.length);
         scrollToBottom();
      }
   };
   onActivated(() => {