@hkyhy/marsun-components-core 0.1.52 → 0.1.56

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 (312) hide show
  1. package/README.md +29 -15
  2. package/dist/agent-hub.d.ts +11 -0
  3. package/dist/agent-hub.js +144 -0
  4. package/dist/agent-hub.js.map +1 -0
  5. package/dist/components/AgentHub/Chat/Action/CreateButton.js +3 -3
  6. package/dist/components/AgentHub/Chat/Action/ManageActionButtons.js +4 -4
  7. package/dist/components/AgentHub/Chat/Action/SessionActionButtons.js +4 -4
  8. package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js +29 -27
  9. package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js.map +1 -1
  10. package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js +19 -18
  11. package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js.map +1 -1
  12. package/dist/components/AgentHub/Chat/Detail/CitationPanel/index.js +18 -17
  13. package/dist/components/AgentHub/Chat/Detail/CitationPanel/index.js.map +1 -1
  14. package/dist/components/AgentHub/Chat/Detail/MessageActions/index.js +23 -19
  15. package/dist/components/AgentHub/Chat/Detail/MessageActions/index.js.map +1 -1
  16. package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js +23 -21
  17. package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js.map +1 -1
  18. package/dist/components/AgentHub/Chat/List/ChatCard/index.js +7 -7
  19. package/dist/components/AgentHub/Chat/List/SessionSidebar/index.js +19 -17
  20. package/dist/components/AgentHub/Chat/List/SessionSidebar/index.js.map +1 -1
  21. package/dist/components/AgentHub/KnowledgeBase/Action/CreateButton.js +3 -3
  22. package/dist/components/AgentHub/KnowledgeBase/Action/ManageActionButtons.js +1 -1
  23. package/dist/components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js +16 -15
  24. package/dist/components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js.map +1 -1
  25. package/dist/components/AgentHub/KnowledgeBase/Detail/ParseStatusTag/index.js +7 -7
  26. package/dist/components/AgentHub/KnowledgeBase/List/KnowledgeCard/index.js +8 -8
  27. package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/index.js +1 -1
  28. package/dist/components/Auth/UserProfileCard/UserProfileCard.js +7 -7
  29. package/dist/components/Auth/UserProfileCard/style.module.scss.js +16 -16
  30. package/dist/components/File/FileItem/index.js +22 -20
  31. package/dist/components/File/FileItem/index.js.map +1 -1
  32. package/dist/components/File/FilePreview/index.js +11 -11
  33. package/dist/components/File/fileDisplay.js +41 -36
  34. package/dist/components/File/fileDisplay.js.map +1 -1
  35. package/dist/components/Filter/CommonFilter/index.js +20 -18
  36. package/dist/components/Filter/CommonFilter/index.js.map +1 -1
  37. package/dist/components/Filter/FilterSelect/index.js +90 -89
  38. package/dist/components/Filter/FilterSelect/index.js.map +1 -1
  39. package/dist/components/Filter/FilterTreeSelect/index.js +51 -48
  40. package/dist/components/Filter/FilterTreeSelect/index.js.map +1 -1
  41. package/dist/components/Filter/FilterTrigger/index.js +13 -11
  42. package/dist/components/Filter/FilterTrigger/index.js.map +1 -1
  43. package/dist/components/Form/PersonOptionRow/index.js +4 -4
  44. package/dist/components/Icons/ArrowLeft.d.ts +1 -0
  45. package/dist/components/Icons/ArrowLeft.js +7 -0
  46. package/dist/components/Icons/ArrowLeft.js.map +1 -0
  47. package/dist/components/Icons/ArrowLeftRight.d.ts +1 -0
  48. package/dist/components/Icons/ArrowLeftRight.js +7 -0
  49. package/dist/components/Icons/ArrowLeftRight.js.map +1 -0
  50. package/dist/components/Icons/BarChart3.d.ts +1 -0
  51. package/dist/components/Icons/BarChart3.js +7 -0
  52. package/dist/components/Icons/BarChart3.js.map +1 -0
  53. package/dist/components/Icons/Bell.d.ts +1 -0
  54. package/dist/components/Icons/Bell.js +7 -0
  55. package/dist/components/Icons/Bell.js.map +1 -0
  56. package/dist/components/Icons/BookOpen.d.ts +1 -0
  57. package/dist/components/Icons/BookOpen.js +7 -0
  58. package/dist/components/Icons/BookOpen.js.map +1 -0
  59. package/dist/components/Icons/Bot.d.ts +1 -0
  60. package/dist/components/Icons/Bot.js +7 -0
  61. package/dist/components/Icons/Bot.js.map +1 -0
  62. package/dist/components/Icons/Check.d.ts +1 -0
  63. package/dist/components/Icons/Check.js +7 -0
  64. package/dist/components/Icons/Check.js.map +1 -0
  65. package/dist/components/Icons/ChevronDown.d.ts +1 -0
  66. package/dist/components/Icons/ChevronDown.js +7 -0
  67. package/dist/components/Icons/ChevronDown.js.map +1 -0
  68. package/dist/components/Icons/ChevronLeft.d.ts +1 -0
  69. package/dist/components/Icons/ChevronLeft.js +7 -0
  70. package/dist/components/Icons/ChevronLeft.js.map +1 -0
  71. package/dist/components/Icons/ChevronRight.d.ts +1 -0
  72. package/dist/components/Icons/ChevronRight.js +7 -0
  73. package/dist/components/Icons/ChevronRight.js.map +1 -0
  74. package/dist/components/Icons/ChevronUp.d.ts +1 -0
  75. package/dist/components/Icons/ChevronUp.js +7 -0
  76. package/dist/components/Icons/ChevronUp.js.map +1 -0
  77. package/dist/components/Icons/CircleAlert.d.ts +1 -0
  78. package/dist/components/Icons/CircleAlert.js +7 -0
  79. package/dist/components/Icons/CircleAlert.js.map +1 -0
  80. package/dist/components/Icons/CircleCheck.d.ts +1 -0
  81. package/dist/components/Icons/CircleCheck.js +7 -0
  82. package/dist/components/Icons/CircleCheck.js.map +1 -0
  83. package/dist/components/Icons/CircleHelp.d.ts +1 -0
  84. package/dist/components/Icons/CircleHelp.js +7 -0
  85. package/dist/components/Icons/CircleHelp.js.map +1 -0
  86. package/dist/components/Icons/CirclePlay.d.ts +1 -0
  87. package/dist/components/Icons/CirclePlay.js +7 -0
  88. package/dist/components/Icons/CirclePlay.js.map +1 -0
  89. package/dist/components/Icons/CircleX.d.ts +1 -0
  90. package/dist/components/Icons/CircleX.js +7 -0
  91. package/dist/components/Icons/CircleX.js.map +1 -0
  92. package/dist/components/Icons/ClipboardCheck.d.ts +1 -0
  93. package/dist/components/Icons/ClipboardCheck.js +7 -0
  94. package/dist/components/Icons/ClipboardCheck.js.map +1 -0
  95. package/dist/components/Icons/Clock.d.ts +1 -0
  96. package/dist/components/Icons/Clock.js +7 -0
  97. package/dist/components/Icons/Clock.js.map +1 -0
  98. package/dist/components/Icons/CloudDownload.d.ts +1 -0
  99. package/dist/components/Icons/CloudDownload.js +7 -0
  100. package/dist/components/Icons/CloudDownload.js.map +1 -0
  101. package/dist/components/Icons/CloudUpload.d.ts +1 -0
  102. package/dist/components/Icons/CloudUpload.js +7 -0
  103. package/dist/components/Icons/CloudUpload.js.map +1 -0
  104. package/dist/components/Icons/Code.d.ts +1 -0
  105. package/dist/components/Icons/Code.js +7 -0
  106. package/dist/components/Icons/Code.js.map +1 -0
  107. package/dist/components/Icons/Copy.d.ts +1 -0
  108. package/dist/components/Icons/Copy.js +7 -0
  109. package/dist/components/Icons/Copy.js.map +1 -0
  110. package/dist/components/Icons/Crown.d.ts +1 -0
  111. package/dist/components/Icons/Crown.js +7 -0
  112. package/dist/components/Icons/Crown.js.map +1 -0
  113. package/dist/components/Icons/Database.d.ts +1 -0
  114. package/dist/components/Icons/Database.js +7 -0
  115. package/dist/components/Icons/Database.js.map +1 -0
  116. package/dist/components/Icons/Download.d.ts +1 -0
  117. package/dist/components/Icons/Download.js +7 -0
  118. package/dist/components/Icons/Download.js.map +1 -0
  119. package/dist/components/Icons/Eye.d.ts +1 -0
  120. package/dist/components/Icons/Eye.js +7 -0
  121. package/dist/components/Icons/Eye.js.map +1 -0
  122. package/dist/components/Icons/EyeOff.d.ts +1 -0
  123. package/dist/components/Icons/EyeOff.js +7 -0
  124. package/dist/components/Icons/EyeOff.js.map +1 -0
  125. package/dist/components/Icons/File.d.ts +1 -0
  126. package/dist/components/Icons/File.js +7 -0
  127. package/dist/components/Icons/File.js.map +1 -0
  128. package/dist/components/Icons/FileArchive.d.ts +1 -0
  129. package/dist/components/Icons/FileArchive.js +7 -0
  130. package/dist/components/Icons/FileArchive.js.map +1 -0
  131. package/dist/components/Icons/FileImage.d.ts +1 -0
  132. package/dist/components/Icons/FileImage.js +7 -0
  133. package/dist/components/Icons/FileImage.js.map +1 -0
  134. package/dist/components/Icons/FileSpreadsheet.d.ts +1 -0
  135. package/dist/components/Icons/FileSpreadsheet.js +7 -0
  136. package/dist/components/Icons/FileSpreadsheet.js.map +1 -0
  137. package/dist/components/Icons/FileText.d.ts +1 -0
  138. package/dist/components/Icons/FileText.js +7 -0
  139. package/dist/components/Icons/FileText.js.map +1 -0
  140. package/dist/components/Icons/Flag.d.ts +1 -0
  141. package/dist/components/Icons/Flag.js +7 -0
  142. package/dist/components/Icons/Flag.js.map +1 -0
  143. package/dist/components/Icons/Flame.d.ts +1 -0
  144. package/dist/components/Icons/Flame.js +7 -0
  145. package/dist/components/Icons/Flame.js.map +1 -0
  146. package/dist/components/Icons/Folder.d.ts +1 -0
  147. package/dist/components/Icons/Folder.js +7 -0
  148. package/dist/components/Icons/Folder.js.map +1 -0
  149. package/dist/components/Icons/FolderOpen.d.ts +1 -0
  150. package/dist/components/Icons/FolderOpen.js +7 -0
  151. package/dist/components/Icons/FolderOpen.js.map +1 -0
  152. package/dist/components/Icons/Hash.d.ts +1 -0
  153. package/dist/components/Icons/Hash.js +7 -0
  154. package/dist/components/Icons/Hash.js.map +1 -0
  155. package/dist/components/Icons/House.d.ts +1 -0
  156. package/dist/components/Icons/House.js +7 -0
  157. package/dist/components/Icons/House.js.map +1 -0
  158. package/dist/components/Icons/Import.d.ts +1 -0
  159. package/dist/components/Icons/Import.js +7 -0
  160. package/dist/components/Icons/Import.js.map +1 -0
  161. package/dist/components/Icons/Inbox.d.ts +1 -0
  162. package/dist/components/Icons/Inbox.js +7 -0
  163. package/dist/components/Icons/Inbox.js.map +1 -0
  164. package/dist/components/Icons/Info.d.ts +1 -0
  165. package/dist/components/Icons/Info.js +7 -0
  166. package/dist/components/Icons/Info.js.map +1 -0
  167. package/dist/components/Icons/LayoutDashboard.d.ts +1 -0
  168. package/dist/components/Icons/LayoutDashboard.js +7 -0
  169. package/dist/components/Icons/LayoutDashboard.js.map +1 -0
  170. package/dist/components/Icons/LayoutGrid.d.ts +1 -0
  171. package/dist/components/Icons/LayoutGrid.js +7 -0
  172. package/dist/components/Icons/LayoutGrid.js.map +1 -0
  173. package/dist/components/Icons/ListTodo.d.ts +1 -0
  174. package/dist/components/Icons/ListTodo.js +7 -0
  175. package/dist/components/Icons/ListTodo.js.map +1 -0
  176. package/dist/components/Icons/Loader2.d.ts +1 -0
  177. package/dist/components/Icons/Loader2.js +7 -0
  178. package/dist/components/Icons/Loader2.js.map +1 -0
  179. package/dist/components/Icons/Lock.d.ts +1 -0
  180. package/dist/components/Icons/Lock.js +7 -0
  181. package/dist/components/Icons/Lock.js.map +1 -0
  182. package/dist/components/Icons/LogOut.d.ts +1 -0
  183. package/dist/components/Icons/LogOut.js +7 -0
  184. package/dist/components/Icons/LogOut.js.map +1 -0
  185. package/dist/components/Icons/Maximize2.d.ts +1 -0
  186. package/dist/components/Icons/Maximize2.js +7 -0
  187. package/dist/components/Icons/Maximize2.js.map +1 -0
  188. package/dist/components/Icons/MessageCircle.d.ts +1 -0
  189. package/dist/components/Icons/MessageCircle.js +7 -0
  190. package/dist/components/Icons/MessageCircle.js.map +1 -0
  191. package/dist/components/Icons/MessageSquare.d.ts +1 -0
  192. package/dist/components/Icons/MessageSquare.js +7 -0
  193. package/dist/components/Icons/MessageSquare.js.map +1 -0
  194. package/dist/components/Icons/Minimize2.d.ts +1 -0
  195. package/dist/components/Icons/Minimize2.js +7 -0
  196. package/dist/components/Icons/Minimize2.js.map +1 -0
  197. package/dist/components/Icons/PanelLeftClose.d.ts +1 -0
  198. package/dist/components/Icons/PanelLeftClose.js +7 -0
  199. package/dist/components/Icons/PanelLeftClose.js.map +1 -0
  200. package/dist/components/Icons/PanelLeftOpen.d.ts +1 -0
  201. package/dist/components/Icons/PanelLeftOpen.js +7 -0
  202. package/dist/components/Icons/PanelLeftOpen.js.map +1 -0
  203. package/dist/components/Icons/Pause.d.ts +1 -0
  204. package/dist/components/Icons/Pause.js +7 -0
  205. package/dist/components/Icons/Pause.js.map +1 -0
  206. package/dist/components/Icons/Pencil.d.ts +1 -0
  207. package/dist/components/Icons/Pencil.js +7 -0
  208. package/dist/components/Icons/Pencil.js.map +1 -0
  209. package/dist/components/Icons/Plus.d.ts +1 -0
  210. package/dist/components/Icons/Plus.js +7 -0
  211. package/dist/components/Icons/Plus.js.map +1 -0
  212. package/dist/components/Icons/Presentation.d.ts +1 -0
  213. package/dist/components/Icons/Presentation.js +7 -0
  214. package/dist/components/Icons/Presentation.js.map +1 -0
  215. package/dist/components/Icons/RefreshCw.d.ts +1 -0
  216. package/dist/components/Icons/RefreshCw.js +7 -0
  217. package/dist/components/Icons/RefreshCw.js.map +1 -0
  218. package/dist/components/Icons/RotateCw.d.ts +1 -0
  219. package/dist/components/Icons/RotateCw.js +7 -0
  220. package/dist/components/Icons/RotateCw.js.map +1 -0
  221. package/dist/components/Icons/Send.d.ts +1 -0
  222. package/dist/components/Icons/Send.js +7 -0
  223. package/dist/components/Icons/Send.js.map +1 -0
  224. package/dist/components/Icons/Settings.d.ts +1 -0
  225. package/dist/components/Icons/Settings.js +7 -0
  226. package/dist/components/Icons/Settings.js.map +1 -0
  227. package/dist/components/Icons/Shield.d.ts +1 -0
  228. package/dist/components/Icons/Shield.js +7 -0
  229. package/dist/components/Icons/Shield.js.map +1 -0
  230. package/dist/components/Icons/ShieldCheck.d.ts +1 -0
  231. package/dist/components/Icons/ShieldCheck.js +7 -0
  232. package/dist/components/Icons/ShieldCheck.js.map +1 -0
  233. package/dist/components/Icons/SlidersHorizontal.d.ts +1 -0
  234. package/dist/components/Icons/SlidersHorizontal.js +7 -0
  235. package/dist/components/Icons/SlidersHorizontal.js.map +1 -0
  236. package/dist/components/Icons/Square.d.ts +1 -0
  237. package/dist/components/Icons/Square.js +7 -0
  238. package/dist/components/Icons/Square.js.map +1 -0
  239. package/dist/components/Icons/Star.d.ts +1 -0
  240. package/dist/components/Icons/Star.js +7 -0
  241. package/dist/components/Icons/Star.js.map +1 -0
  242. package/dist/components/Icons/ThumbsDown.d.ts +1 -0
  243. package/dist/components/Icons/ThumbsDown.js +7 -0
  244. package/dist/components/Icons/ThumbsDown.js.map +1 -0
  245. package/dist/components/Icons/ThumbsUp.d.ts +1 -0
  246. package/dist/components/Icons/ThumbsUp.js +7 -0
  247. package/dist/components/Icons/ThumbsUp.js.map +1 -0
  248. package/dist/components/Icons/Trash2.d.ts +1 -0
  249. package/dist/components/Icons/Trash2.js +7 -0
  250. package/dist/components/Icons/Trash2.js.map +1 -0
  251. package/dist/components/Icons/Trophy.d.ts +1 -0
  252. package/dist/components/Icons/Trophy.js +7 -0
  253. package/dist/components/Icons/Trophy.js.map +1 -0
  254. package/dist/components/Icons/Undo2.d.ts +1 -0
  255. package/dist/components/Icons/Undo2.js +7 -0
  256. package/dist/components/Icons/Undo2.js.map +1 -0
  257. package/dist/components/Icons/Upload.d.ts +1 -0
  258. package/dist/components/Icons/Upload.js +7 -0
  259. package/dist/components/Icons/Upload.js.map +1 -0
  260. package/dist/components/Icons/User.d.ts +1 -0
  261. package/dist/components/Icons/User.js +7 -0
  262. package/dist/components/Icons/User.js.map +1 -0
  263. package/dist/components/Icons/UserPlus.d.ts +1 -0
  264. package/dist/components/Icons/UserPlus.js +7 -0
  265. package/dist/components/Icons/UserPlus.js.map +1 -0
  266. package/dist/components/Icons/UserRoundCog.d.ts +1 -0
  267. package/dist/components/Icons/UserRoundCog.js +7 -0
  268. package/dist/components/Icons/UserRoundCog.js.map +1 -0
  269. package/dist/components/Icons/Users.d.ts +1 -0
  270. package/dist/components/Icons/Users.js +7 -0
  271. package/dist/components/Icons/Users.js.map +1 -0
  272. package/dist/components/Icons/X.d.ts +1 -0
  273. package/dist/components/Icons/X.js +7 -0
  274. package/dist/components/Icons/X.js.map +1 -0
  275. package/dist/components/Icons/createIcon.d.ts +9 -0
  276. package/dist/components/Icons/createIcon.js +32 -0
  277. package/dist/components/Icons/createIcon.js.map +1 -0
  278. package/dist/components/Icons/index.d.ts +80 -90
  279. package/dist/components/Icons/registry.d.ts +6 -0
  280. package/dist/components/Icons/registry.js +239 -0
  281. package/dist/components/Icons/registry.js.map +1 -0
  282. package/dist/components/InteractiveBlock/InteractiveBlock.js +6 -6
  283. package/dist/components/Layout/AgentAppShell/AgentAppShell.js +112 -91
  284. package/dist/components/Layout/AgentAppShell/AgentAppShell.js.map +1 -1
  285. package/dist/components/Layout/AgentAppShell/style.module.scss.js +20 -18
  286. package/dist/components/Layout/AgentAppShell/style.module.scss.js.map +1 -1
  287. package/dist/components/Layout/PageHeaderLayout/index.js +7 -7
  288. package/dist/components/Modal/Modal/index.js +8 -8
  289. package/dist/components/Modal/StepModal/index.js +9 -9
  290. package/dist/components/OrgTree/OrgTree.js +41 -39
  291. package/dist/components/OrgTree/OrgTree.js.map +1 -1
  292. package/dist/components/StateBar/StateBar.js +4 -4
  293. package/dist/components/Table/ColumnConfigPanel.js +13 -10
  294. package/dist/components/Table/ColumnConfigPanel.js.map +1 -1
  295. package/dist/components/Table/Table.js +7 -7
  296. package/dist/components/Tour/AppTour/index.js +10 -10
  297. package/dist/components/Upload/index.js +76 -72
  298. package/dist/components/Upload/index.js.map +1 -1
  299. package/dist/file.d.ts +5 -0
  300. package/dist/file.js +24 -0
  301. package/dist/file.js.map +1 -0
  302. package/dist/index.d.ts +3 -1
  303. package/dist/index.js +615 -537
  304. package/dist/index.js.map +1 -1
  305. package/dist/llm.d.ts +5 -0
  306. package/dist/llm.js +8 -0
  307. package/dist/llm.js.map +1 -0
  308. package/dist/marsun-components-core.css +1 -1
  309. package/dist/styles/global.css +1 -1
  310. package/package.json +15 -5
  311. package/dist/components/Icons/index.js +0 -268
  312. package/dist/components/Icons/index.js.map +0 -1
package/README.md CHANGED
@@ -46,22 +46,35 @@ applyThemeToCssVariables(primaryColor);
46
46
  themeConfig={generateTheme(primaryColor)}
47
47
  >
48
48
  <SemanticTag color="primary">标签</SemanticTag>
49
- <ChatPanel
50
- messages={[]}
51
- inputValue=""
52
- onInputChange={() => {}}
53
- onSend={() => {}}
54
- />
55
- </MarsunCoreProvider>
49
+ <ChatPanel messages={[]} inputValue="" onInputChange={() => {}} onSend={() => {}} />
50
+ </MarsunCoreProvider>;
56
51
  ```
57
52
 
58
53
  ### 主题与 Token
59
54
 
60
- | 导入路径 | 用途 |
61
- | --- | --- |
62
- | `@hkyhy/marsun-components-core/tokens` | 静态 CSS 变量默认值(布局、灰阶、标签色等) |
63
- | `@hkyhy/marsun-components-core/theme` | `generateTheme`, `applyThemeToCssVariables`, `PALETTE`, `LAYOUT_TOKENS` |
64
- | `@hkyhy/marsun-components-core/styles` | 组件库打包样式 |
55
+ | 导入路径 | 用途 |
56
+ | -------------------------------------- | ----------------------------------------------------------------------- |
57
+ | `@hkyhy/marsun-components-core/tokens` | 静态 CSS 变量默认值(布局、灰阶、标签色等) |
58
+ | `@hkyhy/marsun-components-core/theme` | `generateTheme`, `applyThemeToCssVariables`, `PALETTE`, `LAYOUT_TOKENS` |
59
+ | `@hkyhy/marsun-components-core/styles` | 组件库打包样式 |
60
+
61
+ ### L2 产品域(v0.1.53+)
62
+
63
+ AgentHub / File 预览 / Llm 走子路径,避免无相关产品首包拖入重依赖:
64
+
65
+ | 导入路径 | 用途 |
66
+ | ----------------------------------------- | ----------------------------------------- |
67
+ | `@hkyhy/marsun-components-core/agent-hub` | Chat、Knowledge、Citation、AgentHub Guard |
68
+ | `@hkyhy/marsun-components-core/file` | FilePreview、FileItem、FileLink 等 |
69
+ | `@hkyhy/marsun-components-core/llm` | LlmFormattedText |
70
+
71
+ 包根仍 re-export L2(迁移期 `@deprecated`);新代码请用子路径。
72
+
73
+ ### Layout(v0.1.56+)
74
+
75
+ `AgentAppShell` 侧栏折叠改为边缘竖条 tab(主题色);`UserProfileCard` / brand 折叠态水平居中。
76
+
77
+ > 0.1.54/0.1.55 因 typecheck 未发布;以 **0.1.56** 为准。
65
78
 
66
79
  项目可在 `src/styles/tokens.css` 扩展领域变量,详见 showcase 内 `frontend-dev-spec` → `theme.md`。
67
80
 
@@ -108,11 +121,12 @@ npm run typecheck
108
121
  包名为 **`@hkyhy/marsun-components-core`**(npm scope 与 GitHub 发布账号 `hkyhy` 对齐)。
109
122
 
110
123
  1. 在 GitHub 仓库 **Settings → Secrets → Actions** 配置 `HKYHY_PACKAGE_PUBLISH`(npm Automation Token,对 `@hkyhy` 有 publish 权限)
111
- 2. **推送 `main` 即自动发布**:`.github/workflows/release.yml` 会 patch 版本号、提交 `chore(release): v* `、打 tag 并 `npm publish`(`chore(release)` 提交本身不会再次触发,避免循环)
112
- 3. 日常只需正常开发提交并 push:
124
+ 2. **发版**:先将 `package.json` version 升到待发布号,再提交并 push 首行形如 `chore(release): vX.Y.Z …` 的 commit;`release.yml` 校验版本 → 打 tag → `npm publish`(仅该消息前缀触发,feat push 不发版)
125
+ 3. 示例:
113
126
 
114
127
  ```bash
115
- git push origin main
128
+ # version 已为 0.1.53 时
129
+ git push origin main # 含 chore(release): v0.1.53 …
116
130
  ```
117
131
 
118
132
  也可在 Actions 中手动运行 **Publish npm**,填写已有 tag 重新发布。
@@ -0,0 +1,11 @@
1
+ /**
2
+ * L2 产品域入口:`@hkyhy/marsun-components-core/agent-hub`
3
+ * 新代码须从此子路径 import;包根 re-export 为迁移期 @deprecated。
4
+ */
5
+ export { default as AgentHubAccessGuard } from './components/AgentHub/AgentHubAccessGuard';
6
+ export { default as AgentHubIndexRedirect } from './components/AgentHub/AgentHubIndexRedirect';
7
+ export { default as AgentHubSessionAccessGuard } from './components/AgentHub/ChatSessionAccessGuard';
8
+ export type * from './components/AgentHub/types';
9
+ export * from './components/AgentHub/Chat';
10
+ export * from './components/AgentHub/KnowledgeBase';
11
+ export * from './components/AgentHub/Report';
@@ -0,0 +1,144 @@
1
+ import { default as o } from "./components/AgentHub/AgentHubAccessGuard.js";
2
+ import { default as r } from "./components/AgentHub/AgentHubIndexRedirect.js";
3
+ import { default as i } from "./components/AgentHub/ChatSessionAccessGuard.js";
4
+ import { default as n } from "./components/AgentHub/Chat/Detail/ChatAgentFab/index.js";
5
+ import { default as p } from "./components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js";
6
+ import { default as u } from "./components/AgentHub/Chat/Form/Form.js";
7
+ import { default as x } from "./components/AgentHub/Chat/List/ChatCard/index.js";
8
+ import { default as c } from "./components/AgentHub/Chat/Action/CreateButton.js";
9
+ import { default as S } from "./components/AgentHub/Chat/List/FilterBar.js";
10
+ import { default as B } from "./components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js";
11
+ import { default as h } from "./components/AgentHub/Chat/Modal/FormModal.js";
12
+ import { default as I } from "./components/AgentHub/Chat/Detail/ChatInput/index.js";
13
+ import { default as P } from "./components/AgentHub/Chat/Action/ManageActionButtons.js";
14
+ import { default as R } from "./components/AgentHub/Chat/Detail/ChatPanel/index.js";
15
+ import { default as w } from "./components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js";
16
+ import { default as N } from "./components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js";
17
+ import { default as b } from "./components/AgentHub/Chat/Detail/CitationContent/index.js";
18
+ import { default as H } from "./components/AgentHub/Chat/Detail/CitationInlineBadge/index.js";
19
+ import { default as _ } from "./components/AgentHub/Chat/Detail/CitationMarkdownContent/index.js";
20
+ import { default as z } from "./components/AgentHub/Chat/Detail/CitationPanel/index.js";
21
+ import { default as G } from "./components/AgentHub/KnowledgeBase/Action/CreateButton.js";
22
+ import { default as W } from "./components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js";
23
+ import { default as q } from "./components/AgentHub/KnowledgeBase/List/FilterBar.js";
24
+ import { default as X } from "./components/AgentHub/KnowledgeBase/Modal/FormModal.js";
25
+ import { default as Q } from "./components/AgentHub/KnowledgeBase/Form/Form.js";
26
+ import { default as Z } from "./components/AgentHub/KnowledgeBase/List/KnowledgeCard/index.js";
27
+ import { default as tt } from "./components/AgentHub/KnowledgeBase/Action/ManageActionButtons.js";
28
+ import { default as ot } from "./components/AgentHub/Chat/Detail/MermaidBlock/index.js";
29
+ import { default as rt } from "./components/AgentHub/Chat/Detail/MessageActions/index.js";
30
+ import { default as it } from "./components/AgentHub/Chat/Detail/MessageEditPopover/index.js";
31
+ import { default as nt } from "./components/AgentHub/Chat/Detail/MessageItem/index.js";
32
+ import { default as pt } from "./components/AgentHub/KnowledgeBase/Detail/ParseStatusTag/index.js";
33
+ import { default as ut } from "./components/AgentHub/Report/Detail/ReportArchiveModal/index.js";
34
+ import { default as xt } from "./components/AgentHub/Report/Detail/ReportExportLayout/index.js";
35
+ import { default as ct } from "./components/AgentHub/Report/Detail/ReportHtmlPreview/index.js";
36
+ import { default as St } from "./components/AgentHub/Report/Detail/ReportMetaStrip/index.js";
37
+ import { default as Bt } from "./components/AgentHub/Report/Detail/ReportTemplate/index.js";
38
+ import { default as ht } from "./components/AgentHub/Report/Detail/ReportVersionList/index.js";
39
+ import { default as It } from "./components/AgentHub/Report/Detail/ReportWorkspace/index.js";
40
+ import { default as Pt } from "./components/AgentHub/Chat/Action/SessionActionButtons.js";
41
+ import { default as Rt } from "./components/AgentHub/Chat/List/SessionSidebar/index.js";
42
+ import { default as wt } from "./components/AgentHub/Chat/Detail/ThinkingSection/index.js";
43
+ import { CHUNK_METHOD_OPTIONS as Nt, EMBEDDING_MODEL_OPTIONS as Ot, PARSE_STATUS_CONFIG as bt } from "./components/AgentHub/KnowledgeBase/constants/types.js";
44
+ import { CITATION_LINK_PREFIX as Ht, citationDisplayNumber as Kt, citationIdToIndex as _t, countUniqueCitedSources as Lt, detectCitationIdBase as zt, extractCitationIdsFromContent as vt, extractCitationTitle as Gt, formatCitationDocBasename as Ut, formatCitationMeta as Wt, formatCitationPositions as jt, injectCitationMarkdownLinks as qt, normalizeCitation as Vt, parseCitationLinkHref as Xt, prepareCitationContent as Jt, resolveCitationTitle as Qt, sanitizeCitationHtml as Yt, stripCitationFrontmatter as Zt } from "./components/AgentHub/Chat/utils/citationContent.js";
45
+ import { animateScrollFromTopToBottom as te, animateScrollTo as ee, getScrollBottom as oe } from "./components/AgentHub/Chat/utils/smoothScroll.js";
46
+ import { extractCitations as re, formatSessionTime as se, getSessionDisplayName as ie, isWelcomeOnlyMessages as fe, parseSessionMessages as ne, toDisplayMessages as me } from "./components/AgentHub/Chat/utils/sessionMessages.js";
47
+ import { hasCitationMarkers as le, normalizeAssistantMarkdown as ue, normalizeDisplayText as de, parseAssistantContent as xe } from "./components/AgentHub/Chat/utils/messageContent.js";
48
+ import { sanitizeMermaidChart as ce, stripProseFromMermaid as ge } from "./components/AgentHub/Chat/utils/sanitizeMermaidChart.js";
49
+ import { useAutoScrollToBottom as Me } from "./components/AgentHub/Chat/hooks/useAutoScrollToBottom.js";
50
+ import { useChat as Te } from "./components/AgentHub/Chat/hooks/useChat.js";
51
+ import { useChatSessions as Ae } from "./components/AgentHub/Chat/hooks/useChatSessions.js";
52
+ import { useCitationPanel as Fe } from "./components/AgentHub/Chat/hooks/useCitationPanel.js";
53
+ import { useKBDocuments as De } from "./components/AgentHub/KnowledgeBase/hooks/useKBDocuments.js";
54
+ import { useKnowledgeBase as ke } from "./components/AgentHub/KnowledgeBase/hooks/useKnowledgeBase.js";
55
+ import { useSSECompletion as Ee } from "./components/AgentHub/Chat/hooks/useSSECompletion.js";
56
+ import { useTypewriter as Oe } from "./components/AgentHub/Chat/hooks/useTypewriter.js";
57
+ export {
58
+ o as AgentHubAccessGuard,
59
+ r as AgentHubIndexRedirect,
60
+ i as AgentHubSessionAccessGuard,
61
+ Nt as CHUNK_METHOD_OPTIONS,
62
+ Ht as CITATION_LINK_PREFIX,
63
+ n as ChatAgentFab,
64
+ p as ChatAgentFabLayout,
65
+ u as ChatAssistantForm,
66
+ x as ChatCard,
67
+ c as ChatCreateButton,
68
+ S as ChatFilterBar,
69
+ B as ChatFollowUpSuggestions,
70
+ h as ChatFormModal,
71
+ I as ChatInput,
72
+ P as ChatManageActionButtons,
73
+ R as ChatPanel,
74
+ w as ChatSuggestionRow,
75
+ N as ChatWidgetBlock,
76
+ b as CitationContent,
77
+ H as CitationInlineBadge,
78
+ _ as CitationMarkdownContent,
79
+ z as CitationPanel,
80
+ G as CreateButton,
81
+ W as DocumentTable,
82
+ Ot as EMBEDDING_MODEL_OPTIONS,
83
+ q as KBFilterBar,
84
+ X as KBFormModal,
85
+ Q as KnowledgeBaseForm,
86
+ Z as KnowledgeCard,
87
+ tt as ManageActionButtons,
88
+ ot as MermaidBlock,
89
+ rt as MessageActions,
90
+ it as MessageEditPopover,
91
+ nt as MessageItem,
92
+ bt as PARSE_STATUS_CONFIG,
93
+ pt as ParseStatusTag,
94
+ ut as ReportArchiveModal,
95
+ xt as ReportExportLayout,
96
+ ct as ReportHtmlPreview,
97
+ St as ReportMetaStrip,
98
+ Bt as ReportTemplate,
99
+ ht as ReportVersionList,
100
+ It as ReportWorkspace,
101
+ Pt as SessionActionButtons,
102
+ Rt as SessionSidebar,
103
+ wt as ThinkingSection,
104
+ te as animateScrollFromTopToBottom,
105
+ ee as animateScrollTo,
106
+ Kt as citationDisplayNumber,
107
+ _t as citationIdToIndex,
108
+ Lt as countUniqueCitedSources,
109
+ zt as detectCitationIdBase,
110
+ vt as extractCitationIdsFromContent,
111
+ Gt as extractCitationTitle,
112
+ re as extractCitations,
113
+ Ut as formatCitationDocBasename,
114
+ Wt as formatCitationMeta,
115
+ jt as formatCitationPositions,
116
+ se as formatSessionTime,
117
+ oe as getScrollBottom,
118
+ ie as getSessionDisplayName,
119
+ le as hasCitationMarkers,
120
+ qt as injectCitationMarkdownLinks,
121
+ fe as isWelcomeOnlyMessages,
122
+ ue as normalizeAssistantMarkdown,
123
+ Vt as normalizeCitation,
124
+ de as normalizeDisplayText,
125
+ xe as parseAssistantContent,
126
+ Xt as parseCitationLinkHref,
127
+ ne as parseSessionMessages,
128
+ Jt as prepareCitationContent,
129
+ Qt as resolveCitationTitle,
130
+ Yt as sanitizeCitationHtml,
131
+ ce as sanitizeMermaidChart,
132
+ Zt as stripCitationFrontmatter,
133
+ ge as stripProseFromMermaid,
134
+ me as toDisplayMessages,
135
+ Me as useAutoScrollToBottom,
136
+ Te as useChat,
137
+ Ae as useChatSessions,
138
+ Fe as useCitationPanel,
139
+ De as useKBDocuments,
140
+ ke as useKnowledgeBase,
141
+ Ee as useSSECompletion,
142
+ Oe as useTypewriter
143
+ };
144
+ //# sourceMappingURL=agent-hub.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-hub.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Plus as r } from "../../../Icons/index.js";
3
- import { Button as m } from "antd";
4
- const n = ({ onClick: o }) => /* @__PURE__ */ t(m, { type: "primary", icon: /* @__PURE__ */ t(r, {}), onClick: o, children: "新建助手" });
2
+ import { Button as r } from "antd";
3
+ import { Plus as m } from "../../../Icons/Plus.js";
4
+ const n = ({ onClick: o }) => /* @__PURE__ */ t(r, { type: "primary", icon: /* @__PURE__ */ t(m, {}), onClick: o, children: "新建助手" });
5
5
  export {
6
6
  n as default
7
7
  };
@@ -1,14 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Plus as r } from "../../../Icons/index.js";
3
- import i from "@kne/button-group";
2
+ import r from "@kne/button-group";
3
+ import { Plus as i } from "../../../Icons/Plus.js";
4
4
  const s = ({ onCreateClick: t }) => /* @__PURE__ */ o(
5
- i,
5
+ r,
6
6
  {
7
7
  list: [
8
8
  {
9
9
  children: "新建助手",
10
10
  type: "primary",
11
- icon: /* @__PURE__ */ o(r, {}),
11
+ icon: /* @__PURE__ */ o(i, {}),
12
12
  onClick: t
13
13
  }
14
14
  ]
@@ -1,17 +1,17 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Trash2 as r } from "../../../Icons/index.js";
3
- import n from "@kne/button-group";
2
+ import r from "@kne/button-group";
3
+ import { Trash2 as n } from "../../../Icons/Trash2.js";
4
4
  const f = ({
5
5
  streaming: t = !1,
6
6
  clearDisabled: s = !1,
7
7
  onClearConversation: i
8
8
  }) => /* @__PURE__ */ o(
9
- n,
9
+ r,
10
10
  {
11
11
  list: [
12
12
  {
13
13
  children: "清空对话",
14
- icon: /* @__PURE__ */ o(r, {}),
14
+ icon: /* @__PURE__ */ o(n, {}),
15
15
  disabled: t || s,
16
16
  onClick: i
17
17
  }
@@ -1,22 +1,24 @@
1
- import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
- import { ChevronUp as w, ChevronDown as g, MessageCircle as N } from "../../../../Icons/index.js";
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
3
2
  import n from "classnames";
4
- import { useState as C } from "react";
3
+ import { useState as w } from "react";
5
4
  import l from "./style.module.scss.js";
6
- import x from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
7
- const E = ({
5
+ import { ChevronUp as g } from "../../../../Icons/ChevronUp.js";
6
+ import { ChevronDown as N } from "../../../../Icons/ChevronDown.js";
7
+ import C from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
8
+ import { MessageCircle as x } from "../../../../Icons/MessageCircle.js";
9
+ const $ = ({
8
10
  items: s,
9
11
  onSelect: i,
10
12
  title: c = "推荐追问",
11
- className: u,
12
- maxListHeight: p = 132,
13
- collapsible: o = !0,
13
+ className: p,
14
+ maxListHeight: u = 132,
15
+ collapsible: e = !0,
14
16
  defaultExpanded: h = !0
15
17
  }) => {
16
- const [r, d] = C(h);
18
+ const [r, m] = w(h);
17
19
  if (!s.length) return null;
18
- const m = () => {
19
- o && d((e) => !e);
20
+ const d = () => {
21
+ e && m((a) => !a);
20
22
  };
21
23
  return /* @__PURE__ */ t(
22
24
  "div",
@@ -24,7 +26,7 @@ const E = ({
24
26
  className: n(
25
27
  "chat-followup-suggestions",
26
28
  l["chat-followup-suggestions"],
27
- u
29
+ p
28
30
  ),
29
31
  children: [
30
32
  c ? /* @__PURE__ */ t(
@@ -33,39 +35,39 @@ const E = ({
33
35
  type: "button",
34
36
  className: n(
35
37
  l["chat-followup-header"],
36
- o && l["chat-followup-header--collapsible"]
38
+ e && l["chat-followup-header--collapsible"]
37
39
  ),
38
- onClick: m,
40
+ onClick: d,
39
41
  "aria-expanded": r,
40
- disabled: !o,
42
+ disabled: !e,
41
43
  children: [
42
44
  /* @__PURE__ */ t("span", { className: l["chat-followup-title"], children: [
43
45
  c,
44
- /* @__PURE__ */ a("span", { className: l["chat-followup-count"], children: s.length })
46
+ /* @__PURE__ */ o("span", { className: l["chat-followup-count"], children: s.length })
45
47
  ] }),
46
- o ? r ? /* @__PURE__ */ a(w, { className: l["chat-followup-toggle"], "aria-hidden": !0 }) : /* @__PURE__ */ a(g, { className: l["chat-followup-toggle"], "aria-hidden": !0 }) : null
48
+ e ? r ? /* @__PURE__ */ o(g, { className: l["chat-followup-toggle"], "aria-hidden": !0 }) : /* @__PURE__ */ o(N, { className: l["chat-followup-toggle"], "aria-hidden": !0 }) : null
47
49
  ]
48
50
  }
49
51
  ) : null,
50
- r ? /* @__PURE__ */ a(
51
- x,
52
+ r ? /* @__PURE__ */ o(
53
+ C,
52
54
  {
53
55
  wrapperClassName: l["chat-followup-list-scroll-wrapper"],
54
- style: { maxHeight: p },
56
+ style: { maxHeight: u },
55
57
  className: l["chat-followup-list-scroll"],
56
- children: /* @__PURE__ */ a("div", { className: l["chat-followup-list"], children: s.map((e, f) => /* @__PURE__ */ t(
58
+ children: /* @__PURE__ */ o("div", { className: l["chat-followup-list"], children: s.map((a, f) => /* @__PURE__ */ t(
57
59
  "button",
58
60
  {
59
61
  type: "button",
60
62
  className: l["chat-followup-item"],
61
- title: e,
62
- onClick: () => i(e),
63
+ title: a,
64
+ onClick: () => i(a),
63
65
  children: [
64
- /* @__PURE__ */ a(N, { className: l["chat-followup-icon"], "aria-hidden": !0 }),
65
- /* @__PURE__ */ a("span", { className: l["chat-followup-text"], children: e })
66
+ /* @__PURE__ */ o(x, { className: l["chat-followup-icon"], "aria-hidden": !0 }),
67
+ /* @__PURE__ */ o("span", { className: l["chat-followup-text"], children: a })
66
68
  ]
67
69
  },
68
- `${f}-${e.slice(0, 24)}`
70
+ `${f}-${a.slice(0, 24)}`
69
71
  )) })
70
72
  }
71
73
  ) : null
@@ -74,6 +76,6 @@ const E = ({
74
76
  );
75
77
  };
76
78
  export {
77
- E as default
79
+ $ as default
78
80
  };
79
81
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp, MessageCircle } from '@/components/Icons';\nimport { VirtualScrollbar } from '@/components/VirtualScrollbar';\nimport classNames from 'classnames';\nimport { useState } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatFollowUpSuggestionsProps {\n items: string[];\n onSelect: (text: string) => void;\n title?: string;\n className?: string;\n /** 列表区最大高度,超出后纵向滚动 */\n maxListHeight?: number;\n /** 是否可折叠,默认 true */\n collapsible?: boolean;\n /** 初始展开状态 */\n defaultExpanded?: boolean;\n}\n\nconst ChatFollowUpSuggestions: React.FC<ChatFollowUpSuggestionsProps> = ({\n items,\n onSelect,\n title = '推荐追问',\n className,\n maxListHeight = 132,\n collapsible = true,\n defaultExpanded = true,\n}) => {\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n if (!items.length) return null;\n\n const toggleExpanded = () => {\n if (!collapsible) return;\n setExpanded((prev) => !prev);\n };\n\n return (\n <div\n className={classNames(\n 'chat-followup-suggestions',\n styles['chat-followup-suggestions'],\n className,\n )}\n >\n {title ? (\n <button\n type=\"button\"\n className={classNames(\n styles['chat-followup-header'],\n collapsible && styles['chat-followup-header--collapsible'],\n )}\n onClick={toggleExpanded}\n aria-expanded={expanded}\n disabled={!collapsible}\n >\n <span className={styles['chat-followup-title']}>\n {title}\n <span className={styles['chat-followup-count']}>{items.length}</span>\n </span>\n {collapsible ? (\n expanded ? (\n <ChevronUp className={styles['chat-followup-toggle']} aria-hidden />\n ) : (\n <ChevronDown className={styles['chat-followup-toggle']} aria-hidden />\n )\n ) : null}\n </button>\n ) : null}\n\n {expanded ? (\n <VirtualScrollbar\n wrapperClassName={styles['chat-followup-list-scroll-wrapper']}\n style={{ maxHeight: maxListHeight }}\n className={styles['chat-followup-list-scroll']}\n >\n <div className={styles['chat-followup-list']}>\n {items.map((text, index) => (\n <button\n key={`${index}-${text.slice(0, 24)}`}\n type=\"button\"\n className={styles['chat-followup-item']}\n title={text}\n onClick={() => onSelect(text)}\n >\n <MessageCircle className={styles['chat-followup-icon']} aria-hidden />\n <span className={styles['chat-followup-text']}>{text}</span>\n </button>\n ))}\n </div>\n </VirtualScrollbar>\n ) : null}\n </div>\n );\n};\n\nexport default ChatFollowUpSuggestions;\n"],"names":["ChatFollowUpSuggestions","items","onSelect","title","className","maxListHeight","collapsible","defaultExpanded","expanded","setExpanded","useState","toggleExpanded","prev","jsxs","classNames","styles","jsx","ChevronUp","ChevronDown","VirtualScrollbar","text","index","MessageCircle"],"mappings":";;;;;;AAmBA,MAAMA,IAAkE,CAAC;AAAA,EACvE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,aAAAC,IAAc;AAAA,EACd,iBAAAC,IAAkB;AACpB,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAASH,CAAe;AAExD,MAAI,CAACN,EAAM,OAAQ,QAAO;AAE1B,QAAMU,IAAiB,MAAM;AAC3B,IAAKL,KACLG,EAAY,CAACG,MAAS,CAACA,CAAI;AAAA,EAC7B;AAEA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAC,EAAO,2BAA2B;AAAA,QA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,CAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,cAPhD,GAAGC,CAAK,IAAID,EAAK,MAAM,GAAG,EAAE,CAAC;AAAA,YAAA,CASrC,EAAA,CACH;AAAA,UAAA;AAAA,QAAA,IAEA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp, MessageCircle } from '@/components/Icons';\nimport { VirtualScrollbar } from '@/components/VirtualScrollbar';\nimport classNames from 'classnames';\nimport { useState } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatFollowUpSuggestionsProps {\n items: string[];\n onSelect: (text: string) => void;\n title?: string;\n className?: string;\n /** 列表区最大高度,超出后纵向滚动 */\n maxListHeight?: number;\n /** 是否可折叠,默认 true */\n collapsible?: boolean;\n /** 初始展开状态 */\n defaultExpanded?: boolean;\n}\n\nconst ChatFollowUpSuggestions: React.FC<ChatFollowUpSuggestionsProps> = ({\n items,\n onSelect,\n title = '推荐追问',\n className,\n maxListHeight = 132,\n collapsible = true,\n defaultExpanded = true,\n}) => {\n const [expanded, setExpanded] = useState(defaultExpanded);\n\n if (!items.length) return null;\n\n const toggleExpanded = () => {\n if (!collapsible) return;\n setExpanded((prev) => !prev);\n };\n\n return (\n <div\n className={classNames(\n 'chat-followup-suggestions',\n styles['chat-followup-suggestions'],\n className,\n )}\n >\n {title ? (\n <button\n type=\"button\"\n className={classNames(\n styles['chat-followup-header'],\n collapsible && styles['chat-followup-header--collapsible'],\n )}\n onClick={toggleExpanded}\n aria-expanded={expanded}\n disabled={!collapsible}\n >\n <span className={styles['chat-followup-title']}>\n {title}\n <span className={styles['chat-followup-count']}>{items.length}</span>\n </span>\n {collapsible ? (\n expanded ? (\n <ChevronUp className={styles['chat-followup-toggle']} aria-hidden />\n ) : (\n <ChevronDown className={styles['chat-followup-toggle']} aria-hidden />\n )\n ) : null}\n </button>\n ) : null}\n\n {expanded ? (\n <VirtualScrollbar\n wrapperClassName={styles['chat-followup-list-scroll-wrapper']}\n style={{ maxHeight: maxListHeight }}\n className={styles['chat-followup-list-scroll']}\n >\n <div className={styles['chat-followup-list']}>\n {items.map((text, index) => (\n <button\n key={`${index}-${text.slice(0, 24)}`}\n type=\"button\"\n className={styles['chat-followup-item']}\n title={text}\n onClick={() => onSelect(text)}\n >\n <MessageCircle className={styles['chat-followup-icon']} aria-hidden />\n <span className={styles['chat-followup-text']}>{text}</span>\n </button>\n ))}\n </div>\n </VirtualScrollbar>\n ) : null}\n </div>\n );\n};\n\nexport default ChatFollowUpSuggestions;\n"],"names":["ChatFollowUpSuggestions","items","onSelect","title","className","maxListHeight","collapsible","defaultExpanded","expanded","setExpanded","useState","toggleExpanded","prev","jsxs","classNames","styles","jsx","ChevronUp","ChevronDown","VirtualScrollbar","text","index","MessageCircle"],"mappings":";;;;;;;;AAmBA,MAAMA,IAAkE,CAAC;AAAA,EACvE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,aAAAC,IAAc;AAAA,EACd,iBAAAC,IAAkB;AACpB,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAASH,CAAe;AAExD,MAAI,CAACN,EAAM,OAAQ,QAAO;AAE1B,QAAMU,IAAiB,MAAM;AAC3B,IAAKL,KACLG,EAAY,CAACG,MAAS,CAACA,CAAI;AAAA,EAC7B;AAEA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAC,EAAO,2BAA2B;AAAA,QAClCX;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAAD,IACC,gBAAAU;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWC;AAAA,cACTC,EAAO,sBAAsB;AAAA,cAC7BT,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AAA;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1,21 +1,22 @@
1
- import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
- import { Pause as u, Send as f } from "../../../../Icons/index.js";
3
- import { Input as y, Button as p } from "antd";
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { Input as u, Button as o } from "antd";
4
3
  import t from "./style.module.scss.js";
5
4
  import a from "classnames";
6
- const C = ({
5
+ import { Pause as f } from "../../../../Icons/Pause.js";
6
+ import { Send as y } from "../../../../Icons/Send.js";
7
+ const g = ({
7
8
  value: e,
8
9
  loading: c,
9
- onChange: o,
10
+ onChange: p,
10
11
  onSend: s,
11
12
  onStop: h,
12
13
  placeholder: m = "输入问题… Enter 发送,Shift+Enter 换行",
13
14
  embedded: d = !1
14
15
  }) => {
15
- const l = (i) => {
16
- i.key === "Enter" && !i.shiftKey && (i.preventDefault(), !c && e.trim() && s());
16
+ const l = (r) => {
17
+ r.key === "Enter" && !r.shiftKey && (r.preventDefault(), !c && e.trim() && s());
17
18
  };
18
- return /* @__PURE__ */ r(
19
+ return /* @__PURE__ */ i(
19
20
  "div",
20
21
  {
21
22
  className: a(
@@ -24,12 +25,12 @@ const C = ({
24
25
  d && t["chat-input-root--embedded"]
25
26
  ),
26
27
  children: [
27
- /* @__PURE__ */ r("div", { className: a("chat-input-container", t["chat-input-container"]), children: [
28
+ /* @__PURE__ */ i("div", { className: a("chat-input-container", t["chat-input-container"]), children: [
28
29
  /* @__PURE__ */ n(
29
- y.TextArea,
30
+ u.TextArea,
30
31
  {
31
32
  value: e,
32
- onChange: (i) => o(i.target.value),
33
+ onChange: (r) => p(r.target.value),
33
34
  onKeyDown: l,
34
35
  placeholder: m,
35
36
  autoSize: { minRows: 1, maxRows: 5 },
@@ -39,29 +40,29 @@ const C = ({
39
40
  }
40
41
  ),
41
42
  c ? /* @__PURE__ */ n(
42
- p,
43
+ o,
43
44
  {
44
45
  type: "primary",
45
46
  danger: !0,
46
- icon: /* @__PURE__ */ n(u, {}),
47
+ icon: /* @__PURE__ */ n(f, {}),
47
48
  onClick: h,
48
49
  "aria-label": "停止生成",
49
50
  className: a("chat-input-inner", t["chat-input-inner"])
50
51
  }
51
52
  ) : /* @__PURE__ */ n(
52
- p,
53
+ o,
53
54
  {
54
55
  type: "primary",
55
- icon: /* @__PURE__ */ n(f, {}),
56
+ icon: /* @__PURE__ */ n(y, {}),
56
57
  onClick: s,
57
58
  disabled: !e.trim(),
58
59
  className: a("chat-input-inner", t["chat-input-inner"])
59
60
  }
60
61
  )
61
62
  ] }),
62
- /* @__PURE__ */ r("div", { className: a("chat-input-header", t["chat-input-header"]), children: [
63
+ /* @__PURE__ */ i("div", { className: a("chat-input-header", t["chat-input-header"]), children: [
63
64
  /* @__PURE__ */ n("span", { className: a("chat-input-body", t["chat-input-body"]), children: "Enter 发送 · Shift+Enter 换行" }),
64
- e.length > 0 && /* @__PURE__ */ r("span", { className: a("chat-input-body", t["chat-input-body"]), children: [
65
+ e.length > 0 && /* @__PURE__ */ i("span", { className: a("chat-input-body", t["chat-input-body"]), children: [
65
66
  e.length,
66
67
  " 字"
67
68
  ] })
@@ -71,6 +72,6 @@ const C = ({
71
72
  );
72
73
  };
73
74
  export {
74
- C as default
75
+ g as default
75
76
  };
76
77
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatInput/index.tsx"],"sourcesContent":["import { Pause, Send } from '@/components/Icons';\nimport { Button, Input } from 'antd';\nimport React from 'react';\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\nexport interface ChatInputProps {\n value: string;\n loading: boolean;\n onChange: (v: string) => void;\n onSend: () => void;\n onStop?: () => void;\n placeholder?: string;\n /** 嵌入 ChatPanel 时去掉外层 border/padding,避免与 chat-panel-input 重复 */\n embedded?: boolean;\n}\n\nconst ChatInput: React.FC<ChatInputProps> = ({\n value,\n loading,\n onChange,\n onSend,\n onStop,\n placeholder = '输入问题… Enter 发送,Shift+Enter 换行',\n embedded = false,\n}) => {\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (!loading && value.trim()) {\n onSend();\n }\n }\n };\n\n return (\n <div\n className={classNames(\n 'chat-input-root',\n styles['chat-input-root'],\n embedded && styles['chat-input-root--embedded'],\n )}\n >\n <div className={classNames('chat-input-container', styles['chat-input-container'])}>\n <Input.TextArea\n value={value}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n autoSize={{ minRows: 1, maxRows: 5 }}\n disabled={loading}\n variant=\"borderless\"\n className={classNames('chat-input-wrapper', styles['chat-input-wrapper'])}\n />\n\n {loading ? (\n <Button\n type=\"primary\"\n danger\n icon={<Pause />}\n onClick={onStop}\n aria-label=\"停止生成\"\n className={classNames('chat-input-inner', styles['chat-input-inner'])}\n />\n ) : (\n <Button\n type=\"primary\"\n icon={<Send />}\n onClick={onSend}\n disabled={!value.trim()}\n className={classNames('chat-input-inner', styles['chat-input-inner'])}\n />\n )}\n </div>\n\n <div className={classNames('chat-input-header', styles['chat-input-header'])}>\n <span className={classNames('chat-input-body', styles['chat-input-body'])}>\n Enter 发送 · Shift+Enter 换行\n </span>\n {value.length > 0 && (\n <span className={classNames('chat-input-body', styles['chat-input-body'])}>\n {value.length} 字\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default ChatInput;\n"],"names":["ChatInput","value","loading","onChange","onSend","onStop","placeholder","embedded","handleKeyDown","e","jsxs","classNames","styles","jsx","Input","Button","Pause","Send"],"mappings":";;;;;AAiBA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AACb,MAAM;AACJ,QAAMC,IAAgB,CA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,mBAAmB,CAAC,GACzE,UAAA;AAAA,UAAA,gBAAAC,EAAC,QAAA,EAAK,WAAWF,EAAW,mBAAmBC,EAAO,iBAAiB,CAAC,GAAG,UAAA,4BAAA,CAE3E;AAAA,UACCX,EAAM,SAAS,KACd,gBAAAS,EAAC,QAAA,EAAK,WAAWC,EAAW,mBAAmBC,EAAO,iBAAiB,CAAC,GACrE,UAAA;AAAA,YAAAX,EAAM;AAAA,YAAO;AAAA,UAAA,EAAA,CAChB;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatInput/index.tsx"],"sourcesContent":["import { Pause, Send } from '@/components/Icons';\nimport { Button, Input } from 'antd';\nimport React from 'react';\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\nexport interface ChatInputProps {\n value: string;\n loading: boolean;\n onChange: (v: string) => void;\n onSend: () => void;\n onStop?: () => void;\n placeholder?: string;\n /** 嵌入 ChatPanel 时去掉外层 border/padding,避免与 chat-panel-input 重复 */\n embedded?: boolean;\n}\n\nconst ChatInput: React.FC<ChatInputProps> = ({\n value,\n loading,\n onChange,\n onSend,\n onStop,\n placeholder = '输入问题… Enter 发送,Shift+Enter 换行',\n embedded = false,\n}) => {\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n if (!loading && value.trim()) {\n onSend();\n }\n }\n };\n\n return (\n <div\n className={classNames(\n 'chat-input-root',\n styles['chat-input-root'],\n embedded && styles['chat-input-root--embedded'],\n )}\n >\n <div className={classNames('chat-input-container', styles['chat-input-container'])}>\n <Input.TextArea\n value={value}\n onChange={(e) => onChange(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n autoSize={{ minRows: 1, maxRows: 5 }}\n disabled={loading}\n variant=\"borderless\"\n className={classNames('chat-input-wrapper', styles['chat-input-wrapper'])}\n />\n\n {loading ? (\n <Button\n type=\"primary\"\n danger\n icon={<Pause />}\n onClick={onStop}\n aria-label=\"停止生成\"\n className={classNames('chat-input-inner', styles['chat-input-inner'])}\n />\n ) : (\n <Button\n type=\"primary\"\n icon={<Send />}\n onClick={onSend}\n disabled={!value.trim()}\n className={classNames('chat-input-inner', styles['chat-input-inner'])}\n />\n )}\n </div>\n\n <div className={classNames('chat-input-header', styles['chat-input-header'])}>\n <span className={classNames('chat-input-body', styles['chat-input-body'])}>\n Enter 发送 · Shift+Enter 换行\n </span>\n {value.length > 0 && (\n <span className={classNames('chat-input-body', styles['chat-input-body'])}>\n {value.length} 字\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default ChatInput;\n"],"names":["ChatInput","value","loading","onChange","onSend","onStop","placeholder","embedded","handleKeyDown","e","jsxs","classNames","styles","jsx","Input","Button","Pause","Send"],"mappings":";;;;;;AAiBA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AACb,MAAM;AACJ,QAAMC,IAAgB,CAACC,MAAgD;AACrE,IAAIA,EAAE,QAAQ,WAAW,CAACA,EAAE,aAC1BA,EAAE,eAAA,GACE,CAACP,KAAWD,EAAM,UACpBG,EAAA;AAAA,EAGN;AAEA,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAC,EAAO,iBAAiB;AAAA,QACxBL,KAAYK,EAAO,2BAA2B;AAAA,MAAA;AAAA,MAGhD,UAAA;AAAA,QAAA,gBAAAF,EAAC,SAAI,WAAWC,EAAW,wBAAwBC,EAAO,sBAAsB,CAAC,GAC/E,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC,EAAM;AAAA,YAAN;AAAA,cACC,OAAAb;AAAA,cAC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../../../../Icons/index.js";
3
- import { Button as b, Empty as f } from "antd";
2
+ import { Button as N, Empty as f } from "antd";
4
3
  import i from "classnames";
5
- import C, { useState as E, useRef as k, useEffect as x, useCallback as v } from "react";
6
- import S from "../CitationContent/index.js";
4
+ import y, { useState as b, useRef as C, useEffect as E, useCallback as v } from "react";
5
+ import k from "../CitationContent/index.js";
7
6
  import t from "./style.module.scss.js";
8
- import w from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
9
- import { formatCitationMeta as D, resolveCitationTitle as R } from "../../utils/citationContent.js";
7
+ import { X as x } from "../../../../Icons/X.js";
8
+ import S from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
9
+ import { formatCitationMeta as w, resolveCitationTitle as D } from "../../utils/citationContent.js";
10
+ import { ChevronDown as R } from "../../../../Icons/ChevronDown.js";
10
11
  const q = ({
11
12
  citation: o,
12
13
  index: c,
@@ -15,7 +16,7 @@ const q = ({
15
16
  onToggle: p,
16
17
  itemRef: d
17
18
  }) => {
18
- const h = D(o), e = !!o.content, n = R(o, c), m = v(
19
+ const h = w(o), e = !!o.content, n = D(o, c), m = v(
19
20
  (u) => {
20
21
  e && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), p());
21
22
  },
@@ -119,7 +120,7 @@ const q = ({
119
120
  }
120
121
  ),
121
122
  e && /* @__PURE__ */ a(
122
- y,
123
+ R,
123
124
  {
124
125
  className: i(
125
126
  "citation-panel-citation-item-chevron",
@@ -140,7 +141,7 @@ const q = ({
140
141
  "citation-panel-citation-item-quote",
141
142
  t["citation-panel-citation-item-quote"]
142
143
  ),
143
- children: /* @__PURE__ */ a(S, { content: o.content })
144
+ children: /* @__PURE__ */ a(k, { content: o.content })
144
145
  }
145
146
  )
146
147
  ]
@@ -152,9 +153,9 @@ const q = ({
152
153
  ]
153
154
  }
154
155
  );
155
- }, $ = ({ citations: o, highlightedIndex: c, onClose: r }) => {
156
- const [s, p] = E(() => /* @__PURE__ */ new Set()), d = k([]);
157
- x(() => {
156
+ }, z = ({ citations: o, highlightedIndex: c, onClose: r }) => {
157
+ const [s, p] = b(() => /* @__PURE__ */ new Set()), d = C([]);
158
+ E(() => {
158
159
  if (c === void 0 || c < 0) return;
159
160
  p((n) => new Set(n).add(c));
160
161
  const e = d.current[c];
@@ -188,11 +189,11 @@ const q = ({
188
189
  children: [
189
190
  o.length > 0 && /* @__PURE__ */ a("span", { className: i("citation-panel-count", t["citation-panel-count"]), children: o.length }),
190
191
  r && /* @__PURE__ */ a(
191
- b,
192
+ N,
192
193
  {
193
194
  type: "text",
194
195
  icon: /* @__PURE__ */ a(
195
- N,
196
+ x,
196
197
  {
197
198
  className: i(
198
199
  "citation-panel-citation-summary-icon",
@@ -210,10 +211,10 @@ const q = ({
210
211
  )
211
212
  ] }),
212
213
  o.length === 0 ? /* @__PURE__ */ a("div", { className: i("citation-panel-empty", t["citation-panel-empty"]), children: /* @__PURE__ */ a(f, { description: "暂无引用来源", image: f.PRESENTED_IMAGE_SIMPLE }) }) : /* @__PURE__ */ a(
213
- w,
214
+ S,
214
215
  {
215
216
  wrapperClassName: i("citation-panel-empty", t["citation-panel-empty"]),
216
- children: o.map((e, n) => /* @__PURE__ */ l(C.Fragment, { children: [
217
+ children: o.map((e, n) => /* @__PURE__ */ l(y.Fragment, { children: [
217
218
  n > 0 && /* @__PURE__ */ a(
218
219
  "div",
219
220
  {
@@ -242,6 +243,6 @@ const q = ({
242
243
  );
243
244
  };
244
245
  export {
245
- $ as default
246
+ z as default
246
247
  };
247
248
  //# sourceMappingURL=index.js.map