@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.
Files changed (443) hide show
  1. package/README.md +25 -25
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
  4. package/es/index.mjs.map +1 -1
  5. package/es/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.mjs +4816 -0
  6. package/es/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.mjs.map +1 -0
  7. package/es/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.mjs +1380 -0
  8. package/es/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.mjs.map +1 -0
  9. package/es/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs +7824 -0
  10. package/es/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs.map +1 -0
  11. package/es/package.json.css +1 -1
  12. package/es/package.json.mjs +2 -2
  13. package/es/packages/components/index.mjs +1 -1
  14. package/es/packages/components/resolver.mjs.map +1 -1
  15. package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue.mjs +3 -2
  16. package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue.mjs.map +1 -1
  17. package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue2.mjs +219 -159
  18. package/es/packages/components/touchchat/component/AiRobot/HelloChat.vue2.mjs.map +1 -1
  19. package/es/packages/components/touchchat/component/AiRobot/face.vue.mjs +3 -2
  20. package/es/packages/components/touchchat/component/AiRobot/face.vue.mjs.map +1 -1
  21. package/es/packages/components/touchchat/component/AiRobot/face.vue2.mjs +27 -13
  22. package/es/packages/components/touchchat/component/AiRobot/face.vue2.mjs.map +1 -1
  23. package/es/packages/components/touchchat/component/AiRobot/letter.vue.mjs +3 -2
  24. package/es/packages/components/touchchat/component/AiRobot/letter.vue.mjs.map +1 -1
  25. package/es/packages/components/touchchat/component/AiRobot/letter.vue2.mjs +182 -41
  26. package/es/packages/components/touchchat/component/AiRobot/letter.vue2.mjs.map +1 -1
  27. package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.mjs +3 -2
  28. package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.mjs.map +1 -1
  29. package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.mjs +15 -10
  30. package/es/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.mjs.map +1 -1
  31. package/es/packages/components/touchchat/component/AiRobot/start.vue.mjs +3 -2
  32. package/es/packages/components/touchchat/component/AiRobot/start.vue.mjs.map +1 -1
  33. package/es/packages/components/touchchat/component/AiRobot/start.vue2.mjs +18 -11
  34. package/es/packages/components/touchchat/component/AiRobot/start.vue2.mjs.map +1 -1
  35. package/es/packages/components/touchchat/component/CardView.vue.mjs +3 -2
  36. package/es/packages/components/touchchat/component/CardView.vue.mjs.map +1 -1
  37. package/es/packages/components/touchchat/component/CardView.vue2.mjs +66 -42
  38. package/es/packages/components/touchchat/component/CardView.vue2.mjs.map +1 -1
  39. package/es/packages/components/touchchat/component/FileContent.vue.mjs +7 -0
  40. package/es/packages/components/touchchat/component/FileContent.vue.mjs.map +1 -0
  41. package/es/packages/components/touchchat/component/FileContent.vue2.mjs +206 -0
  42. package/es/packages/components/touchchat/component/FileContent.vue2.mjs.map +1 -0
  43. package/es/packages/components/touchchat/component/FileView.vue.mjs +3 -2
  44. package/es/packages/components/touchchat/component/FileView.vue.mjs.map +1 -1
  45. package/es/packages/components/touchchat/component/FileView.vue2.mjs +17 -4
  46. package/es/packages/components/touchchat/component/FileView.vue2.mjs.map +1 -1
  47. package/es/packages/components/touchchat/component/HelloChat.vue.mjs +3 -2
  48. package/es/packages/components/touchchat/component/HelloChat.vue.mjs.map +1 -1
  49. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs +26 -14
  50. package/es/packages/components/touchchat/component/HelloChat.vue2.mjs.map +1 -1
  51. package/es/packages/components/touchchat/component/ImageFile.vue.mjs +7 -0
  52. package/es/packages/components/touchchat/component/ImageFile.vue.mjs.map +1 -0
  53. package/es/packages/components/touchchat/component/ImageFile.vue2.mjs +162 -0
  54. package/es/packages/components/touchchat/component/ImageFile.vue2.mjs.map +1 -0
  55. package/es/packages/components/touchchat/component/ImageView.vue.mjs +3 -2
  56. package/es/packages/components/touchchat/component/ImageView.vue.mjs.map +1 -1
  57. package/es/packages/components/touchchat/component/ImageView.vue2.mjs +1 -1
  58. package/es/packages/components/touchchat/component/ImageView.vue2.mjs.map +1 -1
  59. package/es/packages/components/touchchat/component/LinkView.vue.mjs +3 -2
  60. package/es/packages/components/touchchat/component/LinkView.vue.mjs.map +1 -1
  61. package/es/packages/components/touchchat/component/LinkView.vue2.mjs +19 -5
  62. package/es/packages/components/touchchat/component/LinkView.vue2.mjs.map +1 -1
  63. package/es/packages/components/touchchat/component/MarkLayer.vue.mjs +7 -0
  64. package/es/packages/components/touchchat/component/MarkLayer.vue.mjs.map +1 -0
  65. package/es/packages/components/touchchat/component/MarkLayer.vue2.mjs +56 -0
  66. package/es/packages/components/touchchat/component/MarkLayer.vue2.mjs.map +1 -0
  67. package/es/packages/components/touchchat/component/ModuleSelect.vue.mjs +7 -0
  68. package/es/packages/components/touchchat/component/ModuleSelect.vue.mjs.map +1 -0
  69. package/es/packages/components/touchchat/component/ModuleSelect.vue2.mjs +121 -0
  70. package/es/packages/components/touchchat/component/ModuleSelect.vue2.mjs.map +1 -0
  71. package/es/packages/components/touchchat/component/PDFFile.vue.mjs +7 -0
  72. package/es/packages/components/touchchat/component/PDFFile.vue.mjs.map +1 -0
  73. package/es/packages/components/touchchat/component/PDFFile.vue2.mjs +211 -0
  74. package/es/packages/components/touchchat/component/PDFFile.vue2.mjs.map +1 -0
  75. package/es/packages/components/touchchat/component/QuoteContent.vue.mjs +7 -0
  76. package/es/packages/components/touchchat/component/QuoteContent.vue.mjs.map +1 -0
  77. package/es/packages/components/touchchat/component/QuoteContent.vue2.mjs +40 -0
  78. package/es/packages/components/touchchat/component/QuoteContent.vue2.mjs.map +1 -0
  79. package/es/packages/components/touchchat/component/RealtimeVoice.vue.mjs +7 -0
  80. package/es/packages/components/touchchat/component/RealtimeVoice.vue.mjs.map +1 -0
  81. package/es/packages/components/touchchat/component/RealtimeVoice.vue2.mjs +160 -0
  82. package/es/packages/components/touchchat/component/RealtimeVoice.vue2.mjs.map +1 -0
  83. package/es/packages/components/touchchat/component/Screenshot.vue.mjs +7 -0
  84. package/es/packages/components/touchchat/component/Screenshot.vue.mjs.map +1 -0
  85. package/es/packages/components/touchchat/component/Screenshot.vue2.mjs +208 -0
  86. package/es/packages/components/touchchat/component/Screenshot.vue2.mjs.map +1 -0
  87. package/es/packages/components/touchchat/component/ThoughtChain.vue.mjs +7 -0
  88. package/es/packages/components/touchchat/component/ThoughtChain.vue.mjs.map +1 -0
  89. package/es/packages/components/touchchat/component/ThoughtChain.vue2.mjs +69 -0
  90. package/es/packages/components/touchchat/component/ThoughtChain.vue2.mjs.map +1 -0
  91. package/es/packages/components/touchchat/component/UploadView.vue.mjs +7 -0
  92. package/es/packages/components/touchchat/component/UploadView.vue.mjs.map +1 -0
  93. package/es/packages/components/touchchat/component/UploadView.vue2.mjs +186 -0
  94. package/es/packages/components/touchchat/component/UploadView.vue2.mjs.map +1 -0
  95. package/es/packages/components/touchchat/component/UploadView_api.vue.mjs +7 -0
  96. package/es/packages/components/touchchat/component/UploadView_api.vue.mjs.map +1 -0
  97. package/es/packages/components/touchchat/component/UploadView_api.vue2.mjs +166 -0
  98. package/es/packages/components/touchchat/component/UploadView_api.vue2.mjs.map +1 -0
  99. package/es/packages/components/touchchat/component/VideoFile.vue.mjs +7 -0
  100. package/es/packages/components/touchchat/component/VideoFile.vue.mjs.map +1 -0
  101. package/es/packages/components/touchchat/component/VideoFile.vue2.mjs +33 -0
  102. package/es/packages/components/touchchat/component/VideoFile.vue2.mjs.map +1 -0
  103. package/es/packages/components/touchchat/component/VoiceView.vue.mjs +7 -0
  104. package/es/packages/components/touchchat/component/VoiceView.vue.mjs.map +1 -0
  105. package/es/packages/components/touchchat/component/VoiceView.vue2.mjs +165 -0
  106. package/es/packages/components/touchchat/component/VoiceView.vue2.mjs.map +1 -0
  107. package/es/packages/components/touchchat/img/file/doc.png.mjs +4 -0
  108. package/es/packages/components/touchchat/img/file/doc.png.mjs.map +1 -0
  109. package/es/packages/components/touchchat/img/file/docx.png.mjs +4 -0
  110. package/es/packages/components/touchchat/img/file/docx.png.mjs.map +1 -0
  111. package/es/packages/components/touchchat/img/file/gif.png.mjs +4 -0
  112. package/es/packages/components/touchchat/img/file/gif.png.mjs.map +1 -0
  113. package/es/packages/components/touchchat/img/file/html.png.mjs +4 -0
  114. package/es/packages/components/touchchat/img/file/html.png.mjs.map +1 -0
  115. package/es/packages/components/touchchat/img/file/jpg.png.mjs +4 -0
  116. package/es/packages/components/touchchat/img/file/jpg.png.mjs.map +1 -0
  117. package/es/packages/components/touchchat/img/file/mp3.png.mjs +4 -0
  118. package/es/packages/components/touchchat/img/file/mp3.png.mjs.map +1 -0
  119. package/es/packages/components/touchchat/img/file/mp4.png.mjs +4 -0
  120. package/es/packages/components/touchchat/img/file/mp4.png.mjs.map +1 -0
  121. package/es/packages/components/touchchat/img/file/music.png.mjs +4 -0
  122. package/es/packages/components/touchchat/img/file/music.png.mjs.map +1 -0
  123. package/es/packages/components/touchchat/img/file/pdf.png.mjs +4 -0
  124. package/es/packages/components/touchchat/img/file/pdf.png.mjs.map +1 -0
  125. package/es/packages/components/touchchat/img/file/png.png.mjs +4 -0
  126. package/es/packages/components/touchchat/img/file/png.png.mjs.map +1 -0
  127. package/es/packages/components/touchchat/img/file/ppt.png.mjs +4 -0
  128. package/es/packages/components/touchchat/img/file/ppt.png.mjs.map +1 -0
  129. package/es/packages/components/touchchat/img/file/pptx.png.mjs +4 -0
  130. package/es/packages/components/touchchat/img/file/pptx.png.mjs.map +1 -0
  131. package/es/packages/components/touchchat/img/file/txt.png.mjs +4 -0
  132. package/es/packages/components/touchchat/img/file/txt.png.mjs.map +1 -0
  133. package/es/packages/components/touchchat/img/file/xls.png.mjs +4 -0
  134. package/es/packages/components/touchchat/img/file/xls.png.mjs.map +1 -0
  135. package/es/packages/components/touchchat/img/file/xlsx.png.mjs +4 -0
  136. package/es/packages/components/touchchat/img/file/xlsx.png.mjs.map +1 -0
  137. package/es/packages/components/touchchat/img/svg/reset.svg.mjs +4 -0
  138. package/es/packages/components/touchchat/img/svg/reset.svg.mjs.map +1 -0
  139. package/es/packages/components/touchchat/index.mjs +5 -5
  140. package/es/packages/components/touchchat/index.mjs.map +1 -1
  141. package/es/packages/components/touchchat/src/AiChat/AgentsView.vue.mjs +7 -0
  142. package/es/packages/components/touchchat/src/AiChat/AgentsView.vue.mjs.map +1 -0
  143. package/es/packages/components/touchchat/src/AiChat/AgentsView.vue2.mjs +59 -0
  144. package/es/packages/components/touchchat/src/AiChat/AgentsView.vue2.mjs.map +1 -0
  145. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs +3 -2
  146. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue.mjs.map +1 -1
  147. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs +322 -139
  148. package/es/packages/components/touchchat/src/AiChat/AiMessage.vue2.mjs.map +1 -1
  149. package/es/packages/components/touchchat/src/AiChat/Chat/TouchChat.mjs +18 -0
  150. package/es/packages/components/touchchat/src/AiChat/Chat/TouchChat.mjs.map +1 -0
  151. package/es/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.mjs +145 -0
  152. package/es/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.mjs.map +1 -0
  153. package/es/packages/components/touchchat/src/AiChat/Chat/types.mjs +19 -0
  154. package/es/packages/components/touchchat/src/AiChat/Chat/types.mjs.map +1 -0
  155. package/es/packages/components/touchchat/src/AiChat/Chat/useChat.mjs +693 -0
  156. package/es/packages/components/touchchat/src/AiChat/Chat/useChat.mjs.map +1 -0
  157. package/es/packages/components/touchchat/src/AiChat/Chat/useCopy.mjs +55 -0
  158. package/es/packages/components/touchchat/src/AiChat/Chat/useCopy.mjs.map +1 -0
  159. package/es/packages/components/touchchat/src/AiChat/Chat/useMessageRender.mjs +155 -0
  160. package/es/packages/components/touchchat/src/AiChat/Chat/useMessageRender.mjs.map +1 -0
  161. package/es/packages/components/touchchat/src/AiChat/Chat/useSSE.mjs +345 -0
  162. package/es/packages/components/touchchat/src/AiChat/Chat/useSSE.mjs.map +1 -0
  163. package/es/packages/components/touchchat/src/AiChat/Chat/useScroll.mjs +74 -0
  164. package/es/packages/components/touchchat/src/AiChat/Chat/useScroll.mjs.map +1 -0
  165. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs +3 -2
  166. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue.mjs.map +1 -1
  167. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs +472 -44
  168. package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs.map +1 -1
  169. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs +3 -2
  170. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue.mjs.map +1 -1
  171. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs +180 -98
  172. package/es/packages/components/touchchat/src/AiChat/HistoryList.vue2.mjs.map +1 -1
  173. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs +3 -2
  174. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue.mjs.map +1 -1
  175. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs +29 -12
  176. package/es/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.mjs.map +1 -1
  177. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs +3 -2
  178. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue.mjs.map +1 -1
  179. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs +175 -62
  180. package/es/packages/components/touchchat/src/AiChat/MessageActions.vue2.mjs.map +1 -1
  181. package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue.mjs +3 -2
  182. package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue.mjs.map +1 -1
  183. package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue2.mjs +14 -8
  184. package/es/packages/components/touchchat/src/AiChat/SiderBarView.vue2.mjs.map +1 -1
  185. package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue.mjs +7 -0
  186. package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue.mjs.map +1 -0
  187. package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue2.mjs +1034 -0
  188. package/es/packages/components/touchchat/src/AiChat/TouchAgent.vue2.mjs.map +1 -0
  189. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs +3 -2
  190. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue.mjs.map +1 -1
  191. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs +276 -1004
  192. package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs.map +1 -1
  193. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs +3 -2
  194. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue.mjs.map +1 -1
  195. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs +346 -122
  196. package/es/packages/components/touchchat/src/AiChat/TouchHistory.vue2.mjs.map +1 -1
  197. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs +3 -2
  198. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue.mjs.map +1 -1
  199. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs +143 -64
  200. package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs.map +1 -1
  201. package/es/packages/components/touchchat/src/index.vue.mjs +3 -2
  202. package/es/packages/components/touchchat/src/index.vue.mjs.map +1 -1
  203. package/es/packages/components/touchchat/src/index.vue2.mjs +252 -143
  204. package/es/packages/components/touchchat/src/index.vue2.mjs.map +1 -1
  205. package/es/packages/components/touchchat/src/types/a2a.mjs +11 -0
  206. package/es/packages/components/touchchat/src/types/a2a.mjs.map +1 -0
  207. package/es/packages/components/touchchat/utils/a2aService.mjs +316 -0
  208. package/es/packages/components/touchchat/utils/a2aService.mjs.map +1 -0
  209. package/es/packages/components/touchchat/utils/fetchStream.mjs +8 -2
  210. package/es/packages/components/touchchat/utils/fetchStream.mjs.map +1 -1
  211. package/es/packages/components/touchchat/utils/markdown.mjs +31 -13
  212. package/es/packages/components/touchchat/utils/markdown.mjs.map +1 -1
  213. package/es/packages/utils/config.mjs.map +1 -1
  214. package/es/packages/utils/types.mjs.map +1 -1
  215. package/global.d.ts +2 -2
  216. package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
  217. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  218. package/lib/index.js.map +1 -1
  219. package/lib/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.js +4819 -0
  220. package/lib/node_modules/.pnpm/@touchvue_a2ui@1.0.0-beta.46/node_modules/@touchvue/a2ui/dist/index.js.map +1 -0
  221. package/lib/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.js +1384 -0
  222. package/lib/node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.js.map +1 -0
  223. package/lib/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js +7828 -0
  224. package/lib/node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -0
  225. package/lib/package.json.css +1 -1
  226. package/lib/package.json.js +2 -2
  227. package/lib/packages/components/index.js +2 -2
  228. package/lib/packages/components/resolver.js.map +1 -1
  229. package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue.js +3 -2
  230. package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue.js.map +1 -1
  231. package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue2.js +219 -159
  232. package/lib/packages/components/touchchat/component/AiRobot/HelloChat.vue2.js.map +1 -1
  233. package/lib/packages/components/touchchat/component/AiRobot/face.vue.js +3 -2
  234. package/lib/packages/components/touchchat/component/AiRobot/face.vue.js.map +1 -1
  235. package/lib/packages/components/touchchat/component/AiRobot/face.vue2.js +26 -12
  236. package/lib/packages/components/touchchat/component/AiRobot/face.vue2.js.map +1 -1
  237. package/lib/packages/components/touchchat/component/AiRobot/letter.vue.js +3 -2
  238. package/lib/packages/components/touchchat/component/AiRobot/letter.vue.js.map +1 -1
  239. package/lib/packages/components/touchchat/component/AiRobot/letter.vue2.js +181 -40
  240. package/lib/packages/components/touchchat/component/AiRobot/letter.vue2.js.map +1 -1
  241. package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.js +3 -2
  242. package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue.js.map +1 -1
  243. package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.js +15 -10
  244. package/lib/packages/components/touchchat/component/AiRobot/meterialPrepare.vue2.js.map +1 -1
  245. package/lib/packages/components/touchchat/component/AiRobot/start.vue.js +3 -2
  246. package/lib/packages/components/touchchat/component/AiRobot/start.vue.js.map +1 -1
  247. package/lib/packages/components/touchchat/component/AiRobot/start.vue2.js +17 -10
  248. package/lib/packages/components/touchchat/component/AiRobot/start.vue2.js.map +1 -1
  249. package/lib/packages/components/touchchat/component/CardView.vue.js +3 -2
  250. package/lib/packages/components/touchchat/component/CardView.vue.js.map +1 -1
  251. package/lib/packages/components/touchchat/component/CardView.vue2.js +66 -42
  252. package/lib/packages/components/touchchat/component/CardView.vue2.js.map +1 -1
  253. package/lib/packages/components/touchchat/component/FileContent.vue.js +11 -0
  254. package/lib/packages/components/touchchat/component/FileContent.vue.js.map +1 -0
  255. package/lib/packages/components/touchchat/component/FileContent.vue2.js +210 -0
  256. package/lib/packages/components/touchchat/component/FileContent.vue2.js.map +1 -0
  257. package/lib/packages/components/touchchat/component/FileView.vue.js +3 -2
  258. package/lib/packages/components/touchchat/component/FileView.vue.js.map +1 -1
  259. package/lib/packages/components/touchchat/component/FileView.vue2.js +16 -3
  260. package/lib/packages/components/touchchat/component/FileView.vue2.js.map +1 -1
  261. package/lib/packages/components/touchchat/component/HelloChat.vue.js +3 -2
  262. package/lib/packages/components/touchchat/component/HelloChat.vue.js.map +1 -1
  263. package/lib/packages/components/touchchat/component/HelloChat.vue2.js +26 -14
  264. package/lib/packages/components/touchchat/component/HelloChat.vue2.js.map +1 -1
  265. package/lib/packages/components/touchchat/component/ImageFile.vue.js +11 -0
  266. package/lib/packages/components/touchchat/component/ImageFile.vue.js.map +1 -0
  267. package/lib/packages/components/touchchat/component/ImageFile.vue2.js +166 -0
  268. package/lib/packages/components/touchchat/component/ImageFile.vue2.js.map +1 -0
  269. package/lib/packages/components/touchchat/component/ImageView.vue.js +3 -2
  270. package/lib/packages/components/touchchat/component/ImageView.vue.js.map +1 -1
  271. package/lib/packages/components/touchchat/component/ImageView.vue2.js +1 -1
  272. package/lib/packages/components/touchchat/component/ImageView.vue2.js.map +1 -1
  273. package/lib/packages/components/touchchat/component/LinkView.vue.js +3 -2
  274. package/lib/packages/components/touchchat/component/LinkView.vue.js.map +1 -1
  275. package/lib/packages/components/touchchat/component/LinkView.vue2.js +18 -4
  276. package/lib/packages/components/touchchat/component/LinkView.vue2.js.map +1 -1
  277. package/lib/packages/components/touchchat/component/MarkLayer.vue.js +11 -0
  278. package/lib/packages/components/touchchat/component/MarkLayer.vue.js.map +1 -0
  279. package/lib/packages/components/touchchat/component/MarkLayer.vue2.js +60 -0
  280. package/lib/packages/components/touchchat/component/MarkLayer.vue2.js.map +1 -0
  281. package/lib/packages/components/touchchat/component/ModuleSelect.vue.js +11 -0
  282. package/lib/packages/components/touchchat/component/ModuleSelect.vue.js.map +1 -0
  283. package/lib/packages/components/touchchat/component/ModuleSelect.vue2.js +125 -0
  284. package/lib/packages/components/touchchat/component/ModuleSelect.vue2.js.map +1 -0
  285. package/lib/packages/components/touchchat/component/PDFFile.vue.js +11 -0
  286. package/lib/packages/components/touchchat/component/PDFFile.vue.js.map +1 -0
  287. package/lib/packages/components/touchchat/component/PDFFile.vue2.js +215 -0
  288. package/lib/packages/components/touchchat/component/PDFFile.vue2.js.map +1 -0
  289. package/lib/packages/components/touchchat/component/QuoteContent.vue.js +11 -0
  290. package/lib/packages/components/touchchat/component/QuoteContent.vue.js.map +1 -0
  291. package/lib/packages/components/touchchat/component/QuoteContent.vue2.js +44 -0
  292. package/lib/packages/components/touchchat/component/QuoteContent.vue2.js.map +1 -0
  293. package/lib/packages/components/touchchat/component/RealtimeVoice.vue.js +11 -0
  294. package/lib/packages/components/touchchat/component/RealtimeVoice.vue.js.map +1 -0
  295. package/lib/packages/components/touchchat/component/RealtimeVoice.vue2.js +164 -0
  296. package/lib/packages/components/touchchat/component/RealtimeVoice.vue2.js.map +1 -0
  297. package/lib/packages/components/touchchat/component/Screenshot.vue.js +11 -0
  298. package/lib/packages/components/touchchat/component/Screenshot.vue.js.map +1 -0
  299. package/lib/packages/components/touchchat/component/Screenshot.vue2.js +212 -0
  300. package/lib/packages/components/touchchat/component/Screenshot.vue2.js.map +1 -0
  301. package/lib/packages/components/touchchat/component/ThoughtChain.vue.js +11 -0
  302. package/lib/packages/components/touchchat/component/ThoughtChain.vue.js.map +1 -0
  303. package/lib/packages/components/touchchat/component/ThoughtChain.vue2.js +73 -0
  304. package/lib/packages/components/touchchat/component/ThoughtChain.vue2.js.map +1 -0
  305. package/lib/packages/components/touchchat/component/UploadView.vue.js +11 -0
  306. package/lib/packages/components/touchchat/component/UploadView.vue.js.map +1 -0
  307. package/lib/packages/components/touchchat/component/UploadView.vue2.js +190 -0
  308. package/lib/packages/components/touchchat/component/UploadView.vue2.js.map +1 -0
  309. package/lib/packages/components/touchchat/component/UploadView_api.vue.js +11 -0
  310. package/lib/packages/components/touchchat/component/UploadView_api.vue.js.map +1 -0
  311. package/lib/packages/components/touchchat/component/UploadView_api.vue2.js +170 -0
  312. package/lib/packages/components/touchchat/component/UploadView_api.vue2.js.map +1 -0
  313. package/lib/packages/components/touchchat/component/VideoFile.vue.js +11 -0
  314. package/lib/packages/components/touchchat/component/VideoFile.vue.js.map +1 -0
  315. package/lib/packages/components/touchchat/component/VideoFile.vue2.js +37 -0
  316. package/lib/packages/components/touchchat/component/VideoFile.vue2.js.map +1 -0
  317. package/lib/packages/components/touchchat/component/VoiceView.vue.js +11 -0
  318. package/lib/packages/components/touchchat/component/VoiceView.vue.js.map +1 -0
  319. package/lib/packages/components/touchchat/component/VoiceView.vue2.js +169 -0
  320. package/lib/packages/components/touchchat/component/VoiceView.vue2.js.map +1 -0
  321. package/lib/packages/components/touchchat/img/file/doc.png.js +8 -0
  322. package/lib/packages/components/touchchat/img/file/doc.png.js.map +1 -0
  323. package/lib/packages/components/touchchat/img/file/docx.png.js +8 -0
  324. package/lib/packages/components/touchchat/img/file/docx.png.js.map +1 -0
  325. package/lib/packages/components/touchchat/img/file/gif.png.js +8 -0
  326. package/lib/packages/components/touchchat/img/file/gif.png.js.map +1 -0
  327. package/lib/packages/components/touchchat/img/file/html.png.js +8 -0
  328. package/lib/packages/components/touchchat/img/file/html.png.js.map +1 -0
  329. package/lib/packages/components/touchchat/img/file/jpg.png.js +8 -0
  330. package/lib/packages/components/touchchat/img/file/jpg.png.js.map +1 -0
  331. package/lib/packages/components/touchchat/img/file/mp3.png.js +8 -0
  332. package/lib/packages/components/touchchat/img/file/mp3.png.js.map +1 -0
  333. package/lib/packages/components/touchchat/img/file/mp4.png.js +8 -0
  334. package/lib/packages/components/touchchat/img/file/mp4.png.js.map +1 -0
  335. package/lib/packages/components/touchchat/img/file/music.png.js +8 -0
  336. package/lib/packages/components/touchchat/img/file/music.png.js.map +1 -0
  337. package/lib/packages/components/touchchat/img/file/pdf.png.js +8 -0
  338. package/lib/packages/components/touchchat/img/file/pdf.png.js.map +1 -0
  339. package/lib/packages/components/touchchat/img/file/png.png.js +8 -0
  340. package/lib/packages/components/touchchat/img/file/png.png.js.map +1 -0
  341. package/lib/packages/components/touchchat/img/file/ppt.png.js +8 -0
  342. package/lib/packages/components/touchchat/img/file/ppt.png.js.map +1 -0
  343. package/lib/packages/components/touchchat/img/file/pptx.png.js +8 -0
  344. package/lib/packages/components/touchchat/img/file/pptx.png.js.map +1 -0
  345. package/lib/packages/components/touchchat/img/file/txt.png.js +8 -0
  346. package/lib/packages/components/touchchat/img/file/txt.png.js.map +1 -0
  347. package/lib/packages/components/touchchat/img/file/xls.png.js +8 -0
  348. package/lib/packages/components/touchchat/img/file/xls.png.js.map +1 -0
  349. package/lib/packages/components/touchchat/img/file/xlsx.png.js +8 -0
  350. package/lib/packages/components/touchchat/img/file/xlsx.png.js.map +1 -0
  351. package/lib/packages/components/touchchat/img/svg/reset.svg.js +8 -0
  352. package/lib/packages/components/touchchat/img/svg/reset.svg.js.map +1 -0
  353. package/lib/packages/components/touchchat/index.js +6 -6
  354. package/lib/packages/components/touchchat/index.js.map +1 -1
  355. package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue.js +11 -0
  356. package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue.js.map +1 -0
  357. package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue2.js +63 -0
  358. package/lib/packages/components/touchchat/src/AiChat/AgentsView.vue2.js.map +1 -0
  359. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js +3 -2
  360. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue.js.map +1 -1
  361. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js +321 -138
  362. package/lib/packages/components/touchchat/src/AiChat/AiMessage.vue2.js.map +1 -1
  363. package/lib/packages/components/touchchat/src/AiChat/Chat/TouchChat.js +21 -0
  364. package/lib/packages/components/touchchat/src/AiChat/Chat/TouchChat.js.map +1 -0
  365. package/lib/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.js +147 -0
  366. package/lib/packages/components/touchchat/src/AiChat/Chat/scriptMatcher.js.map +1 -0
  367. package/lib/packages/components/touchchat/src/AiChat/Chat/types.js +22 -0
  368. package/lib/packages/components/touchchat/src/AiChat/Chat/types.js.map +1 -0
  369. package/lib/packages/components/touchchat/src/AiChat/Chat/useChat.js +695 -0
  370. package/lib/packages/components/touchchat/src/AiChat/Chat/useChat.js.map +1 -0
  371. package/lib/packages/components/touchchat/src/AiChat/Chat/useCopy.js +57 -0
  372. package/lib/packages/components/touchchat/src/AiChat/Chat/useCopy.js.map +1 -0
  373. package/lib/packages/components/touchchat/src/AiChat/Chat/useMessageRender.js +157 -0
  374. package/lib/packages/components/touchchat/src/AiChat/Chat/useMessageRender.js.map +1 -0
  375. package/lib/packages/components/touchchat/src/AiChat/Chat/useSSE.js +347 -0
  376. package/lib/packages/components/touchchat/src/AiChat/Chat/useSSE.js.map +1 -0
  377. package/lib/packages/components/touchchat/src/AiChat/Chat/useScroll.js +76 -0
  378. package/lib/packages/components/touchchat/src/AiChat/Chat/useScroll.js.map +1 -0
  379. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js +3 -2
  380. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue.js.map +1 -1
  381. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js +471 -43
  382. package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js.map +1 -1
  383. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js +3 -2
  384. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue.js.map +1 -1
  385. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js +179 -97
  386. package/lib/packages/components/touchchat/src/AiChat/HistoryList.vue2.js.map +1 -1
  387. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js +3 -2
  388. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue.js.map +1 -1
  389. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js +28 -11
  390. package/lib/packages/components/touchchat/src/AiChat/HistorySidebar.vue2.js.map +1 -1
  391. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js +3 -2
  392. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue.js.map +1 -1
  393. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js +174 -61
  394. package/lib/packages/components/touchchat/src/AiChat/MessageActions.vue2.js.map +1 -1
  395. package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue.js +3 -2
  396. package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue.js.map +1 -1
  397. package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue2.js +14 -8
  398. package/lib/packages/components/touchchat/src/AiChat/SiderBarView.vue2.js.map +1 -1
  399. package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue.js +11 -0
  400. package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue.js.map +1 -0
  401. package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue2.js +1038 -0
  402. package/lib/packages/components/touchchat/src/AiChat/TouchAgent.vue2.js.map +1 -0
  403. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js +3 -2
  404. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue.js.map +1 -1
  405. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js +275 -1003
  406. package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js.map +1 -1
  407. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js +3 -2
  408. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue.js.map +1 -1
  409. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js +345 -121
  410. package/lib/packages/components/touchchat/src/AiChat/TouchHistory.vue2.js.map +1 -1
  411. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js +3 -2
  412. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue.js.map +1 -1
  413. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js +142 -63
  414. package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js.map +1 -1
  415. package/lib/packages/components/touchchat/src/index.vue.js +3 -2
  416. package/lib/packages/components/touchchat/src/index.vue.js.map +1 -1
  417. package/lib/packages/components/touchchat/src/index.vue2.js +251 -142
  418. package/lib/packages/components/touchchat/src/index.vue2.js.map +1 -1
  419. package/lib/packages/components/touchchat/src/types/a2a.js +13 -0
  420. package/lib/packages/components/touchchat/src/types/a2a.js.map +1 -0
  421. package/lib/packages/components/touchchat/utils/a2aService.js +319 -0
  422. package/lib/packages/components/touchchat/utils/a2aService.js.map +1 -0
  423. package/lib/packages/components/touchchat/utils/fetchStream.js +8 -2
  424. package/lib/packages/components/touchchat/utils/fetchStream.js.map +1 -1
  425. package/lib/packages/components/touchchat/utils/markdown.js +31 -13
  426. package/lib/packages/components/touchchat/utils/markdown.js.map +1 -1
  427. package/lib/packages/utils/config.js.map +1 -1
  428. package/lib/packages/utils/types.js.map +1 -1
  429. package/package.json +83 -83
  430. package/theme/components/index.css +969 -43
  431. package/theme/font/iconfont.woff +0 -0
  432. package/theme/font/iconfont.woff2 +0 -0
  433. package/theme/index.css +969 -43
  434. package/theme/skin/default.css +969 -43
  435. package/types/global.d.ts +2 -2
  436. package/es/packages/components/touchchat/src/AiChat/Scene.vue.mjs +0 -6
  437. package/es/packages/components/touchchat/src/AiChat/Scene.vue.mjs.map +0 -1
  438. package/es/packages/components/touchchat/src/AiChat/Scene.vue2.mjs +0 -42
  439. package/es/packages/components/touchchat/src/AiChat/Scene.vue2.mjs.map +0 -1
  440. package/lib/packages/components/touchchat/src/AiChat/Scene.vue.js +0 -10
  441. package/lib/packages/components/touchchat/src/AiChat/Scene.vue.js.map +0 -1
  442. package/lib/packages/components/touchchat/src/AiChat/Scene.vue2.js +0 -46
  443. package/lib/packages/components/touchchat/src/AiChat/Scene.vue2.js.map +0 -1
@@ -3,613 +3,100 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var UserMessage_vue_vue_type_script_setup_true_lang = require('./UserMessage.vue2.js');
7
- var AiMessage_vue_vue_type_script_setup_true_lang = require('./AiMessage.vue2.js');
8
- var ChatInput_vue_vue_type_script_setup_true_lang = require('./ChatInput.vue2.js');
9
- var HelloChat_vue_vue_type_script_setup_true_lang = require('../../component/HelloChat.vue2.js');
10
- var index = require('../../../../../node_modules/.pnpm/throttle-debounce@5.0.2/node_modules/throttle-debounce/esm/index.js');
11
- var fetchStream = require('../../utils/fetchStream.js');
12
- var chatRobot = require('../../utils/chatRobot.js');
13
- var markdown = require('../../utils/markdown.js');
14
- var tools = require('../../utils/tools.js');
6
+ var UserMessage = require('./UserMessage.vue.js');
7
+ var AiMessage = require('./AiMessage.vue.js');
8
+ var ChatInput = require('./ChatInput.vue.js');
9
+ var HelloChat = require('../../component/HelloChat.vue.js');
10
+ var types = require('./Chat/types.js');
11
+ var useChat = require('./Chat/useChat.js');
12
+ var useCopy = require('./Chat/useCopy.js');
15
13
 
16
14
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
15
  __name: "TouchChat",
18
16
  props: {
19
- model: {
20
- type: String,
21
- default: "deepseek-v3"
22
- },
23
17
  value: {
24
18
  type: Array,
25
19
  default: () => []
26
- },
27
- placeholder: {
28
- type: String,
29
- default: "\u5FEB\u6765\u548C\u6211\u804A\u5929\u5427~"
30
- },
31
- components: {
32
- type: Object,
33
- default: () => ({})
34
- },
35
- openSSECallback: {
36
- type: Function,
37
- default: null
38
20
  }
39
21
  },
40
- emits: ["sendMessage", "toggleSidebar", "beforeSendMessage"],
22
+ emits: ["sendMessage", "toggleSidebar", "beforeSendMessage", "openSideBar"],
41
23
  setup(__props, { expose: __expose, emit: __emit }) {
42
24
  const emit = __emit;
43
- const action = vue.inject("action", "");
44
- const headers = vue.inject("headers", void 0);
45
- const body = vue.inject("body", void 0);
46
- const token = vue.inject("token", "");
47
- const wsUrl = vue.inject("wsUrl", "");
48
- const connectionType = vue.inject("connectionType");
49
- const isDeepSeek = vue.inject(
50
- "isDeepSeek",
51
- vue.computed(() => true)
52
- );
53
- const aiChatType = vue.inject("aiChatType", "Flow");
54
- const scripts = vue.inject("scripts", []);
55
- const robotUnmatched = vue.inject("robotUnmatched", "\u60A8\u7684\u6D88\u606F\u672A\u5339\u914D\u5230\u4EFB\u4F55\u5185\u5BB9");
56
- const currentScriptIndex = vue.ref(0);
57
- const selectedScriptName = vue.ref("");
58
- const afterSendMessage = vue.inject("afterSendMessage", () => {
59
- console.warn("\u672A\u63D0\u4F9BafterSendMessage\u51FD\u6570");
25
+ const scripts = vue.inject("scripts", vue.ref([]));
26
+ const unmatchText = vue.inject("unmatchText", "\u60A8\u7684\u6D88\u606F\u672A\u5339\u914D\u5230\u4EFB\u4F55\u5185\u5BB9");
27
+ const modules = vue.inject("modules", vue.ref([]));
28
+ const afterSend = vue.inject("afterSend", () => {
29
+ console.warn("\u672A\u63D0\u4F9BafterSend\u51FD\u6570");
60
30
  });
61
- const sendMessageInject = vue.inject("handleSend", () => {
31
+ const sendMessageInject = vue.inject("send", () => {
62
32
  console.warn("\u672A\u63D0\u4F9BhandleSend\u51FD\u6570");
63
33
  });
64
34
  const beforeSend = vue.inject("beforeSend", () => ({
65
- result: true
35
+ result: true,
36
+ componentName: ""
66
37
  }));
38
+ const bottom = vue.inject("bottom", () => {
39
+ console.warn("\u672A\u63D0\u4F9Bbottom\u51FD\u6570");
40
+ });
41
+ const stop = vue.inject("stop", () => {
42
+ console.warn("\u672A\u63D0\u4F9Bstop\u51FD\u6570");
43
+ });
44
+ const isSelectMode = vue.inject(
45
+ "isSelectMode",
46
+ vue.computed(() => false)
47
+ );
48
+ const scriptsLength = vue.computed(() => {
49
+ var _a;
50
+ return ((_a = scripts.value) == null ? void 0 : _a.length) || 0;
51
+ });
67
52
  const props = __props;
68
53
  const chatContainer = vue.ref(null);
69
- const htmlContentRef = vue.ref([]);
70
- const thinkingContentRef = vue.ref([]);
71
- const reasoningContentRef = vue.ref([]);
72
- const isMounted = vue.ref(false);
73
- const isChating = vue.ref(false);
74
- const inputValue = vue.ref("");
75
- const enableDeepThinking = vue.ref(false);
76
- const chatList = vue.ref([]);
77
- const renderQueue = vue.ref([]);
78
- const isRendering = vue.ref(false);
79
- const currIndex = vue.ref(0);
80
- const fetchStream$1 = vue.ref(null);
81
- const TouchChatRobot = vue.ref();
82
- const isUnmounting = vue.ref(false);
83
- const currentComponentName = vue.ref("");
84
- const messageUtils = {
85
- updateMessage: (index, updates) => {
86
- if (index < 0 || index >= chatList.value.length)
87
- return;
88
- chatList.value.splice(index, 1, { ...chatList.value[index], ...updates });
89
- vue.nextTick(() => {
90
- const message = chatList.value[index];
91
- if (message) {
92
- renderContent(message.content, "main", index);
93
- if (message.thinkContent) {
94
- renderContent(message.thinkContent, "thinking", index);
95
- }
96
- if (message.reasoningContent) {
97
- renderContent(message.reasoningContent, "reasoning", index);
98
- }
99
- }
100
- });
101
- },
102
- deleteMessageChain: (index) => {
103
- if (index < 0 || index >= chatList.value.length)
104
- return;
105
- const nextIndex = index + 1;
106
- const deleteCount = nextIndex < chatList.value.length && chatList.value[nextIndex].user === "ai" ? 2 : 1;
107
- chatList.value.splice(index, deleteCount);
108
- },
109
- createStandardMessage: (data) => {
110
- var _a, _b, _c, _d, _e;
111
- return {
112
- chatId: data.chatId || "ai_" + crypto.randomUUID().replace(/-/gi, ""),
113
- user: data.user || "ai",
114
- type: data.type || "text",
115
- content: data.content || "",
116
- isChating: (_a = data.isChating) != null ? _a : false,
117
- thinkContent: data.thinkContent || "",
118
- reasoningContent: data.reasoningContent || "",
119
- isLiked: (_b = data.isLiked) != null ? _b : false,
120
- isDisliked: (_c = data.isDisliked) != null ? _c : false,
121
- isEditing: (_d = data.isEditing) != null ? _d : false,
122
- editContent: (_e = data.editContent) != null ? _e : ""
123
- };
124
- }
125
- };
126
- const sceneClick = (script) => {
127
- selectedScriptName.value = script.name;
128
- const findAndSendFirstUserMessage = (dataSource) => {
129
- var _a;
130
- const targetScript = dataSource.find((item) => item.name === script.name);
131
- if (targetScript && targetScript.content.length) {
132
- const firstUserMessage = (_a = targetScript.content.find((citem) => citem.user === "i")) == null ? void 0 : _a.data;
133
- if (firstUserMessage) {
134
- sendMessage({
135
- name: firstUserMessage
136
- });
137
- }
138
- }
139
- };
140
- if (scripts.length) {
141
- findAndSendFirstUserMessage(scripts);
142
- }
143
- };
144
- console.log("sceneClick", sceneClick);
145
- const completeRendered = () => {
146
- console.log("completeRendered", "\u6E32\u67D3\u5B8C\u6210");
147
- };
148
- const toggleSidebarClick = (item, index) => {
149
- emit("toggleSidebar", item, index);
150
- };
151
- const init = () => {
152
- try {
153
- if (Array.isArray(props.value) && props.value.length && isDeepSeek.value) {
154
- chatList.value = props.value.map((item) => ({
155
- ...item,
156
- content: item.thinkContent ? item.content || "" : item.content || "",
157
- thinkContent: item.thinkContent || ""
158
- }));
159
- vue.nextTick(() => {
160
- requestAnimationFrame(() => {
161
- chatList.value.forEach((item, index) => {
162
- currIndex.value = index;
163
- if (item.thinkContent) {
164
- renderContent(item.thinkContent, "thinking");
165
- }
166
- if (item.reasoningContent) {
167
- renderContent(item.reasoningContent, "reasoning");
168
- }
169
- if (item.content) {
170
- renderContent(item.content, "main");
171
- }
172
- });
173
- });
174
- });
175
- }
176
- if (connectionType === "Websocket" && isDeepSeek.value) {
177
- openWebsocket();
178
- }
179
- } catch (error) {
180
- console.error("\u521D\u59CB\u5316\u5931\u8D25:", error);
181
- }
182
- };
183
- const findMatchingScriptContent = (userInput) => {
184
- if (!scripts || scripts.length === 0)
185
- return null;
186
- let currentScript = scripts.find((item) => item.name === selectedScriptName.value);
187
- if (!currentScript && scripts.length > 0) {
188
- currentScript = scripts[0];
189
- selectedScriptName.value = currentScript.name;
190
- }
191
- if (!currentScript)
192
- return null;
193
- const firstItem = currentScript.content[0];
194
- if (firstItem.user === "i") {
195
- const isDataMatch2 = firstItem.data && userInput.includes(firstItem.data);
196
- let isSubDataMatch2 = false;
197
- if (firstItem.subData) {
198
- if (Array.isArray(firstItem.subData)) {
199
- isSubDataMatch2 = firstItem.subData.some((item) => userInput.includes(item));
200
- }
201
- }
202
- if (isDataMatch2 || isSubDataMatch2) {
203
- currentScriptIndex.value = 0;
204
- const responses = [];
205
- let nextIndex = currentScript.content.length;
206
- for (let i = 1; i < currentScript.content.length; i++) {
207
- const item = currentScript.content[i];
208
- if (item.user === "i") {
209
- nextIndex = i;
210
- break;
211
- }
212
- if (item.user === "ai") {
213
- responses.push(item);
214
- }
215
- }
216
- return { responses, nextIndex };
217
- }
218
- }
219
- const currentItem = currentScript.content[currentScriptIndex.value];
220
- if (!currentItem || currentItem.user !== "i") {
221
- return null;
222
- }
223
- const isDataMatch = currentItem.data && userInput.includes(currentItem.data);
224
- let isSubDataMatch = false;
225
- if (currentItem.subData) {
226
- if (Array.isArray(currentItem.subData)) {
227
- isSubDataMatch = currentItem.subData.some((item) => userInput.includes(item));
228
- }
229
- }
230
- if (isDataMatch || isSubDataMatch) {
231
- const responses = [];
232
- let nextIndex = currentScript.content.length;
233
- for (let i = currentScriptIndex.value + 1; i < currentScript.content.length; i++) {
234
- const item = currentScript.content[i];
235
- if (item.user === "i") {
236
- nextIndex = i;
237
- break;
238
- }
239
- if (item.user === "ai") {
240
- responses.push(item);
241
- }
242
- }
243
- return { responses, nextIndex };
244
- }
245
- return null;
246
- };
247
- vue.watch(
248
- () => props.value,
249
- (newVal, oldVal) => {
250
- if (!Array.isArray(newVal))
251
- return;
252
- if (newVal.length && JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
253
- chatList.value = newVal.map((item) => ({
254
- ...item,
255
- content: item.thinkContent ? item.content || "" : item.content || "",
256
- thinkContent: item.thinkContent || ""
257
- }));
258
- vue.nextTick(() => {
259
- requestAnimationFrame(() => {
260
- chatList.value.forEach((item, index) => {
261
- currIndex.value = index;
262
- if (item.thinkContent) {
263
- renderContent(item.thinkContent, "thinking");
264
- }
265
- if (item.reasoningContent) {
266
- renderContent(item.reasoningContent, "reasoning");
267
- }
268
- if (item.content) {
269
- renderContent(item.content, "main");
270
- }
271
- });
272
- });
273
- });
274
- }
275
- },
276
- { deep: true, immediate: true }
277
- );
278
- const openWebsocket = () => {
279
- if (!wsUrl) {
280
- throw new Error("wsUrl is required");
281
- }
282
- if (!token) {
283
- throw new Error("token is required");
284
- }
285
- let config = {
286
- token,
287
- wsUrl
288
- };
289
- TouchChatRobot.value = new chatRobot.ChatRobot(config);
290
- TouchChatRobot.value && TouchChatRobot.value.addListener("chatCrmSuccess", {
291
- msgCallback: chatCrmSuccess,
292
- statusCallback: () => {
293
- }
294
- });
295
- TouchChatRobot.value && TouchChatRobot.value.addListener("onMessageError", {
296
- msgCallback: () => {
297
- }
298
- });
299
- TouchChatRobot.value && TouchChatRobot.value.addListener("chatCrmError", {
300
- msgCallback: (data) => {
301
- console.log("AI \u5BF9\u8BDD\u8FDE\u63A5\u9519\u8BEF\u56DE\u8C03", data);
302
- }
303
- });
304
- TouchChatRobot.value.connect();
305
- };
306
- const chatCrmSuccess = (data) => {
307
- if (data && data.chatType === "response") {
308
- if (Array.isArray(data.chatInfo)) {
309
- let msgContentList = data.chatInfo.map((item) => item.msgContent);
310
- let msgContent = msgContentList.length ? msgContentList[0] : "";
311
- chatList.value.push({
312
- user: "u",
313
- type: "text",
314
- content: msgContent
315
- });
316
- }
317
- }
318
- };
319
- const openSSE = (userContent, insertIndex, type) => {
320
- try {
321
- if (isUnmounting.value)
322
- return;
323
- isChating.value = true;
324
- if (props.openSSECallback) {
325
- props.openSSECallback(fetchStream.FetchStream);
326
- return;
327
- }
328
- const currentAiMessage = chatList.value.find((item) => item.isChating);
329
- if (currentAiMessage) {
330
- currentAiMessage.isShowLike = true;
331
- currentAiMessage.isShowCopy = true;
332
- currentAiMessage.componentName = currentComponentName.value;
333
- }
334
- const chatId = (currentAiMessage == null ? void 0 : currentAiMessage.chatId) || "ai_" + crypto.randomUUID().replace(/-/gi, "");
335
- let aiContent = (currentAiMessage == null ? void 0 : currentAiMessage.content) || "";
336
- let reasoningContent = (currentAiMessage == null ? void 0 : currentAiMessage.reasoningContent) || "";
337
- let allAiContent = "";
338
- if (!currentAiMessage) {
339
- const chatItem = {
340
- chatId,
341
- user: "ai",
342
- type: "text",
343
- isChating: true,
344
- content: "",
345
- thinkContent: "",
346
- reasoningContent: "",
347
- thinkStatus: "thinking" /* THINKING */,
348
- thinkStartTime: Date.now(),
349
- isShowLike: true,
350
- isShowCopy: true,
351
- componentName: currentComponentName.value
352
- };
353
- if (insertIndex !== void 0 && insertIndex <= chatList.value.length) {
354
- chatList.value.splice(insertIndex, 0, chatItem);
355
- } else {
356
- chatList.value.push(chatItem);
357
- }
358
- }
359
- currIndex.value = chatList.value.findIndex((ele) => ele.chatId === chatId);
360
- fetchStream$1.value = new fetchStream.FetchStream({
361
- url: action != null ? action : "https://api.apiyi.com/v1/chat/completions",
362
- requestInit: {
363
- headers: headers != null ? headers : {
364
- "Content-Type": "application/json",
365
- Authorization: "Bearer sk-fe9MtODvds8wpzz05f3417Fe3e9641C1926e6fC588425dEd"
366
- },
367
- body: !isDeepSeek ? JSON.stringify(body) : JSON.stringify({
368
- model: enableDeepThinking.value ? "deepseek-reasoner" : "deepseek-v3",
369
- messages: [
370
- {
371
- role: "user",
372
- content: userContent
373
- }
374
- ],
375
- stream: true
376
- })
377
- },
378
- onmessage: (line) => {
379
- var _a, _b, _c, _d, _e, _f;
380
- if (isUnmounting.value)
381
- return;
382
- let dataString = "";
383
- if (line.length) {
384
- if (line.includes("data:")) {
385
- dataString = line.split("data:")[1];
386
- } else if (line.startsWith("{") && line.endsWith("}")) {
387
- dataString = line;
388
- }
389
- }
390
- dataString = dataString.trim();
391
- if (dataString && dataString.startsWith("{") && dataString.endsWith("}")) {
392
- try {
393
- const result = JSON.parse(dataString);
394
- const newAiMessage = chatList.value[currIndex.value];
395
- if (isDeepSeek) {
396
- if ((_c = (_b = (_a = result == null ? void 0 : result.choices) == null ? void 0 : _a[0]) == null ? void 0 : _b.delta) == null ? void 0 : _c.content) {
397
- aiContent += result.choices[0].delta.content;
398
- if ((newAiMessage == null ? void 0 : newAiMessage.thinkStatus) === "thinking" /* THINKING */) {
399
- newAiMessage.thinkStatus = "completed" /* COMPLETED */;
400
- newAiMessage.thinkTime = Date.now() - (newAiMessage.thinkStartTime || Date.now());
401
- }
402
- }
403
- if ((_f = (_e = (_d = result == null ? void 0 : result.choices) == null ? void 0 : _d[0]) == null ? void 0 : _e.delta) == null ? void 0 : _f.reasoning_content) {
404
- reasoningContent += result.choices[0].delta.reasoning_content;
405
- if (!(newAiMessage == null ? void 0 : newAiMessage.thinkStatus)) {
406
- newAiMessage.thinkStatus = "thinking" /* THINKING */;
407
- newAiMessage.thinkStartTime = Date.now();
408
- }
409
- }
410
- } else {
411
- if (aiChatType === "Flow") {
412
- if ((result == null ? void 0 : result.message) && (result == null ? void 0 : result.category) === "answer") {
413
- aiContent += result.message;
414
- }
415
- } else if (aiChatType === "Intelligent") {
416
- if ((result == null ? void 0 : result.content) && (result == null ? void 0 : result.category) === "task_stream_content") {
417
- aiContent += result.content;
418
- }
419
- if ((result == null ? void 0 : result.message) && (result == null ? void 0 : result.category) === "answer") {
420
- allAiContent = result.message;
421
- }
422
- }
423
- }
424
- if (chatList.value.some((ele) => ele.chatId === chatId)) {
425
- enqueueRender({
426
- mainContent: aiContent,
427
- thinkContent: "",
428
- reasoningContent
429
- });
430
- }
431
- if (type === 1) {
432
- scrollToBottom();
433
- }
434
- } catch (error) {
435
- console.error("\u89E3\u6790SSE\u6D88\u606F\u5931\u8D25:", error);
436
- }
437
- }
438
- },
439
- ondone: () => {
440
- vue.nextTick(() => {
441
- isChating.value = false;
442
- if (isUnmounting.value || !isMounted.value)
443
- return;
444
- const index = chatList.value.findIndex((ele) => ele.chatId === chatId);
445
- if (index !== -1 && chatList.value[index]) {
446
- chatList.value[index].isChating = false;
447
- chatList.value[index].componentName = currentComponentName.value;
448
- if (aiChatType === "Intelligent" && allAiContent) {
449
- afterSendMessage(allAiContent);
450
- }
451
- const waitForRenderComplete = () => {
452
- if (renderQueue.value.length === 0 && !isRendering.value) {
453
- if (chatList.value.length > 0 && isDeepSeek) {
454
- emit("sendMessage", JSON.parse(JSON.stringify(chatList.value)));
455
- }
456
- } else {
457
- requestAnimationFrame(waitForRenderComplete);
458
- }
459
- };
460
- waitForRenderComplete();
461
- }
462
- });
463
- },
464
- onabort: () => {
465
- handleAbort();
466
- },
467
- onerror: (response) => {
468
- handleError(response);
469
- }
470
- });
471
- } catch (error) {
472
- console.error("OpenSSE\u9519\u8BEF:", error);
473
- isChating.value = false;
474
- tools.showToast("\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5", "error", 3e3);
475
- }
476
- };
477
- const handleAbort = () => {
478
- isChating.value = false;
479
- if (isUnmounting.value)
480
- return;
481
- const currentAiMessage = chatList.value[currIndex.value];
482
- const hasContent = currentAiMessage && (currentAiMessage.content || currentAiMessage.thinkContent || currentAiMessage.reasoningContent);
483
- if (currentAiMessage) {
484
- if (currentAiMessage.thinkStatus === "thinking" /* THINKING */) {
485
- currentAiMessage.thinkStatus = "stopped" /* STOPPED */;
486
- currentAiMessage.thinkTime = Date.now() - (currentAiMessage.thinkStartTime || Date.now());
487
- }
488
- if (!hasContent) {
489
- const userMessageIndex = currIndex.value - 1;
490
- if (userMessageIndex >= 0 && chatList.value[userMessageIndex].user === "u") {
491
- chatList.value.splice(currIndex.value, 1);
492
- chatList.value.splice(userMessageIndex, 1);
493
- } else {
494
- chatList.value.splice(currIndex.value, 1);
495
- }
496
- } else {
497
- const updatedAiMessage = {
498
- ...currentAiMessage,
499
- isChating: false,
500
- content: currentAiMessage.content ? currentAiMessage.content + "\u3002\u3002\u3002" : "",
501
- thinkContent: currentAiMessage.thinkContent ? currentAiMessage.thinkContent + "\u3002\u3002\u3002" : void 0,
502
- reasoningContent: currentAiMessage.reasoningContent ? currentAiMessage.reasoningContent + "\u3002\u3002\u3002" : void 0,
503
- thinkStatus: currentAiMessage.thinkStatus
504
- };
505
- chatList.value.splice(currIndex.value, 1, updatedAiMessage);
506
- vue.nextTick(() => {
507
- renderContent(updatedAiMessage.thinkContent || "", "thinking");
508
- renderContent(updatedAiMessage.reasoningContent || "", "reasoning");
509
- renderContent(updatedAiMessage.content || "", "main");
510
- emit("sendMessage", [...chatList.value]);
511
- });
512
- return;
513
- }
514
- }
515
- if (chatList.value.length > 0) {
516
- emit("sendMessage", [...chatList.value]);
517
- }
518
- };
519
- const handleError = (response) => {
520
- if (isUnmounting.value)
521
- return;
522
- isChating.value = false;
523
- let errorMessage = "\u672A\u77E5\u9519\u8BEF";
524
- if (response instanceof Error) {
525
- console.error("API\u8BF7\u6C42\u9519\u8BEF:", response);
526
- errorMessage = response.message;
527
- } else if (response instanceof Response) {
528
- console.error("API\u8BF7\u6C42\u9519\u8BEF, \u54CD\u5E94\u72B6\u6001:", response.status, response.statusText);
529
- errorMessage = `\u8BF7\u6C42\u5931\u8D25: ${response.status} ${response.statusText}`;
530
- }
531
- const currentAiMessage = chatList.value[currIndex.value];
532
- if (currentAiMessage) {
533
- currentAiMessage.content = `<div style="color: red; display: flex; align-items: center;"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
534
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 15.5C11.6421 15.5 15 12.1421 15 8C15 3.85786 11.6421 0.5 7.5 0.5C3.35786 0.5 0 3.85786 0 8C0 12.1421 3.35786 15.5 7.5 15.5ZM9.7539 4.9506L10.5494 5.7461L8.2951 8.0001L10.5494 10.2539L9.7539 11.0494L7.5001 8.7951L5.2461 11.0494L4.4506 10.2539L6.7051 8.0001L4.4506 5.7461L5.2461 4.9506L7.5001 7.2051L9.7539 4.9506Z" fill="#F93920"/>
535
- </svg>${errorMessage}</div>`;
536
- currentAiMessage.isChating = false;
537
- currentAiMessage.componentName = "";
538
- currentAiMessage.isShowLike = false;
539
- currentAiMessage.isShowCopy = false;
540
- vue.nextTick(() => {
541
- renderContent(currentAiMessage.content || "", "main");
542
- emit("sendMessage", [...chatList.value]);
543
- });
544
- } else {
545
- tools.showToast(errorMessage, "error", 3e3);
546
- emit("sendMessage", [...chatList.value]);
547
- }
548
- };
549
- const enqueueRender = (data) => {
550
- if (isUnmounting.value || !isMounted.value)
551
- return;
552
- if (currIndex.value < 0 || currIndex.value >= chatList.value.length)
553
- return;
554
- renderQueue.value.push(data);
555
- if (!isRendering.value) {
556
- isRendering.value = true;
557
- processRenderQueue();
558
- }
559
- };
560
- const processRenderQueue = () => {
561
- if (isUnmounting.value || !isMounted.value) {
562
- renderQueue.value = [];
563
- isRendering.value = false;
564
- return;
565
- }
566
- if (renderQueue.value.length === 0) {
567
- isRendering.value = false;
568
- return;
569
- }
570
- requestAnimationFrame(() => {
571
- const data = renderQueue.value.shift();
572
- if (data) {
573
- formatMarkdown(data);
574
- }
575
- processRenderQueue();
576
- });
577
- };
578
- const formatMarkdown = (data) => {
579
- if (!isMounted.value)
580
- return;
581
- if (currIndex.value < 0 || currIndex.value >= chatList.value.length)
582
- return;
583
- const currentItem = chatList.value[currIndex.value];
584
- currentItem.thinkContent = data.thinkContent;
585
- currentItem.content = data.mainContent;
586
- currentItem.reasoningContent = data.reasoningContent;
587
- vue.nextTick(() => {
588
- const thinkingContainer = thinkingContentRef.value[currIndex.value];
589
- if (thinkingContainer) {
590
- if (data.thinkContent) {
591
- renderContent(data.thinkContent, "thinking");
592
- thinkingContainer.style.display = "block";
593
- thinkingContainer.style.visibility = "visible";
594
- } else {
595
- thinkingContainer.style.display = "none";
596
- thinkingContainer.style.visibility = "hidden";
597
- }
598
- }
599
- const reasoningContainer = reasoningContentRef.value[currIndex.value];
600
- if (reasoningContainer) {
601
- if (data.reasoningContent) {
602
- renderContent(data.reasoningContent, "reasoning");
603
- reasoningContainer.style.display = "block";
604
- reasoningContainer.style.visibility = "visible";
605
- } else {
606
- reasoningContainer.style.display = "none";
607
- reasoningContainer.style.visibility = "hidden";
608
- }
609
- }
610
- renderContent(data.mainContent, "main");
611
- });
612
- };
54
+ const ChatInputRef = vue.ref(null);
55
+ const {
56
+ chatList,
57
+ isChating,
58
+ inputValue,
59
+ enableDeepThinking,
60
+ activeAgentsName,
61
+ init,
62
+ sendMessage,
63
+ handleBeforeSend,
64
+ handleSend,
65
+ handleStop,
66
+ handleMessageAction,
67
+ saveEdit,
68
+ cancelEdit,
69
+ completeRendered,
70
+ handleAgentSelect,
71
+ update,
72
+ updateModule,
73
+ handleDragEnter,
74
+ handleDragLeave,
75
+ handleDrop,
76
+ handleScroll,
77
+ onMounted: chatOnMounted,
78
+ onBeforeUnmount: chatOnBeforeUnmount
79
+ } = useChat.useChat({
80
+ props,
81
+ emit,
82
+ scripts: scripts.value,
83
+ unmatchText,
84
+ modules: modules.value,
85
+ afterSend,
86
+ sendMessageInject,
87
+ beforeSend,
88
+ bottom,
89
+ stop,
90
+ chatContainer,
91
+ chatInputRef: ChatInputRef
92
+ });
93
+ const { copyWithFeedback } = useCopy.useCopy();
94
+ const modelChangeExternal = vue.inject("modelChange", () => {
95
+ });
96
+ vue.provide("modelChange", (item, index) => {
97
+ modelChangeExternal(item, index);
98
+ updateModule(item);
99
+ });
613
100
  const attachCopyButtons = (container) => {
614
101
  const codeBlocks = container.querySelectorAll("pre code");
615
102
  codeBlocks.forEach((codeBlock) => {
@@ -619,462 +106,247 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
619
106
  copyBtn.className = "touchchat-code-copy";
620
107
  copyBtn.addEventListener("click", () => {
621
108
  const code = codeBlock.textContent || "";
622
- navigator.clipboard.writeText(code).then(() => {
623
- tools.showToast("\u590D\u5236\u6210\u529F", "info", 2e3);
624
- copyBtn.textContent = "\u5DF2\u590D\u5236";
625
- setTimeout(() => {
626
- copyBtn.textContent = "";
627
- }, 2e3);
628
- }).catch((err) => {
629
- console.error("\u590D\u5236\u5931\u8D25:", err);
630
- tools.showToast("\u590D\u5236\u5931\u8D25", "error", 2e3);
631
- });
109
+ copyWithFeedback(code, copyBtn, "", "\u5DF2\u590D\u5236", 2e3);
632
110
  });
633
111
  pre.style.position = "relative";
634
112
  pre.appendChild(copyBtn);
635
113
  }
636
114
  });
637
115
  };
638
- const renderContent = (content, type, index) => {
639
- const renderIndex = index != null ? index : currIndex.value;
640
- if (renderIndex < 0 || renderIndex >= chatList.value.length)
641
- return;
642
- const refArrays = {
643
- main: htmlContentRef,
644
- thinking: thinkingContentRef,
645
- reasoning: reasoningContentRef
646
- };
647
- const processors = {
648
- main: (content2) => {
649
- var _a;
650
- return ((_a = markdown.default) == null ? void 0 : _a.render(content2, { isReasoning: false })) || "";
651
- },
652
- thinking: (content2) => {
653
- var _a;
654
- return ((_a = markdown.default) == null ? void 0 : _a.render(content2, { isReasoning: false })) || "";
655
- },
656
- reasoning: (content2) => {
657
- var _a;
658
- return ((_a = markdown.default) == null ? void 0 : _a.render(content2, { isReasoning: false })) || "";
659
- }
660
- };
661
- const container = refArrays[type].value[renderIndex];
662
- if (!container)
663
- return;
664
- container.innerHTML = processors[type](content || "");
665
- attachCopyButtons(container);
666
- };
667
- const sendMessage = (item) => {
668
- inputValue.value = item.name || "";
669
- handleBeforeSend();
116
+ const handleLikeSend = (value, idx) => {
117
+ handleSend(value);
118
+ vue.nextTick(() => {
119
+ chatList.value[idx].likeList = [];
120
+ });
670
121
  };
671
- const handleBeforeSend = () => {
672
- if (beforeSend) {
673
- const fn = beforeSend();
674
- if (fn && typeof fn.then === "function") {
675
- Promise.resolve(fn).then((res) => {
676
- if (res.result) {
677
- currentComponentName.value = res.componentName || "";
678
- handleSend();
679
- }
680
- }).catch((error) => {
681
- console.log(error);
682
- });
683
- } else {
684
- if (fn.result) {
685
- currentComponentName.value = fn.componentName || "";
686
- handleSend();
687
- }
688
- }
122
+ const handleSelectChange = (idx) => {
123
+ if (isSelectMode.value) {
124
+ chatList.value[idx].selecting = !chatList.value[idx].selecting;
689
125
  }
690
126
  };
691
- const handleSend = (content) => {
692
- var _a;
693
- emit("beforeSendMessage");
694
- if (!isDeepSeek.value && scripts && Array.isArray(scripts) && scripts.length > 0) {
695
- const userInput = content != null ? content : inputValue.value.trim();
696
- if (!userInput)
697
- return;
698
- const userChatId = `user_${Date.now()}`;
699
- const userMessage = {
700
- chatId: userChatId,
701
- user: "u",
702
- type: "text",
703
- content: userInput,
704
- isShowLike: false,
705
- isShowCopy: true
706
- };
707
- chatList.value.push(userMessage);
708
- emit("sendMessage", [...chatList.value]);
709
- vue.nextTick(() => {
710
- scrollToBottom();
711
- renderContent(userMessage.content, "main", chatList.value.length - 1);
712
- });
713
- const result = findMatchingScriptContent(userInput);
714
- if (result && result.responses.length > 0) {
715
- currentScriptIndex.value = result.nextIndex;
716
- const newAiMessages = [];
717
- result.responses.forEach((response, idx) => {
718
- const pauseMarker = Array.isArray(response.data) ? "\u200B".repeat(20) : "";
719
- const content2 = Array.isArray(response.data) ? response.data.join(pauseMarker) : response.data;
720
- const aiChatId = `ai_${Date.now()}_${idx}`;
721
- const aiMessage = {
722
- chatId: aiChatId,
723
- user: "ai",
724
- type: "text",
725
- content: content2 || "",
726
- componentName: response.type || "",
727
- isShowLike: true,
728
- isShowCopy: true
729
- };
730
- newAiMessages.push(aiMessage);
731
- });
732
- chatList.value.push(...newAiMessages);
733
- emit("sendMessage", [...chatList.value]);
734
- vue.nextTick(() => {
735
- scrollToBottom();
736
- newAiMessages.forEach((msg) => {
737
- const msgIndex = chatList.value.findIndex((item) => item.chatId === msg.chatId);
738
- if (msgIndex !== -1) {
739
- renderContent(msg.content, "main", msgIndex);
740
- }
741
- });
742
- });
743
- } else {
744
- const defaultAiChatId = `ai_${Date.now()}`;
745
- const defaultAiMessage = {
746
- chatId: defaultAiChatId,
747
- user: "ai",
748
- type: "text",
749
- content: robotUnmatched,
750
- isShowLike: true,
751
- isShowCopy: true
752
- };
753
- chatList.value.push(defaultAiMessage);
754
- emit("sendMessage", [...chatList.value]);
755
- vue.nextTick(() => {
756
- scrollToBottom();
757
- const msgIndex = chatList.value.findIndex((item) => item.chatId === defaultAiChatId);
758
- if (msgIndex !== -1) {
759
- renderContent(defaultAiMessage.content, "main", msgIndex);
760
- }
761
- });
762
- }
763
- inputValue.value = "";
764
- } else {
765
- if (content) {
766
- inputValue.value = content;
767
- }
768
- if (isChating.value || !inputValue.value.trim())
769
- return;
770
- const userChatId = "user_" + crypto.randomUUID().replace(/-/gi, "");
771
- const userMessage = {
772
- chatId: userChatId,
773
- user: "u",
774
- type: "text",
775
- content: inputValue.value
776
- };
777
- sendMessageInject(inputValue.value);
778
- chatList.value.push(userMessage);
779
- const index = chatList.value.length - 1;
780
- vue.nextTick(() => {
781
- renderContent(userMessage.content, "main", index);
782
- scrollToBottom();
783
- });
784
- if (connectionType === "SSE") {
785
- openSSE(inputValue.value, index + 1, 1);
786
- } else if (connectionType === "Websocket") {
787
- let chatInfo = [
788
- {
789
- type: "text",
790
- msgContent: inputValue.value
791
- }
792
- ];
793
- (_a = TouchChatRobot.value) == null ? void 0 : _a.send(chatInfo);
794
- }
795
- inputValue.value = "";
796
- }
127
+ const toggleSidebarClick = (item, index) => {
128
+ emit("toggleSidebar", item, index);
797
129
  };
798
- const handleStop = () => {
799
- var _a, _b;
800
- (_a = fetchStream$1.value) == null ? void 0 : _a.abort();
801
- const aiIndex = chatList.value.findIndex((item) => item.isChating);
802
- if (aiIndex !== -1) {
803
- const currentAiMessage = chatList.value[aiIndex];
804
- if ((_b = currentAiMessage.content) == null ? void 0 : _b.trim()) {
805
- vue.nextTick(() => {
806
- chatList.value[aiIndex] = {
807
- ...currentAiMessage,
808
- content: currentAiMessage.content + "...",
809
- isChating: false
810
- };
811
- renderContent(chatList.value[aiIndex].content, "main", aiIndex);
812
- emit("sendMessage", chatList.value);
813
- });
814
- } else {
815
- if (aiIndex > 0) {
816
- const userMessageIndex = aiIndex - 1;
817
- if (chatList.value[userMessageIndex].user === "u") {
818
- chatList.value.splice(userMessageIndex, 2);
819
- } else {
820
- chatList.value.splice(aiIndex, 1);
821
- }
822
- } else {
823
- chatList.value.splice(aiIndex, 1);
824
- }
825
- }
826
- } else {
827
- const lastIndex = chatList.value.length - 1;
828
- if (lastIndex >= 0 && chatList.value[lastIndex].user === "u") {
829
- chatList.value.pop();
830
- }
831
- }
832
- isChating.value = false;
130
+ const openSideBar = (item, index) => {
131
+ emit("openSideBar", item, index);
833
132
  };
834
- const scrollToBottom = index.throttle(300, () => {
835
- if (!isMounted.value || isUnmounting.value)
836
- return;
837
- const endEl = document.querySelector(".to-chat-item:last-child");
838
- if (endEl == null ? void 0 : endEl.scrollIntoView) {
839
- endEl.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
840
- }
841
- });
842
- const handleMessageAction = (action2, index) => {
843
- const message = chatList.value[index];
844
- if (!message)
845
- return;
846
- switch (action2) {
847
- case "copy" /* COPY */:
848
- navigator.clipboard.writeText(message.content).then(() => {
849
- tools.showToast("\u590D\u5236\u6210\u529F", "info");
850
- }).catch((err) => {
851
- console.error("\u590D\u5236\u5931\u8D25:", err);
852
- tools.showToast("\u590D\u5236\u5931\u8D25", "error");
853
- });
854
- break;
855
- case "edit" /* EDIT */:
856
- message.isEditing = true;
857
- message.editContent = message.content;
858
- break;
859
- case "delete" /* DELETE */:
860
- messageUtils.deleteMessageChain(index);
861
- emit("sendMessage", chatList.value);
862
- break;
863
- case "retry" /* RETRY */: {
864
- const aiMessage = chatList.value[index];
865
- const userMessageIndex = index - 1;
866
- const userMessage = chatList.value[userMessageIndex];
867
- if (userMessage && userMessage.user === "u") {
868
- const updatedAiMessage = {
869
- ...aiMessage,
870
- content: "",
871
- thinkContent: "",
872
- reasoningContent: "",
873
- isLiked: false,
874
- isDisliked: false,
875
- isChating: true,
876
- chatId: aiMessage.chatId,
877
- user: aiMessage.user,
878
- type: aiMessage.type,
879
- thinkStatus: "completed" /* COMPLETED */,
880
- thinkStartTime: 0,
881
- thinkEndTime: 0
882
- };
883
- chatList.value.splice(index, 1, updatedAiMessage);
884
- vue.nextTick(() => {
885
- if (htmlContentRef.value[index])
886
- htmlContentRef.value[index].innerHTML = "";
887
- if (thinkingContentRef.value[index])
888
- thinkingContentRef.value[index].innerHTML = "";
889
- if (reasoningContentRef.value[index])
890
- reasoningContentRef.value[index].innerHTML = "";
891
- setTimeout(() => {
892
- openSSE(userMessage.content || "", index, 2);
893
- }, 50);
894
- });
895
- }
896
- break;
897
- }
898
- case "like" /* LIKE */:
899
- messageUtils.updateMessage(index, {
900
- isLiked: true,
901
- isDisliked: false
902
- });
903
- break;
904
- case "dislike" /* DISLIKE */:
905
- messageUtils.updateMessage(index, {
906
- isLiked: false,
907
- isDisliked: true
908
- });
909
- break;
133
+ const handleMessageQuote = (item, index) => {
134
+ if (ChatInputRef.value) {
135
+ ChatInputRef.value.updateQuoteData(item, index);
910
136
  }
911
137
  };
912
- const saveEdit = (index, newContent) => {
913
- const message = chatList.value[index];
914
- if (!message || !message.editContent)
915
- return;
916
- chatList.value[index] = {
917
- ...message,
918
- content: newContent,
919
- isEditing: false,
920
- editContent: void 0
921
- };
922
- vue.nextTick(() => {
923
- renderContent(message.content, "main", index);
924
- });
925
- if (index + 1 < chatList.value.length && chatList.value[index + 1].user === "ai") {
926
- chatList.value.splice(index + 1, 1);
138
+ const itemUploadFile = (_item, index) => {
139
+ if (ChatInputRef.value) {
140
+ ChatInputRef.value.itemUploadFile(index, "drop");
927
141
  }
928
- openSSE(newContent, index + 1);
929
- emit("sendMessage", chatList.value);
930
- };
931
- const cancelEdit = (index) => {
932
- const message = chatList.value[index];
933
- if (!message)
934
- return;
935
- message.isEditing = false;
936
- message.editContent = "";
937
- vue.nextTick(() => {
938
- renderContent(message.content, "main", index);
939
- });
940
142
  };
941
- vue.onMounted(async () => {
942
- init();
943
- isMounted.value = true;
944
- vue.watch(
945
- isDeepSeek,
946
- () => {
947
- init();
948
- },
949
- { immediate: false }
950
- );
143
+ const setInputValue = vue.inject("setInput");
144
+ vue.onMounted(() => {
145
+ setInputValue.value = (value) => {
146
+ inputValue.value = value;
147
+ };
148
+ chatOnMounted();
951
149
  vue.watch(
952
150
  () => scripts,
953
151
  () => {
954
- if (!isDeepSeek.value) {
955
- init();
956
- }
152
+ init();
957
153
  },
958
154
  { deep: true, immediate: false }
959
155
  );
960
156
  });
961
157
  vue.onBeforeUnmount(() => {
962
- if (!isUnmounting.value) {
963
- isUnmounting.value = true;
964
- if (fetchStream$1.value) {
965
- fetchStream$1.value.abort();
966
- fetchStream$1.value = null;
967
- }
968
- if (TouchChatRobot.value) {
969
- TouchChatRobot.value.close();
970
- TouchChatRobot.value = void 0;
971
- }
972
- isMounted.value = false;
973
- renderQueue.value = [];
974
- htmlContentRef.value = [];
975
- thinkingContentRef.value = [];
976
- reasoningContentRef.value = [];
977
- }
158
+ chatOnBeforeUnmount();
978
159
  });
979
- vue.provide("parentContext", {
980
- methods: {
981
- sendMessage,
982
- handleMessageAction
983
- }
160
+ vue.provide("touchchat", {
161
+ send: sendMessage,
162
+ retry: handleMessageAction
984
163
  });
985
164
  __expose({
986
- handleSendOut: (value) => {
987
- handleSend(value);
988
- }
165
+ send: (value, fileList, auto, type) => {
166
+ handleSend(value, fileList, auto, type);
167
+ },
168
+ handleAgentSelect,
169
+ retry: (index) => {
170
+ handleMessageAction(types.MessageAction.RETRY, index);
171
+ },
172
+ update
989
173
  });
990
174
  return (_ctx, _cache) => {
991
- return vue.openBlock(), vue.createElementBlock("div", { class: "touchchat-main" }, [
175
+ return vue.openBlock(), vue.createElementBlock("div", {
176
+ class: "touchchat-main",
177
+ onDragover: vue.withModifiers(() => {
178
+ }, ["prevent"]),
179
+ onDragenter: vue.withModifiers(vue.unref(handleDragEnter), ["prevent"]),
180
+ onDragleave: vue.unref(handleDragLeave),
181
+ onDrop: vue.withModifiers(vue.unref(handleDrop), ["prevent"])
182
+ }, [
992
183
  vue.createElementVNode("div", {
993
184
  ref_key: "chatContainer",
994
185
  ref: chatContainer,
995
- class: "touchchat-dialog"
186
+ class: "touchchat-dialog",
187
+ onScroll: vue.unref(handleScroll)
996
188
  }, [
997
- vue.renderSlot(_ctx.$slots, "tabView"),
998
- chatList.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
189
+ vue.renderSlot(_ctx.$slots, "top"),
190
+ vue.unref(chatList).length === 0 ? (vue.openBlock(), vue.createElementBlock("div", {
999
191
  key: 0,
1000
192
  class: "touchchat-welcome"
1001
193
  }, [
1002
194
  vue.renderSlot(_ctx.$slots, "welcome", {}, () => [
1003
- vue.createVNode(HelloChat_vue_vue_type_script_setup_true_lang.default, { onSendMessage: sendMessage })
195
+ vue.createVNode(HelloChat.default, { onSendMessage: vue.unref(sendMessage) }, null, 8, ["onSendMessage"])
1004
196
  ])
1005
- ])) : vue.createCommentVNode("", true),
197
+ ])) : vue.createCommentVNode("v-if", true),
1006
198
  vue.createElementVNode("div", { class: "touchchat-dialog-content" }, [
1007
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(chatList.value, (item, index) => {
1008
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1009
- key: item.chatId
1010
- }, [
1011
- item.user === "u" ? (vue.openBlock(), vue.createBlock(UserMessage_vue_vue_type_script_setup_true_lang.default, {
1012
- key: 0,
1013
- item,
1014
- index,
1015
- onCopy: ($event) => handleMessageAction("copy" /* COPY */, index),
1016
- onEdit: ($event) => handleMessageAction("edit" /* EDIT */, index),
1017
- onDelete: ($event) => handleMessageAction("delete" /* DELETE */, index),
1018
- onSaveEdit: saveEdit,
1019
- onCancelEdit: ($event) => cancelEdit(index)
1020
- }, {
1021
- userAvatar: vue.withCtx(() => [
1022
- vue.renderSlot(_ctx.$slots, "userAvatar")
1023
- ]),
1024
- messageActions: vue.withCtx(() => [
1025
- vue.renderSlot(_ctx.$slots, "messageActions", {
1026
- item,
1027
- index
1028
- })
1029
- ]),
1030
- _: 2
1031
- }, 1032, ["item", "index", "onCopy", "onEdit", "onDelete", "onCancelEdit"])) : (vue.openBlock(), vue.createBlock(AiMessage_vue_vue_type_script_setup_true_lang.default, {
1032
- key: 1,
1033
- item,
1034
- index,
1035
- "enable-deep-thinking": enableDeepThinking.value,
1036
- onCopy: ($event) => handleMessageAction("copy" /* COPY */, index),
1037
- onRetry: ($event) => handleMessageAction("retry" /* RETRY */, index),
1038
- onLike: ($event) => handleMessageAction("like" /* LIKE */, index),
1039
- onDislike: ($event) => handleMessageAction("dislike" /* DISLIKE */, index),
1040
- onContentRendered: attachCopyButtons,
1041
- onCompleteRendered: completeRendered,
1042
- onToggleSidebar: toggleSidebarClick
1043
- }, {
1044
- aiMessageContent: vue.withCtx(() => [
1045
- vue.renderSlot(_ctx.$slots, "aiMessageContent", {
199
+ (vue.openBlock(true), vue.createElementBlock(
200
+ vue.Fragment,
201
+ null,
202
+ vue.renderList(vue.unref(chatList), (item, index) => {
203
+ return vue.openBlock(), vue.createElementBlock("div", {
204
+ key: item.chatId,
205
+ class: "touchchat-list-box"
206
+ }, [
207
+ vue.unref(isSelectMode) ? (vue.openBlock(), vue.createElementBlock("div", {
208
+ key: 0,
209
+ class: "touchchat-list-check"
210
+ }, [
211
+ vue.withDirectives(vue.createElementVNode("input", {
212
+ "onUpdate:modelValue": ($event) => item.selecting = $event,
213
+ class: "input-check",
214
+ type: "checkbox"
215
+ }, null, 8, ["onUpdate:modelValue"]), [
216
+ [vue.vModelCheckbox, item.selecting]
217
+ ])
218
+ ])) : vue.createCommentVNode("v-if", true),
219
+ vue.createElementVNode("div", {
220
+ class: vue.normalizeClass(["touchchat-list-content", [item.selecting ? "status-select" : "", vue.unref(isSelectMode) ? "select-mode" : ""]]),
221
+ onClick: ($event) => handleSelectChange(index)
222
+ }, [
223
+ item.user === "u" ? (vue.openBlock(), vue.createBlock(UserMessage.default, {
224
+ key: 0,
1046
225
  item,
1047
- index
1048
- })
1049
- ]),
1050
- aiAvatar: vue.withCtx(() => [
1051
- vue.renderSlot(_ctx.$slots, "aiAvatar")
1052
- ]),
1053
- messageActions: vue.withCtx(() => [
1054
- vue.renderSlot(_ctx.$slots, "messageActions", {
226
+ index,
227
+ onUserMessageFileList: itemUploadFile,
228
+ onCopy: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).COPY, index),
229
+ onEdit: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).EDIT, index),
230
+ onDelete: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).DELETE, index),
231
+ onSaveEdit: vue.unref(saveEdit),
232
+ onCancelEdit: ($event) => vue.unref(cancelEdit)(index),
233
+ onWithDraw: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).WITHDRAW, index)
234
+ }, {
235
+ userAvatar: vue.withCtx(() => [
236
+ vue.renderSlot(_ctx.$slots, "userAvatar")
237
+ ]),
238
+ fn: vue.withCtx(() => [
239
+ vue.renderSlot(_ctx.$slots, "fn", {
240
+ item,
241
+ index
242
+ })
243
+ ]),
244
+ _: 2
245
+ /* DYNAMIC */
246
+ }, 1032, ["item", "index", "onCopy", "onEdit", "onDelete", "onSaveEdit", "onCancelEdit", "onWithDraw"])) : vue.createCommentVNode("v-if", true),
247
+ item.user === "withDraw" ? (vue.openBlock(), vue.createElementBlock("div", {
248
+ key: 1,
249
+ class: "touchchat-dialog-withDraw"
250
+ }, "\u4F60\u64A4\u56DE\u4E86\u4E00\u6761\u6D88\u606F")) : vue.createCommentVNode("v-if", true),
251
+ item.user === "ai" ? (vue.openBlock(), vue.createBlock(AiMessage.default, {
252
+ key: 2,
1055
253
  item,
1056
- index
1057
- })
1058
- ]),
1059
- _: 2
1060
- }, 1032, ["item", "index", "enable-deep-thinking", "onCopy", "onRetry", "onLike", "onDislike"]))
1061
- ], 64);
1062
- }), 128))
254
+ index,
255
+ "enable-deep-thinking": vue.unref(enableDeepThinking),
256
+ "has-retry": vue.unref(activeAgentsName) || scriptsLength.value > 0 ? false : true,
257
+ onCopy: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).COPY, index),
258
+ onRetry: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).RETRY, index),
259
+ onLike: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).LIKE, index),
260
+ onQuote: handleMessageQuote,
261
+ onDislike: ($event) => vue.unref(handleMessageAction)(vue.unref(types.MessageAction).DISLIKE, index),
262
+ onContentRendered: attachCopyButtons,
263
+ onCompleteRendered: vue.unref(completeRendered),
264
+ onToggleSidebar: toggleSidebarClick,
265
+ onOpenSideBar: openSideBar,
266
+ onSend: (value) => handleLikeSend(value, index)
267
+ }, {
268
+ aimsg: vue.withCtx(() => [
269
+ vue.renderSlot(_ctx.$slots, "aimsg", {
270
+ item,
271
+ index
272
+ })
273
+ ]),
274
+ msg: vue.withCtx(() => [
275
+ vue.renderSlot(_ctx.$slots, "msg", {
276
+ item,
277
+ index
278
+ })
279
+ ]),
280
+ aiAvatar: vue.withCtx(() => [
281
+ vue.renderSlot(_ctx.$slots, "aiAvatar")
282
+ ]),
283
+ fn: vue.withCtx(() => [
284
+ vue.renderSlot(_ctx.$slots, "fn", {
285
+ item,
286
+ index
287
+ })
288
+ ]),
289
+ extendsFn: vue.withCtx(() => [
290
+ vue.renderSlot(_ctx.$slots, "extendsFn", {
291
+ item,
292
+ index
293
+ })
294
+ ]),
295
+ mayLike: vue.withCtx(() => [
296
+ vue.renderSlot(_ctx.$slots, "mayLike", {
297
+ item,
298
+ index
299
+ })
300
+ ]),
301
+ _: 2
302
+ /* DYNAMIC */
303
+ }, 1032, ["item", "index", "enable-deep-thinking", "has-retry", "onCopy", "onRetry", "onLike", "onDislike", "onCompleteRendered", "onSend"])) : vue.createCommentVNode("v-if", true)
304
+ ], 10, ["onClick"])
305
+ ]);
306
+ }),
307
+ 128
308
+ /* KEYED_FRAGMENT */
309
+ ))
1063
310
  ])
1064
- ], 512),
1065
- vue.renderSlot(_ctx.$slots, "chatInput", {}, () => [
1066
- vue.createVNode(ChatInput_vue_vue_type_script_setup_true_lang.default, {
1067
- "input-value": inputValue.value,
1068
- "onUpdate:inputValue": ($event) => inputValue.value = $event,
1069
- "enable-deep-thinking": enableDeepThinking.value,
1070
- "onUpdate:enableDeepThinking": ($event) => enableDeepThinking.value = $event,
1071
- "is-chating": isChating.value,
1072
- onSend: handleBeforeSend,
1073
- onStop: handleStop,
1074
- onToggleDeepThinking: (val) => enableDeepThinking.value = val
1075
- }, null, 8, ["input-value", "onUpdate:inputValue", "enable-deep-thinking", "onUpdate:enableDeepThinking", "is-chating", "onToggleDeepThinking"])
311
+ ], 40, ["onScroll"]),
312
+ _ctx.$slots.shortcut ? (vue.openBlock(), vue.createElementBlock("div", {
313
+ key: 0,
314
+ class: "touchchat-edit-shortcut"
315
+ }, [
316
+ vue.renderSlot(_ctx.$slots, "shortcut")
317
+ ])) : vue.createCommentVNode("v-if", true),
318
+ vue.renderSlot(_ctx.$slots, "edit", {}, () => [
319
+ vue.createVNode(ChatInput.default, {
320
+ ref_key: "ChatInputRef",
321
+ ref: ChatInputRef,
322
+ "input-value": vue.unref(inputValue),
323
+ "onUpdate:inputValue": ($event) => vue.isRef(inputValue) ? inputValue.value = $event : null,
324
+ "enable-deep-thinking": vue.unref(enableDeepThinking),
325
+ "onUpdate:enableDeepThinking": ($event) => vue.isRef(enableDeepThinking) ? enableDeepThinking.value = $event : null,
326
+ "is-chating": vue.unref(isChating),
327
+ onSend: vue.unref(handleBeforeSend),
328
+ onStop: vue.unref(handleStop),
329
+ onToggleDeepThinking: (val) => enableDeepThinking.value = val,
330
+ onModuleInfo: (_info) => {
331
+ }
332
+ }, {
333
+ editTop: vue.withCtx(() => [
334
+ vue.renderSlot(_ctx.$slots, "editTop")
335
+ ]),
336
+ editFn: vue.withCtx(() => [
337
+ vue.renderSlot(_ctx.$slots, "editFn")
338
+ ]),
339
+ editSubmitRight: vue.withCtx(() => [
340
+ vue.renderSlot(_ctx.$slots, "editSubmitRight")
341
+ ]),
342
+ editSubmitLeft: vue.withCtx(() => [
343
+ vue.renderSlot(_ctx.$slots, "editSubmitLeft")
344
+ ]),
345
+ _: 3
346
+ /* FORWARDED */
347
+ }, 8, ["input-value", "onUpdate:inputValue", "enable-deep-thinking", "onUpdate:enableDeepThinking", "is-chating", "onSend", "onStop", "onToggleDeepThinking"])
1076
348
  ])
1077
- ]);
349
+ ], 40, ["onDragover", "onDragenter", "onDragleave", "onDrop"]);
1078
350
  };
1079
351
  }
1080
352
  });