| | |
| | | v-for="(item, index) in initQuestionList" |
| | | :key="index" |
| | | class="cursor-pointer hover:bg-gray-50 p-3 rounded-lg border border-solid border-gray-400" |
| | | @click="handleQuestionClick(item)" |
| | | @click="handleQuestionClick(item.question)" |
| | | > |
| | | {{ item }} |
| | | {{ item.title }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | const historyMessages = ref<ChatMessage[]>([]); |
| | | const isInit = computed(() => historyMessages.value.length === 0); |
| | | const initQuestionList = ref(['放大', '缩小']); |
| | | const initQuestionList = ref([ |
| | | { title: '图层切换', question: '切换卫星地图' }, |
| | | { title: '地图缩放', question: '放大' }, |
| | | { title: '设备显隐', question: '隐藏设备' }, |
| | | { title: '设备聚焦', question: '聚焦设备' }, |
| | | ]); |
| | | const chatContentRef = ref<HTMLDivElement>(null); |
| | | |
| | | const getLastAssistantMessage = () => { |
| | |
| | | handleMapCommand({ operate: '聚焦设备' }); |
| | | return; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const startStream = (question: string) => { |
| | | if (lastIsInit) { |