@agentscope-ai/chat 1.1.4 → 1.1.8

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 (686) hide show
  1. package/LICENSE +74 -0
  2. package/README.md +156 -56
  3. package/README.zh-CN.md +188 -0
  4. package/lib/AGUI/components/HelpModal/icons.d.ts +5 -0
  5. package/lib/AGUI/components/HelpModal/icons.js +84 -0
  6. package/lib/AGUI/components/HelpModal/index.d.ts +1 -0
  7. package/lib/AGUI/components/HelpModal/index.js +1 -0
  8. package/lib/AGUI/components/HelpModal/modal.d.ts +1 -0
  9. package/lib/AGUI/components/HelpModal/modal.js +104 -0
  10. package/lib/AGUI/components/chat/Button.d.ts +2 -0
  11. package/lib/AGUI/components/chat/Button.js +27 -0
  12. package/lib/AGUI/components/chat/Chat.d.ts +242 -0
  13. package/lib/AGUI/components/chat/Chat.js +634 -0
  14. package/lib/AGUI/components/chat/ChatContext.d.ts +142 -0
  15. package/lib/AGUI/components/chat/ChatContext.js +75 -0
  16. package/lib/AGUI/components/chat/CodeBlock.d.ts +12 -0
  17. package/lib/AGUI/components/chat/CodeBlock.js +398 -0
  18. package/lib/AGUI/components/chat/Header.d.ts +2 -0
  19. package/lib/AGUI/components/chat/Header.js +28 -0
  20. package/lib/AGUI/components/chat/Icons.d.ts +16 -0
  21. package/lib/AGUI/components/chat/Icons.js +247 -0
  22. package/lib/AGUI/components/chat/ImageUploadQueue.d.ts +11 -0
  23. package/lib/AGUI/components/chat/ImageUploadQueue.js +65 -0
  24. package/lib/AGUI/components/chat/Input.d.ts +2 -0
  25. package/lib/AGUI/components/chat/Input.js +30 -0
  26. package/lib/AGUI/components/chat/Markdown.d.ts +7 -0
  27. package/lib/AGUI/components/chat/Markdown.js +187 -0
  28. package/lib/AGUI/components/chat/Messages.d.ts +7 -0
  29. package/lib/AGUI/components/chat/Messages.js +242 -0
  30. package/lib/AGUI/components/chat/Modal.d.ts +43 -0
  31. package/lib/AGUI/components/chat/Modal.js +113 -0
  32. package/lib/AGUI/components/chat/Popup.d.ts +49 -0
  33. package/lib/AGUI/components/chat/Popup.js +64 -0
  34. package/lib/AGUI/components/chat/PoweredByTag.d.ts +3 -0
  35. package/lib/AGUI/components/chat/PoweredByTag.js +27 -0
  36. package/lib/AGUI/components/chat/Sidebar.d.ts +2 -0
  37. package/lib/AGUI/components/chat/Sidebar.js +85 -0
  38. package/lib/AGUI/components/chat/Suggestion.d.ts +16 -0
  39. package/{dist/voice-chat/VoiceChatService/index.js → lib/AGUI/components/chat/Suggestion.js} +138 -201
  40. package/lib/AGUI/components/chat/Suggestions.d.ts +2 -0
  41. package/lib/AGUI/components/chat/Suggestions.js +21 -0
  42. package/lib/AGUI/components/chat/Textarea.d.ts +11 -0
  43. package/lib/AGUI/components/chat/Textarea.js +60 -0
  44. package/lib/AGUI/components/chat/Window.d.ts +2 -0
  45. package/lib/AGUI/components/chat/Window.js +115 -0
  46. package/lib/AGUI/components/chat/index.d.ts +11 -0
  47. package/lib/AGUI/components/chat/index.js +11 -0
  48. package/lib/AGUI/components/chat/messages/AssistantMessage.d.ts +2 -0
  49. package/lib/AGUI/components/chat/messages/AssistantMessage.js +56 -0
  50. package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.d.ts +2 -0
  51. package/lib/AGUI/components/chat/messages/RenderActionExecutionMessage.js +114 -0
  52. package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.d.ts +2 -0
  53. package/lib/AGUI/components/chat/messages/RenderAgentStateMessage.js +97 -0
  54. package/lib/AGUI/components/chat/messages/RenderImageMessage.d.ts +2 -0
  55. package/lib/AGUI/components/chat/messages/RenderImageMessage.js +61 -0
  56. package/lib/AGUI/components/chat/messages/RenderResultMessage.d.ts +2 -0
  57. package/lib/AGUI/components/chat/messages/RenderResultMessage.js +27 -0
  58. package/lib/AGUI/components/chat/messages/RenderTextMessage.d.ts +2 -0
  59. package/lib/AGUI/components/chat/messages/RenderTextMessage.js +47 -0
  60. package/lib/AGUI/components/chat/messages/UserMessage.d.ts +2 -0
  61. package/lib/AGUI/components/chat/messages/UserMessage.js +9 -0
  62. package/lib/AGUI/components/chat/props.d.ts +157 -0
  63. package/lib/AGUI/components/index.d.ts +1 -0
  64. package/lib/AGUI/components/index.js +1 -0
  65. package/lib/AGUI/context/index.d.ts +1 -0
  66. package/lib/AGUI/hooks/index.d.ts +1 -0
  67. package/lib/AGUI/hooks/index.js +1 -0
  68. package/lib/AGUI/hooks/use-copilot-chat-suggestions.d.ts +87 -0
  69. package/lib/AGUI/hooks/use-copilot-chat-suggestions.js +95 -0
  70. package/lib/AGUI/hooks/use-copy-to-clipboard.d.ts +7 -0
  71. package/{dist/theme/genStyleUtils.js → lib/AGUI/hooks/use-copy-to-clipboard.js} +27 -42
  72. package/lib/AGUI/hooks/use-dark-mode.d.ts +1 -0
  73. package/lib/AGUI/hooks/use-dark-mode.js +4 -0
  74. package/lib/AGUI/hooks/use-push-to-talk.d.ts +16 -0
  75. package/lib/AGUI/hooks/use-push-to-talk.js +260 -0
  76. package/lib/AGUI/index.d.ts +4 -0
  77. package/lib/AGUI/index.js +4 -0
  78. package/lib/AGUI/lib/utils.d.ts +2 -0
  79. package/lib/AGUI/lib/utils.js +52 -0
  80. package/lib/AGUI/types/index.d.ts +1 -0
  81. package/lib/AGUI/types/suggestions.d.ts +6 -0
  82. package/lib/Accordion/Accordion.d.ts +64 -0
  83. package/{dist/accordion → lib/Accordion}/Accordion.js +101 -40
  84. package/{dist/accordion → lib/Accordion}/BodyContent.d.ts +1 -1
  85. package/lib/Accordion/BodyContent.js +23 -0
  86. package/lib/Accordion/DeepThinking.d.ts +28 -0
  87. package/lib/Accordion/DeepThinking.js +35 -0
  88. package/lib/Accordion/SoftLightTitle.d.ts +3 -0
  89. package/lib/Accordion/SoftLightTitle.js +17 -0
  90. package/lib/Accordion/index.d.ts +2 -0
  91. package/lib/Accordion/style.d.ts +2 -0
  92. package/lib/Accordion/style.js +60 -0
  93. package/lib/Attachments/DropArea.d.ts +24 -0
  94. package/{dist/attachments → lib/Attachments}/DropArea.js +5 -11
  95. package/lib/Attachments/FileList/AudioIcon.d.ts +1 -0
  96. package/lib/Attachments/FileList/AudioIcon.js +24 -0
  97. package/lib/Attachments/FileList/FileListCard.d.ts +36 -0
  98. package/{dist/attachments → lib/Attachments}/FileList/FileListCard.js +109 -83
  99. package/lib/Attachments/FileList/Progress.d.ts +13 -0
  100. package/{dist/attachments → lib/Attachments}/FileList/Progress.js +7 -5
  101. package/lib/Attachments/FileList/VideoIcon.d.ts +1 -0
  102. package/lib/Attachments/FileList/VideoIcon.js +24 -0
  103. package/lib/Attachments/FileList/index.d.ts +56 -0
  104. package/{dist/attachments → lib/Attachments}/FileList/index.js +48 -48
  105. package/lib/Attachments/PlaceholderUploader.d.ts +49 -0
  106. package/{dist/attachments → lib/Attachments}/PlaceholderUploader.js +33 -28
  107. package/lib/Attachments/SilentUploader.d.ts +21 -0
  108. package/lib/Attachments/SilentUploader.js +30 -0
  109. package/lib/Attachments/context.d.ts +9 -0
  110. package/lib/Attachments/index.d.ts +97 -0
  111. package/lib/Attachments/index.en-US.md.bk +10 -0
  112. package/{dist/attachments → lib/Attachments}/index.js +51 -55
  113. package/lib/Attachments/index.zh-CN.md.bk +10 -0
  114. package/lib/Attachments/style/fileCard.d.ts +2 -0
  115. package/lib/Attachments/style/fileCard.js +68 -0
  116. package/lib/Attachments/style/index.d.ts +2 -0
  117. package/lib/Attachments/style/index.js +98 -0
  118. package/{dist/bubble → lib/Bubble}/Avatar.d.ts +0 -1
  119. package/{dist/bubble → lib/Bubble}/Avatar.js +8 -5
  120. package/lib/Bubble/Bubble.d.ts +19 -0
  121. package/{dist/bubble → lib/Bubble}/Bubble.js +39 -52
  122. package/lib/Bubble/BubbleList.d.ts +41 -0
  123. package/lib/Bubble/BubbleList.js +64 -0
  124. package/{dist/bubble → lib/Bubble}/Cards.d.ts +2 -8
  125. package/{dist/bubble → lib/Bubble}/Cards.js +9 -9
  126. package/{dist/bubble → lib/Bubble}/ScrollToBottom.d.ts +0 -1
  127. package/{dist/bubble → lib/Bubble}/ScrollToBottom.js +15 -14
  128. package/lib/Bubble/Spin.d.ts +1 -0
  129. package/lib/Bubble/Spin.js +21 -0
  130. package/lib/Bubble/hooks/useListData.d.ts +0 -0
  131. package/lib/Bubble/hooks/useListData.js +0 -0
  132. package/lib/Bubble/interface.d.ts +62 -0
  133. package/lib/Bubble/loading.js +17 -0
  134. package/lib/Bubble/style/avatar.d.ts +2 -0
  135. package/lib/Bubble/style/avatar.js +8 -0
  136. package/lib/Bubble/style/index.d.ts +2 -0
  137. package/lib/Bubble/style/index.js +46 -0
  138. package/lib/Bubble/style/list.d.ts +2 -0
  139. package/lib/Bubble/style/list.js +16 -0
  140. package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.d.ts +0 -1
  141. package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/index.js +39 -28
  142. package/lib/ChatAnywhere/Chat/style.d.ts +2 -0
  143. package/lib/ChatAnywhere/Chat/style.js +14 -0
  144. package/lib/ChatAnywhere/Header/index.d.ts +1 -0
  145. package/lib/ChatAnywhere/Header/index.js +39 -0
  146. package/lib/ChatAnywhere/Header/style.d.ts +2 -0
  147. package/lib/ChatAnywhere/Header/style.js +12 -0
  148. package/lib/ChatAnywhere/Input/index.d.ts +3 -0
  149. package/{dist/chat-anywhere → lib/ChatAnywhere}/Input/index.js +92 -70
  150. package/lib/ChatAnywhere/Input/style.d.ts +2 -0
  151. package/lib/ChatAnywhere/Input/style.js +6 -0
  152. package/{dist/chat-anywhere → lib/ChatAnywhere}/Layout/index.d.ts +1 -2
  153. package/lib/ChatAnywhere/Layout/index.js +91 -0
  154. package/lib/ChatAnywhere/Layout/style.d.ts +2 -0
  155. package/lib/ChatAnywhere/Layout/style.js +16 -0
  156. package/lib/ChatAnywhere/SessionList/index.d.ts +3 -0
  157. package/{dist/chat-anywhere → lib/ChatAnywhere}/SessionList/index.js +67 -55
  158. package/lib/ChatAnywhere/SessionList/style.d.ts +2 -0
  159. package/lib/ChatAnywhere/SessionList/style.js +14 -0
  160. package/lib/ChatAnywhere/hooks/ChatAnywhereProvider.d.ts +148 -0
  161. package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/ChatAnywhereProvider.js +11 -5
  162. package/lib/ChatAnywhere/hooks/types.d.ts +312 -0
  163. package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.d.ts +2 -0
  164. package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useInput.js +8 -2
  165. package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.d.ts +3 -1
  166. package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useMessages.js +10 -2
  167. package/{dist/chat-anywhere → lib/ChatAnywhere}/index.d.ts +4 -1
  168. package/{dist/chat-anywhere → lib/ChatAnywhere}/index.js +28 -15
  169. package/{dist/conversations → lib/Conversations}/GroupTitle.d.ts +4 -0
  170. package/{dist/conversations → lib/Conversations}/GroupTitle.js +7 -5
  171. package/{dist/conversations → lib/Conversations}/Item.d.ts +1 -0
  172. package/lib/Conversations/Item.js +208 -0
  173. package/lib/Conversations/hooks/useGroupable.d.ts +8 -0
  174. package/lib/Conversations/index.d.ts +55 -0
  175. package/{dist/conversations → lib/Conversations}/index.js +50 -61
  176. package/lib/Conversations/interface.d.ts +56 -0
  177. package/lib/Conversations/style.d.ts +2 -0
  178. package/lib/Conversations/style.js +60 -0
  179. package/{dist/default-cards/DeepThink → lib/DefaultCards/DeepThinking}/index.d.ts +2 -3
  180. package/lib/DefaultCards/DeepThinking/index.js +12 -0
  181. package/lib/DefaultCards/Files/index.d.ts +1 -0
  182. package/lib/DefaultCards/Files/index.js +56 -0
  183. package/{dist/default-cards → lib/DefaultCards}/Footer/index.d.ts +3 -4
  184. package/lib/DefaultCards/Footer/index.js +74 -0
  185. package/lib/DefaultCards/Images/index.d.ts +1 -0
  186. package/lib/DefaultCards/Images/index.js +49 -0
  187. package/{dist/default-cards → lib/DefaultCards}/Interrupted/index.d.ts +1 -3
  188. package/lib/DefaultCards/Interrupted/index.js +54 -0
  189. package/lib/DefaultCards/Text/index.d.ts +1 -0
  190. package/{dist/default-cards → lib/DefaultCards}/Text/index.js +4 -2
  191. package/lib/DefaultCards/count/index.d.ts +1 -0
  192. package/lib/DefaultCards/count/index.js +36 -0
  193. package/{dist/default-cards → lib/DefaultCards}/index.d.ts +1 -1
  194. package/{dist/default-cards → lib/DefaultCards}/index.js +1 -1
  195. package/lib/Disclaimer/index.d.ts +22 -0
  196. package/lib/Disclaimer/index.js +26 -0
  197. package/lib/Disclaimer/style.d.ts +2 -0
  198. package/lib/Disclaimer/style.js +10 -0
  199. package/lib/ImageGenerator/index.d.ts +41 -0
  200. package/lib/ImageGenerator/index.js +75 -0
  201. package/lib/ImageGenerator/style.d.ts +2 -0
  202. package/lib/ImageGenerator/style.js +20 -0
  203. package/{dist/markdown → lib/Markdown}/Citation.js +19 -14
  204. package/{dist/markdown → lib/Markdown}/CodeBlock.d.ts +1 -0
  205. package/{dist/markdown → lib/Markdown}/CodeBlock.js +51 -30
  206. package/lib/Markdown/ImageOrMedia.d.ts +1 -0
  207. package/lib/Markdown/ImageOrMedia.js +113 -0
  208. package/lib/Markdown/Link.js +48 -0
  209. package/{dist/markdown → lib/Markdown}/Markdown.js +22 -11
  210. package/lib/Markdown/cursor/Dot.d.ts +1 -0
  211. package/lib/Markdown/cursor/Dot.js +36 -0
  212. package/lib/Markdown/cursor/Underline.d.ts +1 -0
  213. package/lib/Markdown/cursor/Underline.js +20 -0
  214. package/lib/Markdown/hooks/index.d.ts +0 -0
  215. package/lib/Markdown/hooks/index.js +0 -0
  216. package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.js +1 -1
  217. package/lib/Markdown/index.d.ts +63 -0
  218. package/lib/Markdown/index.js +40 -0
  219. package/lib/Markdown/style.d.ts +2 -0
  220. package/lib/Markdown/style.js +30 -0
  221. package/lib/Markdown/type.d.ts +186 -0
  222. package/{dist/markdown → lib/Markdown}/utils.js +1 -2
  223. package/lib/Mermaid/index.d.ts +18 -0
  224. package/{dist/voice-chat/Recorder → lib/Mermaid}/index.js +144 -160
  225. package/{dist/provider → lib/Provider}/CustomCardsProvider.d.ts +2 -1
  226. package/{dist/provider → lib/Provider}/CustomCardsProvider.js +5 -3
  227. package/{dist/provider → lib/Provider}/GlobalProvider.d.ts +1 -1
  228. package/{dist/provider → lib/Provider}/GlobalProvider.js +5 -3
  229. package/{dist/provider → lib/Provider}/index.d.ts +1 -2
  230. package/{dist/provider → lib/Provider}/index.js +9 -6
  231. package/lib/Provider/types.d.ts +24 -0
  232. package/lib/Provider/types.js +1 -0
  233. package/lib/ResponsesAPI/index.d.ts +0 -0
  234. package/lib/ResponsesAPI/index.js +0 -0
  235. package/lib/Sender/ModeSelect/index.d.ts +17 -0
  236. package/lib/Sender/ModeSelect/index.js +109 -0
  237. package/lib/Sender/ModeSelect/styles.d.ts +0 -0
  238. package/lib/Sender/ModeSelect/styles.js +0 -0
  239. package/lib/Sender/SenderHeader.d.ts +63 -0
  240. package/{dist/sender → lib/Sender}/SenderHeader.js +40 -32
  241. package/{dist/sender → lib/Sender}/StopLoading.d.ts +1 -1
  242. package/lib/Sender/StopLoading.js +25 -0
  243. package/lib/Sender/components/ActionButton.d.ts +72 -0
  244. package/{dist/sender → lib/Sender}/components/ActionButton.js +9 -5
  245. package/lib/Sender/components/ClearButton.js +19 -0
  246. package/lib/Sender/components/LoadingButton.js +28 -0
  247. package/lib/Sender/components/SendButton.js +20 -0
  248. package/lib/Sender/components/SpeechButton/RecordingIcon.d.ts +8 -0
  249. package/lib/Sender/components/SpeechButton/RecordingIcon.js +54 -0
  250. package/lib/Sender/components/SpeechButton/index.js +35 -0
  251. package/lib/Sender/index.d.ts +142 -0
  252. package/{dist/sender → lib/Sender}/index.js +128 -121
  253. package/lib/Sender/style/index.d.ts +2 -0
  254. package/lib/Sender/style/index.js +41 -0
  255. package/{dist/stream → lib/Stream}/index.d.ts +4 -2
  256. package/{dist/stream → lib/Stream}/index.js +1 -1
  257. package/lib/Util/createStyle.d.ts +5 -0
  258. package/lib/Util/createStyle.js +20 -0
  259. package/lib/Util/sleep.d.ts +1 -0
  260. package/lib/Util/sleep.js +5 -0
  261. package/lib/Util/type.js +1 -0
  262. package/{dist/_util → lib/Util}/warning.d.ts +2 -2
  263. package/lib/Voice/Recorder.d.ts +1 -0
  264. package/lib/Voice/Recorder.js +6 -0
  265. package/lib/Voice/index.d.ts +0 -0
  266. package/lib/Voice/index.js +0 -0
  267. package/lib/Welcome/index.d.ts +24 -0
  268. package/lib/Welcome/index.js +39 -0
  269. package/lib/index.d.ts +25 -0
  270. package/lib/index.js +24 -0
  271. package/package.json +28 -14
  272. package/dist/accordion/Accordion.d.ts +0 -22
  273. package/dist/accordion/BodyContent.js +0 -18
  274. package/dist/accordion/DeepThink.d.ts +0 -7
  275. package/dist/accordion/DeepThink.js +0 -35
  276. package/dist/accordion/index.d.ts +0 -2
  277. package/dist/accordion/index.less +0 -170
  278. package/dist/attachments/DropArea.d.ts +0 -8
  279. package/dist/attachments/FileList/AudioIcon.d.ts +0 -2
  280. package/dist/attachments/FileList/AudioIcon.js +0 -19
  281. package/dist/attachments/FileList/FileListCard.d.ts +0 -12
  282. package/dist/attachments/FileList/Progress.d.ts +0 -6
  283. package/dist/attachments/FileList/VideoIcon.d.ts +0 -2
  284. package/dist/attachments/FileList/VideoIcon.js +0 -19
  285. package/dist/attachments/FileList/index.d.ts +0 -16
  286. package/dist/attachments/PlaceholderUploader.d.ts +0 -17
  287. package/dist/attachments/SilentUploader.d.ts +0 -9
  288. package/dist/attachments/SilentUploader.js +0 -23
  289. package/dist/attachments/context.d.ts +0 -5
  290. package/dist/attachments/index.d.ts +0 -33
  291. package/dist/attachments/style/fileCard.d.ts +0 -4
  292. package/dist/attachments/style/fileCard.js +0 -124
  293. package/dist/attachments/style/index.d.ts +0 -10
  294. package/dist/attachments/style/index.js +0 -211
  295. package/dist/bubble/Bubble.d.ts +0 -11
  296. package/dist/bubble/BubbleList.d.ts +0 -15
  297. package/dist/bubble/BubbleList.js +0 -44
  298. package/dist/bubble/Spin.d.ts +0 -2
  299. package/dist/bubble/Spin.js +0 -18
  300. package/dist/bubble/interface.d.ts +0 -26
  301. package/dist/bubble/loading.js +0 -17
  302. package/dist/bubble/style/avatar.less +0 -40
  303. package/dist/bubble/style/content.d.ts +0 -4
  304. package/dist/bubble/style/content.js +0 -43
  305. package/dist/bubble/style/index.d.ts +0 -9
  306. package/dist/bubble/style/index.js +0 -53
  307. package/dist/bubble/style/list.less +0 -15
  308. package/dist/bubble/style/scrollToBottom.less +0 -174
  309. package/dist/chat-anywhere/Chat/index.less +0 -54
  310. package/dist/chat-anywhere/Header/index.d.ts +0 -3
  311. package/dist/chat-anywhere/Header/index.js +0 -32
  312. package/dist/chat-anywhere/Header/index.less +0 -24
  313. package/dist/chat-anywhere/Input/index.d.ts +0 -3
  314. package/dist/chat-anywhere/Input/index.less +0 -12
  315. package/dist/chat-anywhere/Layout/index.js +0 -73
  316. package/dist/chat-anywhere/Layout/index.less +0 -61
  317. package/dist/chat-anywhere/SessionList/index.d.ts +0 -5
  318. package/dist/chat-anywhere/SessionList/index.less +0 -52
  319. package/dist/chat-anywhere/hooks/ChatAnywhereProvider.d.ts +0 -43
  320. package/dist/chat-anywhere/hooks/types.d.ts +0 -57
  321. package/dist/conversations/Item.js +0 -96
  322. package/dist/conversations/hooks/useGroupable.d.ts +0 -9
  323. package/dist/conversations/index.d.ts +0 -62
  324. package/dist/conversations/interface.d.ts +0 -60
  325. package/dist/conversations/style/index.d.ts +0 -9
  326. package/dist/conversations/style/index.js +0 -80
  327. package/dist/default-cards/Count/index.d.ts +0 -3
  328. package/dist/default-cards/Count/index.js +0 -16
  329. package/dist/default-cards/Count/index.less +0 -19
  330. package/dist/default-cards/DeepThink/index.js +0 -11
  331. package/dist/default-cards/Files/index.d.ts +0 -2
  332. package/dist/default-cards/Files/index.js +0 -18
  333. package/dist/default-cards/Footer/index.js +0 -50
  334. package/dist/default-cards/Footer/index.less +0 -41
  335. package/dist/default-cards/Images/index.d.ts +0 -3
  336. package/dist/default-cards/Images/index.js +0 -33
  337. package/dist/default-cards/Images/index.less +0 -17
  338. package/dist/default-cards/Interrupted/index.js +0 -40
  339. package/dist/default-cards/Interrupted/index.less +0 -57
  340. package/dist/default-cards/Text/index.d.ts +0 -2
  341. package/dist/disclaimer/index.d.ts +0 -11
  342. package/dist/disclaimer/index.js +0 -26
  343. package/dist/docs/1896.async.js +0 -457
  344. package/dist/docs/2710.async.js +0 -62
  345. package/dist/docs/2863.async.js +0 -400
  346. package/dist/docs/3057.async.js +0 -46
  347. package/dist/docs/3364.async.js +0 -25
  348. package/dist/docs/404.html +0 -15
  349. package/dist/docs/4820.async.js +0 -1381
  350. package/dist/docs/5623.async.js +0 -60
  351. package/dist/docs/5757.async.js +0 -1
  352. package/dist/docs/5804.async.js +0 -271
  353. package/dist/docs/6198.async.js +0 -18
  354. package/dist/docs/6671.async.js +0 -137
  355. package/dist/docs/7195.async.js +0 -1
  356. package/dist/docs/7485.async.js +0 -29
  357. package/dist/docs/7931.async.js +0 -19
  358. package/dist/docs/7997.async.js +0 -5
  359. package/dist/docs/8156.async.js +0 -110
  360. package/dist/docs/8368.async.js +0 -2
  361. package/dist/docs/8480.async.js +0 -1449
  362. package/dist/docs/8618.async.js +0 -246
  363. package/dist/docs/9016.async.js +0 -32
  364. package/dist/docs/9016.chunk.css +0 -1
  365. package/dist/docs/9335.async.js +0 -11
  366. package/dist/docs/accordion__demos.async.js +0 -9
  367. package/dist/docs/attachments__demos.async.js +0 -1
  368. package/dist/docs/bubble__demos.async.js +0 -50
  369. package/dist/docs/components/accordion/index.html +0 -15
  370. package/dist/docs/components/accordion-cn/index.html +0 -15
  371. package/dist/docs/components/attachments/index.html +0 -15
  372. package/dist/docs/components/attachments-cn/index.html +0 -15
  373. package/dist/docs/components/bubble/index.html +0 -15
  374. package/dist/docs/components/bubble-cn/index.html +0 -15
  375. package/dist/docs/components/bubble-list/index.html +0 -15
  376. package/dist/docs/components/bubble-list-cn/index.html +0 -15
  377. package/dist/docs/components/conversations/index.html +0 -15
  378. package/dist/docs/components/conversations-cn/index.html +0 -15
  379. package/dist/docs/components/disclaimer/index.html +0 -15
  380. package/dist/docs/components/disclaimer-cn/index.html +0 -15
  381. package/dist/docs/components/footer/index.html +0 -15
  382. package/dist/docs/components/footer-cn/index.html +0 -15
  383. package/dist/docs/components/markdown/index.html +0 -15
  384. package/dist/docs/components/markdown-cn/index.html +0 -15
  385. package/dist/docs/components/sender/index.html +0 -15
  386. package/dist/docs/components/sender-cn/index.html +0 -15
  387. package/dist/docs/components/status/index.html +0 -15
  388. package/dist/docs/components/status-cn/index.html +0 -15
  389. package/dist/docs/components/welcome/index.html +0 -15
  390. package/dist/docs/components/welcome-cn/index.html +0 -15
  391. package/dist/docs/components__accordion__index.en-US.md.async.js +0 -6
  392. package/dist/docs/components__accordion__index.en-US.md.chunk.css +0 -1
  393. package/dist/docs/components__accordion__index.zh-CN.md.async.js +0 -6
  394. package/dist/docs/components__accordion__index.zh-CN.md.chunk.css +0 -1
  395. package/dist/docs/components__attachments__index.en-US.md.async.js +0 -1
  396. package/dist/docs/components__attachments__index.en-US.md.chunk.css +0 -1
  397. package/dist/docs/components__attachments__index.zh-CN.md.async.js +0 -1
  398. package/dist/docs/components__attachments__index.zh-CN.md.chunk.css +0 -1
  399. package/dist/docs/components__bubble-list__index.en-US.md.async.js +0 -2
  400. package/dist/docs/components__bubble-list__index.en-US.md.chunk.css +0 -1
  401. package/dist/docs/components__bubble-list__index.zh-CN.md.async.js +0 -2
  402. package/dist/docs/components__bubble-list__index.zh-CN.md.chunk.css +0 -1
  403. package/dist/docs/components__bubble__index.en-US.md.async.js +0 -1
  404. package/dist/docs/components__bubble__index.en-US.md.chunk.css +0 -1
  405. package/dist/docs/components__bubble__index.zh-CN.md.async.js +0 -1
  406. package/dist/docs/components__bubble__index.zh-CN.md.chunk.css +0 -1
  407. package/dist/docs/components__conversations__index.en-US.md.async.js +0 -2
  408. package/dist/docs/components__conversations__index.en-US.md.chunk.css +0 -1
  409. package/dist/docs/components__conversations__index.zh-CN.md.async.js +0 -1
  410. package/dist/docs/components__conversations__index.zh-CN.md.chunk.css +0 -1
  411. package/dist/docs/components__disclaimer__index.en-US.md.async.js +0 -1
  412. package/dist/docs/components__disclaimer__index.en-US.md.chunk.css +0 -1
  413. package/dist/docs/components__disclaimer__index.zh-CN.md.async.js +0 -1
  414. package/dist/docs/components__disclaimer__index.zh-CN.md.chunk.css +0 -1
  415. package/dist/docs/components__footer__index.en-US.md.async.js +0 -1
  416. package/dist/docs/components__footer__index.en-US.md.chunk.css +0 -1
  417. package/dist/docs/components__footer__index.zh-CN.md.async.js +0 -2
  418. package/dist/docs/components__footer__index.zh-CN.md.chunk.css +0 -1
  419. package/dist/docs/components__markdown__index.en-US.md.async.js +0 -1
  420. package/dist/docs/components__markdown__index.en-US.md.chunk.css +0 -1
  421. package/dist/docs/components__markdown__index.zh-CN.md.async.js +0 -1
  422. package/dist/docs/components__markdown__index.zh-CN.md.chunk.css +0 -1
  423. package/dist/docs/components__sender__index.en-US.md.async.js +0 -1
  424. package/dist/docs/components__sender__index.en-US.md.chunk.css +0 -1
  425. package/dist/docs/components__sender__index.zh-CN.md.async.js +0 -1
  426. package/dist/docs/components__sender__index.zh-CN.md.chunk.css +0 -1
  427. package/dist/docs/components__status__index.en-US.md.async.js +0 -1
  428. package/dist/docs/components__status__index.en-US.md.chunk.css +0 -1
  429. package/dist/docs/components__status__index.zh-CN.md.async.js +0 -2
  430. package/dist/docs/components__status__index.zh-CN.md.chunk.css +0 -1
  431. package/dist/docs/components__welcome__index.en-US.md.async.js +0 -2
  432. package/dist/docs/components__welcome__index.en-US.md.chunk.css +0 -1
  433. package/dist/docs/components__welcome__index.zh-CN.md.async.js +0 -2
  434. package/dist/docs/components__welcome__index.zh-CN.md.chunk.css +0 -1
  435. package/dist/docs/conversations__demos.async.js +0 -1
  436. package/dist/docs/demos.async.js +0 -47
  437. package/dist/docs/demos.chunk.css +0 -1
  438. package/dist/docs/disclaimer__demos.async.js +0 -1
  439. package/dist/docs/docs/development/ag-ui/index.html +0 -15
  440. package/dist/docs/docs/development/ag-ui-cn/index.html +0 -15
  441. package/dist/docs/docs/development/backend/index.html +0 -15
  442. package/dist/docs/docs/development/backend-cn/index.html +0 -15
  443. package/dist/docs/docs/development/cards/index.html +0 -15
  444. package/dist/docs/docs/development/cards-cn/index.html +0 -15
  445. package/dist/docs/docs/development/chatanywhere/index.html +0 -15
  446. package/dist/docs/docs/development/chatanywhere-api/index.html +0 -15
  447. package/dist/docs/docs/development/chatanywhere-api-cn/index.html +0 -15
  448. package/dist/docs/docs/development/chatanywhere-cn/index.html +0 -15
  449. package/dist/docs/docs/development/custom/index.html +0 -15
  450. package/dist/docs/docs/development/custom-cn/index.html +0 -15
  451. package/dist/docs/docs/development/overview/index.html +0 -15
  452. package/dist/docs/docs/development/overview-cn/index.html +0 -15
  453. package/dist/docs/docs/development/qwen/index.html +0 -15
  454. package/dist/docs/docs/development/qwen-cn/index.html +0 -15
  455. package/dist/docs/docs/templates/copilot/index.html +0 -15
  456. package/dist/docs/docs/templates/copilot-cn/index.html +0 -15
  457. package/dist/docs/docs/templates/native/index.html +0 -15
  458. package/dist/docs/docs/templates/native-cn/index.html +0 -15
  459. package/dist/docs/docs/templates/voice/index.html +0 -15
  460. package/dist/docs/docs/templates/voice-cn/index.html +0 -15
  461. package/dist/docs/docs__development__ag-ui.en-US.md.async.js +0 -210
  462. package/dist/docs/docs__development__ag-ui.en-US.md.chunk.css +0 -1
  463. package/dist/docs/docs__development__ag-ui.zh-CN.md.async.js +0 -210
  464. package/dist/docs/docs__development__ag-ui.zh-CN.md.chunk.css +0 -1
  465. package/dist/docs/docs__development__backend.en-US.md.async.js +0 -12
  466. package/dist/docs/docs__development__backend.en-US.md.chunk.css +0 -1
  467. package/dist/docs/docs__development__backend.zh-CN.md.async.js +0 -12
  468. package/dist/docs/docs__development__backend.zh-CN.md.chunk.css +0 -1
  469. package/dist/docs/docs__development__cards.en-US.md.async.js +0 -27
  470. package/dist/docs/docs__development__cards.en-US.md.chunk.css +0 -1
  471. package/dist/docs/docs__development__cards.zh-CN.md.async.js +0 -27
  472. package/dist/docs/docs__development__cards.zh-CN.md.chunk.css +0 -1
  473. package/dist/docs/docs__development__chatanywhere-api.en-US.md.async.js +0 -69
  474. package/dist/docs/docs__development__chatanywhere-api.en-US.md.chunk.css +0 -1
  475. package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.async.js +0 -69
  476. package/dist/docs/docs__development__chatanywhere-api.zh-CN.md.chunk.css +0 -1
  477. package/dist/docs/docs__development__chatanywhere.en-US.md.async.js +0 -77
  478. package/dist/docs/docs__development__chatanywhere.en-US.md.chunk.css +0 -1
  479. package/dist/docs/docs__development__chatanywhere.zh-CN.md.async.js +0 -77
  480. package/dist/docs/docs__development__chatanywhere.zh-CN.md.chunk.css +0 -1
  481. package/dist/docs/docs__development__custom.en-US.md.async.js +0 -22
  482. package/dist/docs/docs__development__custom.en-US.md.chunk.css +0 -1
  483. package/dist/docs/docs__development__custom.zh-CN.md.async.js +0 -22
  484. package/dist/docs/docs__development__custom.zh-CN.md.chunk.css +0 -1
  485. package/dist/docs/docs__development__overview.en-US.md.async.js +0 -21
  486. package/dist/docs/docs__development__overview.en-US.md.chunk.css +0 -1
  487. package/dist/docs/docs__development__overview.zh-CN.md.async.js +0 -21
  488. package/dist/docs/docs__development__overview.zh-CN.md.chunk.css +0 -1
  489. package/dist/docs/docs__development__qwen.en-US.md.async.js +0 -25
  490. package/dist/docs/docs__development__qwen.en-US.md.chunk.css +0 -1
  491. package/dist/docs/docs__development__qwen.zh-CN.md.async.js +0 -25
  492. package/dist/docs/docs__development__qwen.zh-CN.md.chunk.css +0 -1
  493. package/dist/docs/docs__templates__copilot.en-US.md.async.js +0 -1
  494. package/dist/docs/docs__templates__copilot.en-US.md.chunk.css +0 -1
  495. package/dist/docs/docs__templates__copilot.zh-CN.md.async.js +0 -1
  496. package/dist/docs/docs__templates__copilot.zh-CN.md.chunk.css +0 -1
  497. package/dist/docs/docs__templates__native.en-US.md.async.js +0 -1
  498. package/dist/docs/docs__templates__native.en-US.md.chunk.css +0 -1
  499. package/dist/docs/docs__templates__native.zh-CN.md.async.js +0 -1
  500. package/dist/docs/docs__templates__native.zh-CN.md.chunk.css +0 -1
  501. package/dist/docs/docs__templates__voice.en-US.md.async.js +0 -20
  502. package/dist/docs/docs__templates__voice.en-US.md.chunk.css +0 -1
  503. package/dist/docs/docs__templates__voice.zh-CN.md.async.js +0 -1
  504. package/dist/docs/docs__templates__voice.zh-CN.md.chunk.css +0 -1
  505. package/dist/docs/dumi__pages__index__index.en-US.async.js +0 -1
  506. package/dist/docs/dumi__pages__index__index.en-US.chunk.css +0 -1
  507. package/dist/docs/dumi__pages__index__index.zh-CN.async.js +0 -1
  508. package/dist/docs/dumi__pages__index__index.zh-CN.chunk.css +0 -1
  509. package/dist/docs/dumi__theme__layouts__DocLayout__index.async.js +0 -1
  510. package/dist/docs/dumi__theme__layouts__DocLayout__index.chunk.css +0 -1
  511. package/dist/docs/dumi__theme__layouts__GlobalLayout__index.async.js +0 -18
  512. package/dist/docs/dumi__theme__layouts__GlobalLayout__index.chunk.css +0 -1
  513. package/dist/docs/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +0 -1
  514. package/dist/docs/index/index.html +0 -15
  515. package/dist/docs/index-cn/index.html +0 -15
  516. package/dist/docs/markdown__demos.async.js +0 -164
  517. package/dist/docs/meta__components__en-US.async.js +0 -9
  518. package/dist/docs/meta__components__zh-CN.async.js +0 -10
  519. package/dist/docs/meta__docs__en-US.async.js +0 -475
  520. package/dist/docs/meta__docs__en-US.chunk.css +0 -1
  521. package/dist/docs/meta__docs__zh-CN.async.js +0 -456
  522. package/dist/docs/meta__docs__zh-CN.chunk.css +0 -1
  523. package/dist/docs/nm__dumi__dist__client__pages__404.async.js +0 -1
  524. package/dist/docs/nm__dumi__dist__client__pages__Demo__index.async.js +0 -1
  525. package/dist/docs/nm__dumi__dist__client__pages__Demo__index.chunk.css +0 -1
  526. package/dist/docs/preload_helper.js +0 -1
  527. package/dist/docs/sender__demos.async.js +0 -1
  528. package/dist/docs/umi.css +0 -1
  529. package/dist/docs/umi.js +0 -107
  530. package/dist/docs/welcome__demos.async.js +0 -1
  531. package/dist/docs/~demos/:id/index.html +0 -15
  532. package/dist/docs/~demos/accordion-demo-inline/index.html +0 -15
  533. package/dist/docs/~demos/accordion-demo-mutisteps/index.html +0 -15
  534. package/dist/docs/~demos/accordion-demo-thinking/index.html +0 -15
  535. package/dist/docs/~demos/attachments-demo-files/index.html +0 -15
  536. package/dist/docs/~demos/bubble-demo-basic/index.html +0 -15
  537. package/dist/docs/~demos/bubble-demo-havestopped/index.html +0 -15
  538. package/dist/docs/~demos/bubble-demo-userwithfile/index.html +0 -15
  539. package/dist/docs/~demos/bubble-demo-userwithimage/index.html +0 -15
  540. package/dist/docs/~demos/bubble-demo-userwithnormal/index.html +0 -15
  541. package/dist/docs/~demos/bubble-demo-withavatar/index.html +0 -15
  542. package/dist/docs/~demos/bubble-demo-withcode/index.html +0 -15
  543. package/dist/docs/~demos/bubble-demo-witherror/index.html +0 -15
  544. package/dist/docs/~demos/bubble-demo-witherrordetail/index.html +0 -15
  545. package/dist/docs/~demos/bubble-demo-withimage/index.html +0 -15
  546. package/dist/docs/~demos/bubble-demo-withusage/index.html +0 -15
  547. package/dist/docs/~demos/bubble-demo-withwaitingmessage/index.html +0 -15
  548. package/dist/docs/~demos/components-bubble-list-demo-basic/index.html +0 -15
  549. package/dist/docs/~demos/components-footer-demo-basic/index.html +0 -15
  550. package/dist/docs/~demos/components-footer-demo-withusage/index.html +0 -15
  551. package/dist/docs/~demos/components-status-demo-basic/index.html +0 -15
  552. package/dist/docs/~demos/conversations-demo-basic/index.html +0 -15
  553. package/dist/docs/~demos/disclaimer-demo-demo/index.html +0 -15
  554. package/dist/docs/~demos/disclaimer-demo-withlink/index.html +0 -15
  555. package/dist/docs/~demos/docs-development-ag-ui-demo-with-copilotkit/index.html +0 -15
  556. package/dist/docs/~demos/docs-development-cards-demo-file/index.html +0 -15
  557. package/dist/docs/~demos/docs-development-cards-demo-footer/index.html +0 -15
  558. package/dist/docs/~demos/docs-development-cards-demo-image/index.html +0 -15
  559. package/dist/docs/~demos/docs-development-cards-demo-text/index.html +0 -15
  560. package/dist/docs/~demos/docs-development-custom-demo-custom/index.html +0 -15
  561. package/dist/docs/~demos/docs-templates-copilot-demo-copilot/index.html +0 -15
  562. package/dist/docs/~demos/docs-templates-native-demo-basic/index.html +0 -15
  563. package/dist/docs/~demos/docs-templates-voice-demo-demo/index.html +0 -15
  564. package/dist/docs/~demos/markdown-demo-citations/index.html +0 -15
  565. package/dist/docs/~demos/markdown-demo-cursor/index.html +0 -15
  566. package/dist/docs/~demos/markdown-demo-mathjax/index.html +0 -15
  567. package/dist/docs/~demos/markdown-demo-md/index.html +0 -15
  568. package/dist/docs/~demos/sender-demo-basic/index.html +0 -15
  569. package/dist/docs/~demos/sender-demo-disabled/index.html +0 -15
  570. package/dist/docs/~demos/sender-demo-loading/index.html +0 -15
  571. package/dist/docs/~demos/sender-demo-moreprefixaction/index.html +0 -15
  572. package/dist/docs/~demos/sender-demo-withfile/index.html +0 -15
  573. package/dist/docs/~demos/welcome-demo-demo0/index.html +0 -15
  574. package/dist/docs/~demos/welcome-demo-demo1/index.html +0 -15
  575. package/dist/docs/~demos/welcome-demo-demo2/index.html +0 -15
  576. package/dist/index.d.ts +0 -26
  577. package/dist/index.js +0 -20
  578. package/dist/index.less +0 -1
  579. package/dist/markdown/ImageOrVideo.d.ts +0 -2
  580. package/dist/markdown/ImageOrVideo.js +0 -81
  581. package/dist/markdown/Link.js +0 -28
  582. package/dist/markdown/cursor/Blur.d.ts +0 -3
  583. package/dist/markdown/cursor/Blur.js +0 -7
  584. package/dist/markdown/cursor/Dot.d.ts +0 -3
  585. package/dist/markdown/cursor/Dot.js +0 -16
  586. package/dist/markdown/cursor/Underline.d.ts +0 -3
  587. package/dist/markdown/cursor/Underline.js +0 -7
  588. package/dist/markdown/cursor/index.less +0 -124
  589. package/dist/markdown/hooks/index.d.ts +0 -1
  590. package/dist/markdown/hooks/index.js +0 -49
  591. package/dist/markdown/index.d.ts +0 -16
  592. package/dist/markdown/index.js +0 -37
  593. package/dist/markdown/index.less +0 -204
  594. package/dist/markdown/type.d.ts +0 -46
  595. package/dist/provider/types.d.ts +0 -8
  596. package/dist/sender/SenderHeader.d.ts +0 -19
  597. package/dist/sender/StopLoading.js +0 -20
  598. package/dist/sender/components/ActionButton.d.ts +0 -22
  599. package/dist/sender/components/ClearButton.js +0 -13
  600. package/dist/sender/components/LoadingButton.js +0 -22
  601. package/dist/sender/components/SendButton.js +0 -14
  602. package/dist/sender/components/SpeechButton/RecordingIcon.d.ts +0 -5
  603. package/dist/sender/components/SpeechButton/RecordingIcon.js +0 -49
  604. package/dist/sender/components/SpeechButton/index.js +0 -30
  605. package/dist/sender/index.d.ts +0 -61
  606. package/dist/sender/style/header.d.ts +0 -4
  607. package/dist/sender/style/header.js +0 -46
  608. package/dist/sender/style/index.d.ts +0 -10
  609. package/dist/sender/style/index.js +0 -123
  610. package/dist/stream/index.en-US.md.bk +0 -50
  611. package/dist/stream/index.zh-CN.md.bk +0 -51
  612. package/dist/theme/components.d.ts +0 -10
  613. package/dist/theme/cssinjs-utils.d.ts +0 -14
  614. package/dist/theme/genStyleUtils.d.ts +0 -28
  615. package/dist/theme/useToken.d.ts +0 -18
  616. package/dist/theme/useToken.js +0 -110
  617. package/dist/voice-chat/Recorder/index.d.ts +0 -26
  618. package/dist/voice-chat/VoiceChatProvider/context.d.ts +0 -22
  619. package/dist/voice-chat/VoiceChatProvider/context.js +0 -3
  620. package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.d.ts +0 -1
  621. package/dist/voice-chat/VoiceChatProvider/hooks/useChatState.js +0 -5
  622. package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.d.ts +0 -8
  623. package/dist/voice-chat/VoiceChatProvider/hooks/useMessages.js +0 -31
  624. package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.d.ts +0 -5
  625. package/dist/voice-chat/VoiceChatProvider/hooks/useRecorder.js +0 -48
  626. package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.d.ts +0 -4
  627. package/dist/voice-chat/VoiceChatProvider/hooks/useVoiceChat.js +0 -10
  628. package/dist/voice-chat/VoiceChatProvider/index.d.ts +0 -9
  629. package/dist/voice-chat/VoiceChatProvider/index.js +0 -55
  630. package/dist/voice-chat/VoiceChatService/index.d.ts +0 -34
  631. package/dist/voice-chat/index.d.ts +0 -2
  632. package/dist/voice-chat/index.js +0 -2
  633. package/dist/voice-chat/types/index.d.ts +0 -12
  634. package/dist/voice-chat/types/index.js +0 -4
  635. package/dist/welcome/icon.d.ts +0 -2
  636. package/dist/welcome/icon.js +0 -38
  637. package/dist/welcome/index.d.ts +0 -9
  638. package/dist/welcome/index.js +0 -57
  639. /package/{dist/_util/type.js → lib/AGUI/components/chat/props.js} +0 -0
  640. /package/{dist/bubble/interface.js → lib/AGUI/context/index.js} +0 -0
  641. /package/{dist/bubble/hooks/useDisplayData.d.ts → lib/AGUI/styles.css} +0 -0
  642. /package/{dist/bubble/hooks/useDisplayData.js → lib/AGUI/types/css.d.ts} +0 -0
  643. /package/{dist/bubble/hooks/useListData.d.ts → lib/AGUI/types/css.js} +0 -0
  644. /package/{dist/chat-anywhere/hooks/types.js → lib/AGUI/types/index.js} +0 -0
  645. /package/{dist/conversations/interface.js → lib/AGUI/types/suggestions.js} +0 -0
  646. /package/{dist/accordion → lib/Accordion}/index.js +0 -0
  647. /package/{dist/attachments → lib/Attachments}/context.js +0 -0
  648. /package/{dist/attachments → lib/Attachments}/util.d.ts +0 -0
  649. /package/{dist/attachments → lib/Attachments}/util.js +0 -0
  650. /package/{dist/bubble/hooks/useListData.js → lib/Bubble/hooks/useDisplayData.d.ts} +0 -0
  651. /package/{dist/default-cards/DeepThink/index.less → lib/Bubble/hooks/useDisplayData.js} +0 -0
  652. /package/{dist/bubble → lib/Bubble}/index.d.ts +0 -0
  653. /package/{dist/bubble → lib/Bubble}/index.js +0 -0
  654. /package/{dist/markdown/type.js → lib/Bubble/interface.js} +0 -0
  655. /package/{dist/bubble → lib/Bubble}/loading.d.ts +0 -0
  656. /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.d.ts +0 -0
  657. /package/{dist/chat-anywhere → lib/ChatAnywhere}/Chat/Ref.js +0 -0
  658. /package/{dist/provider → lib/ChatAnywhere/hooks}/types.js +0 -0
  659. /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.d.ts +0 -0
  660. /package/{dist/chat-anywhere → lib/ChatAnywhere}/hooks/useSessionList.js +0 -0
  661. /package/{dist/conversations → lib/Conversations}/hooks/useGroupable.js +0 -0
  662. /package/{dist/theme/components.js → lib/Conversations/interface.js} +0 -0
  663. /package/{dist/markdown → lib/Markdown}/Citation.d.ts +0 -0
  664. /package/{dist/markdown → lib/Markdown}/Link.d.ts +0 -0
  665. /package/{dist/markdown → lib/Markdown}/Markdown.d.ts +0 -0
  666. /package/{dist/markdown → lib/Markdown}/hooks/useTypedEffect.d.ts +0 -0
  667. /package/{dist/markdown → lib/Markdown}/plugins/footnote.d.ts +0 -0
  668. /package/{dist/markdown → lib/Markdown}/plugins/footnote.js +0 -0
  669. /package/{dist/markdown → lib/Markdown}/plugins/katexDir.d.ts +0 -0
  670. /package/{dist/markdown → lib/Markdown}/plugins/katexDir.js +0 -0
  671. /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.d.ts +0 -0
  672. /package/{dist/markdown → lib/Markdown}/rehype/fadeIn.js +0 -0
  673. /package/{dist/theme/cssinjs-utils.js → lib/Markdown/type.js} +0 -0
  674. /package/{dist/markdown → lib/Markdown}/utils.d.ts +0 -0
  675. /package/{dist/sender → lib/Sender}/components/ClearButton.d.ts +0 -0
  676. /package/{dist/sender → lib/Sender}/components/LoadingButton.d.ts +0 -0
  677. /package/{dist/sender → lib/Sender}/components/SendButton.d.ts +0 -0
  678. /package/{dist/sender → lib/Sender}/components/SpeechButton/index.d.ts +0 -0
  679. /package/{dist/sender → lib/Sender}/useSpeech.d.ts +0 -0
  680. /package/{dist/sender → lib/Sender}/useSpeech.js +0 -0
  681. /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.d.ts +0 -0
  682. /package/{dist/_util → lib/Util}/hooks/use-proxy-imperative-handle.js +0 -0
  683. /package/{dist/_util → lib/Util}/type.d.ts +0 -0
  684. /package/{dist/_util → lib/Util}/warning.js +0 -0
  685. /package/{dist/version → lib/Version}/index.d.ts +0 -0
  686. /package/{dist/version → lib/Version}/index.js +0 -0
@@ -1,168 +1,152 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _templateObject;
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2
9
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
11
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
- import RecorderCore from 'recorder-core';
12
- import 'recorder-core/src/extensions/waveview';
13
- import { BIT_RATE, FRAME_SIZE, SAMPLE_RATE } from "../types";
14
- import VoiceChatService from "../VoiceChatService";
15
- var noop = function noop() {};
16
- var Recorder = /*#__PURE__*/function () {
17
- function Recorder(props) {
18
- _classCallCheck(this, Recorder);
19
- _defineProperty(this, "_recorderInstance", void 0);
20
- _defineProperty(this, "_voiceChatService", void 0);
21
- _defineProperty(this, "_recorderWave", void 0);
22
- // @ts-ignore
23
- _defineProperty(this, "_sendPcmBufferRef", void 0);
24
- _defineProperty(this, "_sendChunkRef", void 0);
25
- // @ts-ignore
26
- _defineProperty(this, "_sendLastFrameRef", void 0);
27
- _defineProperty(this, "onStart", void 0);
28
- _defineProperty(this, "onStop", void 0);
29
- _defineProperty(this, "chatState", void 0);
30
- var wsURL = props.wsURL,
31
- onProcessResponseText = props.onProcessResponseText,
32
- onProcessASR = props.onProcessASR,
33
- onProcessTTS = props.onProcessTTS;
34
- var _props$onStart = props.onStart,
35
- onStart = _props$onStart === void 0 ? noop : _props$onStart,
36
- _props$onStop = props.onStop,
37
- onStop = _props$onStop === void 0 ? noop : _props$onStop;
38
- var chatState = props.chatState;
39
- this.onStart = onStart;
40
- this.onStop = onStop;
41
- this.chatState = chatState;
42
- this._voiceChatService = new VoiceChatService({
43
- chatState: chatState,
44
- wsURL: wsURL,
45
- onProcessResponseText: onProcessResponseText,
46
- onProcessASR: onProcessASR,
47
- onProcessTTS: onProcessTTS
48
- });
49
- }
50
- _createClass(Recorder, [{
51
- key: "start",
52
- value: function () {
53
- var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
54
- var _this = this;
55
- var clearBufferIdx, recorder;
56
- return _regeneratorRuntime().wrap(function _callee$(_context) {
57
- while (1) switch (_context.prev = _context.next) {
58
- case 0:
59
- this.reset();
60
- _context.next = 3;
61
- return this._voiceChatService.connect();
62
- case 3:
63
- clearBufferIdx = 0;
64
- recorder = RecorderCore({
65
- type: 'unknown',
66
- onProcess: function onProcess(buffers, powerLevel, bufferDuration, bufferSampleRate, newBufferIdx) {
67
- var buffer = buffers[buffers.length - 1];
68
- _this._recorderWave && _this._recorderWave.input(buffer, powerLevel, bufferSampleRate);
69
- for (var i = clearBufferIdx; i < newBufferIdx; i++) {
70
- buffers[i] = null;
71
- }
72
- clearBufferIdx = newBufferIdx;
73
- _this.process(buffers, bufferSampleRate, false);
74
- }
75
- });
76
- this._recorderInstance = recorder;
77
- this._recorderInstance.open(function () {
78
- // this._recorderWave = RecorderCore.WaveView({
79
- // elem: '.asr',
80
- // width: 165,
81
- // height: 45,
82
- // });
83
- _this._recorderInstance.start();
84
- _this.onStart();
85
- }, function () {
86
- return console.log('error');
87
- });
88
- case 7:
89
- case "end":
90
- return _context.stop();
91
- }
92
- }, _callee, this);
93
- }));
94
- function start() {
95
- return _start.apply(this, arguments);
96
- }
97
- return start;
98
- }()
99
- }, {
100
- key: "stop",
101
- value: function stop() {
102
- try {
103
- var _this$_recorderInstan, _this$_voiceChatServi;
104
- (_this$_recorderInstan = this._recorderInstance) === null || _this$_recorderInstan === void 0 || _this$_recorderInstan.stop(undefined, undefined, true);
105
- (_this$_voiceChatServi = this._voiceChatService) === null || _this$_voiceChatServi === void 0 || _this$_voiceChatServi.close();
106
- this.onStop();
107
- this.process([], 0, true);
108
- } catch (error) {
109
- console.error(error);
110
- }
111
- }
112
- }, {
113
- key: "reset",
114
- value: function reset() {
115
- this._sendPcmBufferRef = new Int16Array(0);
116
- this._sendChunkRef = null;
117
- this._sendLastFrameRef = null;
118
- }
119
- }, {
120
- key: "send",
121
- value: function send(pcmFrame, isClose) {
122
- if (isClose && pcmFrame.length === 0) {
123
- var _this$_sendLastFrameR;
124
- var len = this._sendLastFrameRef ? (_this$_sendLastFrameR = this._sendLastFrameRef) === null || _this$_sendLastFrameR === void 0 ? void 0 : _this$_sendLastFrameR.length : Math.round(SAMPLE_RATE / 1000 * 50);
125
- pcmFrame = new Int16Array(len);
126
- }
127
- this._sendLastFrameRef = pcmFrame;
128
- this._voiceChatService.send(pcmFrame.buffer);
12
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
+ import { Image } from "@agentscope-ai/design";
14
+ import { useAsyncEffect } from 'ahooks';
15
+ import { theme as AntdTheme } from 'antd';
16
+ import { kebabCase } from 'lodash';
17
+ import React, { useEffect, useId, useMemo, useState } from 'react';
18
+ import { createGlobalStyle, useProviderContext } from "./..";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
+ var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-mermaid {\n &-preview img {\n background: ", ";\n }\n}\n"])), function (p) {
23
+ return p.prefix;
24
+ }, function (p) {
25
+ return p.theme.colorBgBase;
26
+ });
27
+
28
+ // 懒加载 Mermaid 实例
29
+ var mermaidPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
30
+ var module;
31
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
32
+ while (1) switch (_context.prev = _context.next) {
33
+ case 0:
34
+ if (!(typeof window === 'undefined')) {
35
+ _context.next = 2;
36
+ break;
37
+ }
38
+ return _context.abrupt("return");
39
+ case 2:
40
+ _context.next = 4;
41
+ return import('mermaid');
42
+ case 4:
43
+ module = _context.sent;
44
+ return _context.abrupt("return", module.default);
45
+ case 6:
46
+ case "end":
47
+ return _context.stop();
129
48
  }
130
- }, {
131
- key: "process",
132
- value: function process(buffers, bufferSampleRate, isClose) {
133
- var pcm = new Int16Array(0);
134
- if (buffers.length > 0) {
135
- var chunk = RecorderCore.SampleData(buffers, bufferSampleRate, SAMPLE_RATE, this._sendChunkRef);
136
- this._sendChunkRef = chunk;
137
- pcm = chunk.data;
138
- }
139
- var pcmBuffer = this._sendPcmBufferRef;
140
- var tmp = new Int16Array(pcmBuffer.length + pcm.length);
141
- tmp.set(pcmBuffer, 0);
142
- tmp.set(pcm, pcmBuffer.length);
143
- pcmBuffer = tmp;
144
- var chunkSize = FRAME_SIZE / (BIT_RATE / 8);
145
- while (true) {
146
- if (pcmBuffer.length >= chunkSize) {
147
- var frame = new Int16Array(pcmBuffer.subarray(0, chunkSize));
148
- pcmBuffer = new Int16Array(pcmBuffer.subarray(chunkSize));
149
- var closeVal = false;
150
- if (isClose && pcmBuffer.length === 0) {
151
- closeVal = true;
49
+ }, _callee);
50
+ }))();
51
+ export default function Mermaid(props) {
52
+ var content = props.content,
53
+ width = props.width,
54
+ height = props.height;
55
+ var Style = useStyle();
56
+ var _useProviderContext = useProviderContext(),
57
+ theme = _useProviderContext.theme,
58
+ getPrefixCls = _useProviderContext.getPrefixCls;
59
+ var prefixCls = getPrefixCls('mermaid');
60
+ var mermaidConfig = useMemo(function () {
61
+ return {
62
+ theme: theme.algorithm === AntdTheme.darkAlgorithm ? 'dark' : 'default',
63
+ securityLevel: 'loose',
64
+ startOnLoad: false
65
+ };
66
+ }, [theme.algorithm, theme.token.fontFamily]);
67
+ var _useState = useState(''),
68
+ _useState2 = _slicedToArray(_useState, 2),
69
+ renderedContent = _useState2[0],
70
+ setRenderedContent = _useState2[1];
71
+ var _useState3 = useState(),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ blobUrl = _useState4[0],
74
+ setBlobUrl = _useState4[1];
75
+ var id = useId();
76
+ var mermaidId = kebabCase("mermaid-".concat(id));
77
+ useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
78
+ var mermaidInstance, isValid, _yield$mermaidInstanc, svg;
79
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
80
+ while (1) switch (_context2.prev = _context2.next) {
81
+ case 0:
82
+ _context2.prev = 0;
83
+ _context2.next = 3;
84
+ return mermaidPromise;
85
+ case 3:
86
+ mermaidInstance = _context2.sent;
87
+ if (mermaidInstance) {
88
+ _context2.next = 7;
89
+ break;
152
90
  }
153
- this.send(frame, closeVal);
154
- if (!closeVal) continue;
155
- } else if (isClose) {
156
- var _frame = new Int16Array(chunkSize);
157
- _frame.set(pcmBuffer);
158
- pcmBuffer = new Int16Array(0);
159
- this.send(_frame, true);
160
- }
161
- break;
91
+ setRenderedContent(content);
92
+ return _context2.abrupt("return");
93
+ case 7:
94
+ _context2.next = 9;
95
+ return mermaidInstance.parse(content);
96
+ case 9:
97
+ isValid = _context2.sent;
98
+ if (!isValid) {
99
+ _context2.next = 19;
100
+ break;
101
+ }
102
+ mermaidInstance.initialize(mermaidConfig);
103
+ _context2.next = 14;
104
+ return mermaidInstance.render(mermaidId, content);
105
+ case 14:
106
+ _yield$mermaidInstanc = _context2.sent;
107
+ svg = _yield$mermaidInstanc.svg;
108
+ setRenderedContent(svg);
109
+ _context2.next = 20;
110
+ break;
111
+ case 19:
112
+ throw new Error('Invalid Mermaid syntax');
113
+ case 20:
114
+ _context2.next = 26;
115
+ break;
116
+ case 22:
117
+ _context2.prev = 22;
118
+ _context2.t0 = _context2["catch"](0);
119
+ if (!renderedContent) console.error('Mermaid parse error: ', _context2.t0);
120
+ setRenderedContent(renderedContent || '');
121
+ case 26:
122
+ case "end":
123
+ return _context2.stop();
162
124
  }
163
- this._sendPcmBufferRef = pcmBuffer;
125
+ }, _callee2, null, [[0, 22]]);
126
+ })), [content, mermaidConfig]);
127
+ useEffect(function () {
128
+ if (renderedContent) {
129
+ var blob = new Blob([renderedContent], {
130
+ type: 'image/svg+xml'
131
+ });
132
+ var url = URL.createObjectURL(blob);
133
+ setBlobUrl(url);
134
+ return function () {
135
+ URL.revokeObjectURL(url);
136
+ };
164
137
  }
165
- }]);
166
- return Recorder;
167
- }();
168
- export default Recorder;
138
+ }, [renderedContent]);
139
+ if (!blobUrl) return null;
140
+ return /*#__PURE__*/_jsxs(_Fragment, {
141
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsx(Image, {
142
+ className: prefixCls,
143
+ src: blobUrl,
144
+ alt: 'mermaid',
145
+ width: width,
146
+ height: height,
147
+ preview: {
148
+ rootClassName: "".concat(prefixCls, "-preview")
149
+ }
150
+ })]
151
+ });
152
+ }
@@ -2,9 +2,10 @@ import React from "react";
2
2
  import { ProviderProps } from './types';
3
3
  import { DefaultCards } from "..";
4
4
  export declare const CustomCardsContext: React.Context<Record<string, any>>;
5
- export declare const CustomCardsProvider: (props: Pick<ProviderProps, 'cardConfig' | 'children'>) => React.JSX.Element;
5
+ export declare const CustomCardsProvider: (props: Pick<ProviderProps, 'cardConfig' | 'children'>) => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const useCustomCardsContext: () => {
7
7
  DeepThink: typeof DefaultCards.DeepThink;
8
+ DeepThinking: typeof DefaultCards.DeepThink;
8
9
  Files: typeof DefaultCards.Files;
9
10
  Images: typeof DefaultCards.Images;
10
11
  Text: typeof DefaultCards.Text;
@@ -6,11 +6,13 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import React, { createContext } from "react";
8
8
  import { DefaultCards } from "./..";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
9
10
  export var CustomCardsContext = /*#__PURE__*/createContext(undefined);
10
11
  export var CustomCardsProvider = function CustomCardsProvider(props) {
11
- return /*#__PURE__*/React.createElement(CustomCardsContext.Provider, {
12
- value: props.cardConfig
13
- }, props.children);
12
+ return /*#__PURE__*/_jsx(CustomCardsContext.Provider, {
13
+ value: props.cardConfig,
14
+ children: props.children
15
+ });
14
16
  };
15
17
  export var useCustomCardsContext = function useCustomCardsContext() {
16
18
  var cardConfig = React.useContext(CustomCardsContext);
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import { ProviderProps } from './types';
3
3
  export declare const GlobalContext: React.Context<Pick<ProviderProps, "markdown">>;
4
- export declare const GlobalProvider: (props: Pick<ProviderProps, 'markdown' | 'children'>) => React.JSX.Element;
4
+ export declare const GlobalProvider: (props: Pick<ProviderProps, 'markdown' | 'children'>) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const useGlobalContext: () => Pick<ProviderProps, "markdown">;
@@ -1,9 +1,11 @@
1
1
  import React, { createContext } from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
2
3
  export var GlobalContext = /*#__PURE__*/createContext(undefined);
3
4
  export var GlobalProvider = function GlobalProvider(props) {
4
- return /*#__PURE__*/React.createElement(GlobalContext.Provider, {
5
- value: props
6
- }, props.children);
5
+ return /*#__PURE__*/_jsx(GlobalContext.Provider, {
6
+ value: props,
7
+ children: props.children
8
+ });
7
9
  };
8
10
  export var useGlobalContext = function useGlobalContext() {
9
11
  var context = React.useContext(GlobalContext);
@@ -1,8 +1,7 @@
1
- import React from "react";
2
1
  import { CustomCardsProvider, CustomCardsContext, useCustomCardsContext } from './CustomCardsProvider';
3
2
  import { GlobalProvider, GlobalContext, useGlobalContext } from './GlobalProvider';
4
3
  import type { ProviderProps } from './types';
5
- declare const SparkChatProvider: (props: ProviderProps) => React.JSX.Element;
4
+ declare const SparkChatProvider: (props: ProviderProps) => import("react/jsx-runtime").JSX.Element;
6
5
  export declare function useProviderContext(): import("antd/es/config-provider").ConfigConsumerProps;
7
6
  export default SparkChatProvider;
8
7
  export { useCustomCardsContext, CustomCardsProvider, useGlobalContext, CustomCardsContext, GlobalProvider, GlobalContext, ProviderProps };
@@ -1,16 +1,19 @@
1
- import { ConfigProvider } from "antd";
1
+ import { ConfigProvider } from "@agentscope-ai/design";
2
2
  import React from "react";
3
3
  import { CustomCardsProvider, CustomCardsContext, useCustomCardsContext } from "./CustomCardsProvider";
4
4
  import { GlobalProvider, GlobalContext, useGlobalContext } from "./GlobalProvider";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
5
6
  var SparkChatProvider = function SparkChatProvider(props) {
6
7
  var children = props.children,
7
8
  cardConfig = props.cardConfig,
8
9
  markdown = props.markdown;
9
- return /*#__PURE__*/React.createElement(GlobalProvider, {
10
- markdown: markdown
11
- }, /*#__PURE__*/React.createElement(CustomCardsProvider, {
12
- cardConfig: cardConfig
13
- }, children));
10
+ return /*#__PURE__*/_jsx(GlobalProvider, {
11
+ markdown: markdown,
12
+ children: /*#__PURE__*/_jsx(CustomCardsProvider, {
13
+ cardConfig: cardConfig,
14
+ children: children
15
+ })
16
+ });
14
17
  };
15
18
  export function useProviderContext() {
16
19
  var context = React.useContext(ConfigProvider.ConfigContext);
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ export interface ProviderProps {
3
+ /**
4
+ * @description 提供者组件的子元素,用于包装应用内容
5
+ * @descriptionEn Child elements of the provider component for wrapping application content
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * @description 卡片配置对象,用于自定义不同类型卡片的渲染
10
+ * @descriptionEn Card configuration object for customizing rendering of different card types
11
+ */
12
+ cardConfig: Record<string, any>;
13
+ /**
14
+ * @description Markdown渲染配置,用于控制文本显示效果
15
+ * @descriptionEn Markdown rendering configuration for controlling text display effects
16
+ */
17
+ markdown?: {
18
+ /**
19
+ * @description 基础字体大小,影响所有Markdown内容的字体大小
20
+ * @descriptionEn Base font size that affects font size of all Markdown content
21
+ */
22
+ baseFontSize?: number;
23
+ };
24
+ }
@@ -0,0 +1 @@
1
+ export {};
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ interface IItem {
3
+ icon: string | React.ReactNode;
4
+ label: string | React.ReactNode;
5
+ tooltip?: string | React.ReactNode;
6
+ value: string;
7
+ }
8
+ interface IProps {
9
+ options: IItem[];
10
+ value: string;
11
+ desc?: React.ReactNode | string;
12
+ onChange: (value: string) => void;
13
+ style?: React.CSSProperties;
14
+ closeTip?: React.ReactNode | string;
15
+ }
16
+ export default function (props: IProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,109 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _templateObject;
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
9
+ import React, { useMemo } from "react";
10
+ import { createGlobalStyle, useProviderContext } from "../..";
11
+ import { SparkFalseLine } from "@agentscope-ai/icons";
12
+ import { Tooltip } from "@agentscope-ai/design";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-sender-mode-select {\n position: relative;\n height: 40px;\n\n &-options {\n position: absolute;\n top: 4px;\n left: 0;\n right: 0;\n display: flex;\n gap: 8px;\n transition: all 0.3s;\n }\n\n &-option {\n height: 28px;\n display: flex;\n align-items: center;\n fonts: 14px;\n padding: 0 8px;\n border-radius: ", "px;\n gap: 4px;\n border: 1px solid ", ";\n cursor: pointer;\n color: ", ";\n transition: all 0.3s;\n\n &:hover {\n border-color: ", ";\n color: ", ";\n }\n }\n\n &-display {\n position: absolute;\n top: 8px;\n left: 0;\n right: 0;\n height: 40px;\n border: 1px solid ", ";\n border-radius: ", "px ", "px 0 0;\n background: ", ";\n transition: all 0.3s;\n\n &-flex {\n display: flex;\n justify-content: space-between; \n align-items: center;\n height: 32px;\n padding: 0 12px;\n }\n\n &-label {\n display: flex;\n align-items: center;\n gap: 4px;\n fontsize: 14px;\n color: ", ";\n }\n\n &-desc {\n display: flex;\n align-items: center;\n margin: 0 12px 0 auto;\n }\n }\n\n &-hide {\n top: 45px;\n }\n}\n\n"])), function (p) {
17
+ return p.prefix;
18
+ }, function (p) {
19
+ return p.theme.borderRadius;
20
+ }, function (p) {
21
+ return p.theme.colorBorderSecondary;
22
+ }, function (p) {
23
+ return p.theme.colorTextSecondary;
24
+ }, function (p) {
25
+ return p.theme.colorPrimary;
26
+ }, function (p) {
27
+ return p.theme.colorPrimary;
28
+ }, function (p) {
29
+ return p.theme.colorBorderSecondary;
30
+ }, function (p) {
31
+ return p.theme.borderRadiusLG;
32
+ }, function (p) {
33
+ return p.theme.borderRadiusLG;
34
+ }, function (p) {
35
+ return p.theme.colorFillTertiary;
36
+ }, function (p) {
37
+ return p.theme.colorTextSecondary;
38
+ });
39
+ export default function (props) {
40
+ var Style = useStyle();
41
+ var _useProviderContext = useProviderContext(),
42
+ getPrefixCls = _useProviderContext.getPrefixCls;
43
+ var prefixCls = getPrefixCls('sender-mode-select');
44
+ var value = props.value,
45
+ onChange = props.onChange;
46
+ var valueObject = useMemo(function () {
47
+ var item = props.options.find(function (item) {
48
+ return item.value === value;
49
+ });
50
+ return item;
51
+ }, [props.value]);
52
+ var close = /*#__PURE__*/_jsx(SparkFalseLine, {
53
+ onClick: function onClick() {
54
+ return onChange(undefined);
55
+ },
56
+ style: {
57
+ cursor: 'pointer',
58
+ fontSize: 20
59
+ }
60
+ });
61
+ console.log(props.options);
62
+ return /*#__PURE__*/_jsxs(_Fragment, {
63
+ children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
64
+ className: prefixCls,
65
+ style: props.style,
66
+ children: [/*#__PURE__*/_jsx("div", {
67
+ className: "".concat(prefixCls, "-options ").concat(value ? "".concat(prefixCls, "-hide") : ''),
68
+ children: props.options.map(function (item) {
69
+ var node = /*#__PURE__*/_jsx(Display, _objectSpread({
70
+ onClick: function onClick() {
71
+ return onChange(item.value);
72
+ },
73
+ className: "".concat(prefixCls, "-option")
74
+ }, item), item.value);
75
+ return node;
76
+ })
77
+ }), /*#__PURE__*/_jsx("div", {
78
+ className: "".concat(prefixCls, "-display ").concat(value ? '' : "".concat(prefixCls, "-hide")),
79
+ children: /*#__PURE__*/_jsxs("div", {
80
+ className: "".concat(prefixCls, "-display-flex"),
81
+ children: [/*#__PURE__*/_jsx(Display, _objectSpread(_objectSpread({}, valueObject), {}, {
82
+ className: "".concat(prefixCls, "-display-label")
83
+ })), props.desc && /*#__PURE__*/_jsx("div", {
84
+ className: "".concat(prefixCls, "-display-desc"),
85
+ children: props.desc
86
+ }), props.closeTip ? /*#__PURE__*/_jsx(Tooltip, {
87
+ title: props.closeTip,
88
+ children: close
89
+ }) : close]
90
+ })
91
+ })]
92
+ })]
93
+ });
94
+ }
95
+ function Display(props) {
96
+ var node = /*#__PURE__*/_jsxs("div", {
97
+ className: props.className,
98
+ onClick: props.onClick,
99
+ children: [props.icon, props.label]
100
+ });
101
+ if (props.tooltip) {
102
+ return /*#__PURE__*/_jsx(Tooltip, {
103
+ title: props.tooltip,
104
+ children: node
105
+ });
106
+ } else {
107
+ return node;
108
+ }
109
+ }
File without changes
File without changes