wujingjing
2024-08-19 8b48a3991eac809875afedbfa2c440bd21fc1552
src/components/chat/hooks/useAssistantContentOpt.ts
@@ -16,7 +16,7 @@
export const useAssistantContentOpt = (option: AssistantContentOptOption) => {
   const { forbidScroll, sendChatMessage, displayMessageList } = option;
   const { toClipboard } = useClipboard();
   const isNextChat = ref(false);
   const preQuestion = ref(null);
   const copyClick = (item) => {
      const type = item.content.type;
@@ -80,7 +80,7 @@
      });
   };
   useClickOther(
      computed(() => feedbackPanelRef.value[curFeedbackIndex.value]),
      computed(() => feedbackPanelRef.value?.[curFeedbackIndex.value]),
      feedbackIsShow,
      () => {
         feedbackIsShow.value = false;
@@ -103,16 +103,16 @@
      sendChatMessage({ type: AnswerType.Text, values: item.question });
   };
   const fixQuestionClick = (item) => {
   const fixQuestionClick = (item,originData) => {
      if (!item.question) return;
      isNextChat.value = true;
      preQuestion.value = originData?.question;
      try {
         sendChatMessage({
            type: AnswerType.Text,
            values: item.question,
         });
      } finally {
         isNextChat.value = false;
         preQuestion.value = null;
      }
   };
@@ -129,7 +129,7 @@
      feedbackClick,
      askMoreClick,
      fixQuestionClick,
      isNextChat,
      preQuestion,
      showAskMore,
      showFixQuestion,
   };