@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
|
@@ -3,133 +3,173 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var
|
|
6
|
+
var TouchHistory = require('./AiChat/TouchHistory.vue.js');
|
|
7
7
|
|
|
8
|
-
const __default__ = vue.defineComponent({ name: "
|
|
8
|
+
const __default__ = vue.defineComponent({ name: "Touchchat" });
|
|
9
9
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
10
|
...__default__,
|
|
11
11
|
props: {
|
|
12
|
+
mode: { default: "" },
|
|
12
13
|
scripts: { default: () => [] },
|
|
13
|
-
width: { default: "
|
|
14
|
-
height: { default: "
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
model: "deepseek-v3",
|
|
22
|
-
messages: [
|
|
23
|
-
{
|
|
24
|
-
role: "user",
|
|
25
|
-
// content: sendVal.value, // 使用传入的用户内容参数
|
|
26
|
-
content: ""
|
|
27
|
-
// 使用传入的用户内容参数
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
stream: true
|
|
31
|
-
}) },
|
|
32
|
-
rootMap: { default: () => ({}) },
|
|
33
|
-
token: { default: "" },
|
|
34
|
-
wsUrl: { default: "" },
|
|
35
|
-
connectionType: { default: "SSE" },
|
|
36
|
-
isAvatar: { type: Boolean, default: true },
|
|
37
|
-
placeholder: { default: "hi\uFF0C\u6211\u662F\u5C0F\u667A\uFF0C\u5FEB\u6765\u548C\u6211\u804A\u5929\u5427~" },
|
|
38
|
-
mode: { default: "chat" },
|
|
39
|
-
robotUnmatched: { default: "\u60A8\u7684\u6D88\u606F\u672A\u5339\u914D\u5230\u4EFB\u4F55\u5185\u5BB9" },
|
|
40
|
-
helloChatList: { default: () => [] },
|
|
41
|
-
helloChatInfo: { default: () => ({
|
|
42
|
-
info1: { name: "", content: [] },
|
|
43
|
-
info2: { name: "", content: [] },
|
|
44
|
-
info3: { name: "", content: [] }
|
|
45
|
-
}) },
|
|
46
|
-
isNotHeader: { type: Boolean, default: false },
|
|
47
|
-
isThinking: { type: Boolean, default: true },
|
|
48
|
-
isDeepSeek: { type: Boolean, default: true },
|
|
14
|
+
width: { default: "" },
|
|
15
|
+
height: { default: "" },
|
|
16
|
+
components: { default: () => ({}) },
|
|
17
|
+
avatar: { type: Boolean, default: true },
|
|
18
|
+
placeholder: { default: "hi\uFF0C\u6211\u662Ftouchchat\uFF0C\u5FEB\u6765\u548C\u6211\u804A\u5929\u5427~" },
|
|
19
|
+
unmatchText: { default: "\u60A8\u7684\u6D88\u606F\u672A\u5339\u914D\u5230\u4EFB\u4F55\u5185\u5BB9" },
|
|
20
|
+
title: { default: "TouchChat" },
|
|
21
|
+
layout: { default: "side, clear, think, upload, screen, voice,realtime" },
|
|
49
22
|
beforeSend: { type: Function, default: () => ({ result: true, componentName: "" }) },
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
historyList: { default: () => [] },
|
|
24
|
+
historyDetail: { default: () => [] },
|
|
25
|
+
agents: { default: () => [] },
|
|
26
|
+
modules: { default: () => [] },
|
|
27
|
+
speed: { default: 10 },
|
|
28
|
+
allowedTypes: { default: () => [] },
|
|
29
|
+
agentInfo: { default: () => ({
|
|
30
|
+
list: [],
|
|
31
|
+
// list 智能体列表 =1 单智能体 >1 多智能体
|
|
32
|
+
url: "",
|
|
33
|
+
// url 多智能体主机地址 单智能体为空 多智能体必传
|
|
34
|
+
headers: {}
|
|
35
|
+
// 多智能体请求头信息
|
|
36
|
+
}) },
|
|
37
|
+
a2uiProps: { default: () => ({}) },
|
|
38
|
+
messageActions: { default: () => {
|
|
39
|
+
return {
|
|
40
|
+
user: ["edit", "delete", "copy"],
|
|
41
|
+
ai: ["retry", "like", "dislike", "copy"]
|
|
42
|
+
};
|
|
43
|
+
} },
|
|
44
|
+
hasRead: { type: Boolean, default: false },
|
|
45
|
+
isSelectMode: { type: Boolean, default: false },
|
|
46
|
+
uploadAction: { type: Function, default: void 0 }
|
|
54
47
|
},
|
|
55
|
-
emits: ["
|
|
48
|
+
emits: ["send", "afterSend", "like", "dislike", "side-bottom", "change", "historyRemove", "remove", "bottom", "stop", "modelChange", "openSideBar", "share", "withDraw", "file-action"],
|
|
56
49
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
57
50
|
const emits = __emit;
|
|
58
51
|
const sendVal = vue.ref("");
|
|
59
52
|
const props = __props;
|
|
60
|
-
vue.
|
|
61
|
-
vue.provide("
|
|
62
|
-
vue.provide("
|
|
63
|
-
vue.provide("rootMap", props.rootMap);
|
|
64
|
-
vue.provide("token", props.token);
|
|
65
|
-
vue.provide("wsUrl", props.wsUrl);
|
|
66
|
-
vue.provide("connectionType", props.connectionType);
|
|
67
|
-
vue.provide("isAvatar", props.isAvatar);
|
|
53
|
+
const selectMode = vue.computed(() => props.isSelectMode);
|
|
54
|
+
vue.provide("components", props.components);
|
|
55
|
+
vue.provide("avatar", props.avatar);
|
|
68
56
|
vue.provide("placeholder", props.placeholder);
|
|
69
|
-
vue.provide("
|
|
70
|
-
vue.provide("
|
|
71
|
-
vue.provide("
|
|
72
|
-
vue.provide("isNotHeader", props.isNotHeader);
|
|
73
|
-
const isDeepSeekComputed = vue.computed(() => {
|
|
74
|
-
return props.isDeepSeek && (!props.scripts || props.scripts.length === 0);
|
|
75
|
-
});
|
|
76
|
-
vue.provide("isDeepSeek", isDeepSeekComputed);
|
|
77
|
-
vue.provide("isThinking", props.isThinking);
|
|
57
|
+
vue.provide("unmatchText", props.unmatchText);
|
|
58
|
+
vue.provide("title", props.title);
|
|
59
|
+
vue.provide("layout", props.layout);
|
|
78
60
|
vue.provide("beforeSend", props.beforeSend);
|
|
79
|
-
vue.provide("scripts", props.scripts);
|
|
80
|
-
|
|
81
|
-
vue.provide("
|
|
82
|
-
|
|
83
|
-
vue.provide("
|
|
84
|
-
vue.provide("
|
|
85
|
-
vue.provide("
|
|
86
|
-
vue.provide("
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
vue.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
61
|
+
vue.provide("scripts", vue.ref(props.scripts || []));
|
|
62
|
+
vue.provide("speed", props.speed);
|
|
63
|
+
vue.provide("allowedTypes", props.allowedTypes);
|
|
64
|
+
vue.provide("a2uiProps", props.a2uiProps);
|
|
65
|
+
vue.provide("messageActions", props.messageActions);
|
|
66
|
+
vue.provide("hasRead", props.hasRead);
|
|
67
|
+
vue.provide("isSelectMode", selectMode);
|
|
68
|
+
vue.provide("uploadAction", props.uploadAction);
|
|
69
|
+
const historyListComputed = vue.computed(() => props.historyList);
|
|
70
|
+
const providedHistoryList = vue.ref(props.historyList);
|
|
71
|
+
vue.watch(
|
|
72
|
+
historyListComputed,
|
|
73
|
+
(newVal) => {
|
|
74
|
+
providedHistoryList.value = newVal;
|
|
75
|
+
},
|
|
76
|
+
{ immediate: true }
|
|
77
|
+
);
|
|
78
|
+
vue.provide("historyList", providedHistoryList);
|
|
79
|
+
const historyDetailComputed = vue.computed(() => props.historyDetail);
|
|
80
|
+
const providedHistoryDetail = vue.ref(props.historyDetail);
|
|
81
|
+
vue.watch(
|
|
82
|
+
historyDetailComputed,
|
|
83
|
+
(newVal) => {
|
|
84
|
+
providedHistoryDetail.value = newVal;
|
|
85
|
+
},
|
|
86
|
+
{ immediate: true }
|
|
87
|
+
);
|
|
88
|
+
vue.provide("historyDetail", providedHistoryDetail);
|
|
89
|
+
vue.provide("agents", props.agents);
|
|
90
|
+
const iModules = vue.ref(props.modules);
|
|
91
|
+
vue.watch(
|
|
92
|
+
() => props.modules,
|
|
93
|
+
(newVal) => {
|
|
94
|
+
iModules.value = newVal;
|
|
95
|
+
},
|
|
96
|
+
{ immediate: true }
|
|
97
|
+
);
|
|
98
|
+
vue.provide("modules", iModules);
|
|
99
|
+
const iMultiAgentInfo = vue.ref(props.agentInfo);
|
|
100
|
+
vue.watch(
|
|
101
|
+
() => props.agentInfo,
|
|
102
|
+
(newVal) => {
|
|
103
|
+
iMultiAgentInfo.value = newVal;
|
|
104
|
+
},
|
|
105
|
+
{ immediate: true, deep: true }
|
|
106
|
+
);
|
|
107
|
+
vue.provide("agentInfo", iMultiAgentInfo);
|
|
108
|
+
vue.provide("like", (index, isLike) => {
|
|
109
|
+
emits("like", index, isLike);
|
|
110
|
+
});
|
|
111
|
+
vue.provide("dislike", (index, isUnlike) => {
|
|
112
|
+
emits("dislike", index, isUnlike);
|
|
113
|
+
});
|
|
114
|
+
vue.provide("send", (value, fileList) => {
|
|
93
115
|
sendVal.value = value;
|
|
94
|
-
emits("send", value);
|
|
116
|
+
emits("send", value, fileList);
|
|
117
|
+
});
|
|
118
|
+
vue.provide("sideBottom", () => {
|
|
119
|
+
emits("side-bottom");
|
|
120
|
+
});
|
|
121
|
+
vue.provide("change", (id) => {
|
|
122
|
+
emits("change", id);
|
|
123
|
+
});
|
|
124
|
+
vue.provide("historyRemove", (id) => {
|
|
125
|
+
emits("historyRemove", id);
|
|
126
|
+
});
|
|
127
|
+
vue.provide("openSideBar", (item, index) => {
|
|
128
|
+
emits("openSideBar", item, index);
|
|
129
|
+
});
|
|
130
|
+
vue.provide("share", (item, index) => {
|
|
131
|
+
emits("share", item, index);
|
|
95
132
|
});
|
|
96
|
-
vue.provide("
|
|
97
|
-
|
|
98
|
-
emits("pageChange");
|
|
133
|
+
vue.provide("withDraw", (item, index) => {
|
|
134
|
+
emits("withDraw", item, index);
|
|
99
135
|
});
|
|
100
|
-
vue.provide("
|
|
101
|
-
|
|
102
|
-
emits("activeChat", id);
|
|
136
|
+
vue.provide("afterSend", (content) => {
|
|
137
|
+
emits("afterSend", content);
|
|
103
138
|
});
|
|
104
|
-
vue.provide("
|
|
105
|
-
|
|
106
|
-
emits("deletChat", id);
|
|
139
|
+
vue.provide("remove", (item, index) => {
|
|
140
|
+
emits("remove", item, index);
|
|
107
141
|
});
|
|
108
|
-
vue.provide("
|
|
109
|
-
emits("
|
|
142
|
+
vue.provide("bottom", () => {
|
|
143
|
+
emits("bottom");
|
|
144
|
+
});
|
|
145
|
+
vue.provide("stop", (item, index) => {
|
|
146
|
+
emits("stop", item, index);
|
|
147
|
+
});
|
|
148
|
+
vue.provide("modelChange", (item, index) => {
|
|
149
|
+
emits("modelChange", item, index);
|
|
110
150
|
});
|
|
111
|
-
const rootRef = vue.ref(null);
|
|
112
151
|
const deepSeekRef = vue.ref(null);
|
|
113
152
|
const elementClass = vue.computed(() => {
|
|
114
|
-
const classList = [
|
|
153
|
+
const classList = [];
|
|
115
154
|
if (props.mode) {
|
|
116
|
-
classList.push(`
|
|
155
|
+
classList.push(`touchchat-${props.mode}`);
|
|
117
156
|
}
|
|
118
157
|
return classList.join(" ");
|
|
119
158
|
});
|
|
120
159
|
const elementStyle = vue.computed(() => {
|
|
160
|
+
var _a, _b;
|
|
121
161
|
let width = "";
|
|
122
162
|
let height = "";
|
|
123
163
|
if (props.width) {
|
|
124
164
|
if (typeof props.width === "string") {
|
|
125
|
-
width = props.width;
|
|
165
|
+
width = (_a = props.width) != null ? _a : "100%";
|
|
126
166
|
} else {
|
|
127
167
|
width = `${props.width}em`;
|
|
128
168
|
}
|
|
129
169
|
}
|
|
130
170
|
if (props.height) {
|
|
131
171
|
if (typeof props.height === "string") {
|
|
132
|
-
height = props.height;
|
|
172
|
+
height = (_b = props.height) != null ? _b : "100%";
|
|
133
173
|
} else {
|
|
134
174
|
height = `${props.height}em`;
|
|
135
175
|
}
|
|
@@ -139,63 +179,132 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
139
179
|
height
|
|
140
180
|
};
|
|
141
181
|
});
|
|
182
|
+
const updateInputMethod = vue.ref(null);
|
|
183
|
+
vue.provide("setInput", updateInputMethod);
|
|
184
|
+
const setInput = (newValue) => {
|
|
185
|
+
if (updateInputMethod.value) {
|
|
186
|
+
updateInputMethod.value(newValue);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
vue.provide("fileAction", (item, index) => {
|
|
190
|
+
emits("file-action", item, index);
|
|
191
|
+
});
|
|
142
192
|
__expose({
|
|
143
|
-
|
|
193
|
+
send: (value, fileList, auto, type) => {
|
|
144
194
|
var _a;
|
|
145
|
-
(_a = deepSeekRef.value) == null ? void 0 : _a.
|
|
195
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.send(value, fileList, auto, type);
|
|
146
196
|
},
|
|
147
|
-
|
|
197
|
+
closeExtend: () => {
|
|
148
198
|
var _a;
|
|
149
|
-
(_a = deepSeekRef.value) == null ? void 0 : _a.
|
|
150
|
-
}
|
|
199
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.closeExtend();
|
|
200
|
+
},
|
|
201
|
+
create: () => {
|
|
202
|
+
var _a;
|
|
203
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.create();
|
|
204
|
+
},
|
|
205
|
+
retry: (index) => {
|
|
206
|
+
var _a;
|
|
207
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.retry(index);
|
|
208
|
+
},
|
|
209
|
+
update: (index, message) => {
|
|
210
|
+
var _a;
|
|
211
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.update(index, message);
|
|
212
|
+
},
|
|
213
|
+
changeChat: (index) => {
|
|
214
|
+
var _a;
|
|
215
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.changeChat(index);
|
|
216
|
+
},
|
|
217
|
+
clearChat: () => {
|
|
218
|
+
var _a;
|
|
219
|
+
(_a = deepSeekRef.value) == null ? void 0 : _a.clearChat();
|
|
220
|
+
},
|
|
221
|
+
setInput
|
|
151
222
|
});
|
|
152
223
|
return (_ctx, _cache) => {
|
|
153
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
vue.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
vue.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
vue.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
vue.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
vue.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
vue.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
vue.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
224
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
225
|
+
vue.Fragment,
|
|
226
|
+
null,
|
|
227
|
+
[
|
|
228
|
+
vue.createCommentVNode(" <div>1.0.0-beta.2026032301</div> "),
|
|
229
|
+
vue.createVNode(TouchHistory.default, {
|
|
230
|
+
ref_key: "deepSeekRef",
|
|
231
|
+
ref: deepSeekRef,
|
|
232
|
+
style: vue.normalizeStyle(elementStyle.value),
|
|
233
|
+
class: vue.normalizeClass(elementClass.value)
|
|
234
|
+
}, {
|
|
235
|
+
aimsg: vue.withCtx(({ item, index }) => [
|
|
236
|
+
vue.renderSlot(_ctx.$slots, "aimsg", {
|
|
237
|
+
item,
|
|
238
|
+
index
|
|
239
|
+
})
|
|
240
|
+
]),
|
|
241
|
+
msg: vue.withCtx(({ item, index }) => [
|
|
242
|
+
vue.renderSlot(_ctx.$slots, "msg", {
|
|
243
|
+
item,
|
|
244
|
+
index
|
|
245
|
+
})
|
|
246
|
+
]),
|
|
247
|
+
aiAvatar: vue.withCtx(() => [
|
|
248
|
+
vue.renderSlot(_ctx.$slots, "aiAvatar")
|
|
249
|
+
]),
|
|
250
|
+
userAvatar: vue.withCtx(() => [
|
|
251
|
+
vue.renderSlot(_ctx.$slots, "userAvatar")
|
|
252
|
+
]),
|
|
253
|
+
welcome: vue.withCtx(() => [
|
|
254
|
+
vue.renderSlot(_ctx.$slots, "welcome")
|
|
255
|
+
]),
|
|
256
|
+
edit: vue.withCtx(() => [
|
|
257
|
+
vue.renderSlot(_ctx.$slots, "edit")
|
|
258
|
+
]),
|
|
259
|
+
top: vue.withCtx(() => [
|
|
260
|
+
vue.renderSlot(_ctx.$slots, "top")
|
|
261
|
+
]),
|
|
262
|
+
shortcut: vue.withCtx(() => [
|
|
263
|
+
vue.renderSlot(_ctx.$slots, "shortcut")
|
|
264
|
+
]),
|
|
265
|
+
extend: vue.withCtx(({ item, index }) => [
|
|
266
|
+
vue.renderSlot(_ctx.$slots, "extend", {
|
|
267
|
+
item,
|
|
268
|
+
index
|
|
269
|
+
})
|
|
270
|
+
]),
|
|
271
|
+
fn: vue.withCtx(({ item, index }) => [
|
|
272
|
+
vue.renderSlot(_ctx.$slots, "fn", {
|
|
273
|
+
item,
|
|
274
|
+
index
|
|
275
|
+
})
|
|
276
|
+
]),
|
|
277
|
+
editTop: vue.withCtx(() => [
|
|
278
|
+
vue.renderSlot(_ctx.$slots, "editTop")
|
|
279
|
+
]),
|
|
280
|
+
editFn: vue.withCtx(() => [
|
|
281
|
+
vue.renderSlot(_ctx.$slots, "editFn")
|
|
282
|
+
]),
|
|
283
|
+
editSubmitRight: vue.withCtx(() => [
|
|
284
|
+
vue.renderSlot(_ctx.$slots, "editSubmitRight")
|
|
285
|
+
]),
|
|
286
|
+
editSubmitLeft: vue.withCtx(() => [
|
|
287
|
+
vue.renderSlot(_ctx.$slots, "editSubmitLeft")
|
|
288
|
+
]),
|
|
289
|
+
extendsFn: vue.withCtx(({ item, index }) => [
|
|
290
|
+
vue.renderSlot(_ctx.$slots, "extendsFn", {
|
|
291
|
+
item,
|
|
292
|
+
index
|
|
293
|
+
})
|
|
294
|
+
]),
|
|
295
|
+
mayLike: vue.withCtx(({ item, index }) => [
|
|
296
|
+
vue.renderSlot(_ctx.$slots, "mayLike", {
|
|
297
|
+
item,
|
|
298
|
+
index
|
|
299
|
+
})
|
|
300
|
+
]),
|
|
301
|
+
_: 3
|
|
302
|
+
/* FORWARDED */
|
|
303
|
+
}, 8, ["style", "class"])
|
|
304
|
+
],
|
|
305
|
+
2112
|
|
306
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
307
|
+
);
|
|
199
308
|
};
|
|
200
309
|
}
|
|
201
310
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue2.js","sources":["../../../../../../packages/components/touchchat/src/index.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({ name: 'ToTouchChat' });\n</script>\n<template>\n\t<div ref=\"rootRef\" :style=\"elementStyle\" :class=\"elementClass\">\n\t\t<!-- <div>1.0.0-beta.2025091504</div> -->\n\t\t<DeepSeek ref=\"deepSeekRef\">\n\t\t\t<template #aiMessageContent=\"{ item, index }\">\n\t\t\t\t<slot name=\"aiMessageContent\" :item=\"item\" :index=\"index\" />\n\t\t\t</template>\n\t\t\t<template #aiAvatar>\n\t\t\t\t<slot name=\"aiAvatar\" />\n\t\t\t</template>\n\t\t\t<template #userAvatar>\n\t\t\t\t<slot name=\"userAvatar\" />\n\t\t\t</template>\n\t\t\t<template #welcome>\n\t\t\t\t<slot name=\"welcome\" />\n\t\t\t</template>\n\t\t\t<template #chatInput>\n\t\t\t\t<slot name=\"chatInput\" />\n\t\t\t</template>\n\t\t\t<template #tabView>\n\t\t\t\t<slot name=\"tabView\" />\n\t\t\t</template>\n\t\t\t<template #siderBarView=\"{ item, index }\">\n\t\t\t\t<slot name=\"siderBarView\" :item=\"item\" :index=\"index\" />\n\t\t\t</template>\n\t\t\t<template #messageActions=\"{ item, index }\">\n\t\t\t\t<slot name=\"messageActions\" :item=\"item\" :index=\"index\" />\n\t\t\t</template>\n\t\t</DeepSeek>\n\t</div>\n</template>\n<script setup lang=\"ts\">\nimport DeepSeek from './AiChat/TouchHistory.vue'\nimport { provide, ref, computed, defineEmits } from 'vue'\n\n\n\nconst emits = defineEmits<{\n\t(e: 'messageLike', index: number, isLike: boolean): void\n\t(e: 'messageDislike', index: number, isDislike: boolean): void\n\t(e: 'send', value: string): void\n\t(e: 'pageChange'): void\n\t(e: 'activeChat', id: string): void\n\t(e: 'deletChat', id: string): void\n\t(e: 'afterSendMessage', content: string): void\n}>()\n\nconst sendVal = ref('')\n\ninterface ScriptItem {\n\tid?: string\n\tname: string\n\tsubTitle?: string\n\tcontent: Array<{\n\t\tuser: string\n\t\tdata?: string\n\t\tsubData?: string[]\n\t\ttype?: string\n\t}>\n}\n\ninterface HelloChatInfoType {\n\tinfo1: ScriptItem\n\tinfo2: ScriptItem\n\tinfo3: ScriptItem\n}\n\ninterface HistoryItem {\n\tid?: string\n\ttime?: string\n\ttitle?: string\n}\n\ninterface MessageItem {\n\tchatId: string\n\tuser: string\n\ttype: string\n\tcontent: string\n\t[props: string]: any\n}\n\nconst props = withDefaults(\n\tdefineProps<{\n\t\tscripts?: ScriptItem[]\n\t\twidth?: number | string\n\t\theight?: number | string\n\t\taction?: string\n\t\theaders?: { [key: string]: any }\n\t\tbody?: { [key: string]: any }\n\t\trootMap?: { [key: string]: any }\n\t\ttoken?: string\n\t\twsUrl?: string\n\t\tconnectionType?: string\n\t\tisAvatar?: boolean\n\t\tplaceholder?: string\n\t\tmode?: string\n\t\trobotUnmatched?: string\n\t\thelloChatList?: ScriptItem[]\n\t\thelloChatInfo?: HelloChatInfoType\n\t\tisNotHeader?: boolean\n\t\tisThinking?: boolean\n\t\tisDeepSeek?: boolean\n\t\tbeforeSend?: () => { result: boolean; componentName?: string }\n\t\thistoryData?: HistoryItem[]\n\t\tmessageDetail?: MessageItem[]\n\t\taiChatType?: 'Flow' | 'Intelligent'\n\t\tnoBubbleBorder?: boolean\n\t}>(),\n\t{\n\t\tscripts: () => [],\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\taction: 'https://api.apiyi.com/v1/chat/completions',\n\t\theaders: () => ({\n\t\t\t'Content-Type': 'application/json',\n\t\t\tAuthorization: 'Bearer sk-fe9MtODvds8wpzz05f3417Fe3e9641C1926e6fC588425dEd'\n\t\t}),\n\t\tbody: () => ({\n\t\t\tmodel: 'deepseek-v3',\n\t\t\tmessages: [\n\t\t\t\t{\n\t\t\t\t\trole: 'user',\n\t\t\t\t\t// content: sendVal.value, // 使用传入的用户内容参数\n\t\t\t\t\tcontent: '' // 使用传入的用户内容参数\n\t\t\t\t}\n\t\t\t],\n\t\t\tstream: true\n\t\t}),\n\t\tisThinking: true,\n\t\ttoken: '',\n\t\twsUrl: '',\n\t\tconnectionType: 'SSE',\n\t\trootMap: () => ({}),\n\t\tisAvatar: true,\n\t\tplaceholder: 'hi,我是小智,快来和我聊天吧~',\n\t\tmode: 'chat',\n\t\trobotUnmatched: '您的消息未匹配到任何内容',\n\t\thelloChatList: () => [],\n\t\thelloChatInfo: () => ({\n\t\t\tinfo1: { name: '', content: [] },\n\t\t\tinfo2: { name: '', content: [] },\n\t\t\tinfo3: { name: '', content: [] }\n\t\t}),\n\t\tisNotHeader: false,\n\t\tisDeepSeek: true,\n\t\tbeforeSend: () => ({ result: true, componentName: '' }),\n\t\thistoryData: () => [],\n\t\tmessageDetail: () => [],\n\t\taiChatType: 'Flow',\n\t\tnoBubbleBorder: false\n\t}\n)\nprovide('action', props.action)\nprovide('headers', props.headers)\nprovide('body', props.body)\nprovide('rootMap', props.rootMap)\nprovide('token', props.token)\nprovide('wsUrl', props.wsUrl)\nprovide('connectionType', props.connectionType)\nprovide('isAvatar', props.isAvatar)\nprovide('placeholder', props.placeholder)\nprovide('robotUnmatched', props.robotUnmatched)\nprovide('helloChatList', props.helloChatList)\nprovide('helloChatInfo', props.helloChatInfo)\nprovide('isNotHeader', props.isNotHeader)\n// 修改isDeepSeek的值,当scripts有值时设为false,模拟原来的aiRobot流程\nconst isDeepSeekComputed = computed(() => {\n\t// 当scripts有值时,使用aiRobot流程(isDeepSeek=false)\n\treturn props.isDeepSeek && (!props.scripts || props.scripts.length === 0)\n})\n\n// 提供isDeepSeek值\nprovide('isDeepSeek', isDeepSeekComputed)\nprovide('isThinking', props.isThinking)\nprovide('beforeSend', props.beforeSend)\nprovide('scripts', props.scripts)\nconst historyDataComputed = computed(() => props.historyData)\nprovide('historyData', historyDataComputed)\nconst messageDetailComputed = computed(() => props.messageDetail)\nprovide('messageDetail', messageDetailComputed)\nprovide('aiChatType', props.aiChatType)\nprovide('noBubbleBorder', props.noBubbleBorder)\n\n// 新增:提供处理点赞事件的函数\nprovide('handleLike', (index: number, isLike: boolean) => {\n\t// 这里可以实现具体的点赞逻辑\n\temits('messageLike', index, isLike)\n\t// 可以添加实际的业务逻辑,如调用API等\n})\n\n// 新增:提供处理点赞事件的函数\nprovide('handleUnlike', (index: number, isUnlike: boolean) => {\n\t// 这里可以实现具体的点赞逻辑\n\temits('messageDislike', index, isUnlike)\n\t// 可以添加实际的业务逻辑,如调用API等\n})\n\nprovide('handleSend', (value: string) => {\n\t// 这里可以实现具体的点赞逻辑\n\tsendVal.value = value\n\temits('send', value)\n\t// 可以添加实际的业务逻辑,如调用API等\n})\n\nprovide('handlePageChange', () => {\n\tconsole.log('handlePageChange === 触底事件')\n\temits('pageChange')\n})\n\nprovide('handleActiveChat', (id: string) => {\n\tconsole.log('handleActiveChat === 激活事件', id)\n\temits('activeChat', id)\n})\n\nprovide('handleDeleteChat', (id: string) => {\n\tconsole.log('handleDeleteChat === 删除事件', id)\n\temits('deletChat', id)\n})\n\nprovide('afterSendMessage', (content: string) => {\n\t// console.log('afterSendMessage === 发送消息事件', content);\n\temits('afterSendMessage', content)\n})\n\nconst rootRef = ref(null)\nconst deepSeekRef = ref<InstanceType<typeof DeepSeek> | null>(null)\n\nconst elementClass = computed(() => {\n\tconst classList = ['touch-chat']\n\tif (props.mode) {\n\t\tclassList.push(`touch-chat-${props.mode}`)\n\t}\n\treturn classList.join(' ')\n})\n\n// 修改elementStyle计算属性,移除对scripts.length的检查\nconst elementStyle = computed(() => {\n\tlet width = ''\n\tlet height = ''\n\n\tif (props.width) {\n\t\tif (typeof props.width === 'string') {\n\t\t\twidth = props.width\n\t\t} else {\n\t\t\twidth = `${props.width}em`\n\t\t}\n\t}\n\n\tif (props.height) {\n\t\tif (typeof props.height === 'string') {\n\t\t\theight = props.height\n\t\t} else {\n\t\t\theight = `${props.height}em`\n\t\t}\n\t}\n\n\treturn {\n\t\twidth,\n\t\theight\n\t}\n})\ndefineExpose({\n\thandleSendMessageOut: (value: string) => {\n\t\tdeepSeekRef.value?.handleSend(value)\n\t},\n\thandleSiderBarClose: () => {\n\t\tdeepSeekRef.value?.handleSiderBarClose()\n\t}\n})\n</script>\n"],"names":["DO_defineComponent","ref","provide","computed","_createElementBlock","_createVNode","DeepSeek","_withCtx","_renderSlot"],"mappings":";;;;;;;AAEA,MAAA,WAA6B,GAAAA,mBAAA,CAAmB,EAAE,IAAA,EAAM,eAAe,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCvE,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAUd,IAAM,MAAA,OAAA,GAAUC,QAAI,EAAE,CAAA,CAAA;AAkCtB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAuEd,IAAQC,WAAA,CAAA,QAAA,EAAU,MAAM,MAAM,CAAA,CAAA;AAC9B,IAAQA,WAAA,CAAA,SAAA,EAAW,MAAM,OAAO,CAAA,CAAA;AAChC,IAAQA,WAAA,CAAA,MAAA,EAAQ,MAAM,IAAI,CAAA,CAAA;AAC1B,IAAQA,WAAA,CAAA,SAAA,EAAW,MAAM,OAAO,CAAA,CAAA;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AA;AAAA;UAEf,OAAA,cACV,MAAuB;AAAA,YAAvBA,cAAA,CAAuB,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;AAAA;UAEb,cACVD,WAAA,CAAA,CAAwD,EAD9B,IAAA,EAAM,OAAK,KAAA;AAAA,YACrCC,cAAA,CAAwD,IAAA,CAAA,MAAA,EAAA,cAAA,EAAA;AAAA,cAA7B,IAAA;AAAA,cAAa,KAAA;AAAA;;UAE9B,gBACVD,WAAA,CAAA,CAA0D,EAD9B,IAAA,EAAM,OAAK,KAAA;AAAA,YACvCC,cAAA,CAA0D,IAAA,CAAA,MAAA,EAAA,gBAAA,EAAA;AAAA,cAA7B,IAAA;AAAA,cAAa,KAAA;AAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.vue2.js","sources":["../../../../../../packages/components/touchchat/src/index.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as DO_defineComponent } from 'vue';\nexport default /*#__PURE__*/ DO_defineComponent({ name: 'Touchchat' });\n</script>\n<template>\r\n\t<!-- <div>1.0.0-beta.2026032301</div> -->\r\n\t<DeepSeek ref=\"deepSeekRef\" :style=\"elementStyle\" :class=\"elementClass\">\r\n\t\t<!-- msg -->\r\n\t\t<template #aimsg=\"{ item, index }\">\r\n\t\t\t<slot name=\"aimsg\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t\t<template #msg=\"{ item, index }\">\r\n\t\t\t<slot name=\"msg\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t\t<template #aiAvatar>\r\n\t\t\t<slot name=\"aiAvatar\" />\r\n\t\t</template>\r\n\t\t<template #userAvatar>\r\n\t\t\t<slot name=\"userAvatar\" />\r\n\t\t</template>\r\n\t\t<template #welcome>\r\n\t\t\t<slot name=\"welcome\" />\r\n\t\t</template>\r\n\t\t<!-- edit -->\r\n\t\t<template #edit>\r\n\t\t\t<slot name=\"edit\" />\r\n\t\t</template>\r\n\t\t<!-- top -->\r\n\t\t<template #top>\r\n\t\t\t<slot name=\"top\" />\r\n\t\t</template>\r\n\t\t<template #shortcut>\r\n\t\t\t<slot name=\"shortcut\" />\r\n\t\t</template>\r\n\t\t<!-- extend -->\r\n\t\t<template #extend=\"{ item, index }\">\r\n\t\t\t<slot name=\"extend\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t\t<!-- fn -->\r\n\t\t<template #fn=\"{ item, index }\">\r\n\t\t\t<slot name=\"fn\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t\t<template #editTop>\r\n\t\t\t<slot name=\"editTop\" />\r\n\t\t</template>\r\n\t\t<template #editFn>\r\n\t\t\t<slot name=\"editFn\" />\r\n\t\t</template>\r\n\t\t<template #editSubmitRight>\r\n\t\t\t<slot name=\"editSubmitRight\"></slot>\r\n\t\t</template>\r\n\t\t<template #editSubmitLeft>\r\n\t\t\t<slot name=\"editSubmitLeft\"></slot>\r\n\t\t</template>\r\n\t\t<template #extendsFn=\"{ item, index }\">\r\n\t\t\t<slot name=\"extendsFn\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t\t<template #mayLike=\"{ item, index }\">\r\n\t\t\t<slot name=\"mayLike\" :item=\"item\" :index=\"index\" />\r\n\t\t</template>\r\n\t</DeepSeek>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { ChatMessage, ChatMsgList, MessageActions, ModuleItem } from './AiChat/Chat/types'\r\nimport type { AgentConfig, SubAgent } from './types/a2a'\r\nimport DeepSeek from './AiChat/TouchHistory.vue'\r\nimport { provide, ref, computed, watch } from 'vue'\r\n\r\n\r\n\r\nconst emits = defineEmits<{\r\n\t(e: 'send', value: string, fileList?: any[]): void\r\n\t(e: 'afterSend', result: any): void\r\n\t(e: 'like', index: number, isLike: boolean): void\r\n\t(e: 'dislike', index: number, isDislike: boolean): void\r\n\t(e: 'side-bottom'): void\r\n\t(e: 'change', id: string): void\r\n\t(e: 'historyRemove', id: string): void\r\n\t(e: 'remove', item: ChatMessage, index: number): void\r\n\t(e: 'bottom'): void\r\n\t(e: 'stop', item: ChatMessage, index: number): void\r\n\t(e: 'modelChange', item: ModuleItem, index: number): void\r\n\t(e: 'openSideBar', item: ChatMessage & ChatMsgList, index: number): void\r\n\t(e: 'share', item: ChatMessage & ChatMsgList, index: number): void\r\n\t(e: 'withDraw', item: ChatMessage & ChatMsgList, index: number): void\r\n\t(e: 'file-action', item: ChatMessage & ChatMsgList, index: number): void\r\n}>()\r\n\r\nconst sendVal = ref('')\r\n\r\ninterface ScriptItem {\r\n\tid?: string\r\n\tname: string\r\n\tsubTitle?: string\r\n\tcontent: Array<{\r\n\t\tuser: string\r\n\t\tdata?: string\r\n\t\talias?: string[]\r\n\t\ttype?: string\r\n\t}>\r\n}\r\n\r\ninterface HistoryItem {\r\n\tid?: string\r\n\ttime?: string\r\n\ttitle?: string\r\n}\r\n\r\ninterface MessageItem {\r\n\tchatId: string\r\n\tuser: string\r\n\ttype: string\r\n\tcontent: string\r\n\t[props: string]: any\r\n}\r\n\r\n// interface ModuleItem {\r\n// \tname: string\r\n// \tconfig: {\r\n// \t\taction: string\r\n// \t\theaders: () => object\r\n// \t\tbody: () => object\r\n// \t\trespoKey: () => object\r\n// \t}\r\n// }\r\ntype Modules = (string | ModuleItem)[]\r\ntype ResultArray = AgentConfig[] | SubAgent[]\r\ninterface MultiAgentInfo {\r\n\tlist: ResultArray\r\n\turl?: string\r\n\t// token?: string\r\n\theaders?: object\r\n}\r\n\r\nconst props = withDefaults(\r\n\tdefineProps<{\r\n\t\tmode?: string\r\n\t\tscripts?: ScriptItem[]\r\n\t\twidth?: number | string\r\n\t\theight?: number | string\r\n\t\tcomponents?: { [key: string]: any } // components\r\n\t\tavatar?: boolean // avatar\r\n\t\tplaceholder?: string\r\n\t\tunmatchText?: string // unmatchText\r\n\t\ttitle?: string\r\n\t\tlayout?: string // layout=\"side, think, upload, chain,realtime\"\r\n\t\tbeforeSend?: () => { result: boolean; componentName?: string }\r\n\t\thistoryList?: HistoryItem[] // historyList\r\n\t\thistoryDetail?: MessageItem[] // historyDetail\r\n\t\tagents?: {\r\n\t\t\tid: string\r\n\t\t\tname: string\r\n\t\t\tintro: string\r\n\t\t}[] // agents\r\n\t\tmodules?: Modules // modules\r\n\t\tspeed?: number // speed\r\n\t\tallowedTypes?: string[] // allowedTypes\r\n\t\t// agentConfigList?: ResultArray // agentConfigList 智能体配置列表\r\n\t\t// multiAgentHost?: string // multiAgentHost 多智能体主机地址\r\n\t\t// multiAgentToken?: string // multiAgentToken 多智能体认证令牌\r\n\t\tagentInfo?: MultiAgentInfo // agentInfo 多智能体信息\r\n\t\ta2uiProps?: {\r\n\t\t\t[key: string]: any\r\n\t\t}\r\n\t\tmessageActions?: MessageActions\r\n\t\thasRead?: boolean\r\n\t\tisSelectMode?: boolean\r\n\t\tuploadAction?: (file: File, onProgress: (percent: number) => void) => Promise<any>\r\n\t}>(),\r\n\t{\r\n\t\tmode: '',\r\n\t\tscripts: () => [],\r\n\t\twidth: '',\r\n\t\theight: '',\r\n\t\tcomponents: () => ({}),\r\n\t\tavatar: true,\r\n\t\tplaceholder: 'hi,我是touchchat,快来和我聊天吧~',\r\n\t\tunmatchText: '您的消息未匹配到任何内容',\r\n\t\ttitle: 'TouchChat',\r\n\t\tlayout: 'side, clear, think, upload, screen, voice,realtime', //chain 思考链\r\n\t\t// side 侧边栏(历史记录),think 深度思考,upload 上传文件,chain 思考链\r\n\t\tbeforeSend: () => ({ result: true, componentName: '' }),\r\n\t\thistoryList: () => [],\r\n\t\thistoryDetail: () => [],\r\n\t\tagents: () => [],\r\n\t\tmodules: () => [],\r\n\t\tspeed: 10,\r\n\t\tallowedTypes: () => [],\r\n\t\tagentInfo: () => ({\r\n\t\t\tlist: [], // list 智能体列表 =1 单智能体 >1 多智能体\r\n\t\t\turl: '', // url 多智能体主机地址 单智能体为空 多智能体必传\r\n\t\t\theaders: {} // 多智能体请求头信息\r\n\t\t}),\r\n\t\ta2uiProps: () => ({}),\r\n\t\tmessageActions: () => {\r\n\t\t\treturn {\r\n\t\t\t\tuser: ['edit', 'delete', 'copy'],\r\n\t\t\t\tai: ['retry', 'like', 'dislike', 'copy']\r\n\t\t\t}\r\n\t\t},\r\n\t\thasRead: false,\r\n\t\tisSelectMode: false,\r\n\t\tuploadAction: undefined\r\n\t}\r\n)\r\nconst selectMode = computed(() => props.isSelectMode)\r\nprovide('components', props.components)\r\nprovide('avatar', props.avatar)\r\nprovide('placeholder', props.placeholder)\r\nprovide('unmatchText', props.unmatchText)\r\nprovide('title', props.title)\r\nprovide('layout', props.layout)\r\nprovide('beforeSend', props.beforeSend)\r\nprovide('scripts', ref(props.scripts || []))\r\nprovide('speed', props.speed)\r\nprovide('allowedTypes', props.allowedTypes)\r\nprovide('a2uiProps', props.a2uiProps)\r\nprovide('messageActions', props.messageActions)\r\nprovide('hasRead', props.hasRead)\r\nprovide('isSelectMode', selectMode)\r\nprovide('uploadAction', props.uploadAction)\r\nconst historyListComputed = computed(() => props.historyList)\r\nconst providedHistoryList = ref(props.historyList)\r\nwatch(\r\n\thistoryListComputed,\r\n\tnewVal => {\r\n\t\tprovidedHistoryList.value = newVal\r\n\t},\r\n\t{ immediate: true }\r\n)\r\nprovide('historyList', providedHistoryList)\r\nconst historyDetailComputed = computed(() => props.historyDetail)\r\nconst providedHistoryDetail = ref(props.historyDetail)\r\nwatch(\r\n\thistoryDetailComputed,\r\n\tnewVal => {\r\n\t\tprovidedHistoryDetail.value = newVal\r\n\t},\r\n\t{ immediate: true }\r\n)\r\nprovide('historyDetail', providedHistoryDetail)\r\nprovide('agents', props.agents)\r\nconst iModules = ref(props.modules)\r\nwatch(\r\n\t() => props.modules,\r\n\tnewVal => {\r\n\t\tiModules.value = newVal\r\n\t\t// console.log('modules === index.vue === 191', newVal)\r\n\t},\r\n\t{ immediate: true }\r\n)\r\nprovide('modules', iModules)\r\n\r\nconst iMultiAgentInfo = ref(props.agentInfo)\r\nwatch(\r\n\t() => props.agentInfo,\r\n\tnewVal => {\r\n\t\tiMultiAgentInfo.value = newVal\r\n\t},\r\n\t{ immediate: true, deep: true }\r\n)\r\nprovide('agentInfo', iMultiAgentInfo)\r\n\r\n// 新增:提供处理点赞事件的函数\r\nprovide('like', (index: number, isLike: boolean) => {\r\n\t// 这里可以实现具体的点赞逻辑\r\n\temits('like', index, isLike) // like\r\n\t// 可以添加实际的业务逻辑,如调用API等\r\n})\r\n\r\n// 新增:提供处理点赞事件的函数 dislike\r\nprovide('dislike', (index: number, isUnlike: boolean) => {\r\n\t// 这里可以实现具体的点赞逻辑\r\n\temits('dislike', index, isUnlike) // dislike\r\n\t// 可以添加实际的业务逻辑,如调用API等\r\n})\r\n\r\nprovide('send', (value: string, fileList?: any[]) => {\r\n\t// send\r\n\t// 这里可以实现具体的点赞逻辑\r\n\tsendVal.value = value\r\n\temits('send', value, fileList)\r\n\t// 可以添加实际的业务逻辑,如调用API等\r\n})\r\n\r\nprovide('sideBottom', () => {\r\n\t// console.log('sideBottom === 触底事件') // bottom\r\n\temits('side-bottom')\r\n})\r\n\r\nprovide('change', (id: string) => {\r\n\t// console.log('change === 激活事件', id) // change\r\n\temits('change', id)\r\n})\r\n\r\nprovide('historyRemove', (id: string) => {\r\n\t//remove\r\n\t// console.log('historyRemove === 删除事件', id)\r\n\temits('historyRemove', id)\r\n})\r\n\r\nprovide('openSideBar', (item: any, index: number) => {\r\n\temits('openSideBar', item, index)\r\n})\r\n\r\nprovide('share', (item: any, index: number) => {\r\n\temits('share', item, index)\r\n})\r\n\r\nprovide('withDraw', (item: any, index: number) => {\r\n\temits('withDraw', item, index)\r\n})\r\n\r\nprovide('afterSend', (content: any) => {\r\n\t// afterSend\r\n\t// console.log('afterSend === 发送消息事件', content)\r\n\temits('afterSend', content)\r\n})\r\n\r\nprovide('remove', (item: ChatMessage, index: number) => {\r\n\t// afterSend\r\n\t// console.log('remove === 详情删除', item, index)\r\n\temits('remove', item, index)\r\n})\r\n\r\nprovide('bottom', () => {\r\n\t// console.log('bottom === 详情触底')\r\n\temits('bottom')\r\n})\r\n\r\nprovide('stop', (item: ChatMessage, index: number) => {\r\n\t// console.log('stop === 用户终止事件')\r\n\temits('stop', item, index)\r\n})\r\n\r\nprovide('modelChange', (item: ModuleItem, index: number) => {\r\n\t// console.log('modelChange === 模型切换事件', item, index)\r\n\temits('modelChange', item, index)\r\n})\r\n\r\n// const rootRef = ref(null)\r\nconst deepSeekRef = ref<InstanceType<typeof DeepSeek> | null>(null)\r\n\r\nconst elementClass = computed(() => {\r\n\tconst classList = []\r\n\tif (props.mode) {\r\n\t\tclassList.push(`touchchat-${props.mode}`)\r\n\t}\r\n\treturn classList.join(' ')\r\n})\r\n\r\n// 修改elementStyle计算属性,移除对scripts.length的检查\r\nconst elementStyle = computed(() => {\r\n\tlet width = ''\r\n\tlet height = ''\r\n\r\n\tif (props.width) {\r\n\t\tif (typeof props.width === 'string') {\r\n\t\t\twidth = props.width ?? '100%'\r\n\t\t} else {\r\n\t\t\twidth = `${props.width}em`\r\n\t\t}\r\n\t}\r\n\r\n\tif (props.height) {\r\n\t\tif (typeof props.height === 'string') {\r\n\t\t\theight = props.height ?? '100%'\r\n\t\t} else {\r\n\t\t\theight = `${props.height}em`\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\twidth,\r\n\t\theight\r\n\t}\r\n})\r\nconst updateInputMethod = ref<any>(null)\r\nprovide('setInput', updateInputMethod)\r\nconst setInput = (newValue: string) => {\r\n\tif (updateInputMethod.value) {\r\n\t\tupdateInputMethod.value(newValue)\r\n\t}\r\n}\r\nprovide('fileAction', (item: any, index: number) => {\r\n\temits('file-action', item, index)\r\n})\r\ndefineExpose({\r\n\tsend: (value: string, fileList?: any[], auto?: boolean, type?: string) => {\r\n\t\tdeepSeekRef.value?.send(value, fileList, auto, type) //send\r\n\t},\r\n\tcloseExtend: () => {\r\n\t\tdeepSeekRef.value?.closeExtend() // closeExtend\r\n\t},\r\n\tcreate: () => {\r\n\t\tdeepSeekRef.value?.create() // reset\r\n\t},\r\n\tretry: (index: number) => {\r\n\t\tdeepSeekRef.value?.retry(index)\r\n\t},\r\n\tupdate: (index: number, message: object) => {\r\n\t\tdeepSeekRef.value?.update(index, message)\r\n\t},\r\n\tchangeChat: (index: number) => {\r\n\t\tdeepSeekRef.value?.changeChat(index)\r\n\t},\r\n\tclearChat: () => {\r\n\t\tdeepSeekRef.value?.clearChat()\r\n\t},\r\n\tsetInput\r\n})\r\n</script>\r\n"],"names":["DO_defineComponent","ref","computed","provide","watch","_createCommentVNode","_createVNode","DeepSeek","_withCtx","_renderSlot"],"mappings":";;;;;;;AAEA,MAAA,WAA6B,GAAAA,mBAAA,CAAmB,EAAE,IAAA,EAAM,aAAa,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoErE,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAkBd,IAAM,MAAA,OAAA,GAAUC,QAAI,EAAE,CAAA,CAAA;AA8CtB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAuEd,IAAA,MAAM,UAAa,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,YAAY,CAAA,CAAA;AACpD,IAAQC,WAAA,CAAA,YAAA,EAAc,MAAM,UAAU,CAAA,CAAA;AACtC,IAAQA,WAAA,CAAA,QAAA,EAAU,MAAM,MAAM,CAAA,CAAA;AAC9B,IAAQA,WAAA,CAAA,aAAA,EAAe,MAAM,WAAW,CAAA,CAAA;AACxC,IAAQA,WAAA,CAAA,aAAA,EAAe,MAAM,WAAW,CAAA,CAAA;AACxC,IAAQA,WAAA,CAAA,OAAA,EAAS,MAAM,KAAK,CAAA,CAAA;AAC5B,IAAQA,WAAA,CAAA,QAAA,EAAU,MAAM,MAAM,CAAA,CAAA;AAC9B,IAAQA,WAAA,CAAA,YAAA,EAAc,MAAM,UAAU,CAAA,CAAA;AACtC,IAAAA,WAAA,CAAQ,WAAWF,OAAI,CAAA,KAAA,CAAM,OAAW,IAAA,EAAE,CAAC,CAA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AApCA,cAAA,CAAoC,IAAA,CAAA,MAAA,EAAA,iBAAA,CAAA;AAAA;YAE1B,cAAA,cACV,MAAmC;AAAA,cAAnCA,cAAA,CAAmC,IAAA,CAAA,MAAA,EAAA,gBAAA,CAAA;AAAA;YAEzB,WACVD,WAAA,CAAA,CAAqD,EAD9B,IAAA,EAAM,OAAK,KAAA;AAAA,cAClCC,cAAA,CAAqD,IAAA,CAAA,MAAA,EAAA,WAAA,EAAA;AAAA,gBAA7B,IAAA;AAAA,gBAAa,KAAA;AAAA;;YAE3B,SACVD,WAAA,CAAA,CAAmD,EAD9B,IAAA,EAAM,OAAK,KAAA;AAAA,cAChCC,cAAA,CAAmD,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA;AAAA,gBAA7B,IAAA;AAAA,gBAAa,KAAA;AAAA;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var A2AMethods = /* @__PURE__ */ ((A2AMethods2) => {
|
|
4
|
+
A2AMethods2["SEND_MESSAGE"] = "message/send";
|
|
5
|
+
A2AMethods2["STREAM_MESSAGE"] = "message/stream";
|
|
6
|
+
A2AMethods2["GET_TASK"] = "task/get";
|
|
7
|
+
A2AMethods2["CANCEL_TASK"] = "task/cancel";
|
|
8
|
+
A2AMethods2["SUBSCRIBE_TASK"] = "task/subscribe";
|
|
9
|
+
return A2AMethods2;
|
|
10
|
+
})(A2AMethods || {});
|
|
11
|
+
|
|
12
|
+
exports.A2AMethods = A2AMethods;
|
|
13
|
+
//# sourceMappingURL=a2a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a.js","sources":["../../../../../../../packages/components/touchchat/src/types/a2a.ts"],"sourcesContent":["// A2A Protocol Types\n// Based on A2A (Agent-to-Agent) protocol specification\n\n// Message Part Types\nexport interface TextPart {\n\ttype: 'text'\n\ttext: string\n}\n\nexport interface FilePart {\n\ttype: 'file'\n\tfile: {\n\t\tname: string\n\t\tmimeType?: string\n\t\tbytes?: string\n\t\turi?: string\n\t}\n}\n\nexport interface DataPart {\n\ttype: 'data'\n\tdata: Record<string, unknown>\n}\n\nexport type Part = TextPart | FilePart | DataPart\n\n// Message\nexport interface Message {\n\tmessageId: string\n\trole: 'user' | 'agent'\n\tparts: Part[]\n\ttimestamp?: string\n}\n\n// JSON-RPC Request\nexport interface JSONRPCRequest {\n\tjsonrpc: '2.0'\n\tid: string\n\tmethod: string\n\tparams: Record<string, unknown>\n}\n\n// JSON-RPC Response\nexport interface JSONRPCResponse {\n\tjsonrpc: '2.0'\n\tid: string\n\tresult?: Record<string, unknown>\n\terror?: {\n\t\tcode: number\n\t\tmessage: string\n\t\tdata?: unknown\n\t}\n}\n\n// Agent Configuration\nexport interface AgentConfig {\n\tid: string\n\tname: string\n\tversion: string\n\tendpoint: string\n\tauthToken?: string\n\tdescription?: string\n}\n\n// Stream Response Chunk\nexport interface StreamChunk {\n\tjsonrpc: '2.0'\n\tid?: string\n\tmethod?: string\n\tparams?: {\n\t\tmessage?: Message\n\t\tstatus?: TaskStatus\n\t\tartifact?: Artifact\n\t}\n\tresult?: Record<string, unknown>\n\terror?: {\n\t\tcode: number\n\t\tmessage: string\n\t\tdata?: unknown\n\t}\n}\n\n// Task Status\nexport interface TaskStatus {\n\tstate: 'pending' | 'working' | 'input-required' | 'completed' | 'canceled' | 'failed'\n\tmessage?: Message\n\ttimestamp?: string\n}\n\n// Artifact\nexport interface Artifact {\n\tartifactId: string\n\tname?: string\n\tdescription?: string\n\tparts: Part[]\n\tindex?: number\n\tappend?: boolean\n\tlastChunk?: boolean\n\tmetadata?: Record<string, unknown>\n}\n\n// Task\nexport interface Task {\n\ttaskId: string\n\tsessionId?: string\n\tstatus: TaskStatus\n\tartifacts?: Artifact[]\n\thistory?: Message[]\n\tmetadata?: Record<string, unknown>\n}\n\n// A2A Methods\nexport enum A2AMethods {\n\tSEND_MESSAGE = 'message/send',\n\tSTREAM_MESSAGE = 'message/stream',\n\tGET_TASK = 'task/get',\n\tCANCEL_TASK = 'task/cancel',\n\tSUBSCRIBE_TASK = 'task/subscribe'\n}\n\n// Agent Card (Agent Discovery)\nexport interface AgentCard {\n\tname: string\n\tdescription: string\n\turl: string\n\tversion: string\n\tcapabilities: {\n\t\tstreaming?: boolean\n\t\tpushNotifications?: boolean\n\t\tstateTransitionHistory?: boolean\n\t}\n\tauthentication?: {\n\t\tschemes: string[]\n\t\tcredentials?: string\n\t}\n\tdefaultInputModes?: string[]\n\tdefaultOutputModes?: string[]\n\tskills?: Array<{\n\t\tid: string\n\t\tname: string\n\t\tdescription?: string\n\t\ttags?: string[]\n\t\texamples?: string[]\n\t\tinputModes?: string[]\n\t\toutputModes?: string[]\n\t}>\n}\n\n// A2A 1.0 Protocol Types\n\n// A2A 1.0 Message Part\nexport interface Part1_0 {\n\ttext: string\n\tfile: string | null\n\tdata: Record<string, unknown> | null\n\tmetadata: Record<string, unknown> | null\n}\n\n// A2A 1.0 Message\nexport interface Message1_0 {\n\tmessageId: string\n\tparts: Part1_0[]\n\trole: string\n\tmetadata: Record<string, unknown> | null\n}\n\n// A2A 1.0 Status\nexport interface Status1_0 {\n\tmessage: Message1_0\n\tstate: string\n\ttimestamp: string\n}\n\n// A2A 1.0 Task\nexport interface Task1_0 {\n\ttaskId: string\n\tcontextId: string\n\tstatus: Status1_0\n\tmetadata: Record<string, unknown> | null\n}\n\n// A2A 1.0 Stream Chunk\nexport interface StreamChunk1_0 {\n\ttaskId: string\n\tcontextId: string\n\tstatus: {\n\t\tmessage: {\n\t\t\tmessageId: string\n\t\t\tparts: Array<{\n\t\t\t\ttext: string\n\t\t\t\tfile: string | null\n\t\t\t\tdata: Record<string, unknown> | null\n\t\t\t\tmetadata: Record<string, unknown> | null\n\t\t\t}>\n\t\t\trole: string\n\t\t\tmetadata: Record<string, unknown> | null\n\t\t}\n\t\tstate: string\n\t\ttimestamp: string\n\t}\n\tmetadata: Record<string, unknown> | null\n}\n\n// Multi-Agent Types\nexport interface SubAgent {\n\tagent_name: string\n\tagent_url: string\n\theaders: {\n\t\tAuthorization: string\n\t}\n}\n\nexport interface MultiAgentConfig {\n\thostEndpoint: string\n\tsubAgents: SubAgent[]\n}\n"],"names":["A2AMethods"],"mappings":";;AAgHY,IAAA,UAAA,qBAAAA,WAAL,KAAA;AACN,EAAAA,YAAA,cAAe,CAAA,GAAA,cAAA,CAAA;AACf,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA,CAAA;AACjB,EAAAA,YAAA,UAAW,CAAA,GAAA,UAAA,CAAA;AACX,EAAAA,YAAA,aAAc,CAAA,GAAA,aAAA,CAAA;AACd,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA,CAAA;AALN,EAAAA,OAAAA,WAAAA,CAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;;;;"}
|