| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { computed, nextTick, onMounted, ref, watch } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { computed, nextTick, ref, watch } from 'vue'; |
| | | import useClipboard from 'vue-clipboard3'; |
| | | import Loding from './components/Loding.vue'; |
| | | import { RecordSet } from './model/Record'; |
| | | import type { ChatContent } from './model/types'; |
| | | import { AnswerType, RoleEnum, answerTypeMapCom, roleImageMap, type ChatMessage } from './model/types'; |
| | | import { GetHistoryAnswer, QueryHistoryDetail, QuestionAi } from '/@/api/ai/chat'; |
| | | import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; |
| | | import router from '/@/router'; |
| | | import { activeChatRoom, activeRoomId } from '/@/stores/chatRoom'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { content } from 'html2canvas/dist/types/css/property-descriptors/content'; |
| | | |
| | | let isTalking = ref(false); |
| | | let messageContent = ref<ChatContent>({ |
| | |
| | | const appendLastMessageContent = (content: ChatContent) => { |
| | | if(messageList.value.at(-1)){ |
| | | messageList.value.at(-1).content = content; |
| | | |
| | | } |
| | | }; |
| | | let currentSectionId = ''; |
| | |
| | | type: AnswerType.Text, |
| | | values: activeChatRoom.value.title, |
| | | }; |
| | | console.log("🚀 ~ activeChatRoom.value.title:", activeChatRoom.value.title) |
| | | sendChatMessage(); |
| | | } else { |
| | | const res = await QueryHistoryDetail({ |