| | |
| | | <template> |
| | | <div class="flex flex-col h-full"> |
| | | <div class="h-full flex flex-col items-center overflow-y-auto"> |
| | | <div ref="chatListDom" class="h-full" :style="{width:chatWidth}"> |
| | | <div ref="chatListDom" class="h-full" :style="{ width: chatWidth }"> |
| | | <div |
| | | class="group flex px-4 py-6 hover:bg-slate-100 rounded-lg" |
| | | :class="{ 'flex-row-reverse': item.role === RoleEnum.user }" |
| | |
| | | <div class="flex" :class="{ 'w-full': item.role === RoleEnum.assistant }"> |
| | | <div class="relative w-full" v-if="item.content?.values"> |
| | | <div |
| | | class="text-sm rounded-[6px] p-4 leading-relaxed " |
| | | :style="{backgroundColor:item.role ===RoleEnum.user? 'rgb(197 224 255)':'white'}" |
| | | class="text-sm rounded-[6px] p-4 leading-relaxed" |
| | | :style="{ backgroundColor: item.role === RoleEnum.user ? 'rgb(197 224 255)' : 'white' }" |
| | | > |
| | | <component :is="answerTypeMapCom[item.content.type]" :data="item.content.values" :error="item.content.error" /> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="sticky bottom-0 w-full p-6 pb-8 bg-[rgb(247,248,250)] flex justify-center"> |
| | | <PlayBar :isTalking="isTalking" v-model="messageContent.values" @sendClick="sendChatMessage" :style="{width:chatWidth}"></PlayBar> |
| | | <PlayBar |
| | | :isTalking="isTalking" |
| | | v-model="messageContent.values" |
| | | @sendClick="sendChatMessage" |
| | | :style="{ width: chatWidth }" |
| | | ></PlayBar> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | content = { |
| | | type: AnswerType.Summary, |
| | | values: res.summary, |
| | | error: res.error ?? res.json_msg, |
| | | error: res.json_msg, |
| | | }; |
| | | break; |
| | | case AnswerType.Url: |