| | |
| | | <template> |
| | | <div class="flex h-full"> |
| | | <div class="flex flex-col h-full flex-auto"> |
| | | <div ref="chatListDom" class="relative h-full flex flex-col items-center overflow-y-auto"> |
| | | <div ref="chatListDom" class="relative h-full flex flex-col items-center overflow-y-auto "> |
| | | <span |
| | | class="more-loading absolute text-blue-400 left-[50%] translate-x-[-50%] cursor-pointer w-10" |
| | | v-loading="moreIsLoading" |
| | |
| | | class="group flex px-4 py-6 hover:bg-slate-100 rounded-lg relative" |
| | | :class="{ 'flex-row-reverse': item.role === RoleEnum.user }" |
| | | v-for="(item, index) of computedMessageList" |
| | | :key="index" |
| | | :key="`${item.historyId}_${item.role}`" |
| | | > |
| | | <img |
| | | class="rounded-full size-12 flex-0" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="showAskMore" class="ml-4 mt-5 text-sm"> |
| | | <div v-if="showAskMore" class="ml-4 mt-5 text-sm pb-10"> |
| | | <div class="text-gray-600 mb-5">你可以继续问我:</div> |
| | | <div class="space-y-2 inline-flex flex-col"> |
| | | <div |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="sticky bottom-0 w-full p-6 pb-8 bg-[rgb(247,248,250)] flex justify-center"> |
| | | <div class="sticky bottom-0 w-full p-6 bg-[rgb(247,248,250)] flex justify-center"> |
| | | <PlayBar |
| | | v-model:voicePageIsShow="voicePageIsShow" |
| | | :isTalking="isTalking" |
| | |
| | | import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; |
| | | import CustomDrawer from '/@/components/drawer/CustomDrawer.vue'; |
| | | import router from '/@/router'; |
| | | import { activeChatRoom, activeLLMId, activeSampleId, activeSectionAId, getRoomConfig, roomConfig } from '/@/stores/chatRoom'; |
| | | import { activeChatRoom, activeGroupType, activeLLMId, activeRoomId, activeSampleId, activeSectionAId, getRoomConfig, roomConfig } from '/@/stores/chatRoom'; |
| | | import { ErrorCode } from '/@/utils/request'; |
| | | |
| | | const chatWidth = '75%'; |
| | |
| | | }); |
| | | const currentRoute = router.currentRoute; |
| | | const currentRouteId = currentRoute.value.query.id as string; |
| | | activeRoomId.value = currentRouteId; |
| | | const chatListDom = ref<HTMLDivElement>(); |
| | | const messageList = ref<ChatMessage[]>([]); |
| | | const computedMessageList = computed(() => { |
| | |
| | | process_id: processId.value, |
| | | question: text, |
| | | // FIXME: 暂时这样 |
| | | section_a_id: currentSectionAId, |
| | | // section_a_id: currentSectionAId, |
| | | history_group_id: currentRouteId, |
| | | raw_mode: roomConfig.value?.[currentRouteId]?.isAnswerByLLM ?? false, |
| | | ...judgeParams, |
| | | } as any; |
| | | |
| | | if(activeGroupType.value){ |
| | | params.group_type = activeGroupType.value; |
| | | } |
| | | |
| | | if (currentSampleId) { |
| | | params.sample_id = currentSampleId; |
| | |
| | | |
| | | let currentLLMId = null; |
| | | |
| | | const getAnswerById = async (historyId: string) => { |
| | | return await GetHistoryAnswer({ |
| | | history_id: historyId, |
| | | }); |
| | | }; |
| | | |
| | | const sendChatMessage = async (content: ChatContent = messageContent.value, cb?: any, isCallExtParams?: any) => { |
| | | if (!content?.values || isTalking.value || chatListLoading.value) return; |