| | |
| | | > |
| | | <!-- 消息列表 --> |
| | | <template #message-list> |
| | | <template v-if="computedMessageList?.length > 0"> |
| | | <div v-for="(item, msgIndex) of computedMessageList" :key="`${item.historyId}_${item.role}`"> |
| | | <UserMsg |
| | | :msg="item" |
| | | @shareClick="shareClick" |
| | | @setCommonQuestion="setCommonQuestionClick" |
| | | v-if="item.role === RoleEnum.user" |
| | | ></UserMsg> |
| | | |
| | | <AssistantMsg |
| | | v-else |
| | | :msg="item" |
| | | <MessageList |
| | | v-if="computedMessageList?.length > 0" |
| | | :msgList="computedMessageList" |
| | | :isLast="msgIndex === computedMessageList.length - 1" |
| | | @sendChatMessage="sendChatMessage" |
| | | @shareMsg="shareClick" |
| | | :isTalking="isTalking" |
| | | @shareClick="shareClick" |
| | | @setCommonQuestionClick="setCommonQuestionClick" |
| | | @sendChatMessage="sendChatMessage" |
| | | @askMoreClick="askMoreClick" |
| | | /> |
| | | </div> |
| | | <div v-if="showAskMore" class="ml-4 mt-5 pb-10"> |
| | | <div class="text-gray-600 mb-5">你可以继续问我:</div> |
| | | <div class="space-y-2 inline-flex flex-col"> |
| | | <div |
| | | v-for="item in computedMessageList.at(-1).content.askMoreList" |
| | | :key="item.history_id" |
| | | class="bg-white p-3 hover:bg-[#c5e0ff] hover:text-[#1c86ff] cursor-pointer rounded-lg" |
| | | @click="askMoreClick(item)" |
| | | > |
| | | {{ item.question }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <el-empty v-else-if="isSharePage && !chatListLoading" :image-size="200"> |
| | | <template #description> |
| | | <span class="text-[15px]">分享的对话不存在或已失效</span> |
| | |
| | | import { Logger } from '/@/model/logger/Logger'; |
| | | |
| | | import { ElMessage } from 'element-plus'; |
| | | import AssistantMsg from './assistant/index.vue'; |
| | | import ChatContainer from './components/ChatContainer.vue'; |
| | | import ShareLinkDlg from './components/shareLink/index.vue'; |
| | | import UserMsg from './user/index.vue'; |
| | | import router from '/@/router'; |
| | | import MessageList from './messageList/index.vue'; |
| | | import { |
| | | activeChatRoom, |
| | | activeGroupType, |