@agentscope-ai/chat 1.1.20 → 1.1.22

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 (335) hide show
  1. package/bin/client.js +1 -1
  2. package/components/AGUI/components/HelpModal/icons.tsx +68 -0
  3. package/components/AGUI/components/HelpModal/index.tsx +1 -0
  4. package/components/AGUI/components/HelpModal/modal.tsx +101 -0
  5. package/components/AGUI/components/chat/Button.tsx +18 -0
  6. package/components/AGUI/components/chat/Chat.tsx +780 -0
  7. package/components/AGUI/components/chat/ChatContext.tsx +248 -0
  8. package/components/AGUI/components/chat/CodeBlock.tsx +406 -0
  9. package/components/AGUI/components/chat/Header.tsx +22 -0
  10. package/components/AGUI/components/chat/Icons.tsx +237 -0
  11. package/components/AGUI/components/chat/ImageUploadQueue.tsx +77 -0
  12. package/components/AGUI/components/chat/Input.tsx +24 -0
  13. package/components/AGUI/components/chat/Markdown.tsx +134 -0
  14. package/components/AGUI/components/chat/Messages.tsx +259 -0
  15. package/components/AGUI/components/chat/Modal.tsx +133 -0
  16. package/components/AGUI/components/chat/Popup.tsx +57 -0
  17. package/components/AGUI/components/chat/PoweredByTag.tsx +29 -0
  18. package/components/AGUI/components/chat/Sidebar.tsx +74 -0
  19. package/components/AGUI/components/chat/Suggestion.tsx +132 -0
  20. package/components/AGUI/components/chat/Suggestions.tsx +20 -0
  21. package/components/AGUI/components/chat/Textarea.tsx +61 -0
  22. package/components/AGUI/components/chat/Window.tsx +152 -0
  23. package/components/AGUI/components/chat/index.tsx +11 -0
  24. package/components/AGUI/components/chat/messages/AssistantMessage.tsx +69 -0
  25. package/components/AGUI/components/chat/messages/RenderActionExecutionMessage.tsx +129 -0
  26. package/components/AGUI/components/chat/messages/RenderAgentStateMessage.tsx +116 -0
  27. package/components/AGUI/components/chat/messages/RenderImageMessage.tsx +64 -0
  28. package/components/AGUI/components/chat/messages/RenderResultMessage.tsx +26 -0
  29. package/components/AGUI/components/chat/messages/RenderTextMessage.tsx +51 -0
  30. package/components/AGUI/components/chat/messages/UserMessage.tsx +10 -0
  31. package/components/AGUI/components/chat/props.ts +186 -0
  32. package/components/AGUI/components/index.ts +1 -0
  33. package/components/AGUI/context/index.ts +1 -0
  34. package/components/AGUI/hooks/index.ts +1 -0
  35. package/components/AGUI/hooks/use-copilot-chat-suggestions.tsx +122 -0
  36. package/components/AGUI/hooks/use-copy-to-clipboard.tsx +29 -0
  37. package/components/AGUI/hooks/use-dark-mode.ts +10 -0
  38. package/components/AGUI/hooks/use-push-to-talk.tsx +166 -0
  39. package/components/AGUI/index.tsx +4 -0
  40. package/components/AGUI/lib/utils.test.ts +7 -0
  41. package/components/AGUI/lib/utils.ts +27 -0
  42. package/components/AGUI/styles.css +0 -0
  43. package/components/AGUI/types/css.ts +0 -0
  44. package/components/AGUI/types/index.ts +1 -0
  45. package/components/AGUI/types/suggestions.ts +6 -0
  46. package/components/Accordion/Accordion.tsx +203 -0
  47. package/components/Accordion/BodyContent.tsx +28 -0
  48. package/components/Accordion/DeepThinking.tsx +91 -0
  49. package/components/Accordion/SoftLightTitle.tsx +13 -0
  50. package/components/Accordion/demo/search.tsx +39 -0
  51. package/components/Accordion/demo/steps.tsx +135 -0
  52. package/components/Accordion/demo/thinking.tsx +62 -0
  53. package/components/Accordion/index.en-US.md +34 -0
  54. package/components/Accordion/index.tsx +3 -0
  55. package/components/Accordion/index.zh-CN.md +34 -0
  56. package/components/Accordion/style.ts +208 -0
  57. package/components/AgentScopeRuntimeWebUI/demo/index.tsx +4 -0
  58. package/components/AgentScopeRuntimeWebUI/index.tsx +3 -0
  59. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Request/Builder.tsx +82 -0
  60. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Request/Card.tsx +52 -0
  61. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Actions.tsx +39 -0
  62. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Builder.tsx +205 -0
  63. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Card.tsx +44 -0
  64. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Error.tsx +7 -0
  65. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Message.tsx +23 -0
  66. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Reasoning.tsx +16 -0
  67. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/Response/Tool.tsx +19 -0
  68. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/index.tsx +0 -0
  69. package/components/AgentScopeRuntimeWebUI/lib/AgentScopeRuntime/types.tsx +100 -0
  70. package/components/AgentScopeRuntimeWebUI/lib/Chat/Input/index.tsx +77 -0
  71. package/components/AgentScopeRuntimeWebUI/lib/Chat/Input/useAttachments.tsx +53 -0
  72. package/components/AgentScopeRuntimeWebUI/lib/Chat/MessageList/index.tsx +30 -0
  73. package/components/AgentScopeRuntimeWebUI/lib/Chat/Welcome/index.tsx +66 -0
  74. package/components/AgentScopeRuntimeWebUI/lib/Chat/Welcome/styles.ts +51 -0
  75. package/components/AgentScopeRuntimeWebUI/lib/Chat/hooks/index.tsx +5 -0
  76. package/components/AgentScopeRuntimeWebUI/lib/Chat/hooks/useChatController.tsx +130 -0
  77. package/components/AgentScopeRuntimeWebUI/lib/Chat/hooks/useChatMessageHandler.tsx +87 -0
  78. package/components/AgentScopeRuntimeWebUI/lib/Chat/hooks/useChatRequest.tsx +114 -0
  79. package/components/AgentScopeRuntimeWebUI/lib/Chat/hooks/useChatSessionHandler.tsx +50 -0
  80. package/components/AgentScopeRuntimeWebUI/lib/Chat/index.tsx +18 -0
  81. package/components/AgentScopeRuntimeWebUI/lib/Chat/styles.tsx +59 -0
  82. package/components/AgentScopeRuntimeWebUI/lib/ChatAnywhere/ComposedProvider.tsx +27 -0
  83. package/components/AgentScopeRuntimeWebUI/lib/ChatAnywhere/index.tsx +29 -0
  84. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereControl.tsx +0 -0
  85. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereInputContext.tsx +27 -0
  86. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereLayoutContext.tsx +27 -0
  87. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereMessagesContext.tsx +82 -0
  88. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereOptionsContext.tsx +76 -0
  89. package/components/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereSessionsContext.tsx +111 -0
  90. package/components/AgentScopeRuntimeWebUI/lib/Context/useChatAnywhereEventEmitter.tsx +30 -0
  91. package/components/AgentScopeRuntimeWebUI/lib/Header/index.tsx +45 -0
  92. package/components/AgentScopeRuntimeWebUI/lib/Header/styles.ts +23 -0
  93. package/components/AgentScopeRuntimeWebUI/lib/Layout/index.tsx +45 -0
  94. package/components/AgentScopeRuntimeWebUI/lib/Layout/styles.tsx +104 -0
  95. package/components/AgentScopeRuntimeWebUI/lib/Sessions/index.tsx +114 -0
  96. package/components/AgentScopeRuntimeWebUI/lib/Sessions/styles.tsx +0 -0
  97. package/components/AgentScopeRuntimeWebUI/lib/demo/OptionsPanel/FormItem.tsx +37 -0
  98. package/components/AgentScopeRuntimeWebUI/lib/demo/OptionsPanel/OptionsEditor.tsx +163 -0
  99. package/components/AgentScopeRuntimeWebUI/lib/demo/OptionsPanel/defaultConfig.ts +43 -0
  100. package/components/AgentScopeRuntimeWebUI/lib/demo/OptionsPanel/index.tsx +27 -0
  101. package/components/AgentScopeRuntimeWebUI/lib/demo/index.tsx +57 -0
  102. package/components/AgentScopeRuntimeWebUI/lib/demo/sessionApi/index.ts +51 -0
  103. package/components/AgentScopeRuntimeWebUI/lib/types/IChatAnywhere.ts +358 -0
  104. package/components/AgentScopeRuntimeWebUI/lib/types/IMessages.tsx +52 -0
  105. package/components/AgentScopeRuntimeWebUI/lib/types/ISessions.tsx +29 -0
  106. package/components/AgentScopeRuntimeWebUI/lib/types/index.tsx +3 -0
  107. package/components/AgentScopeRuntimeWebUI/starter/OptionsPanel/FormItem.tsx +37 -0
  108. package/components/AgentScopeRuntimeWebUI/starter/OptionsPanel/OptionsEditor.tsx +163 -0
  109. package/components/AgentScopeRuntimeWebUI/starter/OptionsPanel/defaultConfig.ts +43 -0
  110. package/components/AgentScopeRuntimeWebUI/starter/OptionsPanel/index.tsx +27 -0
  111. package/components/AgentScopeRuntimeWebUI/starter/index.tsx +57 -0
  112. package/components/AgentScopeRuntimeWebUI/starter/sessionApi/index.ts +51 -0
  113. package/components/Attachments/DropArea.tsx +97 -0
  114. package/components/Attachments/FileList/AudioIcon.tsx +20 -0
  115. package/components/Attachments/FileList/FileListCard.tsx +270 -0
  116. package/components/Attachments/FileList/Progress.tsx +30 -0
  117. package/components/Attachments/FileList/VideoIcon.tsx +20 -0
  118. package/components/Attachments/FileList/index.tsx +201 -0
  119. package/components/Attachments/PlaceholderUploader.tsx +124 -0
  120. package/components/Attachments/SilentUploader.tsx +39 -0
  121. package/components/Attachments/context.tsx +11 -0
  122. package/components/Attachments/demo/basic.tsx +71 -0
  123. package/components/Attachments/index.en-US.md.bk +10 -0
  124. package/components/Attachments/index.tsx +274 -0
  125. package/components/Attachments/index.zh-CN.md.bk +10 -0
  126. package/components/Attachments/style/fileCard.ts +163 -0
  127. package/components/Attachments/style/index.ts +232 -0
  128. package/components/Attachments/util.ts +56 -0
  129. package/components/Bubble/Avatar.tsx +39 -0
  130. package/components/Bubble/Bubble.tsx +131 -0
  131. package/components/Bubble/BubbleList.tsx +105 -0
  132. package/components/Bubble/Cards.tsx +61 -0
  133. package/components/Bubble/Footer.tsx +55 -0
  134. package/components/Bubble/Interrupted.tsx +82 -0
  135. package/components/Bubble/ScrollToBottom.tsx +42 -0
  136. package/components/Bubble/Spin.tsx +13 -0
  137. package/components/Bubble/demo/assistantWithCode.tsx +60 -0
  138. package/components/Bubble/demo/assistantWithErrorStatus.tsx +102 -0
  139. package/components/Bubble/demo/assistantWithImage.tsx +46 -0
  140. package/components/Bubble/demo/assistantWithProcess.tsx +103 -0
  141. package/components/Bubble/demo/assistantWithSearch.tsx +69 -0
  142. package/components/Bubble/demo/assistantWithThinking.tsx +54 -0
  143. package/components/Bubble/demo/basic.tsx +55 -0
  144. package/components/Bubble/demo/userWithFile.tsx +27 -0
  145. package/components/Bubble/demo/userWithImage.tsx +26 -0
  146. package/components/Bubble/hooks/useDisplayData.ts +0 -0
  147. package/components/Bubble/hooks/useListData.ts +0 -0
  148. package/components/Bubble/index.en-US.md +33 -0
  149. package/components/Bubble/index.tsx +21 -0
  150. package/components/Bubble/index.zh-CN.md +33 -0
  151. package/components/Bubble/interface.ts +71 -0
  152. package/components/Bubble/loading.tsx +15 -0
  153. package/components/Bubble/style/avatar.ts +43 -0
  154. package/components/Bubble/style/footer.ts +45 -0
  155. package/components/Bubble/style/index.ts +192 -0
  156. package/components/Bubble/style/list.ts +51 -0
  157. package/components/ChatAnywhere/Chat/Ref.tsx +20 -0
  158. package/components/ChatAnywhere/Chat/index.tsx +56 -0
  159. package/components/ChatAnywhere/Chat/style.ts +59 -0
  160. package/components/ChatAnywhere/Header/index.tsx +37 -0
  161. package/components/ChatAnywhere/Header/style.ts +27 -0
  162. package/components/ChatAnywhere/Input/index.tsx +158 -0
  163. package/components/ChatAnywhere/Input/style.ts +14 -0
  164. package/components/ChatAnywhere/Layout/index.tsx +70 -0
  165. package/components/ChatAnywhere/Layout/style.ts +51 -0
  166. package/components/ChatAnywhere/SessionList/index.tsx +122 -0
  167. package/components/ChatAnywhere/SessionList/style.ts +53 -0
  168. package/components/ChatAnywhere/hooks/ChatAnywhereProvider.tsx +219 -0
  169. package/components/ChatAnywhere/hooks/types.ts +333 -0
  170. package/components/ChatAnywhere/hooks/useInput.tsx +22 -0
  171. package/components/ChatAnywhere/hooks/useMessages.tsx +63 -0
  172. package/components/ChatAnywhere/hooks/useSessionList.tsx +123 -0
  173. package/components/ChatAnywhere/index.tsx +49 -0
  174. package/components/Conversations/GroupTitle.tsx +28 -0
  175. package/components/Conversations/Item.tsx +189 -0
  176. package/components/Conversations/demo/basic.tsx +107 -0
  177. package/components/Conversations/demo/timeline.tsx +111 -0
  178. package/components/Conversations/demo/timestamp.tsx +110 -0
  179. package/components/Conversations/hooks/useGroupable.ts +81 -0
  180. package/components/Conversations/index.en-US.md +32 -0
  181. package/components/Conversations/index.tsx +176 -0
  182. package/components/Conversations/index.zh-CN.md +31 -0
  183. package/components/Conversations/interface.ts +69 -0
  184. package/components/Conversations/style.ts +153 -0
  185. package/components/DefaultCards/DeepThinking/index.tsx +33 -0
  186. package/components/DefaultCards/Files/index.tsx +69 -0
  187. package/components/DefaultCards/Footer/index.tsx +16 -0
  188. package/components/DefaultCards/Images/index.tsx +53 -0
  189. package/components/DefaultCards/Interrupted/index.tsx +13 -0
  190. package/components/DefaultCards/Text/index.tsx +13 -0
  191. package/components/DefaultCards/index.tsx +6 -0
  192. package/components/DeviceAction/actionMap.tsx +100 -0
  193. package/components/DeviceAction/demo/index.tsx +132 -0
  194. package/components/DeviceAction/index.en-US.md +19 -0
  195. package/components/DeviceAction/index.tsx +75 -0
  196. package/components/DeviceAction/index.zh-CN.md +19 -0
  197. package/components/Disclaimer/demo/index.tsx +4 -0
  198. package/components/Disclaimer/demo/withLink.tsx +4 -0
  199. package/components/Disclaimer/index.en-US.md +23 -0
  200. package/components/Disclaimer/index.tsx +42 -0
  201. package/components/Disclaimer/index.zh-CN.md +24 -0
  202. package/components/Disclaimer/style.ts +17 -0
  203. package/components/ImageGenerator/demo/basic.tsx +23 -0
  204. package/components/ImageGenerator/demo/custom.tsx +56 -0
  205. package/components/ImageGenerator/demo/size.tsx +15 -0
  206. package/components/ImageGenerator/index.en-US.md +23 -0
  207. package/components/ImageGenerator/index.tsx +124 -0
  208. package/components/ImageGenerator/index.zh-CN.md +23 -0
  209. package/components/ImageGenerator/style.ts +99 -0
  210. package/components/Markdown/Markdown/AnimationNode.tsx +89 -0
  211. package/components/Markdown/Markdown/Markdown.tsx +61 -0
  212. package/components/Markdown/Markdown/core/Parser.ts +52 -0
  213. package/components/Markdown/Markdown/core/Renderer.ts +121 -0
  214. package/components/Markdown/Markdown/core/index.ts +4 -0
  215. package/components/Markdown/Markdown/defaultComponents/CodeBlock.tsx +113 -0
  216. package/components/Markdown/Markdown/defaultComponents/DisabledImage.tsx +3 -0
  217. package/components/Markdown/Markdown/defaultComponents/Media.tsx +71 -0
  218. package/components/Markdown/Markdown/hooks/index.ts +4 -0
  219. package/components/Markdown/Markdown/hooks/useAnimation.tsx +27 -0
  220. package/components/Markdown/Markdown/hooks/useCitationsData.tsx +36 -0
  221. package/components/Markdown/Markdown/hooks/useStreaming.ts +503 -0
  222. package/components/Markdown/Markdown/hooks/useTyping.ts +22 -0
  223. package/components/Markdown/Markdown/index.tsx +198 -0
  224. package/components/Markdown/Markdown/interface.ts +217 -0
  225. package/components/Markdown/Markdown/style.ts +152 -0
  226. package/components/Markdown/demo/basic.tsx +107 -0
  227. package/components/Markdown/demo/citations.tsx +47 -0
  228. package/components/Markdown/demo/cursor.tsx +9 -0
  229. package/components/Markdown/demo/latex.tsx +77 -0
  230. package/components/Markdown/demo/typing.tsx +82 -0
  231. package/components/Markdown/index.en-US.md +27 -0
  232. package/components/Markdown/index.ts +1 -0
  233. package/components/Markdown/index.zh-CN.md +28 -0
  234. package/components/Markdown/plugins/citations/CitationComponent.tsx +72 -0
  235. package/components/Markdown/plugins/citations/index.tsx +37 -0
  236. package/components/Markdown/plugins/cursor/Dot.tsx +106 -0
  237. package/components/Markdown/plugins/cursor/Underline.tsx +38 -0
  238. package/components/Markdown/plugins/cursor/index.tsx +59 -0
  239. package/components/Markdown/plugins/latex/index.ts +109 -0
  240. package/components/Markdown/plugins/type.ts +71 -0
  241. package/components/Mermaid/demo/basic.tsx +12 -0
  242. package/components/Mermaid/demo/class.tsx +31 -0
  243. package/components/Mermaid/demo/flowchart.tsx +13 -0
  244. package/components/Mermaid/demo/sequence.tsx +18 -0
  245. package/components/Mermaid/demo/state.tsx +16 -0
  246. package/components/Mermaid/demo/timeline.tsx +15 -0
  247. package/components/Mermaid/index.en-US.md +27 -0
  248. package/components/Mermaid/index.tsx +118 -0
  249. package/components/Mermaid/index.zh-CN.md +27 -0
  250. package/components/OperateCard/OperateCard.tsx +93 -0
  251. package/components/OperateCard/demo/index.tsx +35 -0
  252. package/components/OperateCard/demo/rag.tsx +19 -0
  253. package/components/OperateCard/demo/thinking.tsx +17 -0
  254. package/components/OperateCard/demo/todo.tsx +28 -0
  255. package/components/OperateCard/demo/toolCall.tsx +14 -0
  256. package/components/OperateCard/demo/webSearch.tsx +12 -0
  257. package/components/OperateCard/index.en-US.md +51 -0
  258. package/components/OperateCard/index.tsx +1 -0
  259. package/components/OperateCard/index.zh-CN.md +51 -0
  260. package/components/OperateCard/preset/Rag.tsx +90 -0
  261. package/components/OperateCard/preset/Thinking.tsx +45 -0
  262. package/components/OperateCard/preset/TodoList.tsx +73 -0
  263. package/components/OperateCard/preset/ToolCall.tsx +67 -0
  264. package/components/OperateCard/preset/WebSearch.tsx +65 -0
  265. package/components/OperateCard/preset/index.tsx +5 -0
  266. package/components/OperateCard/style.ts +268 -0
  267. package/components/Provider/CustomCardsProvider.tsx +17 -0
  268. package/components/Provider/GlobalProvider.tsx +17 -0
  269. package/components/Provider/index.tsx +33 -0
  270. package/components/Provider/types.ts +23 -0
  271. package/components/ResponsesAPI/index.tsx +0 -0
  272. package/components/Sender/ModeSelect/index.tsx +160 -0
  273. package/components/Sender/ModeSelect/styles.ts +0 -0
  274. package/components/Sender/SenderHeader.tsx +164 -0
  275. package/components/Sender/StopLoading.tsx +48 -0
  276. package/components/Sender/components/ActionButton.tsx +106 -0
  277. package/components/Sender/components/ClearButton.tsx +10 -0
  278. package/components/Sender/components/LoadingButton.tsx +26 -0
  279. package/components/Sender/components/SendButton.tsx +22 -0
  280. package/components/Sender/components/SpeechButton/RecordingIcon.tsx +68 -0
  281. package/components/Sender/components/SpeechButton/index.tsx +30 -0
  282. package/components/Sender/demo/asr.tsx +7 -0
  283. package/components/Sender/demo/basic.tsx +7 -0
  284. package/components/Sender/demo/loading.tsx +5 -0
  285. package/components/Sender/demo/moreMode.tsx +45 -0
  286. package/components/Sender/demo/morePrefixAction.tsx +40 -0
  287. package/components/Sender/demo/withFile.tsx +54 -0
  288. package/components/Sender/demo/withImage.tsx +52 -0
  289. package/components/Sender/index.en-US.md +29 -0
  290. package/components/Sender/index.tsx +491 -0
  291. package/components/Sender/index.zh-CN.md +30 -0
  292. package/components/Sender/style/index.ts +150 -0
  293. package/components/Sender/useSpeech.ts +133 -0
  294. package/components/StatusCard/demo/index.tsx +32 -0
  295. package/components/StatusCard/index.en-US.md +30 -0
  296. package/components/StatusCard/index.tsx +162 -0
  297. package/components/StatusCard/index.zh-CN.md +27 -0
  298. package/components/StatusCard/style.ts +119 -0
  299. package/components/Stream/index.ts +203 -0
  300. package/components/Util/hooks/use-proxy-imperative-handle.ts +25 -0
  301. package/components/Util/sleep.ts +3 -0
  302. package/components/Util/type.ts +1 -0
  303. package/components/Util/warning.ts +118 -0
  304. package/components/Version/index.ts +3 -0
  305. package/components/Voice/Recorder.tsx +3 -0
  306. package/components/Voice/demo/index.tsx +0 -0
  307. package/components/Voice/index.en-US.md +8 -0
  308. package/components/Voice/index.tsx +0 -0
  309. package/components/Voice/index.zh-CN.md +9 -0
  310. package/components/Welcome/demo/EyeFollower.tsx +161 -0
  311. package/components/Welcome/demo/demo0.tsx +14 -0
  312. package/components/Welcome/demo/demo1.tsx +16 -0
  313. package/components/Welcome/demo/demo2.tsx +30 -0
  314. package/components/Welcome/demo/demo3.tsx +16 -0
  315. package/components/Welcome/index.en-US.md +28 -0
  316. package/components/Welcome/index.tsx +72 -0
  317. package/components/Welcome/index.zh-CN.md +28 -0
  318. package/components/index.ts +88 -0
  319. package/components/overview.en-US.md +10 -0
  320. package/components/overview.zh-CN.md +10 -0
  321. package/lib/AgentScopeRuntimeWebUI/index.d.ts +1 -0
  322. package/lib/AgentScopeRuntimeWebUI/index.js +1 -0
  323. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/FormItem.d.ts +9 -0
  324. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/FormItem.js +33 -0
  325. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/OptionsEditor.d.ts +7 -0
  326. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/OptionsEditor.js +188 -0
  327. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/defaultConfig.d.ts +29 -0
  328. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/defaultConfig.js +35 -0
  329. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/index.d.ts +6 -0
  330. package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/index.js +49 -0
  331. package/lib/AgentScopeRuntimeWebUI/starter/index.d.ts +1 -0
  332. package/lib/AgentScopeRuntimeWebUI/starter/index.js +70 -0
  333. package/lib/AgentScopeRuntimeWebUI/starter/sessionApi/index.d.ts +14 -0
  334. package/lib/AgentScopeRuntimeWebUI/starter/sessionApi/index.js +143 -0
  335. package/package.json +3 -2
@@ -0,0 +1,203 @@
1
+ import React, { useMemo, useRef } from 'react';
2
+ import cls from 'classnames';
3
+ import BodyContent from './BodyContent';
4
+ import SoftLightTitle from './SoftLightTitle';
5
+ import Style from './style';
6
+ import { useProviderContext } from '../Provider';
7
+ import { SparkCheckCircleFill, SparkErrorCircleFill, SparkDownLine, SparkUpLine, SparkLoadingLine, SparkStopCircleLine } from '@agentscope-ai/icons';
8
+ import { Transition } from 'react-transition-group';
9
+
10
+ export interface IAccordionProps {
11
+ /**
12
+ * @description 组件的当前执行状态,用于显示不同的图标和样式
13
+ * @descriptionEn Current execution status of the component, used to display different icons and styles
14
+ */
15
+ status?: 'finished' | 'interrupted' | 'generating' | 'error';
16
+ /**
17
+ * @description 组件的标题内容,支持文本或React元素
18
+ * @descriptionEn Title content of the component, supports text or React elements
19
+ */
20
+ title: string | React.ReactElement;
21
+ /**
22
+ * @description 组件展开时显示的主要内容
23
+ * @descriptionEn Main content displayed when the component is expanded
24
+ */
25
+ children?: string | React.ReactElement;
26
+ /**
27
+ * @description 自定义图标,会覆盖默认的状态图标
28
+ * @descriptionEn Custom icon that overrides the default status icon
29
+ */
30
+ icon?: string | React.ReactElement;
31
+ /**
32
+ * @description 是否显示图标与内容之间的连接线
33
+ * @descriptionEn Whether to display the connecting line between the icon and content
34
+ */
35
+ iconLine?: boolean;
36
+ /**
37
+ * @description 组件的唯一标识符,用于React的key属性
38
+ * @descriptionEn Unique identifier for the component, used for React's key prop
39
+ */
40
+ id?: string;
41
+ /**
42
+ * @description 显示在标题右侧的额外内容
43
+ * @descriptionEn Additional content displayed on the right side of the title
44
+ */
45
+ rightChildren?: string | React.ReactElement;
46
+ /**
47
+ * @description 子步骤数组,支持递归嵌套结构
48
+ * @descriptionEn Array of child steps, supports recursive nested structure
49
+ */
50
+ steps?: IAccordionProps[];
51
+ /**
52
+ * @description 组件初始化时是否默认展开
53
+ * @descriptionEn Whether the component is expanded by default when initialized
54
+ */
55
+ defaultOpen?: boolean;
56
+ /**
57
+ * @description 受控模式:控制组件是否展开
58
+ * @descriptionEn Controlled mode: controls whether the component is expanded
59
+ */
60
+ open?: boolean;
61
+ /**
62
+ * @description 内容区域的样式对象
63
+ * @descriptionEn Style object for the content area
64
+ */
65
+ bodyStyle?: React.CSSProperties;
66
+ /**
67
+ * @description 是否使用内联模式,影响布局和交互方式
68
+ * @descriptionEn Whether to use inline mode, affects layout and interaction behavior
69
+ */
70
+ inline?: boolean;
71
+ }
72
+
73
+
74
+ function Item(props: IAccordionProps) {
75
+ const { getPrefixCls } = useProviderContext();
76
+
77
+ const prefixCls = getPrefixCls('accordion-group');
78
+ const [stateOpen, setStateOpen] = React.useState(props.defaultOpen);
79
+
80
+ // 支持受控模式:如果提供了 open prop,则使用它;否则使用内部状态
81
+ const isOpen = props.open !== undefined ? props.open : stateOpen;
82
+ const status = props.inline ? 'close' : (isOpen ? 'open' : 'close');
83
+
84
+ const icon = useMemo(() => {
85
+ if (props.icon) return props.icon;
86
+ if (props.status === 'generating') return <SparkLoadingLine className={`${prefixCls}-icon-loading`} spin />;
87
+ if (props.status === 'finished') return <SparkCheckCircleFill className={`${prefixCls}-icon-success`} />;
88
+ if (props.status === 'interrupted') return <SparkStopCircleLine />
89
+ if (props.status === 'error') return <SparkErrorCircleFill className={`${prefixCls}-icon-error`} />;
90
+
91
+ }, [props.status, props.icon]);
92
+
93
+
94
+ const content = useMemo(() => {
95
+ if (props.steps) {
96
+ return props.steps.map((item, index) => {
97
+ const isFirst = index === 0;
98
+ const isLast = index === props.steps.length - 1;
99
+
100
+ // @ts-ignore
101
+ return <Item key={item.id || index} {...item} isFirst={isFirst} isLast={isLast} />
102
+ })
103
+ } else {
104
+ return props.children
105
+ }
106
+ }, [props.steps, props.children]);
107
+
108
+
109
+ return <div className={cls(`${prefixCls}`, `${prefixCls}-${status}`)}>
110
+ <div
111
+ className={cls(`${prefixCls}-header`, `${prefixCls}-header-${status}`)}
112
+ onClick={() => content && props.open === undefined && setStateOpen(!stateOpen)}>
113
+ {icon ? <div className={cls(`${prefixCls}-header-icon`, {
114
+ [`${prefixCls}-header-icon-line`]: props.iconLine,
115
+ // @ts-ignore
116
+ [`${prefixCls}-header-icon-first`]: props.isFirst,
117
+ // @ts-ignore
118
+ [`${prefixCls}-header-icon-last`]: props.isLast && status === 'close' || props.level,
119
+ })}>{icon}</div> : null}
120
+ <div>
121
+ {props.title}
122
+ </div>
123
+ {content && <div className={cls(`${prefixCls}-header-arrow`)}>
124
+ {!isOpen ? <SparkDownLine /> : <SparkUpLine />}
125
+ </div>}
126
+ {<>
127
+ <span style={{ flex: 1 }}></span>
128
+ {props.rightChildren}
129
+ </>}
130
+ </div>
131
+
132
+ <Children
133
+ prefixCls={prefixCls}
134
+ stateOpen={isOpen}
135
+ status={status}
136
+ inline={props.inline}
137
+ content={content}
138
+ bodyStyle={props.bodyStyle}
139
+ // @ts-ignore
140
+ level={props.level}
141
+ />
142
+ </div>
143
+ }
144
+
145
+ const transitionStyles = {
146
+ entering: { opacity: 1 },
147
+ entered: { opacity: 1 },
148
+ exiting: { opacity: 0 },
149
+ exited: { opacity: 0 },
150
+ };
151
+
152
+ function Children(props: any) {
153
+ const nodeRef = useRef(null);
154
+ if (!props.content) return null;
155
+
156
+ const prefixCls = props.prefixCls;
157
+ const stateOpen = props.stateOpen;
158
+ const inline = props.inline;
159
+ const bodyStyle = props.bodyStyle;
160
+ const level = props.level;
161
+
162
+ return <Transition nodeRef={nodeRef} in={stateOpen} timeout={300}>
163
+
164
+ {state => (
165
+ <div
166
+ style={{
167
+ ...bodyStyle,
168
+ ...(level ? { marginTop: 0 } : {}),
169
+ transition: `opacity ${300}ms ease-in-out`,
170
+ ...transitionStyles[state]
171
+
172
+ }}
173
+ className={cls(`${prefixCls}-body`, `${prefixCls}-body-${stateOpen ? 'open' : 'close'}`, {
174
+ [`${prefixCls}-body-inline`]: inline
175
+ })}
176
+ >
177
+ {props.content}
178
+ </div>
179
+ )}
180
+
181
+
182
+ </Transition>
183
+
184
+
185
+
186
+
187
+ }
188
+
189
+ function Accordion(props: IAccordionProps) {
190
+ // @ts-ignore
191
+ const { level = 1, isFirst = true, isLast = true } = props;
192
+ return <>
193
+ <Style />
194
+ {/* @ts-ignore */}
195
+ <Item {...props} level={level} isFirst={isFirst} isLast={isLast} />
196
+ </>
197
+ }
198
+
199
+
200
+ Accordion.BodyContent = BodyContent;
201
+ Accordion.SoftLightTitle = SoftLightTitle
202
+
203
+ export default Accordion;
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { useProviderContext } from "../Provider";
3
+
4
+
5
+ interface IBodyContentProps {
6
+ children: React.ReactNode;
7
+ headerLeft?: React.ReactNode;
8
+ headerRight?: React.ReactNode;
9
+ }
10
+
11
+ export default function (props: IBodyContentProps) {
12
+ const { getPrefixCls } = useProviderContext();
13
+ const prefixCls = getPrefixCls('accordion-content-body');
14
+
15
+ return <div className={prefixCls}>
16
+ {
17
+ (props.headerLeft || props.headerRight) ?
18
+ <div className={`${prefixCls}-header`}>
19
+ {props.headerLeft}
20
+ <div style={{ flex: 1 }} />
21
+ {props.headerRight}
22
+ </div> : null
23
+ }
24
+ <div className={`${prefixCls}-body`}>
25
+ {props.children}
26
+ </div>
27
+ </div>
28
+ }
@@ -0,0 +1,91 @@
1
+ import { Accordion } from '@agentscope-ai/chat';
2
+ import { useProviderContext } from '@agentscope-ai/chat';
3
+ import { theme as AntdTheme } from 'antd'
4
+ import cls from 'classnames';
5
+
6
+
7
+ export interface IDeepThinking {
8
+ /**
9
+ * @description 深度思考过程的标题,用于描述思考的主题或方向
10
+ * @descriptionEn Title of the deep thinking process for describing the topic or direction of thinking
11
+ */
12
+ title?: string;
13
+ /**
14
+ * @description 是否正在生成思考内容,影响显示状态和动画效果
15
+ * @descriptionEn Whether the thinking content is being generated, affects display state and animation effects
16
+ */
17
+ loading?: boolean;
18
+ /**
19
+ * @description 深度思考的具体内容,包含思考过程和结果
20
+ * @descriptionEn Specific content of deep thinking, including thinking process and results
21
+ */
22
+ content?: string;
23
+ /**
24
+ * @description 组件初始化时是否默认展开,控制初始显示状态
25
+ * @descriptionEn Whether to expand by default when component initializes, controls initial display state
26
+ */
27
+ defaultOpen?: boolean;
28
+ /**
29
+ * @description 受控模式:控制组件是否展开
30
+ * @descriptionEn Controlled mode: controls whether the component is expanded
31
+ */
32
+ open?: boolean;
33
+ /**
34
+ * @description 生成结束后是否自动关闭(默认 false)
35
+ * @descriptionEn Whether to automatically close after generation is complete (default false)
36
+ */
37
+ autoCloseOnFinish?: boolean;
38
+ /**
39
+ * @description 内容区域的最大高度(单位:像素)
40
+ * @descriptionEn Maximum height of the content area (in pixels)
41
+ */
42
+ maxHeight?: number;
43
+ /**
44
+ * @description 组件的CSS类名,用于自定义样式
45
+ * @descriptionEn CSS class name for the component for custom styling
46
+ */
47
+ className?: string;
48
+ }
49
+
50
+ export default function (props: IDeepThinking) {
51
+ const { theme: providerTheme, getPrefixCls } = useProviderContext();
52
+ const prefixCls = getPrefixCls('accordion-deep-thinking');
53
+ const isDarkMode = providerTheme?.algorithm === AntdTheme.darkAlgorithm;
54
+ const icon = <img style={{ display: 'block', width: 16, height: 16, filter: isDarkMode ? 'invert(1) brightness(100%) saturate(0%)' : '' }} src="https://img.alicdn.com/imgextra/i2/O1CN01QZgWRv1I4JM0BAZ9O_!!6000000000839-54-tps-56-56.apng" />
55
+
56
+ // 构建标题文本
57
+ let titleText = props.title || 'Deep thinking';
58
+ if (props.loading) {
59
+ titleText += '...';
60
+ }
61
+
62
+ // 构建标题
63
+ const title = props.loading ? (
64
+ <Accordion.SoftLightTitle>{titleText}</Accordion.SoftLightTitle>
65
+ ) : titleText;
66
+
67
+ // 构建 bodyStyle,添加 maxHeight 支持
68
+ const bodyStyle: React.CSSProperties = props.maxHeight
69
+ ? { maxHeight: props.maxHeight, overflowY: 'auto' as const }
70
+ : {};
71
+
72
+ // 确定默认展开状态:如果设置了 autoCloseOnFinish 且不在 loading 状态,默认关闭
73
+ const finalDefaultOpen = props.defaultOpen !== undefined
74
+ ? props.defaultOpen
75
+ : (props.autoCloseOnFinish && !props.loading) ? false : undefined;
76
+
77
+ return <Accordion
78
+ title={title}
79
+ status={props.loading ? 'generating' : 'finished'}
80
+ icon={props.loading ? icon : null}
81
+ defaultOpen={finalDefaultOpen}
82
+ open={props.open}
83
+ bodyStyle={bodyStyle}
84
+ inline
85
+ >
86
+ <div className={cls(prefixCls, props.className)}>{props.content || '...'}</div>
87
+ </Accordion>
88
+ }
89
+
90
+
91
+
@@ -0,0 +1,13 @@
1
+ import { useProviderContext } from '@agentscope-ai/chat';
2
+ import { theme as AntdTheme } from 'antd'
3
+
4
+ export default function (props: { children }) {
5
+ const { theme, getPrefixCls } = useProviderContext();
6
+ const isDarkMode = theme?.algorithm === AntdTheme.darkAlgorithm;
7
+ const prefixCls = getPrefixCls('accordion-soft-light-title');
8
+
9
+ return <div
10
+ className={prefixCls}
11
+ style={isDarkMode ? {} : { color: 'rgba(38, 36, 76, 0.88)' }}
12
+ >{props.children}</div>
13
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { Accordion } from '@agentscope-ai/chat';
3
+ import { Flex } from 'antd'
4
+ import { SparkDeepSearchLine, SparkCheckCircleLine } from '@agentscope-ai/icons'
5
+ const App = () => <>
6
+ <Flex gap={32} vertical>
7
+ <Accordion
8
+ status="generating"
9
+ icon={<SparkDeepSearchLine />}
10
+ title={<Accordion.SoftLightTitle>Searching from 10 pages</Accordion.SoftLightTitle>}
11
+
12
+ steps={[{
13
+ icon: <SparkCheckCircleLine />,
14
+ title: 'File analysis',
15
+ }, {
16
+ icon: <SparkCheckCircleLine />,
17
+ title: 'Url analysis',
18
+ }]}
19
+ >
20
+ </Accordion>
21
+
22
+ <Accordion
23
+ defaultOpen
24
+ status="finished"
25
+ icon={<SparkDeepSearchLine />}
26
+ title={"Searching from 10 pages"}
27
+ steps={[{
28
+ icon: <SparkCheckCircleLine />,
29
+ title: 'File analysis',
30
+ }, {
31
+ icon: <SparkCheckCircleLine />,
32
+ title: 'Url analysis',
33
+ }]}
34
+ >
35
+ </Accordion>
36
+ </Flex>
37
+ </>;
38
+
39
+ export default App;
@@ -0,0 +1,135 @@
1
+ import { Accordion } from '@agentscope-ai/chat';
2
+ import { Flex } from 'antd'
3
+ import { CodeBlock } from '@agentscope-ai/design';
4
+ import { SparkCheckCircleLine, SparkTimeLine, SparkTimestampLine } from '@agentscope-ai/icons';
5
+
6
+ const input = JSON.stringify({
7
+ 'query': 'What is city pop?',
8
+ 'top_k': 1,
9
+ 'threshold': 0.5,
10
+ 'return_metadata': true,
11
+ });
12
+
13
+ const output = JSON.stringify({
14
+ 'results': [
15
+ {
16
+ 'score': 0.9999999999999998,
17
+ 'metadata': {
18
+ 'source': 'https://en.wikipedia.org/wiki/City_population',
19
+ 'title': 'City population',
20
+ },
21
+ 'content': 'city pop, short for city pop, is a genre of music that originated in japan during the late 1970s and early 1980s. it blends elements of jazz, folk, easy listening, and aor (adult oriented rock) with a distinctly urban feel. the term "city pop" often evokes images of the sophisticated, stylish, and sometimes nostalgic lifestyle of tokyo and other major japanese cities during this period.'
22
+ }
23
+ ]
24
+
25
+ })
26
+
27
+ const App = () => <>
28
+ <Flex gap={24} vertical>
29
+ <Accordion
30
+ title="Completed"
31
+ status="finished"
32
+ defaultOpen
33
+ steps={[{
34
+ icon: <SparkCheckCircleLine />,
35
+ iconLine: true,
36
+ title: 'Knowledge base search',
37
+ rightChildren: <span>52.21ms</span>,
38
+ children: <Accordion.BodyContent headerLeft="What is city pop?" headerRight="Similarity: 78%">
39
+ <div style={{ padding: 12 }}>
40
+ city pop, short for city pop, is a genre of music that originated in japan during the late 1970s and early 1980s. it blends elements of jazz, folk, easy listening, and aor (adult oriented rock) with a distinctly urban feel. the term "city pop" often evokes images of the sophisticated, stylish, and sometimes nostalgic lifestyle of tokyo and other major japanese cities during this period.
41
+ city pop is characterized by its smooth melodies, mellow rhythms, and often dreamy or introspective lyrics. common themes include city life, summer vibes, nature, and romantic encounters. the music is frequently associated with a particular aesthetic that reflects the fashion, design, and cultural trends of urban japan in the 1980s.
42
+ some notable city pop artists include mariya takeuchi, known for her iconic song " plastic love," and joe hisaishi, a composer famous for his work on studio ghibli films, though he is not strictly considered a city pop artist.
43
+ </div>
44
+ </Accordion.BodyContent>,
45
+ }, {
46
+ defaultOpen: true,
47
+ icon: <SparkCheckCircleLine />,
48
+ iconLine: true,
49
+ title: 'Long Memory',
50
+ children: <Flex gap={8} vertical>
51
+ <Accordion.BodyContent headerLeft="Input">
52
+ <CodeBlock language="json" value={input} />
53
+ </Accordion.BodyContent>
54
+ <Accordion.BodyContent headerLeft="Output">
55
+ <CodeBlock language="json" value={output} />
56
+ </Accordion.BodyContent>
57
+ </Flex>,
58
+ }
59
+ ]}
60
+ >
61
+ </Accordion>
62
+
63
+
64
+ {[{ label: 'steps error', value: 'error' },
65
+ { label: 'steps interrupted', value: 'interrupted' },
66
+ { label: 'steps generating', value: 'generating' }].map(({ label, value }) => (
67
+ <Accordion
68
+ title={label}
69
+ // @ts-ignore
70
+ status={value}
71
+ defaultOpen={false}
72
+ steps={[{
73
+ icon: <SparkCheckCircleLine />,
74
+ iconLine: true,
75
+ title: 'Knowledge base search',
76
+ rightChildren: <span>52.21ms</span>,
77
+ children: <Accordion.BodyContent headerLeft="What is city pop?" headerRight="Similarity: 78%">
78
+ <div style={{ padding: 12 }}>
79
+ city pop, short for city pop, is a genre of music that originated in japan during the late 1970s and early 1980s. it blends elements of jazz, folk, easy listening, and aor (adult oriented rock) with a distinctly urban feel. the term "city pop" often evokes images of the sophisticated, stylish, and sometimes nostalgic lifestyle of tokyo and other major japanese cities during this period.
80
+ city pop is characterized by its smooth melodies, mellow rhythms, and often dreamy or introspective lyrics. common themes include city life, summer vibes, nature, and romantic encounters. the music is frequently associated with a particular aesthetic that reflects the fashion, design, and cultural trends of urban japan in the 1980s.
81
+ some notable city pop artists include mariya takeuchi, known for her iconic song " plastic love," and joe hisaishi, a composer famous for his work on studio ghibli films, though he is not strictly considered a city pop artist.
82
+ </div>
83
+ </Accordion.BodyContent>,
84
+ }]}
85
+ >
86
+ </Accordion>
87
+ ))}
88
+
89
+
90
+ <Accordion
91
+ title="Completed deep thinking"
92
+ status="generating"
93
+ defaultOpen
94
+ steps={[{
95
+ icon: <SparkCheckCircleLine />,
96
+ iconLine: true,
97
+ title: 'File analysis',
98
+ rightChildren: <span>52.21ms</span>,
99
+ children: <Accordion.BodyContent headerLeft="What is city pop?" headerRight="Similarity: 78%">
100
+ <div style={{ padding: 12 }}>
101
+ city pop, short for city pop, is a genre of music that originated in japan during the late 1970s and early 1980s. it blends elements of jazz, folk, easy listening, and aor (adult oriented rock) with a distinctly urban feel. the term "city pop" often evokes images of the sophisticated, stylish, and sometimes nostalgic lifestyle of tokyo and other major japanese cities during this period.
102
+ city pop is characterized by its smooth melodies, mellow rhythms, and often dreamy or introspective lyrics. common themes include city life, summer vibes, nature, and romantic encounters. the music is frequently associated with a particular aesthetic that reflects the fashion, design, and cultural trends of urban japan in the 1980s.
103
+ some notable city pop artists include mariya takeuchi, known for her iconic song " plastic love," and joe hisaishi, a composer famous for his work on studio ghibli films, though he is not strictly considered a city pop artist.
104
+ </div>
105
+ </Accordion.BodyContent>,
106
+ }, {
107
+ status: "generating",
108
+ iconLine: true,
109
+ title: <b>MCP Call</b>,
110
+ children: <Flex gap={8} vertical>
111
+ <Accordion.BodyContent headerLeft="input">
112
+ <CodeBlock language="json" value={input} />
113
+ </Accordion.BodyContent>
114
+ <Accordion.BodyContent headerLeft="output">
115
+ <CodeBlock language="json" value={output} />
116
+ </Accordion.BodyContent>
117
+ </Flex>,
118
+ },
119
+ {
120
+ icon: <SparkTimestampLine />,
121
+ iconLine: true,
122
+ title: 'Long Memory',
123
+ },
124
+ {
125
+ icon: <SparkTimestampLine />,
126
+ iconLine: true,
127
+ title: 'Final output',
128
+ },
129
+ ]}
130
+ >
131
+ </Accordion>
132
+ </Flex>
133
+ </>;
134
+
135
+ export default App;
@@ -0,0 +1,62 @@
1
+ import { DeepThinking } from '@agentscope-ai/chat';
2
+ import { Flex } from 'antd'
3
+
4
+
5
+ const App = () => {
6
+ return <>
7
+ <Flex gap={32} vertical>
8
+ {/* 示例 1: 正在生成中 */}
9
+ <DeepThinking
10
+ loading={true}
11
+ content='你好,我是AI智能助手,我正在思考...'
12
+ />
13
+
14
+ {/* 示例 2: 生成完成,展开状态 */}
15
+ <DeepThinking
16
+ defaultOpen
17
+ loading={false}
18
+ content={`Okay, the user is asking about "citypop." Let me start by recalling what I know about that term. I remember that City Pop is a genre of music, but I need to make sure I'm accurate.
19
+
20
+ First, when did City Pop originate? I think it was in Japan during the late 1970s and 1980s. That makes sense because Japan's economy was booming then, leading to a vibrant urban culture. The genre probably blends Western styles like funk, jazz, and disco with Japanese pop elements. Artists like Tatsuro Yamashita and Mariya Takeuchi come to mind. Oh, and there's that song "Plastic Love" by Mariya Takeuchi that went viral online recently, which might have sparked renewed interest.
21
+
22
+ I should also mention the themes of City Pop songs—they often reflect city life, romance, and leisure, fitting the upbeat and cosmopolitan vibe of the time. The visual style associated with it includes retro anime and vibrant cityscapes, which adds to its aesthetic appeal. It's interesting how the internet, especially platforms like YouTube and Spotify, helped revive this genre internationally. Maybe I should note that connection between modern digital culture and the resurgence of City Pop.
23
+
24
+ Wait, are there any subgenres or key characteristics I should highlight? The use of synthesizers, smooth vocals, and lush production are typical. Also, City Pop was influenced by yacht rock and soft rock from the West. It's important to link it to Japan's economic bubble era, as that context explains the music's optimistic and luxurious feel.
25
+
26
+ I need to ensure I don't confuse it with other Japanese genres like J-pop or Enka. City Pop is distinct in its fusion with Western sounds. Including notable albums, like Tatsuro Yamashita's "For You" or Anri's "Timely!!", could be helpful. Oh, and the connection to future funk and vaporwave genres that sample City Pop tracks is a good point for its modern influence.`}
27
+ />
28
+
29
+ {/* 示例 3: 使用 maxHeight 限制高度 */}
30
+ <DeepThinking
31
+ title="限制最大高度示例"
32
+ defaultOpen
33
+ maxHeight={150}
34
+ content={`这是一个很长的思考内容,用于演示 maxHeight 属性。
35
+
36
+ 当内容超出设定的最大高度时,会出现滚动条。
37
+
38
+ 这样可以避免内容过长导致页面布局问题。
39
+
40
+ 让我们添加更多文字来演示滚动效果...
41
+
42
+ 第一段:City Pop 是日本在 1970 年代末到 1980 年代流行的音乐类型。
43
+ 第二段:它融合了西方的放克、爵士、迪斯科等元素。
44
+ 第三段:代表艺术家包括山下达郎、竹内玛莉亚等。
45
+ 第四段:近年来通过互联网重新流行起来。
46
+ 第五段:其特点是使用合成器、流畅的人声和华丽的制作。
47
+ 第六段:与日本经济泡沫时期的乐观氛围密切相关。
48
+ 第七段:影响了后来的 Future Funk 和 Vaporwave 等音乐流派。`}
49
+ />
50
+
51
+ {/* 示例 4: 生成结束后自动关闭 */}
52
+ <DeepThinking
53
+ title="自动关闭示例"
54
+ autoCloseOnFinish
55
+ loading={false}
56
+ content="这个示例演示了 autoCloseOnFinish 功能,生成结束后默认是关闭状态,需要手动点击才能展开查看内容。"
57
+ />
58
+ </Flex>
59
+ </>
60
+ };
61
+
62
+ export default App;
@@ -0,0 +1,34 @@
1
+ ---
2
+ order: 2
3
+
4
+ group:
5
+ title: Output
6
+ order: 3
7
+ title: Process
8
+ description: Visualization of model problem-solving process
9
+
10
+ demo:
11
+ cols: 1
12
+ ---
13
+
14
+ <DemoTitle title="Process" desc="Visualization of model problem-solving process" llmTxtName="Accordion"></DemoTitle>
15
+
16
+ <code src="./demo/thinking.tsx" height="auto">Deep Thinking Example</code>
17
+
18
+ <Install>import { Process, DeepThinking } from '@agentscope-ai/chat'</Install>
19
+
20
+ #### Process Examples
21
+
22
+ The following are examples and variations of this component
23
+ <code src="./demo/steps.tsx" height="auto">With Multiple Steps</code>
24
+ <code src="./demo/search.tsx" height="auto">Search Scenario Steps</code>
25
+
26
+ #### API
27
+
28
+ ##### IAccordionProps
29
+
30
+ <ApiParser source="./Accordion.tsx" id="IAccordionProps"></ApiParser>
31
+
32
+ ##### IDeepThinking
33
+
34
+ <ApiParser source="./DeepThinking.tsx" id="IDeepThinking"></ApiParser>
@@ -0,0 +1,3 @@
1
+
2
+ export { default as Accordion } from './Accordion';
3
+ export type { IAccordionProps, IAccordionProps as IProcessProps } from './Accordion';
@@ -0,0 +1,34 @@
1
+ ---
2
+ order: 2
3
+
4
+ group:
5
+ title: 输出
6
+ order: 3
7
+ title: Process
8
+ description: 模型处理问题的过程展示
9
+
10
+ demo:
11
+ cols: 1
12
+ ---
13
+
14
+ <DemoTitle title="Process" desc="模型处理问题的过程展示" llmTxtName="Accordion"></DemoTitle>
15
+
16
+ <code src="./demo/thinking.tsx" height="auto">深度思考示例</code>
17
+
18
+ <Install>import { Process, DeepThinking } from '@agentscope-ai/chat'</Install>
19
+
20
+ #### 模型处理过程示例
21
+
22
+ 以下是此组件的示例和变体
23
+ <code src="./demo/steps.tsx" height="auto">包含多个步骤</code>
24
+ <code src="./demo/search.tsx" height="auto">搜索场景的步骤展示</code>
25
+
26
+ #### API
27
+
28
+ ##### IAccordionProps
29
+
30
+ <ApiParser source="./Accordion.tsx" id="IAccordionProps"></ApiParser>
31
+
32
+ ##### IDeepThinking
33
+
34
+ <ApiParser source="./DeepThinking.tsx" id="IDeepThinking"></ApiParser>