@yoka-ui/ui 1.0.10-test → 1.1.0

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 (385) hide show
  1. package/@Docs-yoka/exports.generated.md +68 -62
  2. package/README.md +40 -189
  3. package/dist/es/assets/image/skills.zip +0 -0
  4. package/dist/es/business/AiChat/index.d.ts +3 -3
  5. package/dist/es/business/AiChat/index.js +331 -119
  6. package/dist/es/business/AiChat/index.js.map +3 -3
  7. package/dist/es/business/AiChat/intentRecognizer.js.map +1 -1
  8. package/dist/es/business/AiChat/navigationManager.js +6 -6
  9. package/dist/es/business/AiChat/navigationManager.js.map +2 -2
  10. package/dist/es/business/AiChat/sse.d.ts +15 -0
  11. package/dist/es/business/AiChat/sse.js +118 -7
  12. package/dist/es/business/AiChat/sse.js.map +2 -2
  13. package/dist/es/business/AiChat/type.d.ts +22 -23
  14. package/dist/es/business/AiChat/useAiChat.js +105 -75
  15. package/dist/es/business/AiChat/useAiChat.js.map +3 -3
  16. package/dist/es/business/AiChat/useTaskWorkflow.d.ts +1 -2
  17. package/dist/es/business/AiChat/useTaskWorkflow.js +2 -36
  18. package/dist/es/business/AiChat/useTaskWorkflow.js.map +2 -2
  19. package/dist/es/business/DrawerPageInfo/index.js.map +1 -1
  20. package/dist/es/business/Editor/index.d.ts +1 -1
  21. package/dist/es/business/Editor/index.js.map +2 -2
  22. package/dist/es/business/Empty/index.js +1 -1
  23. package/dist/es/business/Empty/index.js.map +1 -1
  24. package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +2 -2
  25. package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
  26. package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +3 -3
  27. package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
  28. package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +2 -2
  29. package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
  30. package/dist/es/business/ModCommonFilter/index.d.ts +1 -1
  31. package/dist/es/business/ModCommonFilter/index.js.map +2 -2
  32. package/dist/es/business/YkCharts/Area.d.ts +18 -0
  33. package/dist/es/business/YkCharts/Area.js +336 -0
  34. package/dist/es/business/YkCharts/Area.js.map +7 -0
  35. package/dist/es/business/YkCharts/Bar.d.ts +21 -0
  36. package/dist/es/business/YkCharts/Bar.js +316 -0
  37. package/dist/es/business/YkCharts/Bar.js.map +7 -0
  38. package/dist/es/business/YkCharts/BarProperty.d.ts +21 -0
  39. package/dist/es/business/YkCharts/BarProperty.js +357 -0
  40. package/dist/es/business/YkCharts/BarProperty.js.map +7 -0
  41. package/dist/es/business/YkCharts/BarTotal.d.ts +21 -0
  42. package/dist/es/business/YkCharts/BarTotal.js +292 -0
  43. package/dist/es/business/YkCharts/BarTotal.js.map +7 -0
  44. package/dist/es/business/YkCharts/Line.d.ts +21 -0
  45. package/dist/es/business/YkCharts/Line.js +342 -0
  46. package/dist/es/business/YkCharts/Line.js.map +7 -0
  47. package/dist/es/business/YkCharts/Pie.d.ts +19 -0
  48. package/dist/es/business/YkCharts/Pie.js +107 -0
  49. package/dist/es/business/YkCharts/Pie.js.map +7 -0
  50. package/dist/es/business/YkCharts/PieProperty.d.ts +18 -0
  51. package/dist/es/business/YkCharts/PieProperty.js +180 -0
  52. package/dist/es/business/YkCharts/PieProperty.js.map +7 -0
  53. package/dist/es/business/YkCharts/Pies.d.ts +26 -0
  54. package/dist/es/business/YkCharts/Pies.js +352 -0
  55. package/dist/es/business/YkCharts/Pies.js.map +7 -0
  56. package/dist/es/business/YkCharts/constants.d.ts +1 -0
  57. package/dist/es/business/YkCharts/constants.js +47 -0
  58. package/dist/es/business/YkCharts/constants.js.map +7 -0
  59. package/dist/es/business/YkCharts/hooks.d.ts +4 -0
  60. package/dist/es/business/YkCharts/hooks.js +37 -0
  61. package/dist/es/business/YkCharts/hooks.js.map +7 -0
  62. package/dist/es/business/YkCharts/index.d.ts +9 -0
  63. package/dist/es/business/YkCharts/index.js +20 -0
  64. package/dist/es/business/YkCharts/index.js.map +7 -0
  65. package/dist/es/business/YkCharts/index.module.less +164 -0
  66. package/dist/es/business/YkCharts/tooltip.less +92 -0
  67. package/dist/es/business/YkCharts/transformData.js +16 -0
  68. package/dist/es/business/YkCharts/transformData.js.map +7 -0
  69. package/dist/es/business/YkCharts/typing.d.ts +74 -0
  70. package/dist/es/business/YkCharts/typing.js +1 -0
  71. package/dist/es/business/YkCharts/typing.js.map +7 -0
  72. package/dist/es/business/YkCharts/utils.d.ts +4 -0
  73. package/dist/es/business/YkCharts/utils.js +109 -0
  74. package/dist/es/business/YkCharts/utils.js.map +7 -0
  75. package/dist/es/business/YkCharts/variables.less +13 -0
  76. package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
  77. package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
  78. package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
  79. package/dist/es/business/YkLoginModule/index.d.ts +48 -0
  80. package/dist/es/business/YkLoginModule/index.js +198 -0
  81. package/dist/es/business/YkLoginModule/index.js.map +7 -0
  82. package/dist/es/business/YkLoginModule/styles.module.less +169 -0
  83. package/dist/es/business/YkPorjectSelect/index.d.ts +1 -1
  84. package/dist/es/business/YkPorjectSelect/index.js +2 -2
  85. package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
  86. package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
  87. package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
  88. package/dist/es/business/YkSqlEdit/index.js +180 -0
  89. package/dist/es/business/YkSqlEdit/index.js.map +7 -0
  90. package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
  91. package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
  92. package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
  93. package/dist/es/components/DebounceInput/index.js.map +2 -2
  94. package/dist/es/components/MultipleSelect/index.d.ts +14 -0
  95. package/dist/es/components/MultipleSelect/index.js +1 -1
  96. package/dist/es/components/MultipleSelect/index.js.map +2 -2
  97. package/dist/es/components/RefreshButton/index.js.map +2 -2
  98. package/dist/es/components/SearchWithHistory/index.js +1 -1
  99. package/dist/es/components/SearchWithHistory/index.js.map +2 -2
  100. package/dist/es/components/TextWithToolTip/index.d.ts +1 -1
  101. package/dist/es/components/TextWithToolTip/index.js.map +2 -2
  102. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
  103. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
  104. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
  105. package/dist/es/components/TreeTransfer/index.d.ts +1 -24
  106. package/dist/es/components/TreeTransfer/index.js +8 -8
  107. package/dist/es/components/TreeTransfer/index.js.map +2 -2
  108. package/dist/es/components/TreeTransfer/utils/index.d.ts +1 -1
  109. package/dist/es/components/TreeTransfer/utils/index.js.map +2 -2
  110. package/dist/es/components/YKMarkdown/index.d.ts +11 -0
  111. package/dist/es/components/YKMarkdown/index.js +236 -0
  112. package/dist/es/components/YKMarkdown/index.js.map +7 -0
  113. package/dist/es/components/YKMarkdown/index.module.less +83 -0
  114. package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
  115. package/dist/es/components/YkDateRangePicker/index.d.ts +9 -1
  116. package/dist/es/components/YkDateRangePicker/index.js +127 -61
  117. package/dist/es/components/YkDateRangePicker/index.js.map +2 -2
  118. package/dist/es/components/YkDateRangePicker/index.module.less +33 -9
  119. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
  120. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
  121. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
  122. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
  123. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +23 -3
  124. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
  125. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
  126. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
  127. package/dist/es/components/YkRangeDateWithVS/index.d.ts +2 -2
  128. package/dist/es/components/YkRangeDateWithVS/index.js.map +2 -2
  129. package/dist/es/components/YkRangeDateWithVS/index.module.less +22 -4
  130. package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +1 -1
  131. package/dist/es/components/YkRangeTimeWithRecent/index.js.map +2 -2
  132. package/dist/es/creative/ArcCheckbox/index.d.ts +12 -0
  133. package/dist/es/creative/ArcCheckbox/index.js +49 -0
  134. package/dist/es/creative/ArcCheckbox/index.js.map +7 -0
  135. package/dist/es/creative/ArcCheckbox/index.module.less +102 -0
  136. package/dist/es/creative/ButtonRadioWithInfo/index.js.map +1 -1
  137. package/dist/es/creative/ButtonWithProgress/index.d.ts +1 -1
  138. package/dist/es/creative/ButtonWithProgress/index.js.map +2 -2
  139. package/dist/es/creative/GlassSegmentedRadio/index.d.ts +24 -0
  140. package/dist/es/creative/GlassSegmentedRadio/index.js +75 -0
  141. package/dist/es/creative/GlassSegmentedRadio/index.js.map +7 -0
  142. package/dist/es/creative/GlassSegmentedRadio/index.module.less +241 -0
  143. package/dist/es/creative/SkillsWriter/index.d.ts +3 -0
  144. package/dist/es/creative/SkillsWriter/index.js +191 -0
  145. package/dist/es/creative/SkillsWriter/index.js.map +7 -0
  146. package/dist/es/creative/SkillsWriter/index.module.less +21 -0
  147. package/dist/es/index.d.ts +32 -24
  148. package/dist/es/index.js +90 -80
  149. package/dist/es/index.js.map +2 -2
  150. package/dist/es/index.less +44 -0
  151. package/dist/es/layout/FlexGrid/index.d.ts +1 -1
  152. package/dist/es/layout/FlexGrid/index.js.map +2 -2
  153. package/dist/es/layout/YkContainer/index.js.map +1 -1
  154. package/dist/es/layout/YkDrawer/index.d.ts +1 -1
  155. package/dist/es/layout/YkDrawer/index.js.map +2 -2
  156. package/dist/es/ui/LabelSelect/demo.js +1 -1
  157. package/dist/es/ui/LabelSelect/demo.js.map +2 -2
  158. package/dist/es/ui/LabelSelect/index.d.ts +1 -1
  159. package/dist/es/ui/LabelSelect/index.js +1 -1
  160. package/dist/es/ui/LabelSelect/index.js.map +2 -2
  161. package/dist/es/ui/LogicOperator/index.d.ts +1 -1
  162. package/dist/es/ui/LogicOperator/index.js.map +2 -2
  163. package/dist/es/ui/YkButton/index.d.ts +1 -1
  164. package/dist/es/ui/YkButton/index.js.map +2 -2
  165. package/dist/es/ui/YkCard/index.d.ts +1 -1
  166. package/dist/es/ui/YkCard/index.js +1 -1
  167. package/dist/es/ui/YkCard/index.js.map +2 -2
  168. package/dist/es/ui/YkCheckbox/index.d.ts +1 -1
  169. package/dist/es/ui/YkCheckbox/index.js.map +2 -2
  170. package/dist/es/ui/YkDescriptions/index.d.ts +1 -1
  171. package/dist/es/ui/YkDescriptions/index.js.map +2 -2
  172. package/dist/es/ui/YkPagination/index.d.ts +1 -1
  173. package/dist/es/ui/YkPagination/index.js.map +2 -2
  174. package/dist/es/ui/YkRadio/index.d.ts +1 -1
  175. package/dist/es/ui/YkRadio/index.js.map +2 -2
  176. package/dist/es/ui/YkSegmented/index.d.ts +1 -1
  177. package/dist/es/ui/YkSegmented/index.js.map +2 -2
  178. package/dist/es/ui/YkSelect/index.d.ts +1 -1
  179. package/dist/es/ui/YkSelect/index.js.map +2 -2
  180. package/dist/es/ui/YkSpin/index.d.ts +1 -1
  181. package/dist/es/ui/YkSpin/index.js.map +2 -2
  182. package/dist/es/ui/YkStatistic/index.d.ts +1 -1
  183. package/dist/es/ui/YkStatistic/index.js.map +2 -2
  184. package/dist/es/ui/YkSwitch/index.d.ts +1 -1
  185. package/dist/es/ui/YkSwitch/index.js.map +2 -2
  186. package/dist/es/ui/YkTabs/index.d.ts +1 -1
  187. package/dist/es/ui/YkTabs/index.js.map +2 -2
  188. package/dist/es/ui/YkTooltip/index.d.ts +1 -1
  189. package/dist/es/ui/YkTooltip/index.js.map +2 -2
  190. package/dist/es/utils/styleUtils.js.map +2 -2
  191. package/dist/es/utils/ykStorybookDoc.d.ts +15 -0
  192. package/dist/es/utils/ykStorybookDoc.js +24 -2
  193. package/dist/es/utils/ykStorybookDoc.js.map +2 -2
  194. package/dist/lib/assets/image/skills.zip +0 -0
  195. package/dist/lib/business/AiChat/index.d.ts +3 -3
  196. package/dist/lib/business/AiChat/index.js +320 -111
  197. package/dist/lib/business/AiChat/index.js.map +3 -3
  198. package/dist/lib/business/AiChat/intentRecognizer.js.map +1 -1
  199. package/dist/lib/business/AiChat/navigationManager.js +6 -6
  200. package/dist/lib/business/AiChat/navigationManager.js.map +2 -2
  201. package/dist/lib/business/AiChat/sse.d.ts +15 -0
  202. package/dist/lib/business/AiChat/sse.js +117 -7
  203. package/dist/lib/business/AiChat/sse.js.map +2 -2
  204. package/dist/lib/business/AiChat/type.d.ts +22 -23
  205. package/dist/lib/business/AiChat/type.js.map +1 -1
  206. package/dist/lib/business/AiChat/useAiChat.js +104 -74
  207. package/dist/lib/business/AiChat/useAiChat.js.map +3 -3
  208. package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +1 -2
  209. package/dist/lib/business/AiChat/useTaskWorkflow.js +0 -34
  210. package/dist/lib/business/AiChat/useTaskWorkflow.js.map +2 -2
  211. package/dist/lib/business/DrawerPageInfo/index.js.map +1 -1
  212. package/dist/lib/business/Editor/index.d.ts +1 -1
  213. package/dist/lib/business/Editor/index.js.map +2 -2
  214. package/dist/lib/business/Empty/index.js +1 -1
  215. package/dist/lib/business/Empty/index.js.map +1 -1
  216. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +3 -3
  217. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
  218. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +4 -4
  219. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
  220. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +3 -3
  221. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
  222. package/dist/lib/business/ModCommonFilter/index.d.ts +1 -1
  223. package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
  224. package/dist/lib/business/YkCharts/Area.d.ts +18 -0
  225. package/dist/lib/business/YkCharts/Area.js +346 -0
  226. package/dist/lib/business/YkCharts/Area.js.map +7 -0
  227. package/dist/lib/business/YkCharts/Bar.d.ts +21 -0
  228. package/dist/lib/business/YkCharts/Bar.js +323 -0
  229. package/dist/lib/business/YkCharts/Bar.js.map +7 -0
  230. package/dist/lib/business/YkCharts/BarProperty.d.ts +21 -0
  231. package/dist/lib/business/YkCharts/BarProperty.js +370 -0
  232. package/dist/lib/business/YkCharts/BarProperty.js.map +7 -0
  233. package/dist/lib/business/YkCharts/BarTotal.d.ts +21 -0
  234. package/dist/lib/business/YkCharts/BarTotal.js +298 -0
  235. package/dist/lib/business/YkCharts/BarTotal.js.map +7 -0
  236. package/dist/lib/business/YkCharts/Line.d.ts +21 -0
  237. package/dist/lib/business/YkCharts/Line.js +349 -0
  238. package/dist/lib/business/YkCharts/Line.js.map +7 -0
  239. package/dist/lib/business/YkCharts/Pie.d.ts +19 -0
  240. package/dist/lib/business/YkCharts/Pie.js +117 -0
  241. package/dist/lib/business/YkCharts/Pie.js.map +7 -0
  242. package/dist/lib/business/YkCharts/PieProperty.d.ts +18 -0
  243. package/dist/lib/business/YkCharts/PieProperty.js +193 -0
  244. package/dist/lib/business/YkCharts/PieProperty.js.map +7 -0
  245. package/dist/lib/business/YkCharts/Pies.d.ts +26 -0
  246. package/dist/lib/business/YkCharts/Pies.js +341 -0
  247. package/dist/lib/business/YkCharts/Pies.js.map +7 -0
  248. package/dist/lib/business/YkCharts/constants.d.ts +1 -0
  249. package/dist/lib/business/YkCharts/constants.js +71 -0
  250. package/dist/lib/business/YkCharts/constants.js.map +7 -0
  251. package/dist/lib/business/YkCharts/hooks.d.ts +4 -0
  252. package/dist/lib/business/YkCharts/hooks.js +62 -0
  253. package/dist/lib/business/YkCharts/hooks.js.map +7 -0
  254. package/dist/lib/business/YkCharts/index.d.ts +9 -0
  255. package/dist/lib/business/YkCharts/index.js +61 -0
  256. package/dist/lib/business/YkCharts/index.js.map +7 -0
  257. package/dist/lib/business/YkCharts/index.module.less +164 -0
  258. package/dist/lib/business/YkCharts/tooltip.less +92 -0
  259. package/dist/lib/business/YkCharts/transformData.js +40 -0
  260. package/dist/lib/business/YkCharts/transformData.js.map +7 -0
  261. package/dist/lib/business/YkCharts/typing.d.ts +74 -0
  262. package/dist/lib/business/YkCharts/typing.js +18 -0
  263. package/dist/lib/business/YkCharts/typing.js.map +7 -0
  264. package/dist/lib/business/YkCharts/utils.d.ts +4 -0
  265. package/dist/lib/business/YkCharts/utils.js +143 -0
  266. package/dist/lib/business/YkCharts/utils.js.map +7 -0
  267. package/dist/lib/business/YkCharts/variables.less +13 -0
  268. package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
  269. package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
  270. package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
  271. package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
  272. package/dist/lib/business/YkLoginModule/index.js +206 -0
  273. package/dist/lib/business/YkLoginModule/index.js.map +7 -0
  274. package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
  275. package/dist/lib/business/YkPorjectSelect/index.d.ts +1 -1
  276. package/dist/lib/business/YkPorjectSelect/index.js +3 -3
  277. package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
  278. package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
  279. package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
  280. package/dist/lib/business/YkSqlEdit/index.js +202 -0
  281. package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
  282. package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
  283. package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
  284. package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
  285. package/dist/lib/components/DebounceInput/index.js.map +2 -2
  286. package/dist/lib/components/MultipleSelect/index.d.ts +14 -0
  287. package/dist/lib/components/MultipleSelect/index.js +1 -1
  288. package/dist/lib/components/MultipleSelect/index.js.map +2 -2
  289. package/dist/lib/components/RefreshButton/index.js.map +2 -2
  290. package/dist/lib/components/SearchWithHistory/index.js +1 -1
  291. package/dist/lib/components/SearchWithHistory/index.js.map +2 -2
  292. package/dist/lib/components/TextWithToolTip/index.d.ts +1 -1
  293. package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
  294. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
  295. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
  296. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
  297. package/dist/lib/components/TreeTransfer/index.d.ts +1 -24
  298. package/dist/lib/components/TreeTransfer/index.js +3 -3
  299. package/dist/lib/components/TreeTransfer/index.js.map +2 -2
  300. package/dist/lib/components/TreeTransfer/utils/index.d.ts +1 -1
  301. package/dist/lib/components/TreeTransfer/utils/index.js.map +2 -2
  302. package/dist/lib/components/YKMarkdown/index.d.ts +11 -0
  303. package/dist/lib/components/YKMarkdown/index.js +188 -0
  304. package/dist/lib/components/YKMarkdown/index.js.map +7 -0
  305. package/dist/lib/components/YKMarkdown/index.module.less +83 -0
  306. package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
  307. package/dist/lib/components/YkDateRangePicker/index.d.ts +9 -1
  308. package/dist/lib/components/YkDateRangePicker/index.js +127 -61
  309. package/dist/lib/components/YkDateRangePicker/index.js.map +2 -2
  310. package/dist/lib/components/YkDateRangePicker/index.module.less +33 -9
  311. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
  312. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
  313. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
  314. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
  315. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +22 -2
  316. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
  317. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
  318. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
  319. package/dist/lib/components/YkRangeDateWithVS/index.d.ts +2 -2
  320. package/dist/lib/components/YkRangeDateWithVS/index.js.map +2 -2
  321. package/dist/lib/components/YkRangeDateWithVS/index.module.less +22 -4
  322. package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +1 -1
  323. package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +2 -2
  324. package/dist/lib/creative/ArcCheckbox/index.d.ts +12 -0
  325. package/dist/lib/creative/ArcCheckbox/index.js +50 -0
  326. package/dist/lib/creative/ArcCheckbox/index.js.map +7 -0
  327. package/dist/lib/creative/ArcCheckbox/index.module.less +102 -0
  328. package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +1 -1
  329. package/dist/lib/creative/ButtonWithProgress/index.d.ts +1 -1
  330. package/dist/lib/creative/ButtonWithProgress/index.js.map +2 -2
  331. package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +24 -0
  332. package/dist/lib/creative/GlassSegmentedRadio/index.js +78 -0
  333. package/dist/lib/creative/GlassSegmentedRadio/index.js.map +7 -0
  334. package/dist/lib/creative/GlassSegmentedRadio/index.module.less +241 -0
  335. package/dist/lib/creative/SkillsWriter/index.d.ts +3 -0
  336. package/dist/lib/creative/SkillsWriter/index.js +200 -0
  337. package/dist/lib/creative/SkillsWriter/index.js.map +7 -0
  338. package/dist/lib/creative/SkillsWriter/index.module.less +21 -0
  339. package/dist/lib/index.d.ts +32 -24
  340. package/dist/lib/index.js +39 -24
  341. package/dist/lib/index.js.map +2 -2
  342. package/dist/lib/index.less +44 -0
  343. package/dist/lib/layout/FlexGrid/index.d.ts +1 -1
  344. package/dist/lib/layout/FlexGrid/index.js.map +2 -2
  345. package/dist/lib/layout/YkContainer/index.js.map +1 -1
  346. package/dist/lib/layout/YkDrawer/index.d.ts +1 -1
  347. package/dist/lib/layout/YkDrawer/index.js.map +2 -2
  348. package/dist/lib/ui/LabelSelect/demo.js +1 -1
  349. package/dist/lib/ui/LabelSelect/demo.js.map +2 -2
  350. package/dist/lib/ui/LabelSelect/index.d.ts +1 -1
  351. package/dist/lib/ui/LabelSelect/index.js +1 -1
  352. package/dist/lib/ui/LabelSelect/index.js.map +2 -2
  353. package/dist/lib/ui/LogicOperator/index.d.ts +1 -1
  354. package/dist/lib/ui/LogicOperator/index.js.map +2 -2
  355. package/dist/lib/ui/YkButton/index.d.ts +1 -1
  356. package/dist/lib/ui/YkButton/index.js.map +2 -2
  357. package/dist/lib/ui/YkCard/index.d.ts +1 -1
  358. package/dist/lib/ui/YkCard/index.js.map +2 -2
  359. package/dist/lib/ui/YkCheckbox/index.d.ts +1 -1
  360. package/dist/lib/ui/YkCheckbox/index.js.map +2 -2
  361. package/dist/lib/ui/YkDescriptions/index.d.ts +1 -1
  362. package/dist/lib/ui/YkDescriptions/index.js.map +2 -2
  363. package/dist/lib/ui/YkPagination/index.d.ts +1 -1
  364. package/dist/lib/ui/YkPagination/index.js.map +2 -2
  365. package/dist/lib/ui/YkRadio/index.d.ts +1 -1
  366. package/dist/lib/ui/YkRadio/index.js.map +2 -2
  367. package/dist/lib/ui/YkSegmented/index.d.ts +1 -1
  368. package/dist/lib/ui/YkSegmented/index.js.map +2 -2
  369. package/dist/lib/ui/YkSelect/index.d.ts +1 -1
  370. package/dist/lib/ui/YkSelect/index.js.map +2 -2
  371. package/dist/lib/ui/YkSpin/index.d.ts +1 -1
  372. package/dist/lib/ui/YkSpin/index.js.map +2 -2
  373. package/dist/lib/ui/YkStatistic/index.d.ts +1 -1
  374. package/dist/lib/ui/YkStatistic/index.js.map +2 -2
  375. package/dist/lib/ui/YkSwitch/index.d.ts +1 -1
  376. package/dist/lib/ui/YkSwitch/index.js.map +2 -2
  377. package/dist/lib/ui/YkTabs/index.d.ts +1 -1
  378. package/dist/lib/ui/YkTabs/index.js.map +2 -2
  379. package/dist/lib/ui/YkTooltip/index.d.ts +1 -1
  380. package/dist/lib/ui/YkTooltip/index.js.map +2 -2
  381. package/dist/lib/utils/styleUtils.js.map +2 -2
  382. package/dist/lib/utils/ykStorybookDoc.d.ts +15 -0
  383. package/dist/lib/utils/ykStorybookDoc.js +23 -1
  384. package/dist/lib/utils/ykStorybookDoc.js.map +2 -2
  385. package/package.json +152 -144
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
  var __async = (__this, __arguments, generator) => {
18
21
  return new Promise((resolve, reject) => {
19
22
  var fulfilled = (value) => {
@@ -37,41 +40,47 @@ var __async = (__this, __arguments, generator) => {
37
40
 
38
41
  // src/business/AiChat/index.tsx
39
42
  import {
40
- ClearOutlined,
43
+ CloseOutlined,
44
+ CompressOutlined,
41
45
  CopyOutlined,
42
46
  DeleteOutlined,
43
- ExportOutlined,
47
+ ExpandOutlined,
48
+ FileImageOutlined,
44
49
  MenuOutlined,
45
50
  MessageOutlined,
51
+ PaperClipOutlined,
46
52
  PlusOutlined,
47
53
  ReloadOutlined,
48
54
  SendOutlined,
49
- StopOutlined,
50
- SwitcherOutlined
55
+ StopOutlined
51
56
  } from "@ant-design/icons";
52
- import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography } from "antd";
57
+ import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography, Upload } from "antd";
53
58
  import React, { useCallback, useEffect, useRef, useState } from "react";
59
+ import { generateSuggestions, isTaskCreationIntent, recognizeIntent } from "./intentRecognizer";
54
60
  import MarkdownRender from "./MarkdownRender";
55
61
  import { useAiChat } from "./useAiChat";
56
62
  import { useTaskWorkflow } from "./useTaskWorkflow";
57
- import { recognizeIntent, generateSuggestions, isTaskCreationIntent } from "./intentRecognizer";
63
+ import { generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription, recognizeIntent as recognizeIntent2 } from "./intentRecognizer";
64
+ import { delay, NavigationManager } from "./navigationManager";
58
65
  import { useAiChat as useAiChat2 } from "./useAiChat";
59
66
  import { useTaskWorkflow as useTaskWorkflow2 } from "./useTaskWorkflow";
60
- import { recognizeIntent as recognizeIntent2, generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription } from "./intentRecognizer";
61
- import { NavigationManager, delay } from "./navigationManager";
62
67
  var { TextArea } = Input;
63
68
  var { Title } = Typography;
64
69
  var AiChat = ({
65
70
  apiPath = "/api/ai/chat-stream",
66
71
  storageKey = "ai_chat_sessions",
67
- position = { bottom: 24, right: 24 },
72
+ position: initialPosition = { bottom: 24, right: 24 },
68
73
  buttonSize = 56,
69
74
  zIndex = 1080,
70
75
  showSessionPanel = true,
71
- showExport = true,
72
76
  onBeforeSend,
73
77
  onError,
74
78
  onSuccess,
79
+ onFetchSessions,
80
+ onFetchSessionDetail,
81
+ onCreateSession,
82
+ onSendMessage,
83
+ onUploadFile,
75
84
  className,
76
85
  style,
77
86
  renderTrigger,
@@ -93,17 +102,25 @@ var AiChat = ({
93
102
  sendQuestion,
94
103
  regenerateAnswer,
95
104
  deleteSingleMsg,
96
- clearCurrentSession,
97
- exportCurrentSession,
98
105
  cancelRequest,
99
106
  toggleVisible
100
- } = useAiChat({ apiPath, storageKey, onBeforeSend, onError, onSuccess });
107
+ } = useAiChat({
108
+ apiPath,
109
+ storageKey,
110
+ onBeforeSend,
111
+ onError,
112
+ onSuccess,
113
+ onFetchSessions,
114
+ onFetchSessionDetail,
115
+ onCreateSession,
116
+ onSendMessage,
117
+ onUploadFile
118
+ });
101
119
  const {
102
120
  tasks,
103
121
  createTask,
104
122
  updateTaskStatus,
105
123
  deleteTask,
106
- exportTasks,
107
124
  createTaskFromNaturalLanguage,
108
125
  updateUrlWithTaskId,
109
126
  refreshCurrentPage,
@@ -131,11 +148,63 @@ var AiChat = ({
131
148
  const [inputValue, setInputValue] = useState("");
132
149
  const [showSessions, setShowSessions] = useState(false);
133
150
  const [suggestions, setSuggestions] = useState([]);
151
+ const [fileList, setFileList] = useState([]);
152
+ const [isMaximized, setIsMaximized] = useState(false);
153
+ const [dialogPosition, setDialogPosition] = useState({ x: 0, y: 0 });
154
+ const [isDragging, setIsDragging] = useState(false);
155
+ const dragOffset = useRef({ x: 0, y: 0 });
134
156
  const messagesEndRef = useRef(null);
157
+ const triggerRef = useRef(null);
158
+ const fileInputRef = useRef(null);
135
159
  useEffect(() => {
136
160
  var _a;
137
161
  (_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
138
162
  }, [activeSession == null ? void 0 : activeSession.messages]);
163
+ const handleTriggerMouseDown = useCallback(
164
+ (e) => {
165
+ if (visible)
166
+ return;
167
+ const target = e.target;
168
+ if (target.closest(".ant-upload, .ant-btn"))
169
+ return;
170
+ e.preventDefault();
171
+ const triggerEl = triggerRef.current;
172
+ if (!triggerEl)
173
+ return;
174
+ const rect = triggerEl.getBoundingClientRect();
175
+ dragOffset.current = {
176
+ x: e.clientX - rect.left,
177
+ y: e.clientY - rect.top
178
+ };
179
+ setIsDragging(true);
180
+ },
181
+ [visible]
182
+ );
183
+ const handleTriggerMouseMove = useCallback(
184
+ (e) => {
185
+ if (!isDragging || visible)
186
+ return;
187
+ setDialogPosition({
188
+ x: e.clientX - dragOffset.current.x,
189
+ y: e.clientY - dragOffset.current.y
190
+ });
191
+ },
192
+ [isDragging, visible]
193
+ );
194
+ const handleTriggerMouseUp = useCallback(() => {
195
+ setIsDragging(false);
196
+ }, []);
197
+ useEffect(() => {
198
+ if (isDragging && !visible) {
199
+ document.addEventListener("mousemove", handleTriggerMouseMove);
200
+ document.addEventListener("mouseup", handleTriggerMouseUp);
201
+ return () => {
202
+ document.removeEventListener("mousemove", handleTriggerMouseMove);
203
+ document.removeEventListener("mouseup", handleTriggerMouseUp);
204
+ };
205
+ }
206
+ return void 0;
207
+ }, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
139
208
  const handleInputChange = useCallback((e) => {
140
209
  const value = e.target.value;
141
210
  setInputValue(value);
@@ -147,25 +216,70 @@ var AiChat = ({
147
216
  setSuggestions([]);
148
217
  }
149
218
  }, []);
219
+ const handleFileChange = useCallback(
220
+ (info) => __async(void 0, null, function* () {
221
+ const uploadFile = info.file;
222
+ if (!uploadFile || !uploadFile.originFileObj) {
223
+ setFileList(info.fileList);
224
+ return;
225
+ }
226
+ const file = uploadFile.originFileObj;
227
+ const isImage = file.type.startsWith("image/");
228
+ const fileType = isImage ? "image" : "document";
229
+ try {
230
+ if (onUploadFile && activeSession) {
231
+ const result = yield onUploadFile({
232
+ sessionId: activeSession.id,
233
+ file,
234
+ type: fileType
235
+ });
236
+ const uploadedFile = {
237
+ uid: file.name,
238
+ name: result.name || file.name,
239
+ status: "done",
240
+ url: result.url
241
+ };
242
+ setFileList([...fileList, uploadedFile]);
243
+ message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
244
+ } else {
245
+ setFileList([...fileList, uploadFile]);
246
+ }
247
+ } catch (err) {
248
+ console.error("文件上传失败:", err);
249
+ message.error("文件上传失败");
250
+ setFileList(fileList.filter((f) => f.uid !== file.name));
251
+ }
252
+ }),
253
+ [fileList, activeSession, onUploadFile]
254
+ );
150
255
  const handleSend = useCallback(() => __async(void 0, null, function* () {
151
- if (!inputValue.trim()) {
152
- message.warning("请输入问题");
256
+ if (!inputValue.trim() && fileList.length === 0) {
257
+ message.warning("请输入问题或上传文件");
153
258
  return;
154
259
  }
155
- const content = inputValue.trim();
260
+ let content = inputValue.trim();
261
+ if (fileList.length > 0) {
262
+ const fileInfo = fileList.map((f) => f.name).join(", ");
263
+ content += `
264
+ [附件: ${fileInfo}]`;
265
+ }
156
266
  setInputValue("");
157
267
  setSuggestions([]);
268
+ setFileList([]);
158
269
  const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
159
270
  if (intentEnabled && isTaskCreationIntent(content)) {
160
271
  yield executeTaskCreationWorkflow(content);
161
272
  return;
162
273
  }
163
274
  sendQuestion(content);
164
- }), [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
275
+ }), [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
165
276
  const copyMsg = (c) => {
166
277
  navigator.clipboard.writeText(c);
167
278
  message.success("复制成功");
168
279
  };
280
+ const toggleMaximize = useCallback(() => {
281
+ setIsMaximized((prev) => !prev);
282
+ }, []);
169
283
  const renderMsg = (item) => /* @__PURE__ */ React.createElement(
170
284
  List.Item,
171
285
  {
@@ -200,16 +314,29 @@ var AiChat = ({
200
314
  flexShrink: 0
201
315
  }
202
316
  }
203
- )) : item.role === "system" ? /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, fontSize: 13 } }, /* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"), /* @__PURE__ */ React.createElement("span", null, item.content), item.taskId && /* @__PURE__ */ React.createElement(
204
- Button,
317
+ )) : item.role === "system" ? /* @__PURE__ */ React.createElement(
318
+ "div",
205
319
  {
206
- type: "link",
207
- size: "small",
208
- style: { padding: 0, fontSize: 12 },
209
- onClick: () => updateUrlWithTaskId(item.taskId)
320
+ style: {
321
+ display: "flex",
322
+ alignItems: "center",
323
+ gap: 8,
324
+ fontSize: 13
325
+ }
210
326
  },
211
- "查看任务"
212
- )) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
327
+ /* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"),
328
+ /* @__PURE__ */ React.createElement("span", null, item.content),
329
+ item.taskId && /* @__PURE__ */ React.createElement(
330
+ Button,
331
+ {
332
+ type: "link",
333
+ size: "small",
334
+ style: { padding: 0, fontSize: 12 },
335
+ onClick: () => updateUrlWithTaskId(item.taskId)
336
+ },
337
+ "查看任务"
338
+ )
339
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
213
340
  )
214
341
  );
215
342
  const renderSession = (s) => /* @__PURE__ */ React.createElement(
@@ -221,14 +348,14 @@ var AiChat = ({
221
348
  return;
222
349
  }
223
350
  switchSession(s.id);
224
- setShowSessions(false);
225
351
  },
226
352
  style: {
227
353
  padding: "10px 12px",
228
354
  borderRadius: 8,
229
355
  cursor: "pointer",
230
356
  backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
231
- transition: "all 0.2s"
357
+ transition: "all 0.2s",
358
+ marginBottom: 8
232
359
  }
233
360
  },
234
361
  /* @__PURE__ */ React.createElement(
@@ -273,66 +400,126 @@ var AiChat = ({
273
400
  )
274
401
  )
275
402
  );
403
+ const getDialogStyle = () => {
404
+ if (isMaximized) {
405
+ return {
406
+ position: "fixed",
407
+ top: 0,
408
+ left: 0,
409
+ width: "100vw",
410
+ height: "100vh",
411
+ borderRadius: 0
412
+ };
413
+ }
414
+ const baseStyle = {
415
+ position: "relative",
416
+ width: showSessions ? 960 : 720,
417
+ height: 680,
418
+ borderRadius: 12
419
+ };
420
+ if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
421
+ return __spreadProps(__spreadValues({}, baseStyle), {
422
+ transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
423
+ });
424
+ }
425
+ return baseStyle;
426
+ };
276
427
  return /* @__PURE__ */ React.createElement(
277
428
  "div",
278
429
  {
279
430
  className,
280
431
  style: __spreadValues({
281
432
  position: "fixed",
282
- bottom: position.bottom,
283
- right: position.right,
433
+ bottom: initialPosition.bottom,
434
+ right: initialPosition.right,
284
435
  zIndex,
285
436
  display: "flex",
286
437
  flexDirection: "column",
287
- alignItems: "flex-end"
438
+ alignItems: "flex-end",
439
+ transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0
288
440
  }, style)
289
441
  },
290
- !visible ? renderTrigger ? /* @__PURE__ */ React.createElement("div", { onClick: () => toggleVisible(true), style: { cursor: "pointer" } }, renderTrigger) : /* @__PURE__ */ React.createElement(
291
- Button,
442
+ !visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
443
+ "div",
292
444
  {
293
- type: "primary",
294
- shape: "circle",
295
- size: "large",
296
- icon: /* @__PURE__ */ React.createElement(MessageOutlined, null),
297
- onClick: () => toggleVisible(true),
298
- style: {
299
- width: buttonSize,
300
- height: buttonSize,
301
- boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
445
+ ref: triggerRef,
446
+ onMouseDown: handleTriggerMouseDown,
447
+ onClick: () => !isDragging && toggleVisible(true),
448
+ style: { cursor: isDragging ? "grabbing" : "grab" }
449
+ },
450
+ renderTrigger
451
+ ) : /* @__PURE__ */ React.createElement(
452
+ "div",
453
+ {
454
+ ref: triggerRef,
455
+ onMouseDown: handleTriggerMouseDown,
456
+ onClick: () => !isDragging && toggleVisible(true),
457
+ style: { cursor: isDragging ? "grabbing" : "grab" }
458
+ },
459
+ /* @__PURE__ */ React.createElement(
460
+ Button,
461
+ {
462
+ type: "primary",
463
+ shape: "circle",
464
+ size: "large",
465
+ icon: /* @__PURE__ */ React.createElement(MessageOutlined, null),
466
+ style: {
467
+ width: buttonSize,
468
+ height: buttonSize,
469
+ boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
470
+ }
302
471
  }
303
- }
472
+ )
304
473
  ) : /* @__PURE__ */ React.createElement(
305
474
  "div",
306
475
  {
307
- style: {
308
- width: showSessions ? 960 : 720,
309
- height: 680,
476
+ style: __spreadProps(__spreadValues({}, getDialogStyle()), {
310
477
  background: "#fff",
311
- borderRadius: 12,
312
478
  boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
313
479
  overflow: "hidden",
314
480
  display: "flex",
315
481
  flexDirection: "row",
316
- marginBottom: 12,
317
- transition: "width 0.2s ease",
318
- position: "relative"
319
- }
482
+ marginBottom: isMaximized ? 0 : 12,
483
+ transition: "all 0.3s ease"
484
+ })
320
485
  },
321
- /* @__PURE__ */ React.createElement(
322
- Button,
486
+ showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
487
+ "div",
323
488
  {
324
- type: "text",
325
- icon: /* @__PURE__ */ React.createElement(SwitcherOutlined, null),
326
- onClick: () => toggleVisible(false),
327
489
  style: {
328
- position: "absolute",
329
- top: -5,
330
- right: -5,
331
- zIndex: zIndex + 1,
332
- fontSize: 14,
333
- color: "#999"
490
+ width: 280,
491
+ borderRight: "1px solid #f0f0f0",
492
+ background: "#fafafa",
493
+ display: "flex",
494
+ flexDirection: "column",
495
+ flexShrink: 0
334
496
  }
335
- }
497
+ },
498
+ /* @__PURE__ */ React.createElement(
499
+ "div",
500
+ {
501
+ style: {
502
+ padding: "12px 16px",
503
+ borderBottom: "1px solid #f0f0f0",
504
+ display: "flex",
505
+ justifyContent: "space-between",
506
+ alignItems: "center"
507
+ }
508
+ },
509
+ /* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
510
+ /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => setShowSessions(false) })
511
+ ),
512
+ /* @__PURE__ */ React.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ React.createElement(
513
+ Button,
514
+ {
515
+ type: "primary",
516
+ block: true,
517
+ icon: /* @__PURE__ */ React.createElement(PlusOutlined, null),
518
+ onClick: createNewSession,
519
+ style: { marginBottom: 12 }
520
+ },
521
+ "新建会话"
522
+ ), /* @__PURE__ */ React.createElement(List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
336
523
  ),
337
524
  /* @__PURE__ */ React.createElement(
338
525
  "div",
@@ -347,6 +534,7 @@ var AiChat = ({
347
534
  renderHeader || /* @__PURE__ */ React.createElement(
348
535
  "div",
349
536
  {
537
+ className: "ai-chat-header",
350
538
  style: {
351
539
  padding: "12px 16px",
352
540
  background: "#fafafa",
@@ -357,16 +545,25 @@ var AiChat = ({
357
545
  flexShrink: 0
358
546
  }
359
547
  },
360
- /* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, style: { fontWeight: 500 } }, "新会话"), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ClearOutlined, null), onClick: clearCurrentSession }, "清空")),
361
- /* @__PURE__ */ React.createElement(Space, null, showExport && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ React.createElement(
548
+ /* @__PURE__ */ React.createElement(Space, null, showSessionPanel && /* @__PURE__ */ React.createElement(
362
549
  Button,
363
550
  {
364
551
  type: showSessions ? "primary" : "text",
365
552
  icon: /* @__PURE__ */ React.createElement(MenuOutlined, null),
553
+ size: "small",
366
554
  onClick: () => setShowSessions(!showSessions)
367
555
  },
368
- showSessions ? "收起会话" : "会话"
369
- ))
556
+ showSessions ? "收起" : "会话"
557
+ ), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
558
+ /* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ React.createElement(
559
+ Button,
560
+ {
561
+ type: "text",
562
+ icon: isMaximized ? /* @__PURE__ */ React.createElement(CompressOutlined, null) : /* @__PURE__ */ React.createElement(ExpandOutlined, null),
563
+ onClick: toggleMaximize,
564
+ size: "small"
565
+ }
566
+ )), /* @__PURE__ */ React.createElement(Tooltip, { title: "关闭" }, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
370
567
  ),
371
568
  /* @__PURE__ */ React.createElement(
372
569
  "div",
@@ -387,7 +584,7 @@ var AiChat = ({
387
584
  }
388
585
  },
389
586
  /* @__PURE__ */ React.createElement(MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
390
- /* @__PURE__ */ React.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
587
+ /* @__PURE__ */ React.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
391
588
  /* @__PURE__ */ React.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
392
589
  /* @__PURE__ */ React.createElement(Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
393
590
  ) : /* @__PURE__ */ React.createElement(List, { dataSource: activeSession.messages, renderItem: renderMsg }),
@@ -425,7 +622,33 @@ var AiChat = ({
425
622
  suggestion
426
623
  ))
427
624
  ),
428
- /* @__PURE__ */ React.createElement(
625
+ fileList.length > 0 && /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ React.createElement(
626
+ "div",
627
+ {
628
+ key: file.uid,
629
+ style: {
630
+ display: "inline-block",
631
+ padding: "4px 8px",
632
+ background: "#e6f7ff",
633
+ borderRadius: 4,
634
+ marginRight: 8,
635
+ fontSize: 12
636
+ }
637
+ },
638
+ file.name,
639
+ /* @__PURE__ */ React.createElement(
640
+ CloseOutlined,
641
+ {
642
+ style: {
643
+ marginLeft: 8,
644
+ cursor: "pointer",
645
+ fontSize: 10
646
+ },
647
+ onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
648
+ }
649
+ )
650
+ ))),
651
+ /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(
429
652
  TextArea,
430
653
  {
431
654
  value: inputValue,
@@ -438,69 +661,58 @@ var AiChat = ({
438
661
  handleSend();
439
662
  }
440
663
  },
441
- style: { marginBottom: 8, borderRadius: 8 },
664
+ style: {
665
+ marginBottom: 8,
666
+ borderRadius: 8,
667
+ paddingRight: 80
668
+ },
442
669
  disabled: loading
443
670
  }
444
- ),
445
- /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "取消"), /* @__PURE__ */ React.createElement(
446
- Button,
447
- {
448
- type: "primary",
449
- icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
450
- onClick: handleSend,
451
- loading,
452
- disabled: !inputValue.trim(),
453
- size: "small"
454
- },
455
- "发送"
456
- )))
457
- ),
458
- showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
459
- "div",
460
- {
461
- style: {
462
- width: 240,
463
- borderLeft: "1px solid #f0f0f0",
464
- padding: 16,
465
- background: "#fafafa",
466
- overflowY: "auto",
467
- flexShrink: 0
468
- }
469
- },
470
- /* @__PURE__ */ React.createElement(
671
+ ), /* @__PURE__ */ React.createElement(
471
672
  "div",
472
673
  {
473
674
  style: {
675
+ position: "absolute",
676
+ right: 12,
677
+ bottom: 16,
474
678
  display: "flex",
475
- justifyContent: "space-between",
476
- alignItems: "center",
477
- marginBottom: 16
679
+ gap: 8
478
680
  }
479
681
  },
480
- /* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
481
682
  /* @__PURE__ */ React.createElement(
482
- Button,
683
+ Upload,
483
684
  {
484
- type: "link",
485
- size: "small",
486
- onClick: () => {
487
- setShowSessions(false);
488
- },
489
- style: { padding: 0 }
685
+ fileList,
686
+ onChange: handleFileChange,
687
+ beforeUpload: () => false,
688
+ showUploadList: false,
689
+ accept: "image/*"
490
690
  },
491
- "收起"
691
+ /* @__PURE__ */ React.createElement(Tooltip, { title: "上传图片" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(FileImageOutlined, null) }))
692
+ ),
693
+ /* @__PURE__ */ React.createElement(
694
+ Upload,
695
+ {
696
+ fileList,
697
+ onChange: handleFileChange,
698
+ beforeUpload: () => false,
699
+ showUploadList: false
700
+ },
701
+ /* @__PURE__ */ React.createElement(Tooltip, { title: "上传文件" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(PaperClipOutlined, null) }))
492
702
  )
493
- ),
494
- /* @__PURE__ */ React.createElement(
495
- List,
703
+ )),
704
+ /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ React.createElement(
705
+ Button,
496
706
  {
497
- dataSource: sessions,
498
- renderItem: renderSession,
499
- locale: { emptyText: "暂无会话" },
500
- style: { marginBottom: 16 }
501
- }
502
- ),
503
- /* @__PURE__ */ React.createElement(Button, { type: "primary", block: true, icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession }, "新建会话")
707
+ type: "primary",
708
+ icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
709
+ onClick: handleSend,
710
+ loading,
711
+ disabled: !inputValue.trim() && fileList.length === 0,
712
+ size: "small"
713
+ },
714
+ "发送"
715
+ )))
504
716
  )
505
717
  )
506
718
  )