| | |
| | | import { useSyncMsg } from './hooks/useSyncMsg'; |
| | | import { getCurrentPosition } from '/@/utils/brower'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | import { ParentRegister } from '/@/stores/global'; |
| | | const containerRef = useCompRef(ChatContainer); |
| | | const chatListDom = computed(() => containerRef.value?.chatListDom); |
| | | |
| | | const scrollToBottom = () => { |
| | | containerRef.value?.scrollToBottom(); |
| | | }; |
| | |
| | | isTalking.value = !isTalking.value; |
| | | }); |
| | | }; |
| | | |
| | | const enableCallback = ref(false); |
| | | |
| | | let streamOutputIsStart = false; |
| | | let position: Position = null; |
| | |
| | | return; |
| | | // chunkRes.value = '准备数据分析'; |
| | | } |
| | | |
| | | if (chunkRes.mode === 'main_frame') { |
| | | const jsonObj = JSON.parse(chunkRes.value); |
| | | if (!enableCallback.value) { |
| | | return; |
| | | } |
| | | |
| | | ParentRegister.notify?.({ |
| | | type: 'main_frame', |
| | | value: jsonObj, |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (chunkRes.mode === 'create_work_order') { |
| | | const lastMsg = computedMessageList.value.at(-1); |