wujingjing
2024-10-10 fc42a3c9fb49ecf6c72d22738757c5cda8c06130
src/components/chat/hooks/useAssistantContentOpt.ts
@@ -9,13 +9,12 @@
import { onClickOutside } from '@vueuse/core';
export type AssistantContentOptOption = {
   forbidScroll: Ref<boolean>;
   sendChatMessage: any;
   displayMessageList: ComputedRef<ChatMessage[]>;
};
export const useAssistantContentOpt = (option: AssistantContentOptOption) => {
   const { forbidScroll, sendChatMessage, displayMessageList } = option;
   const { sendChatMessage, displayMessageList } = option;
   const { toClipboard } = useClipboard();
   const preQuestion = ref(null);
@@ -38,10 +37,7 @@
         answer_state: toSetState,
      });
      item.state = toSetState;
      forbidScroll.value = true;
      nextTick(() => {
         forbidScroll.value = false;
      });
   };
   const unLikeClick = async (item) => {
@@ -52,10 +48,7 @@
      });
      item.state = toSetState;
      forbidScroll.value = true;
      nextTick(() => {
         forbidScroll.value = false;
      });
   };
   const feedbackPosition = ref({
      x: 0,