feat: 快速预定的组件调试
This commit is contained in:
@@ -26,8 +26,11 @@
|
||||
|
||||
<view class="area-msg-list-content" v-for="item in chatMsgList" :key="item.msgId" :id="item.msgId">
|
||||
<template v-if="item.msgType === MessageRole.AI">
|
||||
<ChatCardAI class="message-item-ai" :text="item.msg">
|
||||
</ChatCardAI>
|
||||
<ChatCardAI class="message-item-ai" :text="item.msg">
|
||||
<template v-if="item.toolCall">
|
||||
<QuickBookingComponent v-if="item.toolCall.componentName === 'createWorkOrderCard'" />
|
||||
</template>
|
||||
</ChatCardAI>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.msgType === MessageRole.ME">
|
||||
@@ -78,6 +81,7 @@
|
||||
import ChatMoreTips from './ChatMoreTips.vue';
|
||||
import ChatInputArea from './ChatInputArea.vue'
|
||||
import CommandWrapper from '@/components/CommandWrapper/index.vue'
|
||||
import QuickBookingComponent from '../booking/QuickBookingComponent.vue'
|
||||
|
||||
import { MessageRole, MessageType } from '../../model/ChatModel';
|
||||
|
||||
@@ -349,12 +353,22 @@
|
||||
loadingTimer = null;
|
||||
isTyping = false;
|
||||
typeWriterTimer = null;
|
||||
// 补全:如果消息内容还停留在'加载中.'或为空,则给出友好提示
|
||||
const msg = chatMsgList.value[aiMsgIndex].msg;
|
||||
|
||||
// 补全:如果消息内容还停留在'加载中.'或为空,则给出友好提示
|
||||
const msg = chatMsgList.value[aiMsgIndex].msg;
|
||||
console.log('msg:', msg)
|
||||
if (!msg || msg === '加载中.' || msg.startsWith('加载中')) {
|
||||
chatMsgList.value[aiMsgIndex].msg = '未获取到内容,请重试';
|
||||
}
|
||||
if (!msg || msg === '加载中.' || msg.startsWith('加载中')) {
|
||||
chatMsgList.value[aiMsgIndex].msg = '未获取到内容,请重试';
|
||||
if(chunk.toolCall) {
|
||||
chatMsgList.value[aiMsgIndex].msg = '';
|
||||
}
|
||||
}
|
||||
|
||||
if(chunk.toolCall) {
|
||||
console.log('chunk.toolCall:', chunk.toolCall)
|
||||
chatMsgList.value[aiMsgIndex].toolCall = chunk.toolCall
|
||||
}
|
||||
|
||||
isSessionActive = false;
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user