@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,9 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var TouchChat_vue_vue_type_script_setup_true_lang = require('./TouchChat.vue2.js');
7
- var HistorySidebar_vue_vue_type_script_setup_true_lang = require('./HistorySidebar.vue2.js');
8
- var SiderBarView_vue_vue_type_script_setup_true_lang = require('./SiderBarView.vue2.js');
6
+ var TouchChat = require('./TouchChat.vue.js');
7
+ var TouchAgent = require('./TouchAgent.vue.js');
8
+ var HistorySidebar = require('./HistorySidebar.vue.js');
9
+ var SiderBarView = require('./SiderBarView.vue.js');
9
10
 
10
11
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
11
12
  __name: "TouchHistory",
@@ -16,66 +17,164 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
17
  isSidebarCollapsed: false,
17
18
  actionMenuVisible: {},
18
19
  mockMessages: [],
19
- toggleSidebarFlag: false
20
+ toggleSidebarFlag: false,
21
+ agentsType: "",
22
+ clickCreateNum: 0
20
23
  });
21
- const historyContainer = vue.ref(null);
24
+ const watchHistoryData = vue.ref([]);
25
+ const watchHistoryDetail = vue.ref([]);
22
26
  const chatComponent = vue.ref();
23
- const isNotHeader = vue.inject("isNotHeader", false);
24
- const isDeepSeek = vue.inject("isDeepSeek", true);
25
- const scripts = vue.inject("scripts", []);
26
- const getIsDeepSeekValue = () => {
27
- return scripts.length > 0 ? false : typeof isDeepSeek === "boolean" ? isDeepSeek : isDeepSeek.value;
27
+ const layout = vue.inject("layout", "side, think, upload, chain");
28
+ const isNotHeader = !layout.includes("side");
29
+ const scripts = vue.inject("scripts", vue.ref([]));
30
+ const agents = vue.inject("agents", []);
31
+ const agentsInfo = vue.ref();
32
+ const agentInfo = vue.inject("agentInfo", vue.ref({ list: [], url: "", headers: {} }));
33
+ const iIsAgent = vue.ref(false);
34
+ vue.watch(
35
+ agentInfo,
36
+ (newVal) => {
37
+ iIsAgent.value = newVal.list.length > 0;
38
+ },
39
+ { immediate: true, deep: true }
40
+ );
41
+ const updateSharedData = (item) => {
42
+ var _a, _b;
43
+ agentsInfo.value = item;
44
+ if (chatComponent.value) {
45
+ (_b = (_a = chatComponent.value) == null ? void 0 : _a.handleAgentSelect) == null ? void 0 : _b.call(_a, item);
46
+ }
47
+ };
48
+ vue.provide("updateSharedData", updateSharedData);
49
+ const STORAGE_KEYS = {
50
+ CHAT_HISTORY: scripts.value.length === 0 ? "chatHistory" : "robotHistory",
51
+ SIDEBAR_STATE: "sidebarCollapsed"
52
+ };
53
+ const saveToLocalStorage = () => {
54
+ localStorage.setItem(STORAGE_KEYS.CHAT_HISTORY, JSON.stringify(state.chatHistory));
55
+ localStorage.setItem(STORAGE_KEYS.SIDEBAR_STATE, JSON.stringify(state.isSidebarCollapsed));
56
+ };
57
+ const createNewChat = (title = "\u65B0\u5BF9\u8BDD", messageList = [], type) => {
58
+ var _a;
59
+ let agentsId = "";
60
+ if (agents.length > 0) {
61
+ agentsId = ((_a = agents.find((item) => item.name === title)) == null ? void 0 : _a.id) || "";
62
+ }
63
+ const newChat = {
64
+ // id: Date.now().toString(),
65
+ id: agentsId ? agentsId : (Math.floor(Math.random() * 89999999) + 1e7).toString(),
66
+ title,
67
+ time: /* @__PURE__ */ new Date(),
68
+ messages: messageList,
69
+ type: type ? type : ""
70
+ };
71
+ state.chatHistory.unshift(newChat);
72
+ saveToLocalStorage();
73
+ return newChat;
28
74
  };
29
75
  const loadFromLocalStorage = () => {
76
+ var _a, _b;
30
77
  const savedCollapseState = localStorage.getItem(STORAGE_KEYS.SIDEBAR_STATE);
31
78
  if (savedCollapseState) {
32
79
  state.isSidebarCollapsed = JSON.parse(savedCollapseState);
33
80
  }
81
+ if (scripts.value.length > 0) {
82
+ localStorage.setItem(STORAGE_KEYS.CHAT_HISTORY, "[]");
83
+ localStorage.setItem("activeAgentsName", "");
84
+ }
34
85
  const savedHistory = localStorage.getItem(STORAGE_KEYS.CHAT_HISTORY);
35
- if (!getIsDeepSeekValue()) {
36
- state.chatHistory = setHistoryData.value;
37
- if (state.chatHistory.length > 0) {
38
- state.activeChat = state.chatHistory[0].id;
39
- }
40
- } else if (savedHistory && getIsDeepSeekValue()) {
41
- state.chatHistory = JSON.parse(savedHistory);
42
- if (state.chatHistory.length > 0) {
86
+ const historyData = JSON.parse(savedHistory || "[]");
87
+ if (agents.length > 0 && !historyData.length) {
88
+ agents.forEach((item) => {
89
+ const agentsList = [
90
+ {
91
+ chatId: item.id,
92
+ user: "ai",
93
+ type: "text",
94
+ isShowLike: true,
95
+ content: (item == null ? void 0 : item.intro) || "\u6211\u662FAI\u52A9\u624B\uFF0C\u6211\u53EF\u4EE5\u56DE\u7B54\u4F60\u7684\u95EE\u9898\uFF0C\u4F60\u53EF\u4EE5\u548C\u6211\u804A\u5929\uFF0C\u4E5F\u53EF\u4EE5\u95EE\u6211\u95EE\u9898\u3002",
96
+ msgList: []
97
+ }
98
+ ];
99
+ createNewChat(item.name, agentsList, item.name);
100
+ });
101
+ }
102
+ if (watchHistoryData.value.length > 0) {
103
+ state.chatHistory = watchHistoryData.value;
104
+ } else if (historyData.length > 0) {
105
+ state.chatHistory = historyData;
106
+ }
107
+ if (!state.activeChat && state.chatHistory.length > 0) {
108
+ if (agents.length > 0) {
109
+ const firstId = agents[0].id;
110
+ state.activeChat = (_b = (_a = state.chatHistory.find((h) => h.id === firstId)) == null ? void 0 : _a.id) != null ? _b : state.chatHistory[state.chatHistory.length - 1].id;
111
+ } else {
43
112
  state.activeChat = state.chatHistory[0].id;
44
113
  }
45
- } else {
46
- createNewChat("AI\u57FA\u7840\u95EE\u7B54");
114
+ }
115
+ if (scripts.value.length > 0 && agents.length === 0 && state.chatHistory.length === 0) {
116
+ const seeded = createNewChat("\u5BF9\u8BDD");
117
+ state.activeChat = seeded.id;
47
118
  }
48
119
  };
49
- const currentChatMessages = vue.computed(() => {
50
- if (!getIsDeepSeekValue() && scripts.length === 0) {
120
+ const historyList = vue.inject("historyList", []);
121
+ const setHistoryData = vue.ref(Array.isArray(historyList) ? historyList : typeof historyList === "object" && historyList ? historyList : []);
122
+ const computedHistoryData = vue.computed(() => {
123
+ if (setHistoryData.value.length) {
124
+ return setHistoryData.value;
125
+ }
126
+ return [];
127
+ });
128
+ vue.watch(
129
+ computedHistoryData,
130
+ (newVal) => {
131
+ watchHistoryData.value = newVal;
132
+ state.chatHistory = newVal;
133
+ loadFromLocalStorage();
134
+ },
135
+ { immediate: true }
136
+ );
137
+ const historyDetail = vue.inject("historyDetail", []);
138
+ const setMessageDetail = vue.ref(Array.isArray(historyDetail) ? historyDetail : typeof historyDetail === "object" && historyDetail ? historyDetail : []);
139
+ const computedHistoryDetail = vue.computed(() => {
140
+ if (setMessageDetail.value.length) {
51
141
  return setMessageDetail.value;
52
142
  }
53
- if (!state.activeChat && getIsDeepSeekValue())
143
+ return [];
144
+ });
145
+ vue.watch(
146
+ computedHistoryDetail,
147
+ (newVal) => {
148
+ watchHistoryDetail.value = newVal;
149
+ },
150
+ { immediate: true }
151
+ );
152
+ const messageItem = vue.ref({ user: "u", type: "", content: "", msgList: [] });
153
+ const messageIndex = vue.ref(0);
154
+ const currentChatMessages = vue.computed(() => {
155
+ if (watchHistoryDetail.value.length) {
156
+ return watchHistoryDetail.value;
157
+ }
158
+ if (!state.activeChat)
54
159
  return [];
55
- if (!setMessageDetail.value.length && !setHistoryData.value.length && getIsDeepSeekValue() || scripts.length > 0 && !getIsDeepSeekValue()) {
160
+ if (!watchHistoryDetail.value.length && !watchHistoryData.value.length || watchHistoryData.value.length) {
56
161
  const currentChat = state.chatHistory.find((item) => item.id === state.activeChat);
57
162
  return (currentChat == null ? void 0 : currentChat.messages) || [];
58
163
  } else {
59
- return setMessageDetail.value;
164
+ return watchHistoryDetail.value;
60
165
  }
61
166
  });
62
- const historyData = vue.inject("historyData", []);
63
- const setHistoryData = vue.ref(Array.isArray(historyData) ? historyData : typeof historyData === "object" && (historyData == null ? void 0 : historyData.value) ? historyData.value : []);
64
- const messageDetail = vue.inject("messageDetail", []);
65
- const setMessageDetail = vue.ref(Array.isArray(messageDetail) ? messageDetail : typeof messageDetail === "object" && (messageDetail == null ? void 0 : messageDetail.value) ? messageDetail.value : []);
66
- const messageItem = vue.ref({ user: "", type: "", content: "" });
67
- const messageIndex = vue.ref(0);
68
167
  vue.watch(
69
168
  () => {
70
- if (typeof historyData === "object" && (historyData == null ? void 0 : historyData.value) !== void 0) {
71
- return historyData.value;
169
+ if (typeof historyList === "object" && historyList !== void 0) {
170
+ return historyList;
72
171
  }
73
- return historyData;
172
+ return historyList;
74
173
  },
75
174
  (newVal) => {
76
- if (newVal && Array.isArray(newVal)) {
77
- setHistoryData.value = newVal;
78
- if (!isDeepSeek && scripts.length === 0) {
175
+ if (newVal && Array.isArray(newVal) && newVal.length) {
176
+ watchHistoryData.value = newVal;
177
+ if (!scripts.value.length) {
79
178
  state.chatHistory = newVal;
80
179
  if (state.chatHistory.length > 0 && !state.activeChat) {
81
180
  state.activeChat = state.chatHistory[0].id;
@@ -87,14 +186,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
87
186
  );
88
187
  vue.watch(
89
188
  () => {
90
- if (typeof messageDetail === "object" && (messageDetail == null ? void 0 : messageDetail.value) !== void 0) {
91
- return messageDetail.value;
189
+ if (typeof historyDetail === "object" && historyDetail !== void 0) {
190
+ return historyDetail;
92
191
  }
93
- return messageDetail;
192
+ return historyDetail;
94
193
  },
95
194
  (newVal) => {
96
195
  if (newVal && Array.isArray(newVal)) {
97
- setMessageDetail.value = JSON.parse(JSON.stringify(newVal));
196
+ watchHistoryDetail.value = JSON.parse(JSON.stringify(newVal));
98
197
  if (chatComponent.value) {
99
198
  setTimeout(() => {
100
199
  var _a, _b;
@@ -104,27 +203,10 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
104
203
  }
105
204
  },
106
205
  { deep: true, immediate: true }
107
- // 添加immediate: true,确保在watch创建时立即执行一次
108
206
  );
109
207
  vue.onMounted(() => {
110
208
  loadFromLocalStorage();
111
- initEventListeners();
112
209
  });
113
- const STORAGE_KEYS = {
114
- CHAT_HISTORY: scripts.length === 0 ? "chatHistory" : "historyData",
115
- SIDEBAR_STATE: "sidebarCollapsed"
116
- };
117
- function saveToLocalStorage() {
118
- localStorage.setItem(STORAGE_KEYS.CHAT_HISTORY, JSON.stringify(state.chatHistory));
119
- localStorage.setItem(STORAGE_KEYS.SIDEBAR_STATE, JSON.stringify(state.isSidebarCollapsed));
120
- }
121
- function initEventListeners() {
122
- document.addEventListener("click", () => {
123
- Object.keys(state.actionMenuVisible).forEach((key) => {
124
- state.actionMenuVisible[key] = false;
125
- });
126
- });
127
- }
128
210
  const toggleSidebarOut = (item, index) => {
129
211
  messageItem.value = item;
130
212
  messageIndex.value = index;
@@ -135,48 +217,73 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
135
217
  state.isSidebarCollapsed = false;
136
218
  toggleSidebar();
137
219
  };
138
- function toggleSidebar() {
220
+ const toggleSidebar = () => {
139
221
  state.isSidebarCollapsed = !state.isSidebarCollapsed;
140
222
  saveToLocalStorage();
141
- }
142
- function createNewChat(title = "\u65B0\u5BF9\u8BDD", messageList = []) {
143
- const newChat = {
144
- id: Date.now().toString(),
145
- title,
146
- time: /* @__PURE__ */ new Date(),
147
- messages: messageList
148
- };
149
- state.chatHistory.unshift(newChat);
150
- state.activeChat = newChat.id;
151
- saveToLocalStorage();
152
- return newChat;
153
- }
154
- function startNewChat() {
155
- var _a, _b, _c, _d, _e, _f;
223
+ };
224
+ const startNewChat = () => {
225
+ var _a, _b, _c, _d, _e, _f, _g;
226
+ localStorage.setItem("activeAgentsName", "");
227
+ const robotHistory = localStorage.getItem(STORAGE_KEYS.CHAT_HISTORY) || "[]";
228
+ const robotHistoryData = JSON.parse(robotHistory);
229
+ let messageList = [];
230
+ let messageItem2 = {};
231
+ let firstMessageList = [];
232
+ if (robotHistoryData.length) {
233
+ messageItem2 = robotHistoryData.find((item) => item.id === state.activeChat) || {};
234
+ messageList = (messageItem2 == null ? void 0 : messageItem2.messages) || [];
235
+ firstMessageList = ((_a = robotHistoryData == null ? void 0 : robotHistoryData[0]) == null ? void 0 : _a.messages) || [];
236
+ }
156
237
  state.toggleSidebarFlag = false;
157
- if (state.chatHistory.length > 0 && !((_c = (_b = (_a = state.chatHistory) == null ? void 0 : _a[0]) == null ? void 0 : _b.messages) == null ? void 0 : _c.length)) {
238
+ if (watchHistoryData.value.length > 0 && firstMessageList.length > 0 && (watchHistoryDetail.value.length > 0 || currentChatMessages.value.length > 0 || messageList.length > 0) || !(messageItem2 == null ? void 0 : messageItem2.messages) && firstMessageList.length > 0 || !state.clickCreateNum) {
239
+ const newChat2 = createNewChat("\u65B0\u5BF9\u8BDD" + (state.chatHistory.length + 1));
240
+ state.activeChat = newChat2.id;
241
+ change("");
242
+ state.clickCreateNum++;
243
+ return;
244
+ }
245
+ if (state.chatHistory.length > 0 && !((_d = (_c = (_b = state.chatHistory) == null ? void 0 : _b[0]) == null ? void 0 : _c.messages) == null ? void 0 : _d.length)) {
158
246
  state.activeChat = state.chatHistory[0].id;
247
+ change("");
159
248
  return;
160
249
  }
161
250
  if (!currentChatMessages.value.length && state.chatHistory.length > 0) {
162
- state.activeChat = (_f = (_e = (_d = state.chatHistory) == null ? void 0 : _d[0]) == null ? void 0 : _e.id) != null ? _f : "";
251
+ state.activeChat = (_g = (_f = (_e = state.chatHistory) == null ? void 0 : _e[0]) == null ? void 0 : _f.id) != null ? _g : "";
252
+ change("");
163
253
  return;
164
254
  }
165
- createNewChat("\u65B0\u5BF9\u8BDD" + (state.chatHistory.length + 1));
166
- }
167
- const handleActiveChat = vue.inject("handleActiveChat", () => {
168
- console.warn("\u672A\u63D0\u4F9BhandleActiveChat\u51FD\u6570");
255
+ const newChat = createNewChat("\u65B0\u5BF9\u8BDD" + (state.chatHistory.length + 1));
256
+ state.activeChat = newChat.id;
257
+ change("");
258
+ };
259
+ const change = vue.inject("change", () => {
260
+ console.warn("\u672A\u63D0\u4F9Bchange\u51FD\u6570");
169
261
  });
170
- function selectChat(id) {
171
- state.toggleSidebarFlag = false;
262
+ const changeChatHistory = (index) => {
263
+ state.activeChat = state.chatHistory[index].id;
264
+ change(state.chatHistory[index].id);
265
+ };
266
+ const clearChatHistory = () => {
267
+ state.chatHistory = [];
268
+ state.activeChat = "";
269
+ localStorage.setItem(STORAGE_KEYS.CHAT_HISTORY, JSON.stringify([]));
270
+ };
271
+ const selectChat = (id, type) => {
172
272
  state.activeChat = id;
173
- handleActiveChat(id);
273
+ state.toggleSidebarFlag = false;
274
+ state.agentsType = type;
275
+ if (!type) {
276
+ localStorage.setItem("activeAgentsName", "");
277
+ }
278
+ change(id);
174
279
  resetAllMenus();
175
- }
176
- const handleDeleteChat = vue.inject("handleDeleteChat", () => {
177
- console.warn("\u672A\u63D0\u4F9BhandleDeleteChat\u51FD\u6570");
280
+ };
281
+ const historyRemove = vue.inject("historyRemove", () => {
282
+ console.warn("\u672A\u63D0\u4F9Bremove\u51FD\u6570");
283
+ });
284
+ const openSideBar = vue.inject("openSideBar", () => {
178
285
  });
179
- function deleteChat(id) {
286
+ const deleteChat = (id) => {
180
287
  const index = state.chatHistory.findIndex((item) => item.id === id);
181
288
  if (index === -1)
182
289
  return;
@@ -187,17 +294,21 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
187
294
  state.activeChat = "";
188
295
  state.mockMessages = [];
189
296
  }
190
- handleDeleteChat(id);
297
+ historyRemove(id);
191
298
  saveToLocalStorage();
192
- }
299
+ };
193
300
  const beforeSendMessage = () => {
194
301
  state.toggleSidebarFlag = false;
195
302
  };
196
- function sendMessage(messageList) {
303
+ const sendMessage = (messageList, type) => {
197
304
  state.mockMessages = messageList;
305
+ if (type) {
306
+ return;
307
+ }
198
308
  if (!state.activeChat) {
199
309
  const newChat = createNewChat("AI\u57FA\u7840\u95EE\u7B54", messageList);
200
310
  newChat.messages = messageList;
311
+ state.activeChat = newChat.id;
201
312
  } else {
202
313
  const currentChat = state.chatHistory.find((item) => item.id === state.activeChat);
203
314
  if (currentChat) {
@@ -206,12 +317,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
206
317
  }
207
318
  saveToLocalStorage();
208
319
  }
209
- }
210
- function resetAllMenus() {
320
+ };
321
+ const resetAllMenus = () => {
211
322
  Object.keys(state.actionMenuVisible).forEach((key) => {
212
323
  state.actionMenuVisible[key] = false;
213
324
  });
214
- }
325
+ };
215
326
  const handleRenameChat = (id, newTitle) => {
216
327
  const item = state.chatHistory.find((item2) => item2.id === id);
217
328
  if (item) {
@@ -228,21 +339,36 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
228
339
  { deep: true }
229
340
  );
230
341
  __expose({
231
- handleSend: (value) => {
342
+ send: (value, fileList, auto, type) => {
232
343
  var _a;
233
- (_a = chatComponent.value) == null ? void 0 : _a.handleSendOut(value);
344
+ (_a = chatComponent.value) == null ? void 0 : _a.send(value, fileList, auto, type);
234
345
  },
235
- handleSiderBarClose: () => {
346
+ closeExtend: () => {
236
347
  state.toggleSidebarFlag = false;
348
+ },
349
+ create: () => {
350
+ const newChat = createNewChat("\u65B0\u5BF9\u8BDD" + (state.chatHistory.length + 1));
351
+ state.activeChat = newChat.id;
352
+ change("");
353
+ },
354
+ retry: (index) => {
355
+ var _a;
356
+ (_a = chatComponent.value) == null ? void 0 : _a.retry(index);
357
+ },
358
+ update: (index, message) => {
359
+ var _a;
360
+ (_a = chatComponent.value) == null ? void 0 : _a.update(index, message);
361
+ },
362
+ changeChat: (index) => {
363
+ changeChatHistory(index);
364
+ },
365
+ clearChat: () => {
366
+ clearChatHistory();
237
367
  }
238
368
  });
239
369
  return (_ctx, _cache) => {
240
- return vue.openBlock(), vue.createElementBlock("div", {
241
- ref_key: "historyContainer",
242
- ref: historyContainer,
243
- class: "touchchat"
244
- }, [
245
- state.isSidebarCollapsed && !vue.unref(isNotHeader) ? (vue.openBlock(), vue.createElementBlock("div", {
370
+ return vue.openBlock(), vue.createElementBlock("div", { class: "touchchat" }, [
371
+ state.isSidebarCollapsed && !isNotHeader ? (vue.openBlock(), vue.createElementBlock("div", {
246
372
  key: 0,
247
373
  class: "touchchat-header"
248
374
  }, [
@@ -259,9 +385,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
259
385
  vue.createElementVNode("div", { class: "touchchat-add-lite-icon" }),
260
386
  vue.createElementVNode("span", null, "\u65B0\u5BF9\u8BDD")
261
387
  ])
262
- ])) : vue.createCommentVNode("", true),
388
+ ])) : vue.createCommentVNode("v-if", true),
263
389
  vue.createElementVNode("div", { class: "touchchat-content" }, [
264
- !vue.unref(isNotHeader) && !state.isSidebarCollapsed ? (vue.openBlock(), vue.createBlock(HistorySidebar_vue_vue_type_script_setup_true_lang.default, {
390
+ !isNotHeader && !state.isSidebarCollapsed ? (vue.openBlock(), vue.createBlock(HistorySidebar.default, {
265
391
  key: 0,
266
392
  "is-sidebar-collapsed": state.isSidebarCollapsed,
267
393
  "active-chat": state.activeChat,
@@ -271,18 +397,25 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
271
397
  onSelectChat: selectChat,
272
398
  onRenameChat: handleRenameChat,
273
399
  onDeleteChat: deleteChat
274
- }, null, 8, ["is-sidebar-collapsed", "active-chat", "chat-history"])) : vue.createCommentVNode("", true),
275
- (vue.openBlock(), vue.createBlock(TouchChat_vue_vue_type_script_setup_true_lang.default, {
276
- key: state.activeChat,
400
+ }, null, 8, ["is-sidebar-collapsed", "active-chat", "chat-history"])) : vue.createCommentVNode("v-if", true),
401
+ !iIsAgent.value ? (vue.openBlock(), vue.createBlock(TouchChat.default, {
277
402
  ref_key: "chatComponent",
278
403
  ref: chatComponent,
404
+ key: state.activeChat + "-chat",
279
405
  value: currentChatMessages.value,
280
406
  onSendMessage: sendMessage,
281
407
  onToggleSidebar: toggleSidebarOut,
282
- onBeforeSendMessage: beforeSendMessage
408
+ onBeforeSendMessage: beforeSendMessage,
409
+ onOpenSideBar: vue.unref(openSideBar)
283
410
  }, {
284
- aiMessageContent: vue.withCtx(({ item, index }) => [
285
- vue.renderSlot(_ctx.$slots, "aiMessageContent", {
411
+ aimsg: vue.withCtx(({ item, index }) => [
412
+ vue.renderSlot(_ctx.$slots, "aimsg", {
413
+ item,
414
+ index
415
+ })
416
+ ]),
417
+ msg: vue.withCtx(({ item, index }) => [
418
+ vue.renderSlot(_ctx.$slots, "msg", {
286
419
  item,
287
420
  index
288
421
  })
@@ -296,37 +429,128 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
296
429
  welcome: vue.withCtx(() => [
297
430
  vue.renderSlot(_ctx.$slots, "welcome")
298
431
  ]),
299
- chatInput: vue.withCtx(() => [
300
- vue.renderSlot(_ctx.$slots, "chatInput")
432
+ edit: vue.withCtx(() => [
433
+ vue.renderSlot(_ctx.$slots, "edit")
434
+ ]),
435
+ shortcut: vue.withCtx(() => [
436
+ vue.renderSlot(_ctx.$slots, "shortcut")
437
+ ]),
438
+ top: vue.withCtx(() => [
439
+ vue.renderSlot(_ctx.$slots, "top")
440
+ ]),
441
+ fn: vue.withCtx(({ item, index }) => [
442
+ vue.renderSlot(_ctx.$slots, "fn", {
443
+ item,
444
+ index
445
+ })
446
+ ]),
447
+ extendsFn: vue.withCtx(({ item, index }) => [
448
+ vue.renderSlot(_ctx.$slots, "extendsFn", {
449
+ item,
450
+ index
451
+ })
452
+ ]),
453
+ editTop: vue.withCtx(() => [
454
+ vue.renderSlot(_ctx.$slots, "editTop")
455
+ ]),
456
+ editFn: vue.withCtx(() => [
457
+ vue.renderSlot(_ctx.$slots, "editFn")
458
+ ]),
459
+ editSubmitRight: vue.withCtx(() => [
460
+ vue.renderSlot(_ctx.$slots, "editSubmitRight")
301
461
  ]),
302
- tabView: vue.withCtx(() => [
303
- vue.renderSlot(_ctx.$slots, "tabView")
462
+ editSubmitLeft: vue.withCtx(() => [
463
+ vue.renderSlot(_ctx.$slots, "editSubmitLeft")
304
464
  ]),
305
- messageActions: vue.withCtx(({ item, index }) => [
306
- vue.renderSlot(_ctx.$slots, "messageActions", {
465
+ mayLike: vue.withCtx(({ item, index }) => [
466
+ vue.renderSlot(_ctx.$slots, "mayLike", {
307
467
  item,
308
468
  index
309
469
  })
310
470
  ]),
311
471
  _: 3
312
- }, 8, ["value"])),
313
- vue.withDirectives(vue.createVNode(SiderBarView_vue_vue_type_script_setup_true_lang.default, {
472
+ /* FORWARDED */
473
+ }, 8, ["value", "onOpenSideBar"])) : (vue.openBlock(), vue.createElementBlock(
474
+ vue.Fragment,
475
+ { key: 2 },
476
+ [
477
+ vue.createCommentVNode(' :key="state.activeChat" '),
478
+ (vue.openBlock(), vue.createBlock(TouchAgent.default, {
479
+ ref_key: "chatComponent",
480
+ ref: chatComponent,
481
+ key: state.activeChat + "-agent",
482
+ value: currentChatMessages.value,
483
+ onSendMessage: sendMessage,
484
+ onToggleSidebar: toggleSidebarOut,
485
+ onBeforeSendMessage: beforeSendMessage
486
+ }, {
487
+ aimsg: vue.withCtx(({ item, index }) => [
488
+ vue.renderSlot(_ctx.$slots, "aimsg", {
489
+ item,
490
+ index
491
+ })
492
+ ]),
493
+ msg: vue.withCtx(({ item, index }) => [
494
+ vue.renderSlot(_ctx.$slots, "msg", {
495
+ item,
496
+ index
497
+ })
498
+ ]),
499
+ aiAvatar: vue.withCtx(() => [
500
+ vue.renderSlot(_ctx.$slots, "aiAvatar")
501
+ ]),
502
+ userAvatar: vue.withCtx(() => [
503
+ vue.renderSlot(_ctx.$slots, "userAvatar")
504
+ ]),
505
+ welcome: vue.withCtx(() => [
506
+ vue.renderSlot(_ctx.$slots, "welcome")
507
+ ]),
508
+ edit: vue.withCtx(() => [
509
+ vue.renderSlot(_ctx.$slots, "edit")
510
+ ]),
511
+ shortcut: vue.withCtx(() => [
512
+ vue.renderSlot(_ctx.$slots, "shortcut")
513
+ ]),
514
+ top: vue.withCtx(() => [
515
+ vue.renderSlot(_ctx.$slots, "top")
516
+ ]),
517
+ fn: vue.withCtx(({ item, index }) => [
518
+ vue.renderSlot(_ctx.$slots, "fn", {
519
+ item,
520
+ index
521
+ })
522
+ ]),
523
+ extendsFn: vue.withCtx(({ item, index }) => [
524
+ vue.renderSlot(_ctx.$slots, "extendsFn", {
525
+ item,
526
+ index
527
+ })
528
+ ]),
529
+ _: 3
530
+ /* FORWARDED */
531
+ }, 8, ["value"]))
532
+ ],
533
+ 2112
534
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
535
+ )),
536
+ vue.withDirectives(vue.createVNode(SiderBarView.default, {
314
537
  flag: state.isSidebarCollapsed,
315
538
  item: messageItem.value,
316
539
  index: messageIndex.value
317
540
  }, {
318
- siderBarView: vue.withCtx(({ item: slotMessageItem, index: slotMessageIndex }) => [
319
- vue.renderSlot(_ctx.$slots, "siderBarView", {
541
+ extend: vue.withCtx(({ item: slotMessageItem, index: slotMessageIndex }) => [
542
+ vue.renderSlot(_ctx.$slots, "extend", {
320
543
  item: slotMessageItem,
321
544
  index: slotMessageIndex
322
545
  })
323
546
  ]),
324
547
  _: 3
548
+ /* FORWARDED */
325
549
  }, 8, ["flag", "item", "index"]), [
326
550
  [vue.vShow, state.toggleSidebarFlag]
327
551
  ])
328
552
  ])
329
- ], 512);
553
+ ]);
330
554
  };
331
555
  }
332
556
  });