feat: 完成对话结束的标签
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="chat-ai">
|
||||
<ChatMarkdown v-if="text.length > 0" :text="text"></ChatMarkdown>
|
||||
<ChatMarkdown :text="text"></ChatMarkdown>
|
||||
<slot name="content"></slot>
|
||||
</view>
|
||||
<slot name="footer"></slot>
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
<CreateServiceOrder v-else-if="item.toolCall.componentName === CompName.createWorkOrderCard"/>
|
||||
</template>
|
||||
<template #footer >
|
||||
<!-- <text> 这个是底部 </text> -->
|
||||
<!-- 这个是底部 -->
|
||||
<AttachListComponent v-if="item.question" :question="item.question" @replySent="handleReply"/>
|
||||
</template>
|
||||
</ChatCardAI>
|
||||
</template>
|
||||
@@ -93,6 +94,7 @@
|
||||
import DiscoveryCardComponent from '../module/discovery/DiscoveryCardComponent.vue';
|
||||
import ActivityListComponent from '../module/banner/ActivityListComponent.vue';
|
||||
import RecommendPostsComponent from '../module/recommend/RecommendPostsComponent.vue';
|
||||
import AttachListComponent from '../module/attach/AttachListComponent.vue';
|
||||
|
||||
import CreateServiceOrder from '@/components/CreateServiceOrder/index.vue'
|
||||
|
||||
@@ -365,7 +367,6 @@
|
||||
if (chunk && chunk.finish) {
|
||||
// 结尾处理:确保剩余内容全部输出
|
||||
const finishInterval = setInterval(() => {
|
||||
console.log('aiMsgBuffer.length:', aiMsgBuffer.length)
|
||||
if (aiMsgBuffer.length === 0) {
|
||||
clearInterval(finishInterval);
|
||||
clearInterval(loadingTimer);
|
||||
@@ -382,12 +383,19 @@
|
||||
chatMsgList.value[aiMsgIndex].msg = '';
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有组件
|
||||
if(chunk.toolCall) {
|
||||
console.log('chunk.toolCall:', chunk.toolCall)
|
||||
chatMsgList.value[aiMsgIndex].toolCall = chunk.toolCall
|
||||
}
|
||||
|
||||
console.log("============>", chunk.question)
|
||||
|
||||
// 如果有问题,则设置问题
|
||||
if(chunk.question && chunk.question.length > 0) {
|
||||
chatMsgList.value[aiMsgIndex].question = chunk.question
|
||||
}
|
||||
|
||||
isSessionActive = false;
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- :style="backgroundStyle" -->
|
||||
<view class="top-item1-left">
|
||||
<image :src="initPageImages.welcomeImageUrl"></image>
|
||||
<text>{{ currentDate }} 多云 -3~6℃ cc </text>
|
||||
<text>{{ currentDate }} 多云 -3~6℃ ff </text>
|
||||
</view>
|
||||
<view class="top-item1-right">
|
||||
<image :src="initPageImages.logoImageUrl"></image>
|
||||
|
||||
Reference in New Issue
Block a user