@touchvue/chat 1.0.0-beta.5 → 1.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
- package/es/index.mjs.map +1 -1
- package/es/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.mjs +4816 -0
- package/es/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.mjs +1380 -0
- package/es/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.mjs.map +1 -0
- package/es/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs +7824 -0
- package/es/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs.map +1 -0
- package/es/package.json.css +1 -1
- package/es/package.json.mjs +2 -2
- package/es/packages/components/index.mjs +1 -1
- package/es/packages/components/resolver.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue2.mjs +219 -159
- package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/face.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/AiRobot/face.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/face.vue2.mjs +27 -13
- package/es/packages/components/touchchat/component/AiRobot/face.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/letter.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/AiRobot/letter.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/letter.vue2.mjs +182 -41
- package/es/packages/components/touchchat/component/AiRobot/letter.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.mjs +15 -10
- package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/start.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/AiRobot/start.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/AiRobot/start.vue2.mjs +18 -11
- package/es/packages/components/touchchat/component/AiRobot/start.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/CardView.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/CardView.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/CardView.vue2.mjs +66 -42
- package/es/packages/components/touchchat/component/CardView.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/FileContent.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/FileContent.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/FileContent.vue2.mjs +206 -0
- package/es/packages/components/touchchat/component/FileContent.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/FileView.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/FileView.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/FileView.vue2.mjs +17 -4
- package/es/packages/components/touchchat/component/FileView.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/HelloChat.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/HelloChat.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/HelloChat.vue2.mjs +26 -14
- package/es/packages/components/touchchat/component/HelloChat.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/ImageFile.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/ImageFile.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ImageFile.vue2.mjs +162 -0
- package/es/packages/components/touchchat/component/ImageFile.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ImageView.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/ImageView.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/ImageView.vue2.mjs +1 -1
- package/es/packages/components/touchchat/component/ImageView.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/LinkView.vue.mjs +3 -2
- package/es/packages/components/touchchat/component/LinkView.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/component/LinkView.vue2.mjs +19 -5
- package/es/packages/components/touchchat/component/LinkView.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/component/MarkLayer.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/MarkLayer.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/MarkLayer.vue2.mjs +56 -0
- package/es/packages/components/touchchat/component/MarkLayer.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ModuleSelect.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/ModuleSelect.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ModuleSelect.vue2.mjs +121 -0
- package/es/packages/components/touchchat/component/ModuleSelect.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/PDFFile.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/PDFFile.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/PDFFile.vue2.mjs +211 -0
- package/es/packages/components/touchchat/component/PDFFile.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/QuoteContent.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/QuoteContent.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/QuoteContent.vue2.mjs +40 -0
- package/es/packages/components/touchchat/component/QuoteContent.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/RealtimeVoice.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/RealtimeVoice.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/RealtimeVoice.vue2.mjs +160 -0
- package/es/packages/components/touchchat/component/RealtimeVoice.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/Screenshot.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/Screenshot.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/Screenshot.vue2.mjs +208 -0
- package/es/packages/components/touchchat/component/Screenshot.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ThoughtChain.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/ThoughtChain.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/ThoughtChain.vue2.mjs +69 -0
- package/es/packages/components/touchchat/component/ThoughtChain.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/UploadView.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/UploadView.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/UploadView.vue2.mjs +186 -0
- package/es/packages/components/touchchat/component/UploadView.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/UploadView_api.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/UploadView_api.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/UploadView_api.vue2.mjs +166 -0
- package/es/packages/components/touchchat/component/UploadView_api.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/VideoFile.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/VideoFile.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/VideoFile.vue2.mjs +33 -0
- package/es/packages/components/touchchat/component/VideoFile.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/component/VoiceView.vue.mjs +7 -0
- package/es/packages/components/touchchat/component/VoiceView.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/component/VoiceView.vue2.mjs +165 -0
- package/es/packages/components/touchchat/component/VoiceView.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/doc.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/doc.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/docx.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/docx.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/gif.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/gif.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/html.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/html.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/jpg.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/jpg.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/mp3.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/mp3.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/mp4.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/mp4.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/music.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/music.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/pdf.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/pdf.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/png.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/png.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/ppt.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/ppt.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/pptx.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/pptx.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/txt.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/txt.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/xls.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/xls.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/file/xlsx.png.mjs +4 -0
- package/es/packages/components/touchchat/img/file/xlsx.png.mjs.map +1 -0
- package/es/packages/components/touchchat/img/svg/reset.svg.mjs +4 -0
- package/es/packages/components/touchchat/img/svg/reset.svg.mjs.map +1 -0
- package/es/packages/components/touchchat/index.mjs +5 -5
- package/es/packages/components/touchchat/index.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/AgentsView.vue.mjs +7 -0
- package/es/packages/components/touchchat/src/AiChat/AgentsView.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/AgentsView.vue2.mjs +59 -0
- package/es/packages/components/touchchat/src/AiChat/AgentsView.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs +322 -139
- package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/Chat/TouchChat.mjs +18 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/TouchChat.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.mjs +145 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/types.mjs +19 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/types.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useChat.mjs +693 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useChat.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useCopy.mjs +55 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useCopy.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useMessageRender.mjs +155 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useMessageRender.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useSSE.mjs +345 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useSSE.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useScroll.mjs +74 -0
- package/es/packages/components/touchchat/src/AiChat/Chat/useScroll.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs +472 -44
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs +180 -98
- package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs +29 -12
- package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs +175 -62
- package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue2.mjs +14 -8
- package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue.mjs +7 -0
- package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue2.mjs +1034 -0
- package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue2.mjs.map +1 -0
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs +276 -1004
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs +346 -122
- package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs +143 -64
- package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/index.vue.mjs +3 -2
- package/es/packages/components/touchchat/src/index.vue.mjs.map +1 -1
- package/es/packages/components/touchchat/src/index.vue2.mjs +252 -143
- package/es/packages/components/touchchat/src/index.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/types/a2a.mjs +11 -0
- package/es/packages/components/touchchat/src/types/a2a.mjs.map +1 -0
- package/es/packages/components/touchchat/utils/a2aService.mjs +316 -0
- package/es/packages/components/touchchat/utils/a2aService.mjs.map +1 -0
- package/es/packages/components/touchchat/utils/fetchStream.mjs +8 -2
- package/es/packages/components/touchchat/utils/fetchStream.mjs.map +1 -1
- package/es/packages/components/touchchat/utils/markdown.mjs +31 -13
- package/es/packages/components/touchchat/utils/markdown.mjs.map +1 -1
- package/es/packages/utils/config.mjs.map +1 -1
- package/es/packages/utils/types.mjs.map +1 -1
- package/global.d.ts +2 -2
- package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
- package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
- package/lib/index.js.map +1 -1
- package/lib/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.js +4819 -0
- package/lib/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.js.map +1 -0
- package/lib/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.js +1384 -0
- package/lib/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.js.map +1 -0
- package/lib/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js +7828 -0
- package/lib/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -0
- package/lib/package.json.css +1 -1
- package/lib/package.json.js +2 -2
- package/lib/packages/components/index.js +2 -2
- package/lib/packages/components/resolver.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue.js +3 -2
- package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue2.js +219 -159
- package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/face.vue.js +3 -2
- package/lib/packages/components/touchchat/component/AiRobot/face.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/face.vue2.js +26 -12
- package/lib/packages/components/touchchat/component/AiRobot/face.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/letter.vue.js +3 -2
- package/lib/packages/components/touchchat/component/AiRobot/letter.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/letter.vue2.js +181 -40
- package/lib/packages/components/touchchat/component/AiRobot/letter.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.js +3 -2
- package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.js +15 -10
- package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/start.vue.js +3 -2
- package/lib/packages/components/touchchat/component/AiRobot/start.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/AiRobot/start.vue2.js +17 -10
- package/lib/packages/components/touchchat/component/AiRobot/start.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/CardView.vue.js +3 -2
- package/lib/packages/components/touchchat/component/CardView.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/CardView.vue2.js +66 -42
- package/lib/packages/components/touchchat/component/CardView.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/FileContent.vue.js +11 -0
- package/lib/packages/components/touchchat/component/FileContent.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/FileContent.vue2.js +210 -0
- package/lib/packages/components/touchchat/component/FileContent.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/FileView.vue.js +3 -2
- package/lib/packages/components/touchchat/component/FileView.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/FileView.vue2.js +16 -3
- package/lib/packages/components/touchchat/component/FileView.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/HelloChat.vue.js +3 -2
- package/lib/packages/components/touchchat/component/HelloChat.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/HelloChat.vue2.js +26 -14
- package/lib/packages/components/touchchat/component/HelloChat.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/ImageFile.vue.js +11 -0
- package/lib/packages/components/touchchat/component/ImageFile.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/ImageFile.vue2.js +166 -0
- package/lib/packages/components/touchchat/component/ImageFile.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/ImageView.vue.js +3 -2
- package/lib/packages/components/touchchat/component/ImageView.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/ImageView.vue2.js +1 -1
- package/lib/packages/components/touchchat/component/ImageView.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/LinkView.vue.js +3 -2
- package/lib/packages/components/touchchat/component/LinkView.vue.js.map +1 -1
- package/lib/packages/components/touchchat/component/LinkView.vue2.js +18 -4
- package/lib/packages/components/touchchat/component/LinkView.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/component/MarkLayer.vue.js +11 -0
- package/lib/packages/components/touchchat/component/MarkLayer.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/MarkLayer.vue2.js +60 -0
- package/lib/packages/components/touchchat/component/MarkLayer.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/ModuleSelect.vue.js +11 -0
- package/lib/packages/components/touchchat/component/ModuleSelect.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/ModuleSelect.vue2.js +125 -0
- package/lib/packages/components/touchchat/component/ModuleSelect.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/PDFFile.vue.js +11 -0
- package/lib/packages/components/touchchat/component/PDFFile.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/PDFFile.vue2.js +215 -0
- package/lib/packages/components/touchchat/component/PDFFile.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/QuoteContent.vue.js +11 -0
- package/lib/packages/components/touchchat/component/QuoteContent.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/QuoteContent.vue2.js +44 -0
- package/lib/packages/components/touchchat/component/QuoteContent.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/RealtimeVoice.vue.js +11 -0
- package/lib/packages/components/touchchat/component/RealtimeVoice.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/RealtimeVoice.vue2.js +164 -0
- package/lib/packages/components/touchchat/component/RealtimeVoice.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/Screenshot.vue.js +11 -0
- package/lib/packages/components/touchchat/component/Screenshot.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/Screenshot.vue2.js +212 -0
- package/lib/packages/components/touchchat/component/Screenshot.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/ThoughtChain.vue.js +11 -0
- package/lib/packages/components/touchchat/component/ThoughtChain.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/ThoughtChain.vue2.js +73 -0
- package/lib/packages/components/touchchat/component/ThoughtChain.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/UploadView.vue.js +11 -0
- package/lib/packages/components/touchchat/component/UploadView.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/UploadView.vue2.js +190 -0
- package/lib/packages/components/touchchat/component/UploadView.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/UploadView_api.vue.js +11 -0
- package/lib/packages/components/touchchat/component/UploadView_api.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/UploadView_api.vue2.js +170 -0
- package/lib/packages/components/touchchat/component/UploadView_api.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/VideoFile.vue.js +11 -0
- package/lib/packages/components/touchchat/component/VideoFile.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/VideoFile.vue2.js +37 -0
- package/lib/packages/components/touchchat/component/VideoFile.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/component/VoiceView.vue.js +11 -0
- package/lib/packages/components/touchchat/component/VoiceView.vue.js.map +1 -0
- package/lib/packages/components/touchchat/component/VoiceView.vue2.js +169 -0
- package/lib/packages/components/touchchat/component/VoiceView.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/doc.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/doc.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/docx.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/docx.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/gif.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/gif.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/html.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/html.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/jpg.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/jpg.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/mp3.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/mp3.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/mp4.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/mp4.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/music.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/music.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/pdf.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/pdf.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/png.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/png.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/ppt.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/ppt.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/pptx.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/pptx.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/txt.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/txt.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/xls.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/xls.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/file/xlsx.png.js +8 -0
- package/lib/packages/components/touchchat/img/file/xlsx.png.js.map +1 -0
- package/lib/packages/components/touchchat/img/svg/reset.svg.js +8 -0
- package/lib/packages/components/touchchat/img/svg/reset.svg.js.map +1 -0
- package/lib/packages/components/touchchat/index.js +6 -6
- package/lib/packages/components/touchchat/index.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue.js +11 -0
- package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue2.js +63 -0
- package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js +321 -138
- package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/Chat/TouchChat.js +21 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/TouchChat.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.js +147 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/types.js +22 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/types.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useChat.js +695 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useChat.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useCopy.js +57 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useCopy.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useMessageRender.js +157 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useMessageRender.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useSSE.js +347 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useSSE.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useScroll.js +76 -0
- package/lib/packages/components/touchchat/src/AiChat/Chat/useScroll.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js +471 -43
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js +179 -97
- package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js +28 -11
- package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js +174 -61
- package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue2.js +14 -8
- package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue.js +11 -0
- package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue2.js +1038 -0
- package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue2.js.map +1 -0
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js +275 -1003
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js +345 -121
- package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js +3 -2
- package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js +142 -63
- package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/index.vue.js +3 -2
- package/lib/packages/components/touchchat/src/index.vue.js.map +1 -1
- package/lib/packages/components/touchchat/src/index.vue2.js +251 -142
- package/lib/packages/components/touchchat/src/index.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/types/a2a.js +13 -0
- package/lib/packages/components/touchchat/src/types/a2a.js.map +1 -0
- package/lib/packages/components/touchchat/utils/a2aService.js +319 -0
- package/lib/packages/components/touchchat/utils/a2aService.js.map +1 -0
- package/lib/packages/components/touchchat/utils/fetchStream.js +8 -2
- package/lib/packages/components/touchchat/utils/fetchStream.js.map +1 -1
- package/lib/packages/components/touchchat/utils/markdown.js +31 -13
- package/lib/packages/components/touchchat/utils/markdown.js.map +1 -1
- package/lib/packages/utils/config.js.map +1 -1
- package/lib/packages/utils/types.js.map +1 -1
- package/package.json +83 -83
- package/theme/components/index.css +969 -43
- package/theme/font/iconfont.woff +0 -0
- package/theme/font/iconfont.woff2 +0 -0
- package/theme/index.css +969 -43
- package/theme/skin/default.css +969 -43
- package/types/global.d.ts +2 -2
- package/es/packages/components/touchchat/src/AiChat/Scene.vue.mjs +0 -6
- package/es/packages/components/touchchat/src/AiChat/Scene.vue.mjs.map +0 -1
- package/es/packages/components/touchchat/src/AiChat/Scene.vue2.mjs +0 -42
- package/es/packages/components/touchchat/src/AiChat/Scene.vue2.mjs.map +0 -1
- package/lib/packages/components/touchchat/src/AiChat/Scene.vue.js +0 -10
- package/lib/packages/components/touchchat/src/AiChat/Scene.vue.js.map +0 -1
- package/lib/packages/components/touchchat/src/AiChat/Scene.vue2.js +0 -46
- package/lib/packages/components/touchchat/src/AiChat/Scene.vue2.js.map +0 -1
|
@@ -0,0 +1,695 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var types = require('./types.js');
|
|
5
|
+
var scriptMatcher = require('./scriptMatcher.js');
|
|
6
|
+
var useSSE = require('./useSSE.js');
|
|
7
|
+
var useScroll = require('./useScroll.js');
|
|
8
|
+
var useMessageRender = require('./useMessageRender.js');
|
|
9
|
+
var useCopy = require('./useCopy.js');
|
|
10
|
+
|
|
11
|
+
function useChat({ props, emit, scripts, unmatchText, modules, afterSend, sendMessageInject, beforeSend, bottom, stop, chatContainer, chatInputRef }) {
|
|
12
|
+
const isMounted = vue.ref(false);
|
|
13
|
+
const isChating = vue.ref(false);
|
|
14
|
+
const inputValue = vue.ref("");
|
|
15
|
+
const enableDeepThinking = vue.ref(false);
|
|
16
|
+
const chatList = vue.ref([]);
|
|
17
|
+
const currIndex = vue.ref(0);
|
|
18
|
+
const isUnmounting = vue.ref(false);
|
|
19
|
+
const currentComponentName = vue.ref("");
|
|
20
|
+
const fileData = vue.ref([]);
|
|
21
|
+
const activeAgentsName = vue.ref("");
|
|
22
|
+
const moduleInfo = vue.ref(modules[0] || { name: "deepseek-v3" });
|
|
23
|
+
const isDragging = vue.ref(false);
|
|
24
|
+
const typeFlag = vue.ref("");
|
|
25
|
+
const currentMessageProcessor = vue.ref(null);
|
|
26
|
+
const { htmlContentRef, thinkingContentRef, reasoningContentRef, markdownToHtml, renderContent, enqueueRender } = useMessageRender.useMessageRender({
|
|
27
|
+
chatList,
|
|
28
|
+
currIndex,
|
|
29
|
+
isMounted,
|
|
30
|
+
isUnmounting
|
|
31
|
+
});
|
|
32
|
+
const { scrollToBottom, handleScroll } = useScroll.useScroll({
|
|
33
|
+
chatContainer,
|
|
34
|
+
isMounted,
|
|
35
|
+
isUnmounting,
|
|
36
|
+
bottom
|
|
37
|
+
});
|
|
38
|
+
const { copyToClipboard } = useCopy.useCopy();
|
|
39
|
+
const scriptsRef = vue.ref(scripts);
|
|
40
|
+
const { activeScript, findMatchingScriptContent } = scriptMatcher.createScriptMatcher({
|
|
41
|
+
scripts: scriptsRef,
|
|
42
|
+
activeAgentsName,
|
|
43
|
+
fileData,
|
|
44
|
+
unmatchText
|
|
45
|
+
});
|
|
46
|
+
const { fetchStream, resultItem, openSSE, cleanupSSE } = useSSE.useSSE({
|
|
47
|
+
chatList,
|
|
48
|
+
currIndex,
|
|
49
|
+
isChating,
|
|
50
|
+
isMounted,
|
|
51
|
+
isUnmounting,
|
|
52
|
+
inputValue,
|
|
53
|
+
enableDeepThinking,
|
|
54
|
+
currentComponentName,
|
|
55
|
+
typeFlag,
|
|
56
|
+
moduleInfo,
|
|
57
|
+
emit,
|
|
58
|
+
fileData,
|
|
59
|
+
afterSend,
|
|
60
|
+
enqueueRender,
|
|
61
|
+
renderContent,
|
|
62
|
+
markdownToHtml,
|
|
63
|
+
scrollToBottom,
|
|
64
|
+
stop
|
|
65
|
+
});
|
|
66
|
+
vue.watch(
|
|
67
|
+
() => activeAgentsName,
|
|
68
|
+
(val) => {
|
|
69
|
+
if (!val) {
|
|
70
|
+
activeAgentsName.value = localStorage.getItem("activeAgentsName");
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{ immediate: true }
|
|
74
|
+
);
|
|
75
|
+
const messageUtils = {
|
|
76
|
+
updateMessage: (index, updates) => {
|
|
77
|
+
if (index < 0 || index >= chatList.value.length)
|
|
78
|
+
return;
|
|
79
|
+
chatList.value.splice(index, 1, { ...chatList.value[index], ...updates });
|
|
80
|
+
vue.nextTick(() => {
|
|
81
|
+
const message = chatList.value[index];
|
|
82
|
+
if (message) {
|
|
83
|
+
renderContent(message.content, "main", index);
|
|
84
|
+
if (message.thinkContent) {
|
|
85
|
+
renderContent(message.thinkContent, "thinking", index);
|
|
86
|
+
}
|
|
87
|
+
if (message.reasoningContent) {
|
|
88
|
+
renderContent(message.reasoningContent, "reasoning", index);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
deleteMessageChain: (index) => {
|
|
94
|
+
if (index < 0 || index >= chatList.value.length)
|
|
95
|
+
return;
|
|
96
|
+
if (chatList.value[index].user === "u") {
|
|
97
|
+
let deleteCount = 1;
|
|
98
|
+
for (let i = index + 1; i < chatList.value.length; i++) {
|
|
99
|
+
if (chatList.value[i].user === "ai") {
|
|
100
|
+
deleteCount++;
|
|
101
|
+
} else {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
chatList.value.splice(index, deleteCount);
|
|
106
|
+
} else {
|
|
107
|
+
chatList.value.splice(index, 1);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
createStandardMessage: (data) => {
|
|
111
|
+
var _a, _b, _c, _d, _e;
|
|
112
|
+
return {
|
|
113
|
+
chatId: data.chatId || "ai_" + Math.random().toString(36).slice(2).padEnd(10, "0").slice(0, 10),
|
|
114
|
+
user: data.user || "ai",
|
|
115
|
+
type: data.type || "text",
|
|
116
|
+
content: data.content || "",
|
|
117
|
+
isChating: (_a = data.isChating) != null ? _a : false,
|
|
118
|
+
thinkContent: data.thinkContent || "",
|
|
119
|
+
reasoningContent: data.reasoningContent || "",
|
|
120
|
+
isLiked: (_b = data.isLiked) != null ? _b : false,
|
|
121
|
+
isDisliked: (_c = data.isDisliked) != null ? _c : false,
|
|
122
|
+
isEditing: (_d = data.isEditing) != null ? _d : false,
|
|
123
|
+
editContent: (_e = data.editContent) != null ? _e : "",
|
|
124
|
+
msgList: []
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const update = (index, message) => {
|
|
129
|
+
chatList.value[index] = { ...chatList.value[index], ...message };
|
|
130
|
+
};
|
|
131
|
+
const updateModule = (info) => {
|
|
132
|
+
moduleInfo.value = info;
|
|
133
|
+
};
|
|
134
|
+
const handleAgentSelect = (item) => {
|
|
135
|
+
localStorage.setItem("activeAgentsName", item.name);
|
|
136
|
+
const aiMessage = item.intro;
|
|
137
|
+
messageUtils.updateMessage(0, {
|
|
138
|
+
content: "",
|
|
139
|
+
isChating: false
|
|
140
|
+
});
|
|
141
|
+
simulateStreamOutput(0, aiMessage);
|
|
142
|
+
};
|
|
143
|
+
const completeRendered = (chatId) => {
|
|
144
|
+
if (currentMessageProcessor.value) {
|
|
145
|
+
currentMessageProcessor.value.handleMessageComplete(chatId);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const init = () => {
|
|
149
|
+
try {
|
|
150
|
+
if (Array.isArray(props.value) && props.value.length && !scripts.length) {
|
|
151
|
+
chatList.value = props.value.map((item) => ({
|
|
152
|
+
...item,
|
|
153
|
+
content: item.thinkContent ? item.content || "" : item.content || "",
|
|
154
|
+
thinkContent: item.thinkContent || ""
|
|
155
|
+
}));
|
|
156
|
+
vue.nextTick(() => {
|
|
157
|
+
requestAnimationFrame(() => {
|
|
158
|
+
if (activeAgentsName.value && chatList.value.length > 0 && chatList.value[0].user === "ai") {
|
|
159
|
+
const aiMessage = chatList.value[0];
|
|
160
|
+
messageUtils.updateMessage(0, {
|
|
161
|
+
content: "",
|
|
162
|
+
isChating: true
|
|
163
|
+
});
|
|
164
|
+
simulateStreamOutput(0, aiMessage.content);
|
|
165
|
+
} else {
|
|
166
|
+
chatList.value.forEach((item) => {
|
|
167
|
+
if (item.thinkContent) {
|
|
168
|
+
renderContent(item.thinkContent, "thinking");
|
|
169
|
+
}
|
|
170
|
+
if (item.reasoningContent) {
|
|
171
|
+
renderContent(item.reasoningContent, "reasoning");
|
|
172
|
+
}
|
|
173
|
+
if (item.content) {
|
|
174
|
+
renderContent(item.content, "main");
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
vue.nextTick(() => {
|
|
178
|
+
scrollToBottom();
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
} catch (error) {
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const simulateStreamOutput = (aiIndex, msg, callback) => {
|
|
188
|
+
const message = typeof msg === "string" ? msg : msg.content;
|
|
189
|
+
const componentName = typeof msg === "string" ? "" : msg.needSequenceProcessing ? msg.needSequenceType : "";
|
|
190
|
+
const isNeedSequenceProcessing = typeof msg === "string" ? false : msg.needSequenceProcessing;
|
|
191
|
+
const fn = () => {
|
|
192
|
+
clearInterval(interval);
|
|
193
|
+
emit("sendMessage", [...chatList.value]);
|
|
194
|
+
if (componentName) {
|
|
195
|
+
chatList.value[aiIndex].componentName = componentName;
|
|
196
|
+
}
|
|
197
|
+
messageUtils.updateMessage(aiIndex, {
|
|
198
|
+
isChating: false
|
|
199
|
+
});
|
|
200
|
+
vue.nextTick(() => {
|
|
201
|
+
renderContent(message, "main", aiIndex);
|
|
202
|
+
vue.nextTick(() => {
|
|
203
|
+
scrollToBottom();
|
|
204
|
+
if (!isNeedSequenceProcessing && callback) {
|
|
205
|
+
callback();
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
let index = 0;
|
|
211
|
+
const interval = setInterval(() => {
|
|
212
|
+
if (index < message.length) {
|
|
213
|
+
const newContent = message;
|
|
214
|
+
messageUtils.updateMessage(aiIndex, {
|
|
215
|
+
content: newContent
|
|
216
|
+
});
|
|
217
|
+
vue.nextTick(() => {
|
|
218
|
+
renderContent(newContent, "main", aiIndex);
|
|
219
|
+
vue.nextTick(() => {
|
|
220
|
+
scrollToBottom();
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
index++;
|
|
224
|
+
} else {
|
|
225
|
+
fn();
|
|
226
|
+
}
|
|
227
|
+
}, 50);
|
|
228
|
+
};
|
|
229
|
+
vue.watch(
|
|
230
|
+
() => props.value,
|
|
231
|
+
(newVal, oldVal) => {
|
|
232
|
+
if (!Array.isArray(newVal))
|
|
233
|
+
return;
|
|
234
|
+
if (newVal.length && JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
|
235
|
+
chatList.value = newVal.map((item) => ({
|
|
236
|
+
...item,
|
|
237
|
+
content: item.thinkContent ? item.content || "" : item.content || "",
|
|
238
|
+
thinkContent: item.thinkContent || ""
|
|
239
|
+
}));
|
|
240
|
+
vue.nextTick(() => {
|
|
241
|
+
requestAnimationFrame(() => {
|
|
242
|
+
chatList.value.forEach((item) => {
|
|
243
|
+
if (item.thinkContent) {
|
|
244
|
+
renderContent(item.thinkContent, "thinking");
|
|
245
|
+
}
|
|
246
|
+
if (item.reasoningContent) {
|
|
247
|
+
renderContent(item.reasoningContent, "reasoning");
|
|
248
|
+
}
|
|
249
|
+
if (item.content) {
|
|
250
|
+
renderContent(item.content, "main");
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
vue.nextTick(() => {
|
|
254
|
+
scrollToBottom();
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{ deep: true, immediate: true }
|
|
261
|
+
);
|
|
262
|
+
const sendMessage = (content, fileList, auto, type) => {
|
|
263
|
+
inputValue.value = content || "";
|
|
264
|
+
handleBeforeSend(content, fileList, auto, type);
|
|
265
|
+
};
|
|
266
|
+
const handleBeforeSend = (content, fileList, auto, type) => {
|
|
267
|
+
fileData.value = fileList || [];
|
|
268
|
+
if (beforeSend) {
|
|
269
|
+
const fn = beforeSend();
|
|
270
|
+
if (fn && typeof fn.then === "function") {
|
|
271
|
+
Promise.resolve(fn).then((res) => {
|
|
272
|
+
if (res.result) {
|
|
273
|
+
currentComponentName.value = res.componentName || "";
|
|
274
|
+
handleSend(content, fileList, auto, type);
|
|
275
|
+
}
|
|
276
|
+
}).catch((error) => {
|
|
277
|
+
console.log(error);
|
|
278
|
+
});
|
|
279
|
+
} else {
|
|
280
|
+
if (fn.result) {
|
|
281
|
+
currentComponentName.value = fn.componentName || "";
|
|
282
|
+
handleSend(content, fileList, auto, type);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
const handleSend = (content, fileList, auto, type) => {
|
|
288
|
+
emit("beforeSendMessage");
|
|
289
|
+
sendMessageInject(inputValue.value, fileData.value);
|
|
290
|
+
typeFlag.value = type || "";
|
|
291
|
+
if (scripts && Array.isArray(scripts) && scripts.length > 0) {
|
|
292
|
+
const userInput = content ? content.replace(/\n/g, "") : inputValue.value.replace(/\n/g, "").trim();
|
|
293
|
+
if (!userInput && !(fileList == null ? void 0 : fileList.length) && auto)
|
|
294
|
+
return;
|
|
295
|
+
const userChatId = `user_${Date.now()}`;
|
|
296
|
+
const userMessage = {
|
|
297
|
+
chatId: userChatId,
|
|
298
|
+
user: "u",
|
|
299
|
+
type: "text",
|
|
300
|
+
content: userInput,
|
|
301
|
+
isShowLike: false,
|
|
302
|
+
isShowCopy: true,
|
|
303
|
+
isWithDraw: false,
|
|
304
|
+
isRead: false,
|
|
305
|
+
files: fileList || [],
|
|
306
|
+
typeFlag: type,
|
|
307
|
+
auto: auto || false,
|
|
308
|
+
msgList: [],
|
|
309
|
+
selecting: false
|
|
310
|
+
};
|
|
311
|
+
chatList.value.push(userMessage);
|
|
312
|
+
emit("sendMessage", [...chatList.value]);
|
|
313
|
+
vue.nextTick(() => {
|
|
314
|
+
renderContent(userMessage.content, "main", chatList.value.length - 1);
|
|
315
|
+
vue.nextTick(() => {
|
|
316
|
+
scrollToBottom();
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
const result = findMatchingScriptContent(userInput);
|
|
320
|
+
if (result && result.responses.length > 0) {
|
|
321
|
+
const newAiMessages = [];
|
|
322
|
+
result.responses.forEach((response, idx) => {
|
|
323
|
+
const pauseMarker = Array.isArray(response.data) ? "\u200B".repeat(20) : "";
|
|
324
|
+
const content2 = Array.isArray(response.data) ? response.data.join(pauseMarker) : response.data;
|
|
325
|
+
const aiChatId = `ai_${Date.now()}_${idx}`;
|
|
326
|
+
const aiMessage = {
|
|
327
|
+
chatId: aiChatId,
|
|
328
|
+
user: "ai",
|
|
329
|
+
type: "text",
|
|
330
|
+
content: content2 || "",
|
|
331
|
+
componentName: response.type || "",
|
|
332
|
+
isShowLike: true,
|
|
333
|
+
isShowCopy: true,
|
|
334
|
+
needSequenceType: response.type || "",
|
|
335
|
+
needSequenceProcessing: response.needSequenceProcessing || false,
|
|
336
|
+
typeFlag: type,
|
|
337
|
+
msgList: [],
|
|
338
|
+
likeList: response.likeList
|
|
339
|
+
};
|
|
340
|
+
newAiMessages.push(aiMessage);
|
|
341
|
+
});
|
|
342
|
+
const messageQueue = [...newAiMessages];
|
|
343
|
+
let isProcessing = false;
|
|
344
|
+
let currentMessage = null;
|
|
345
|
+
const processNextMessage = () => {
|
|
346
|
+
if (messageQueue.length > 0 && !isProcessing) {
|
|
347
|
+
isProcessing = true;
|
|
348
|
+
const nextMessage = messageQueue.shift();
|
|
349
|
+
if (nextMessage) {
|
|
350
|
+
currentMessage = nextMessage;
|
|
351
|
+
chatList.value.push(currentMessage);
|
|
352
|
+
emit("sendMessage", [...chatList.value]);
|
|
353
|
+
const msgIndex = chatList.value.length - 1;
|
|
354
|
+
vue.nextTick(() => {
|
|
355
|
+
renderContent((currentMessage == null ? void 0 : currentMessage.content) || "", "main", msgIndex);
|
|
356
|
+
vue.nextTick(() => {
|
|
357
|
+
scrollToBottom();
|
|
358
|
+
if (currentMessage) {
|
|
359
|
+
const messageToProcess = {
|
|
360
|
+
...currentMessage,
|
|
361
|
+
needSequenceProcessing: true
|
|
362
|
+
};
|
|
363
|
+
simulateStreamOutput(msgIndex, messageToProcess);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const handleMessageComplete = (chatId) => {
|
|
371
|
+
if (currentMessage && currentMessage.chatId === chatId) {
|
|
372
|
+
currentMessage = null;
|
|
373
|
+
isProcessing = false;
|
|
374
|
+
processNextMessage();
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
const processorObj = {
|
|
378
|
+
messageQueue,
|
|
379
|
+
isProcessing,
|
|
380
|
+
currentMessage,
|
|
381
|
+
processNextMessage,
|
|
382
|
+
handleMessageComplete
|
|
383
|
+
};
|
|
384
|
+
currentMessageProcessor.value = processorObj;
|
|
385
|
+
processNextMessage();
|
|
386
|
+
} else {
|
|
387
|
+
const defaultAiChatId = `ai_${Date.now()}`;
|
|
388
|
+
const defaultAiMessage = {
|
|
389
|
+
chatId: defaultAiChatId,
|
|
390
|
+
user: "ai",
|
|
391
|
+
type: "text",
|
|
392
|
+
content: unmatchText,
|
|
393
|
+
isShowLike: true,
|
|
394
|
+
isShowCopy: true,
|
|
395
|
+
msgList: []
|
|
396
|
+
};
|
|
397
|
+
chatList.value.push(defaultAiMessage);
|
|
398
|
+
emit("sendMessage", [...chatList.value]);
|
|
399
|
+
vue.nextTick(() => {
|
|
400
|
+
const msgIndex = chatList.value.findIndex((item) => item.chatId === defaultAiChatId);
|
|
401
|
+
if (msgIndex !== -1) {
|
|
402
|
+
renderContent(defaultAiMessage.content, "main", msgIndex);
|
|
403
|
+
vue.nextTick(() => {
|
|
404
|
+
scrollToBottom();
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
inputValue.value = "";
|
|
410
|
+
} else {
|
|
411
|
+
console.log("content === useChat === 488", content);
|
|
412
|
+
if (content) {
|
|
413
|
+
inputValue.value = content;
|
|
414
|
+
}
|
|
415
|
+
if ((isChating.value || !inputValue.value.trim() && !(fileList == null ? void 0 : fileList.length)) && !auto)
|
|
416
|
+
return;
|
|
417
|
+
const userChatId = "user_" + Math.random().toString(36).slice(2).padEnd(10, "0").slice(0, 10);
|
|
418
|
+
const userMessage = {
|
|
419
|
+
chatId: userChatId,
|
|
420
|
+
user: "u",
|
|
421
|
+
type: "text",
|
|
422
|
+
content: inputValue.value,
|
|
423
|
+
files: fileList || [],
|
|
424
|
+
msgList: [],
|
|
425
|
+
isRead: false
|
|
426
|
+
};
|
|
427
|
+
chatList.value.push(userMessage);
|
|
428
|
+
const index = chatList.value.length - 1;
|
|
429
|
+
vue.nextTick(() => {
|
|
430
|
+
renderContent(userMessage.content, "main", index);
|
|
431
|
+
scrollToBottom();
|
|
432
|
+
});
|
|
433
|
+
console.log("openSSE === useChat === 511");
|
|
434
|
+
openSSE(inputValue.value, index + 1);
|
|
435
|
+
inputValue.value = "";
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
const handleStop = () => {
|
|
439
|
+
var _a;
|
|
440
|
+
cleanupSSE();
|
|
441
|
+
const aiIndex = chatList.value.findIndex((item) => item.isChating);
|
|
442
|
+
if (aiIndex !== -1) {
|
|
443
|
+
const currentAiMessage = chatList.value[aiIndex];
|
|
444
|
+
if ((_a = currentAiMessage.content) == null ? void 0 : _a.trim()) {
|
|
445
|
+
vue.nextTick(() => {
|
|
446
|
+
chatList.value[aiIndex] = {
|
|
447
|
+
...currentAiMessage,
|
|
448
|
+
content: currentAiMessage.content + "...",
|
|
449
|
+
isChating: false
|
|
450
|
+
};
|
|
451
|
+
renderContent(chatList.value[aiIndex].content, "main", aiIndex);
|
|
452
|
+
emit("sendMessage", chatList.value);
|
|
453
|
+
});
|
|
454
|
+
} else {
|
|
455
|
+
if (aiIndex > 0) {
|
|
456
|
+
const userMessageIndex = aiIndex - 1;
|
|
457
|
+
if (chatList.value[userMessageIndex].user === "u") {
|
|
458
|
+
chatList.value.splice(userMessageIndex, 2);
|
|
459
|
+
} else {
|
|
460
|
+
chatList.value.splice(aiIndex, 1);
|
|
461
|
+
}
|
|
462
|
+
} else {
|
|
463
|
+
chatList.value.splice(aiIndex, 1);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
} else {
|
|
467
|
+
const lastIndex = chatList.value.length - 1;
|
|
468
|
+
if (lastIndex >= 0 && chatList.value[lastIndex].user === "u") {
|
|
469
|
+
chatList.value.pop();
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
isChating.value = false;
|
|
473
|
+
};
|
|
474
|
+
const handleMessageAction = (action, index) => {
|
|
475
|
+
const message = chatList.value[index];
|
|
476
|
+
if (!message)
|
|
477
|
+
return;
|
|
478
|
+
switch (action) {
|
|
479
|
+
case types.MessageAction.COPY: {
|
|
480
|
+
copyToClipboard(message.content, "\u590D\u5236\u6210\u529F", "\u590D\u5236\u5931\u8D25");
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
case types.MessageAction.EDIT:
|
|
484
|
+
message.isEditing = true;
|
|
485
|
+
message.editContent = message.content;
|
|
486
|
+
break;
|
|
487
|
+
case types.MessageAction.DELETE:
|
|
488
|
+
messageUtils.deleteMessageChain(index);
|
|
489
|
+
emit("sendMessage", chatList.value);
|
|
490
|
+
break;
|
|
491
|
+
case types.MessageAction.RETRY: {
|
|
492
|
+
const aiMessage = chatList.value[index];
|
|
493
|
+
const userMessageIndex = index - 1;
|
|
494
|
+
const userMessage = chatList.value[userMessageIndex];
|
|
495
|
+
if (userMessage && userMessage.user === "u") {
|
|
496
|
+
const updatedAiMessage = {
|
|
497
|
+
...aiMessage,
|
|
498
|
+
content: "",
|
|
499
|
+
thinkContent: "",
|
|
500
|
+
reasoningContent: "",
|
|
501
|
+
isLiked: false,
|
|
502
|
+
isDisliked: false,
|
|
503
|
+
isChating: true,
|
|
504
|
+
isRead: false,
|
|
505
|
+
chatId: aiMessage.chatId,
|
|
506
|
+
user: aiMessage.user,
|
|
507
|
+
type: aiMessage.type,
|
|
508
|
+
thinkStatus: types.ThinkStatus.COMPLETED,
|
|
509
|
+
thinkStartTime: 0,
|
|
510
|
+
thinkEndTime: 0
|
|
511
|
+
};
|
|
512
|
+
chatList.value.splice(index, 1, updatedAiMessage);
|
|
513
|
+
vue.nextTick(() => {
|
|
514
|
+
if (htmlContentRef.value[index])
|
|
515
|
+
htmlContentRef.value[index].innerHTML = "";
|
|
516
|
+
if (thinkingContentRef.value[index])
|
|
517
|
+
thinkingContentRef.value[index].innerHTML = "";
|
|
518
|
+
if (reasoningContentRef.value[index])
|
|
519
|
+
reasoningContentRef.value[index].innerHTML = "";
|
|
520
|
+
setTimeout(() => {
|
|
521
|
+
openSSE(userMessage.content || "", index);
|
|
522
|
+
}, 50);
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
case types.MessageAction.LIKE:
|
|
528
|
+
messageUtils.updateMessage(index, {
|
|
529
|
+
isLiked: true,
|
|
530
|
+
isDisliked: false
|
|
531
|
+
});
|
|
532
|
+
break;
|
|
533
|
+
case types.MessageAction.DISLIKE:
|
|
534
|
+
messageUtils.updateMessage(index, {
|
|
535
|
+
isLiked: false,
|
|
536
|
+
isDisliked: true
|
|
537
|
+
});
|
|
538
|
+
break;
|
|
539
|
+
case types.MessageAction.WITHDRAW:
|
|
540
|
+
console.log("withDraw");
|
|
541
|
+
messageUtils.updateMessage(index, {
|
|
542
|
+
isWithDraw: true,
|
|
543
|
+
user: "withDraw"
|
|
544
|
+
});
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
const saveEdit = (index, newContent) => {
|
|
549
|
+
const message = chatList.value[index];
|
|
550
|
+
if (!message || !message.editContent)
|
|
551
|
+
return;
|
|
552
|
+
chatList.value[index] = {
|
|
553
|
+
...message,
|
|
554
|
+
content: newContent,
|
|
555
|
+
isEditing: false,
|
|
556
|
+
editContent: void 0
|
|
557
|
+
};
|
|
558
|
+
vue.nextTick(() => {
|
|
559
|
+
renderContent(newContent, "main", index);
|
|
560
|
+
});
|
|
561
|
+
const hasDeletedAi = index + 1 < chatList.value.length && chatList.value[index + 1].user === "ai";
|
|
562
|
+
if (hasDeletedAi) {
|
|
563
|
+
chatList.value.splice(index + 1, 1);
|
|
564
|
+
}
|
|
565
|
+
const insertPosition = index + 1;
|
|
566
|
+
vue.nextTick(() => {
|
|
567
|
+
openSSE(newContent, insertPosition);
|
|
568
|
+
});
|
|
569
|
+
emit("sendMessage", chatList.value);
|
|
570
|
+
};
|
|
571
|
+
const cancelEdit = (index) => {
|
|
572
|
+
const message = chatList.value[index];
|
|
573
|
+
if (!message)
|
|
574
|
+
return;
|
|
575
|
+
message.isEditing = false;
|
|
576
|
+
message.editContent = "";
|
|
577
|
+
vue.nextTick(() => {
|
|
578
|
+
renderContent(message.content, "main", index);
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
const handleDragEnter = () => {
|
|
582
|
+
isDragging.value = true;
|
|
583
|
+
if (chatInputRef == null ? void 0 : chatInputRef.value) {
|
|
584
|
+
chatInputRef.value.openMarkLayer();
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
const handleDragLeave = (e) => {
|
|
588
|
+
const rect = e.target.getBoundingClientRect();
|
|
589
|
+
if (e.clientX < rect.left || e.clientX > rect.right || e.clientY < rect.top || e.clientY > rect.bottom) {
|
|
590
|
+
isDragging.value = false;
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
const handleDrop = async (e) => {
|
|
594
|
+
var _a;
|
|
595
|
+
isDragging.value = false;
|
|
596
|
+
const files = (_a = e.dataTransfer) == null ? void 0 : _a.files;
|
|
597
|
+
if (files && files.length > 0) {
|
|
598
|
+
const fileList = await Promise.all(
|
|
599
|
+
Array.from(files).map(async (file) => {
|
|
600
|
+
let base64 = "";
|
|
601
|
+
if (file.type.startsWith("image/")) {
|
|
602
|
+
base64 = await new Promise((resolve) => {
|
|
603
|
+
const reader = new FileReader();
|
|
604
|
+
reader.onload = (e2) => {
|
|
605
|
+
var _a2;
|
|
606
|
+
resolve((_a2 = e2.target) == null ? void 0 : _a2.result);
|
|
607
|
+
};
|
|
608
|
+
reader.readAsDataURL(file);
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
return {
|
|
612
|
+
id: Math.random().toString(36).slice(2).padEnd(10, "0").slice(0, 10),
|
|
613
|
+
file,
|
|
614
|
+
name: file.name,
|
|
615
|
+
fileType: file.type,
|
|
616
|
+
fileSize: file.size,
|
|
617
|
+
lastModified: file.lastModified,
|
|
618
|
+
preview: URL.createObjectURL(file),
|
|
619
|
+
base64
|
|
620
|
+
};
|
|
621
|
+
})
|
|
622
|
+
);
|
|
623
|
+
if (chatInputRef == null ? void 0 : chatInputRef.value) {
|
|
624
|
+
chatInputRef.value.handlePaste(fileList, "drop");
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (chatInputRef == null ? void 0 : chatInputRef.value) {
|
|
628
|
+
chatInputRef.value.colseMarkLayer();
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
const onMounted = () => {
|
|
632
|
+
if (!isMounted.value) {
|
|
633
|
+
init();
|
|
634
|
+
}
|
|
635
|
+
isMounted.value = true;
|
|
636
|
+
};
|
|
637
|
+
const onBeforeUnmount = () => {
|
|
638
|
+
if (!isUnmounting.value) {
|
|
639
|
+
isUnmounting.value = true;
|
|
640
|
+
cleanupSSE();
|
|
641
|
+
isMounted.value = false;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
return {
|
|
645
|
+
// 状态
|
|
646
|
+
chatList,
|
|
647
|
+
isChating,
|
|
648
|
+
inputValue,
|
|
649
|
+
enableDeepThinking,
|
|
650
|
+
isMounted,
|
|
651
|
+
isUnmounting,
|
|
652
|
+
currentComponentName,
|
|
653
|
+
fileData,
|
|
654
|
+
activeAgentsName,
|
|
655
|
+
moduleInfo,
|
|
656
|
+
isDragging,
|
|
657
|
+
typeFlag,
|
|
658
|
+
currIndex,
|
|
659
|
+
fetchStream,
|
|
660
|
+
resultItem,
|
|
661
|
+
currentMessageProcessor,
|
|
662
|
+
activeScript,
|
|
663
|
+
htmlContentRef,
|
|
664
|
+
thinkingContentRef,
|
|
665
|
+
reasoningContentRef,
|
|
666
|
+
// 方法
|
|
667
|
+
init,
|
|
668
|
+
sendMessage,
|
|
669
|
+
handleBeforeSend,
|
|
670
|
+
handleSend,
|
|
671
|
+
handleStop,
|
|
672
|
+
handleMessageAction,
|
|
673
|
+
saveEdit,
|
|
674
|
+
cancelEdit,
|
|
675
|
+
completeRendered,
|
|
676
|
+
handleAgentSelect,
|
|
677
|
+
update,
|
|
678
|
+
updateModule,
|
|
679
|
+
messageUtils,
|
|
680
|
+
simulateStreamOutput,
|
|
681
|
+
handleDragEnter,
|
|
682
|
+
handleDragLeave,
|
|
683
|
+
handleDrop,
|
|
684
|
+
onMounted,
|
|
685
|
+
onBeforeUnmount,
|
|
686
|
+
cleanupSSE,
|
|
687
|
+
scrollToBottom,
|
|
688
|
+
handleScroll,
|
|
689
|
+
renderContent,
|
|
690
|
+
enqueueRender
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
exports.useChat = useChat;
|
|
695
|
+
//# sourceMappingURL=useChat.js.map
|