@glodon-aiot/agent-cli-ui 3.1.0-beta.16 → 3.2.2-beta.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 (394) hide show
  1. package/dist/es/AgentClientUI.mjs +40 -39
  2. package/dist/es/Dialog/AgentChat/index.mjs +283 -264
  3. package/dist/es/Dialog/AgentChat/style.less.mjs +4 -0
  4. package/dist/es/Dialog/ConnectToNetwork/index.mjs +19 -18
  5. package/dist/es/Dialog/ConnectToNetwork/style.less.mjs +4 -0
  6. package/dist/es/Dialog/FileCard/index.mjs +22 -21
  7. package/dist/es/Dialog/FileCard/style.less.mjs +4 -0
  8. package/dist/es/Dialog/FilePreview/index.mjs +14 -13
  9. package/dist/es/Dialog/FilePreview/style.less.mjs +4 -0
  10. package/dist/es/Dialog/Greeting/index.mjs +5 -4
  11. package/dist/es/Dialog/Greeting/style.less.mjs +4 -0
  12. package/dist/es/Dialog/HistoryContent/index.mjs +6 -5
  13. package/dist/es/Dialog/HistoryContent/style.less.mjs +4 -0
  14. package/dist/es/Dialog/HistoryItem/index.mjs +127 -125
  15. package/dist/es/Dialog/HistoryItem/style.less.mjs +4 -0
  16. package/dist/es/Dialog/KnowledgeDoc/index.mjs +23 -22
  17. package/dist/es/Dialog/KnowledgeDoc/style.less.mjs +4 -0
  18. package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/index.mjs +14 -13
  19. package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/style.less.mjs +4 -0
  20. package/dist/es/Dialog/KnowledgeList/index.mjs +29 -28
  21. package/dist/es/Dialog/KnowledgeList/style.less.mjs +4 -0
  22. package/dist/es/Dialog/PromptManager/PromptList/PromptListItem.mjs +19 -19
  23. package/dist/es/Dialog/PromptManager/PromptList/PublicPromptList.mjs +17 -16
  24. package/dist/es/Dialog/PromptManager/PromptList/style.less.mjs +4 -0
  25. package/dist/es/Dialog/PromptManager/index.mjs +17 -16
  26. package/dist/es/Dialog/PromptManager/style.less.mjs +4 -0
  27. package/dist/es/Dialog/PromptSetting/index.mjs +32 -32
  28. package/dist/es/Dialog/PromptSetting/style.less.mjs +4 -0
  29. package/dist/es/Dialog/Recommend/RecommendItem.mjs +12 -11
  30. package/dist/es/Dialog/Recommend/index.mjs +23 -23
  31. package/dist/es/Dialog/Recommend/style.less.mjs +4 -0
  32. package/dist/es/Dialog/ReferCollapse/index.mjs +29 -28
  33. package/dist/es/Dialog/ReferCollapse/style.less.mjs +4 -0
  34. package/dist/es/Dialog/SearchReference/index.mjs +13 -12
  35. package/dist/es/Dialog/SearchReference/style.less.mjs +4 -0
  36. package/dist/es/Dialog/SessionAction/index.mjs +30 -29
  37. package/dist/es/Dialog/SessionAction/style.less.mjs +4 -0
  38. package/dist/es/Dialog/SessionList/index.mjs +51 -51
  39. package/dist/es/Dialog/SessionList/style.less.mjs +4 -0
  40. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +11 -10
  41. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/SessionItem.mjs +15 -14
  42. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +48 -47
  43. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/style.less.mjs +4 -0
  44. package/dist/es/Dialog/SessionListDrawer/index.mjs +9 -8
  45. package/dist/es/Dialog/SessionListDrawer/style.less.mjs +4 -0
  46. package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +26 -25
  47. package/dist/es/Dialog/SessionRefer/ReferItem/style.less.mjs +4 -0
  48. package/dist/es/Dialog/SessionRefer/index.mjs +21 -20
  49. package/dist/es/Dialog/SessionRefer/style.less.mjs +4 -0
  50. package/dist/es/Dialog/SessionRelated/index.mjs +18 -17
  51. package/dist/es/Dialog/SessionRelated/style.less.mjs +4 -0
  52. package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/index.mjs +9 -8
  53. package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/style.less.mjs +4 -0
  54. package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +117 -117
  55. package/dist/es/Dialog/UploadKnowledgeFiles/style.less.mjs +4 -0
  56. package/dist/es/Dialog/UploadingPrompt/index.mjs +6 -5
  57. package/dist/es/Dialog/UploadingPrompt/style.less.mjs +4 -0
  58. package/dist/es/Dialog/index.mjs +58 -57
  59. package/dist/es/Dialog/style.less.mjs +4 -0
  60. package/dist/es/FileItem/index.mjs +23 -22
  61. package/dist/es/FileItem/style.less.mjs +4 -0
  62. package/dist/es/Footer/FooterWarning.mjs +14 -13
  63. package/dist/es/Footer/index.mjs +7 -6
  64. package/dist/es/Footer/style.less.mjs +4 -0
  65. package/dist/es/InputProgress/index.mjs +10 -9
  66. package/dist/es/InputProgress/style.less.mjs +4 -0
  67. package/dist/es/QuillEditor/index.mjs +34 -34
  68. package/dist/es/QuillEditor/style.less.mjs +4 -0
  69. package/dist/es/_virtual/_cloneBuffer.mjs +4 -0
  70. package/dist/es/_virtual/_commonjsHelpers.mjs +8 -0
  71. package/dist/es/_virtual/_nodeUtil.mjs +4 -0
  72. package/dist/es/_virtual/index.mjs +4 -0
  73. package/dist/es/_virtual/isBuffer.mjs +4 -0
  74. package/dist/es/_virtual/jsx-runtime.mjs +7 -0
  75. package/dist/es/_virtual/jsx-runtime2.mjs +4 -0
  76. package/dist/es/_virtual/lib.mjs +4 -0
  77. package/dist/es/_virtual/react-jsx-runtime.production.min.mjs +4 -0
  78. package/dist/es/_virtual/ua-parser.min.mjs +4 -0
  79. package/dist/es/components/Copy/index.mjs +21 -20
  80. package/dist/es/components/Copy/style.less.mjs +4 -0
  81. package/dist/es/components/JsonDisplay/index.mjs +5 -4
  82. package/dist/es/components/JsonDisplay/style.less.mjs +4 -0
  83. package/dist/es/components/Markdown/ATag/index.mjs +7 -7
  84. package/dist/es/components/Markdown/Code/index.mjs +33 -33
  85. package/dist/es/components/Markdown/Image/index.mjs +17 -16
  86. package/dist/es/components/Markdown/Video/index.mjs +13 -13
  87. package/dist/es/components/Markdown/index.mjs +36 -35
  88. package/dist/es/components/Markdown/style.less.mjs +4 -0
  89. package/dist/es/components/WebLink/index.mjs +9 -9
  90. package/dist/es/favicon.ico +0 -0
  91. package/dist/es/favicon2.ico +0 -0
  92. package/dist/es/font/font_4108228_4w5nlhafpte.js +1 -0
  93. package/dist/es/font/font_4439177_0sppkcnqiqgs.js +1 -0
  94. package/dist/es/font/gos-font.js +64 -0
  95. package/dist/es/images/empty.svg +40 -0
  96. package/dist/es/images/loading.gif +0 -0
  97. package/dist/es/images/logo.png +0 -0
  98. package/dist/es/images/map-example.png +0 -0
  99. package/dist/es/images/sketch.png +0 -0
  100. package/dist/es/index.html +43 -0
  101. package/dist/es/index.mjs +32 -26
  102. package/dist/es/logo192.png +0 -0
  103. package/dist/es/logo512.png +0 -0
  104. package/dist/es/manifest.json +25 -0
  105. package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
  106. package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +201 -0
  107. package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +1087 -0
  108. package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +104 -0
  109. package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +568 -0
  110. package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +158 -0
  111. package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +847 -0
  112. package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +35 -0
  113. package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +226 -0
  114. package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +33 -0
  115. package/dist/es/node_modules/ahooks/es/useKeyPress/index.mjs +221 -0
  116. package/dist/es/node_modules/ahooks/es/useLatest/index.mjs +8 -0
  117. package/dist/es/node_modules/ahooks/es/useMemoizedFn/index.mjs +19 -0
  118. package/dist/es/node_modules/ahooks/es/useRafState/index.mjs +16 -0
  119. package/dist/es/node_modules/ahooks/es/useSize/index.mjs +34 -0
  120. package/dist/es/node_modules/ahooks/es/useUnmount/index.mjs +17 -0
  121. package/dist/es/node_modules/ahooks/es/useUnmountedRef/index.mjs +13 -0
  122. package/dist/es/node_modules/ahooks/es/utils/createEffectWithTarget.mjs +27 -0
  123. package/dist/es/node_modules/ahooks/es/utils/depsAreSame.mjs +11 -0
  124. package/dist/es/node_modules/ahooks/es/utils/depsEqual.mjs +7 -0
  125. package/dist/es/node_modules/ahooks/es/utils/domTarget.mjs +13 -0
  126. package/dist/es/node_modules/ahooks/es/utils/index.mjs +12 -0
  127. package/dist/es/node_modules/ahooks/es/utils/isAppleDevice.mjs +5 -0
  128. package/dist/es/node_modules/ahooks/es/utils/isBrowser.mjs +5 -0
  129. package/dist/es/node_modules/ahooks/es/utils/isDev.mjs +5 -0
  130. package/dist/es/node_modules/ahooks/es/utils/useDeepCompareWithTarget.mjs +11 -0
  131. package/dist/es/node_modules/ahooks/es/utils/useEffectWithTarget.mjs +7 -0
  132. package/dist/es/node_modules/ahooks/es/utils/useIsomorphicLayoutEffectWithTarget.mjs +8 -0
  133. package/dist/es/node_modules/ahooks/es/utils/useLayoutEffectWithTarget.mjs +7 -0
  134. package/dist/es/node_modules/antd/es/calendar/locale/zh_CN.mjs +4 -0
  135. package/dist/es/node_modules/antd/es/date-picker/locale/zh_CN.mjs +23 -0
  136. package/dist/es/node_modules/antd/es/locale/zh_CN.mjs +132 -0
  137. package/dist/es/node_modules/antd/es/time-picker/locale/zh_CN.mjs +8 -0
  138. package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +20 -0
  139. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +4 -0
  140. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +76 -0
  141. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +14 -0
  142. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +34 -0
  143. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +172 -0
  144. package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +81 -0
  145. package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +5 -0
  146. package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +4 -0
  147. package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +84 -0
  148. package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +5 -0
  149. package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +4 -0
  150. package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +9 -0
  151. package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +4 -0
  152. package/dist/es/node_modules/antd-mobile/es/global/index.mjs +4 -0
  153. package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +141 -0
  154. package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +9 -0
  155. package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +7 -0
  156. package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +4 -0
  157. package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +9 -0
  158. package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +6 -0
  159. package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +22 -0
  160. package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +11 -0
  161. package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +12 -0
  162. package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +46 -0
  163. package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +12 -0
  164. package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +13 -0
  165. package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +52 -0
  166. package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +11 -0
  167. package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +10 -0
  168. package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +15 -0
  169. package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +6 -0
  170. package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +8 -0
  171. package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +54 -0
  172. package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +32 -0
  173. package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +11 -0
  174. package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +19 -0
  175. package/dist/es/node_modules/classnames/index.mjs +42 -0
  176. package/dist/es/node_modules/comma-separated-tokens/index.mjs +13 -0
  177. package/dist/es/node_modules/copy-to-clipboard/index.mjs +46 -0
  178. package/dist/es/node_modules/devlop/lib/default.mjs +5 -0
  179. package/dist/es/node_modules/hast-util-from-dom/lib/index.mjs +93 -0
  180. package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/create-h.mjs +126 -0
  181. package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/index.mjs +8 -0
  182. package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/svg-case-sensitive-tag-names.mjs +4 -0
  183. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/index.mjs +12 -0
  184. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/aria.mjs +61 -0
  185. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/find.mjs +33 -0
  186. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/html.mjs +368 -0
  187. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/normalize.mjs +6 -0
  188. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/svg.mjs +566 -0
  189. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
  190. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
  191. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/create.mjs +14 -0
  192. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/defined-info.mjs +36 -0
  193. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/info.mjs +28 -0
  194. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/merge.mjs +10 -0
  195. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/schema.mjs +21 -0
  196. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/types.mjs +15 -0
  197. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xlink.mjs +19 -0
  198. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xml.mjs +15 -0
  199. package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xmlns.mjs +16 -0
  200. package/dist/es/node_modules/hast-util-from-html-isomorphic/lib/browser.mjs +16 -0
  201. package/dist/es/node_modules/hast-util-is-element/lib/index.mjs +61 -0
  202. package/dist/es/node_modules/hast-util-parse-selector/lib/index.mjs +20 -0
  203. package/dist/es/node_modules/hast-util-to-text/lib/index.mjs +223 -0
  204. package/dist/es/node_modules/katex/dist/katex.min.css.mjs +4 -0
  205. package/dist/es/node_modules/katex/dist/katex.mjs +11700 -0
  206. package/dist/es/node_modules/lodash/_Hash.mjs +22 -0
  207. package/dist/es/node_modules/lodash/_ListCache.mjs +22 -0
  208. package/dist/es/node_modules/lodash/_Map.mjs +6 -0
  209. package/dist/es/node_modules/lodash/_MapCache.mjs +22 -0
  210. package/dist/es/node_modules/lodash/_Stack.mjs +20 -0
  211. package/dist/es/node_modules/lodash/_Symbol.mjs +5 -0
  212. package/dist/es/node_modules/lodash/_Uint8Array.mjs +5 -0
  213. package/dist/es/node_modules/lodash/_apply.mjs +17 -0
  214. package/dist/es/node_modules/lodash/_arrayLikeKeys.mjs +21 -0
  215. package/dist/es/node_modules/lodash/_assignMergeValue.mjs +10 -0
  216. package/dist/es/node_modules/lodash/_assignValue.mjs +11 -0
  217. package/dist/es/node_modules/lodash/_assocIndexOf.mjs +12 -0
  218. package/dist/es/node_modules/lodash/_baseAssignValue.mjs +14 -0
  219. package/dist/es/node_modules/lodash/_baseCreate.mjs +17 -0
  220. package/dist/es/node_modules/lodash/_baseFor.mjs +5 -0
  221. package/dist/es/node_modules/lodash/_baseGetTag.mjs +11 -0
  222. package/dist/es/node_modules/lodash/_baseIsArguments.mjs +10 -0
  223. package/dist/es/node_modules/lodash/_baseIsNative.mjs +15 -0
  224. package/dist/es/node_modules/lodash/_baseIsTypedArray.mjs +13 -0
  225. package/dist/es/node_modules/lodash/_baseKeysIn.mjs +16 -0
  226. package/dist/es/node_modules/lodash/_baseMerge.mjs +22 -0
  227. package/dist/es/node_modules/lodash/_baseMergeDeep.mjs +33 -0
  228. package/dist/es/node_modules/lodash/_baseRest.mjs +11 -0
  229. package/dist/es/node_modules/lodash/_baseSetToString.mjs +14 -0
  230. package/dist/es/node_modules/lodash/_baseTimes.mjs +9 -0
  231. package/dist/es/node_modules/lodash/_baseTrim.mjs +9 -0
  232. package/dist/es/node_modules/lodash/_baseUnary.mjs +9 -0
  233. package/dist/es/node_modules/lodash/_cloneArrayBuffer.mjs +10 -0
  234. package/dist/es/node_modules/lodash/_cloneBuffer.mjs +17 -0
  235. package/dist/es/node_modules/lodash/_cloneTypedArray.mjs +10 -0
  236. package/dist/es/node_modules/lodash/_copyArray.mjs +10 -0
  237. package/dist/es/node_modules/lodash/_copyObject.mjs +16 -0
  238. package/dist/es/node_modules/lodash/_coreJsData.mjs +5 -0
  239. package/dist/es/node_modules/lodash/_createAssigner.mjs +17 -0
  240. package/dist/es/node_modules/lodash/_createBaseFor.mjs +14 -0
  241. package/dist/es/node_modules/lodash/_defineProperty.mjs +11 -0
  242. package/dist/es/node_modules/lodash/_freeGlobal.mjs +5 -0
  243. package/dist/es/node_modules/lodash/_getMapData.mjs +10 -0
  244. package/dist/es/node_modules/lodash/_getNative.mjs +11 -0
  245. package/dist/es/node_modules/lodash/_getPrototype.mjs +5 -0
  246. package/dist/es/node_modules/lodash/_getRawTag.mjs +16 -0
  247. package/dist/es/node_modules/lodash/_getValue.mjs +7 -0
  248. package/dist/es/node_modules/lodash/_hashClear.mjs +9 -0
  249. package/dist/es/node_modules/lodash/_hashDelete.mjs +8 -0
  250. package/dist/es/node_modules/lodash/_hashGet.mjs +14 -0
  251. package/dist/es/node_modules/lodash/_hashHas.mjs +10 -0
  252. package/dist/es/node_modules/lodash/_hashSet.mjs +10 -0
  253. package/dist/es/node_modules/lodash/_initCloneObject.mjs +11 -0
  254. package/dist/es/node_modules/lodash/_isIndex.mjs +9 -0
  255. package/dist/es/node_modules/lodash/_isIterateeCall.mjs +15 -0
  256. package/dist/es/node_modules/lodash/_isKeyable.mjs +8 -0
  257. package/dist/es/node_modules/lodash/_isMasked.mjs +12 -0
  258. package/dist/es/node_modules/lodash/_isPrototype.mjs +9 -0
  259. package/dist/es/node_modules/lodash/_listCacheClear.mjs +7 -0
  260. package/dist/es/node_modules/lodash/_listCacheDelete.mjs +13 -0
  261. package/dist/es/node_modules/lodash/_listCacheGet.mjs +10 -0
  262. package/dist/es/node_modules/lodash/_listCacheHas.mjs +9 -0
  263. package/dist/es/node_modules/lodash/_listCacheSet.mjs +10 -0
  264. package/dist/es/node_modules/lodash/_mapCacheClear.mjs +15 -0
  265. package/dist/es/node_modules/lodash/_mapCacheDelete.mjs +10 -0
  266. package/dist/es/node_modules/lodash/_mapCacheGet.mjs +9 -0
  267. package/dist/es/node_modules/lodash/_mapCacheHas.mjs +9 -0
  268. package/dist/es/node_modules/lodash/_mapCacheSet.mjs +10 -0
  269. package/dist/es/node_modules/lodash/_nativeCreate.mjs +5 -0
  270. package/dist/es/node_modules/lodash/_nativeKeysIn.mjs +11 -0
  271. package/dist/es/node_modules/lodash/_nodeUtil.mjs +17 -0
  272. package/dist/es/node_modules/lodash/_objectToString.mjs +8 -0
  273. package/dist/es/node_modules/lodash/_overArg.mjs +9 -0
  274. package/dist/es/node_modules/lodash/_overRest.mjs +16 -0
  275. package/dist/es/node_modules/lodash/_root.mjs +5 -0
  276. package/dist/es/node_modules/lodash/_safeGet.mjs +8 -0
  277. package/dist/es/node_modules/lodash/_setToString.mjs +6 -0
  278. package/dist/es/node_modules/lodash/_shortOut.mjs +17 -0
  279. package/dist/es/node_modules/lodash/_stackClear.mjs +9 -0
  280. package/dist/es/node_modules/lodash/_stackDelete.mjs +8 -0
  281. package/dist/es/node_modules/lodash/_stackGet.mjs +7 -0
  282. package/dist/es/node_modules/lodash/_stackHas.mjs +7 -0
  283. package/dist/es/node_modules/lodash/_stackSet.mjs +18 -0
  284. package/dist/es/node_modules/lodash/_toSource.mjs +18 -0
  285. package/dist/es/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  286. package/dist/es/node_modules/lodash/constant.mjs +9 -0
  287. package/dist/es/node_modules/lodash/debounce.mjs +57 -0
  288. package/dist/es/node_modules/lodash/eq.mjs +7 -0
  289. package/dist/es/node_modules/lodash/identity.mjs +7 -0
  290. package/dist/es/node_modules/lodash/isArguments.mjs +10 -0
  291. package/dist/es/node_modules/lodash/isArray.mjs +4 -0
  292. package/dist/es/node_modules/lodash/isArrayLike.mjs +10 -0
  293. package/dist/es/node_modules/lodash/isArrayLikeObject.mjs +10 -0
  294. package/dist/es/node_modules/lodash/isBuffer.mjs +12 -0
  295. package/dist/es/node_modules/lodash/isFunction.mjs +13 -0
  296. package/dist/es/node_modules/lodash/isLength.mjs +8 -0
  297. package/dist/es/node_modules/lodash/isObject.mjs +8 -0
  298. package/dist/es/node_modules/lodash/isObjectLike.mjs +7 -0
  299. package/dist/es/node_modules/lodash/isPlainObject.mjs +17 -0
  300. package/dist/es/node_modules/lodash/isSymbol.mjs +10 -0
  301. package/dist/es/node_modules/lodash/isTypedArray.mjs +7 -0
  302. package/dist/es/node_modules/lodash/keysIn.mjs +11 -0
  303. package/dist/es/node_modules/lodash/merge.mjs +10 -0
  304. package/dist/es/node_modules/lodash/now.mjs +7 -0
  305. package/dist/es/node_modules/lodash/stubFalse.mjs +7 -0
  306. package/dist/es/node_modules/lodash/toNumber.mjs +23 -0
  307. package/dist/es/node_modules/lodash/toPlainObject.mjs +10 -0
  308. package/dist/es/node_modules/longest-streak/index.mjs +12 -0
  309. package/dist/es/node_modules/mdast-util-math/lib/index.mjs +170 -0
  310. package/dist/es/node_modules/micromark-extension-math/lib/math-flow.mjs +76 -0
  311. package/dist/es/node_modules/micromark-extension-math/lib/math-text.mjs +48 -0
  312. package/dist/es/node_modules/micromark-extension-math/lib/syntax.mjs +15 -0
  313. package/dist/es/node_modules/micromark-factory-space/index.mjs +15 -0
  314. package/dist/es/node_modules/micromark-util-character/index.mjs +10 -0
  315. package/dist/es/node_modules/object-assign/index.mjs +34 -0
  316. package/dist/es/node_modules/rc-pagination/es/locale/zh_CN.mjs +18 -0
  317. package/dist/es/node_modules/rc-picker/es/locale/zh_CN.mjs +31 -0
  318. package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +45 -0
  319. package/dist/es/node_modules/react/jsx-runtime.mjs +8 -0
  320. package/dist/es/node_modules/react-device-detect/dist/lib.mjs +723 -0
  321. package/dist/es/node_modules/react-fast-compare/index.mjs +78 -0
  322. package/dist/es/node_modules/react-infinite-scroll-component/dist/index.es.mjs +188 -0
  323. package/dist/es/node_modules/react-quill/dist/quill.snow.css.mjs +4 -0
  324. package/dist/es/node_modules/rehype-katex/lib/index.mjs +83 -0
  325. package/dist/es/node_modules/remark-math/lib/index.mjs +13 -0
  326. package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs +294 -0
  327. package/dist/es/node_modules/space-separated-tokens/index.mjs +7 -0
  328. package/dist/es/node_modules/toggle-selection/index.mjs +25 -0
  329. package/dist/es/node_modules/tslib/tslib.es6.mjs +64 -0
  330. package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +120 -0
  331. package/dist/es/node_modules/unist-util-find-after/lib/index.mjs +32 -0
  332. package/dist/es/node_modules/unist-util-is/lib/index.mjs +81 -0
  333. package/dist/es/node_modules/unist-util-visit-parents/lib/color.mjs +6 -0
  334. package/dist/es/node_modules/unist-util-visit-parents/lib/index.mjs +56 -0
  335. package/dist/es/node_modules/web-namespaces/index.mjs +11 -0
  336. package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/native.mjs +4 -0
  337. package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/rng.mjs +13 -0
  338. package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
  339. package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/v4.mjs +23 -0
  340. package/dist/es/robots.txt +3 -0
  341. package/dist/es/style.less.mjs +4 -0
  342. package/dist/lib/favicon.ico +0 -0
  343. package/dist/lib/favicon2.ico +0 -0
  344. package/dist/lib/font/font_4108228_4w5nlhafpte.js +1 -0
  345. package/dist/lib/font/font_4439177_0sppkcnqiqgs.js +1 -0
  346. package/dist/lib/font/gos-font.js +64 -0
  347. package/dist/lib/images/empty.svg +40 -0
  348. package/dist/lib/images/loading.gif +0 -0
  349. package/dist/lib/images/logo.png +0 -0
  350. package/dist/lib/images/map-example.png +0 -0
  351. package/dist/lib/images/sketch.png +0 -0
  352. package/dist/lib/index.html +43 -0
  353. package/dist/lib/index.js +311 -5
  354. package/dist/lib/logo192.png +0 -0
  355. package/dist/lib/logo512.png +0 -0
  356. package/dist/lib/manifest.json +25 -0
  357. package/dist/lib/robots.txt +3 -0
  358. package/dist/src/Dialog/HistoryItem/index.d.ts +1 -0
  359. package/dist/src/types.d.ts +1 -1
  360. package/package.json +6 -24
  361. package/dist/es/src/style.css +0 -1
  362. package/dist/es/src/style10.css +0 -1
  363. package/dist/es/src/style11.css +0 -1
  364. package/dist/es/src/style12.css +0 -1
  365. package/dist/es/src/style13.css +0 -1
  366. package/dist/es/src/style14.css +0 -1
  367. package/dist/es/src/style15.css +0 -1
  368. package/dist/es/src/style16.css +0 -1
  369. package/dist/es/src/style17.css +0 -1
  370. package/dist/es/src/style18.css +0 -1
  371. package/dist/es/src/style19.css +0 -1
  372. package/dist/es/src/style2.css +0 -1
  373. package/dist/es/src/style20.css +0 -1
  374. package/dist/es/src/style21.css +0 -1
  375. package/dist/es/src/style22.css +0 -1
  376. package/dist/es/src/style23.css +0 -1
  377. package/dist/es/src/style24.css +0 -0
  378. package/dist/es/src/style25.css +0 -1
  379. package/dist/es/src/style26.css +0 -1
  380. package/dist/es/src/style27.css +0 -1
  381. package/dist/es/src/style28.css +0 -1
  382. package/dist/es/src/style29.css +0 -1
  383. package/dist/es/src/style3.css +0 -1
  384. package/dist/es/src/style30.css +0 -1
  385. package/dist/es/src/style31.css +0 -1
  386. package/dist/es/src/style32.css +0 -1
  387. package/dist/es/src/style33.css +0 -1
  388. package/dist/es/src/style4.css +0 -1
  389. package/dist/es/src/style5.css +0 -1
  390. package/dist/es/src/style6.css +0 -1
  391. package/dist/es/src/style7.css +0 -1
  392. package/dist/es/src/style8.css +0 -1
  393. package/dist/es/src/style9.css +0 -1
  394. package/dist/lib/index.css +0 -1
@@ -1,60 +1,61 @@
1
- var Mt = Object.defineProperty, jt = Object.defineProperties;
2
- var Vt = Object.getOwnPropertyDescriptors;
3
- var Xe = Object.getOwnPropertySymbols;
4
- var $t = Object.prototype.hasOwnProperty, At = Object.prototype.propertyIsEnumerable;
5
- var ve = (x, o, g) => o in x ? Mt(x, o, { enumerable: !0, configurable: !0, writable: !0, value: g }) : x[o] = g, ke = (x, o) => {
1
+ var $t = Object.defineProperty, At = Object.defineProperties;
2
+ var Bt = Object.getOwnPropertyDescriptors;
3
+ var Je = Object.getOwnPropertySymbols;
4
+ var qt = Object.prototype.hasOwnProperty, Kt = Object.prototype.propertyIsEnumerable;
5
+ var ke = (x, o, g) => o in x ? $t(x, o, { enumerable: !0, configurable: !0, writable: !0, value: g }) : x[o] = g, we = (x, o) => {
6
6
  for (var g in o || (o = {}))
7
- $t.call(o, g) && ve(x, g, o[g]);
8
- if (Xe)
9
- for (var g of Xe(o))
10
- At.call(o, g) && ve(x, g, o[g]);
7
+ qt.call(o, g) && ke(x, g, o[g]);
8
+ if (Je)
9
+ for (var g of Je(o))
10
+ Kt.call(o, g) && ke(x, g, o[g]);
11
11
  return x;
12
- }, we = (x, o) => jt(x, Vt(o));
13
- var P = (x, o, g) => (ve(x, typeof o != "symbol" ? o + "" : o, g), g);
14
- var z = (x, o, g) => new Promise((e, k) => {
12
+ }, be = (x, o) => At(x, Bt(o));
13
+ var P = (x, o, g) => (ke(x, typeof o != "symbol" ? o + "" : o, g), g);
14
+ var U = (x, o, g) => new Promise((e, k) => {
15
15
  var ae = (w) => {
16
16
  try {
17
17
  D(g.next(w));
18
- } catch (p) {
19
- k(p);
18
+ } catch (u) {
19
+ k(u);
20
20
  }
21
21
  }, v = (w) => {
22
22
  try {
23
23
  D(g.throw(w));
24
- } catch (p) {
25
- k(p);
24
+ } catch (u) {
25
+ k(u);
26
26
  }
27
27
  }, D = (w) => w.done ? e(w.value) : Promise.resolve(w.value).then(ae, v);
28
28
  D((g = g.apply(x, o)).next());
29
29
  });
30
- import { jsxs as W, jsx as a } from "react/jsx-runtime";
31
- import { memo as Bt, useState as u, useRef as $, useContext as Kt, useEffect as C } from "react";
32
- /* empty css */import { Divider as qt, Spin as Wt, Button as Q, Space as re, Upload as Qt, Tooltip as Yt, message as R, notification as _t } from "antd";
33
- import be from "../../Iconfont/index.mjs";
34
- import { IHistoryRole as Y, ChatMessageRole as Ze } from "@glodon-aiot/apis";
35
- import Gt from "../HistoryItem/index.mjs";
36
- import Xt from "dayjs";
37
- import { v4 as et } from "uuid";
38
- import Zt from "../../context.mjs";
39
- import { MB as Jt } from "../../constant.mjs";
40
- import St from "../FilePreview/index.mjs";
41
- import { getImageExtension as en } from "../../utils/index.mjs";
42
- import tn from "../../QuillEditor/index.mjs";
43
- import nn from "../Recommend/index.mjs";
44
- import on from "../Greeting/index.mjs";
45
- import sn from "../PromptManager/index.mjs";
46
- import ln from "../../Footer/index.mjs";
47
- import { CameraOutlined as Je, PlusOutlined as rn } from "@ant-design/icons";
48
- import an from "../UploadKnowledgeFiles/index.mjs";
49
- import dn from "../UploadingPrompt/index.mjs";
50
- import cn from "../PromptSetting/index.mjs";
51
- import { useMemoizedFn as xe } from "ahooks";
52
- import fn from "../SessionListDrawer/index.mjs";
53
- import un from "react-infinite-scroll-component";
54
- import pn from "../ConnectToNetwork/index.mjs";
55
- import hn from "../../assets/icon.svg.mjs";
56
- const gn = Bt(Gt), mn = {
57
- icon: hn,
30
+ import { jsx as a, jsxs as $ } from "../../_virtual/jsx-runtime.mjs";
31
+ import { memo as Yt, useState as p, useRef as A, useContext as Wt, useEffect as N, useMemo as Qt } from "react";
32
+ import "./style.less.mjs";
33
+ import { Divider as _t, Spin as Gt, Button as W, Space as re, Upload as Xt, Tooltip as Zt, message as R, notification as Jt } from "antd";
34
+ import xe from "../../Iconfont/index.mjs";
35
+ import { IHistoryRole as Q, ChatMessageRole as Se } from "@glodon-aiot/apis";
36
+ import nt from "../HistoryItem/index.mjs";
37
+ import it from "dayjs";
38
+ import St from "../../context.mjs";
39
+ import { MB as en } from "../../constant.mjs";
40
+ import tn from "../FilePreview/index.mjs";
41
+ import { getImageExtension as nn } from "../../utils/index.mjs";
42
+ import on from "../../QuillEditor/index.mjs";
43
+ import sn from "../Recommend/index.mjs";
44
+ import ln from "../Greeting/index.mjs";
45
+ import rn from "../PromptManager/index.mjs";
46
+ import an from "../../Footer/index.mjs";
47
+ import { CameraOutlined as et, PlusOutlined as dn } from "@ant-design/icons";
48
+ import cn from "../UploadKnowledgeFiles/index.mjs";
49
+ import fn from "../UploadingPrompt/index.mjs";
50
+ import un from "../PromptSetting/index.mjs";
51
+ import Ie from "../../node_modules/ahooks/es/useMemoizedFn/index.mjs";
52
+ import pn from "../SessionListDrawer/index.mjs";
53
+ import hn from "../../node_modules/react-infinite-scroll-component/dist/index.es.mjs";
54
+ import gn from "../ConnectToNetwork/index.mjs";
55
+ import mn from "../../assets/icon.svg.mjs";
56
+ import ot from "../../packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/v4.mjs";
57
+ const yn = Yt(nt), vn = {
58
+ icon: mn,
58
59
  text: "今天我能帮你什么?"
59
60
  };
60
61
  class Z {
@@ -68,13 +69,13 @@ class Z {
68
69
  P(this, "isSensitive");
69
70
  P(this, "isSuspend");
70
71
  P(this, "comment");
71
- this.content = o, this.sessionId = g, this.role = e, this.files = k, this.content = o, this.role = e, this.sessionId = g, this.files = k, this.messageTime = Xt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = et(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
72
+ this.content = o, this.sessionId = g, this.role = e, this.files = k, this.content = o, this.role = e, this.sessionId = g, this.files = k, this.messageTime = it(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = ot(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
72
73
  isAgree: 0
73
74
  };
74
75
  }
75
76
  }
76
- const Se = 10, yn = (x) => {
77
- var $e, Ae, Be, Ke, qe, We, Qe, Ye, _e;
77
+ const tt = 10, Qn = (x) => {
78
+ var Be, qe, Ke, Ye, We, Qe, _e, Ge, Xe;
78
79
  const {
79
80
  application: o,
80
81
  docViewerUrl: g = "",
@@ -84,35 +85,35 @@ const Se = 10, yn = (x) => {
84
85
  setCurrentSession: v,
85
86
  networkStatus: D,
86
87
  setNetworkStatus: w
87
- } = x, [p, I] = u([]), [tt, J] = u(), [de, Ie] = u(), T = $(null), {
88
- service: N,
88
+ } = x, [u, I] = p([]), [st, J] = p(), [de, Le] = p(), E = A(null), {
89
+ service: C,
89
90
  agentClient: L,
90
- depId: nt,
91
- footer: it,
91
+ depId: lt,
92
+ footer: rt,
92
93
  transform: c,
93
94
  defaultInput: ce,
94
95
  onMessage: S,
95
- onHistoryLoad: Le,
96
- beforeMessageSend: M,
97
- bodyStyle: ot,
98
- disabled: O,
96
+ onHistoryLoad: Ce,
97
+ beforeMessageSend: z,
98
+ bodyStyle: at,
99
+ disabled: H,
99
100
  features: f
100
- } = Kt(Zt), [Ne, fe] = u(!1), h = $(p), Ce = $(), [st, lt] = u(0), [_, A] = u(), [B, ee] = u(""), [Fe, ue] = u(!1), pe = $(null), [Ee, rt] = u([]), [Te, G] = u(!1), [Pe, at] = u(!1), [dt, ct] = u(""), [ft, K] = u(), [te, ne] = u({}), ie = $(null), Re = $(null), he = $(null), [De, ut] = u(!1), [pt, ht] = u([]), [gt, oe] = u(!0), [mt, yt] = u(!0), [Oe, H] = u(!1), [ge, j] = u(!1), [He, vt] = u(!1), [F, se] = u(typeof (f == null ? void 0 : f.promptVariables) == "object" ? f.promptVariables.default || [] : []), [kt, wt] = u(typeof (f == null ? void 0 : f.knowledges) == "object" && f.knowledges.default || void 0), [Ue, U] = u(!1), [bt, X] = u(!0), [xt, q] = u(typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.default) == "boolean" ? f.connectNetwork.default : !1), [ze, le] = u(!1);
101
- C(() => {
101
+ } = Wt(St), [Ne, fe] = p(!1), h = A(u), Fe = A(), [dt, ct] = p(0), [_, B] = p(), [q, ee] = p(""), [Te, ue] = p(!1), pe = A(null), [Ee, ft] = p([]), [Pe, G] = p(!1), [Re, ut] = p(!1), [pt, ht] = p(""), [gt, K] = p(), [te, ne] = p({}), ie = A(null), De = A(null), he = A(null), [He, mt] = p(!1), [yt, vt] = p([]), [kt, oe] = p(!0), [wt, bt] = p(!0), [Me, M] = p(!1), [ge, j] = p(!1), [Oe, xt] = p(!1), [F, se] = p(typeof (f == null ? void 0 : f.promptVariables) == "object" ? f.promptVariables.default || [] : []), [It, Lt] = p(typeof (f == null ? void 0 : f.knowledges) == "object" && f.knowledges.default || void 0), [Ue, O] = p(!1), [ze, X] = p(!0), [Ct, Y] = p(typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.default) == "boolean" ? f.connectNetwork.default : !1), [je, le] = p(!1);
102
+ N(() => {
102
103
  var l, i;
103
104
  e && (h.current = []), I([]);
104
- const t = T.current;
105
+ const t = E.current;
105
106
  if (t && t.scrollTo({
106
107
  top: 0
107
108
  }), !((l = e == null ? void 0 : e.data) != null && l.id))
108
109
  return;
109
- if (j(!1), H(!1), (i = e.messages) != null && i.length) {
110
+ if (j(!1), M(!1), (i = e.messages) != null && i.length) {
110
111
  const s = [...e.messages.filter((d) => d == null ? void 0 : d.messageId)].reverse();
111
112
  h.current = [...s], I([...s]);
112
113
  }
113
114
  const n = (r) => {
114
115
  var s;
115
- (s = e == null ? void 0 : e.data) != null && s.id && (h.current = [...r].reverse(), I([...r].reverse()), !r || r.length < 10 ? X(!1) : X(!0), Le && Le({
116
+ (s = e == null ? void 0 : e.data) != null && s.id && (h.current = [...r].reverse(), I([...r].reverse()), !r || r.length < 10 ? X(!1) : X(!0), Ce && Ce({
116
117
  applicationId: o.id,
117
118
  sessionId: e.data.id,
118
119
  histories: r
@@ -121,15 +122,15 @@ const Se = 10, yn = (x) => {
121
122
  return e.addEventListener("history:loaded", n), () => {
122
123
  h.current = [], I([]), e == null || e.removeEventListener("history:loaded", n);
123
124
  };
124
- }, [e]), C(() => {
125
+ }, [e]), N(() => {
125
126
  const t = () => {
126
127
  var n;
127
- (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && se(e.promptVariables.sort((l, i) => l.key.localeCompare(i.key))), e.knowledges && wt(e.knowledges), w(e.netOpen));
128
+ (n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && se(e.promptVariables.sort((l, i) => l.key.localeCompare(i.key))), e.knowledges && Lt(e.knowledges), w(e.netOpen));
128
129
  };
129
130
  return e == null || e.addEventListener("data:updated", t), () => {
130
131
  e == null || e.removeEventListener("data:updated", t);
131
132
  };
132
- }, [e]), C(() => {
133
+ }, [e]), N(() => {
133
134
  var n;
134
135
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
135
136
  return;
@@ -140,28 +141,28 @@ const Se = 10, yn = (x) => {
140
141
  e == null || e.removeEventListener("error", t);
141
142
  };
142
143
  }, [e]);
143
- const It = () => {
144
+ const Nt = () => {
144
145
  var l;
145
146
  if (!((l = e == null ? void 0 : e.data) != null && l.id) || !(o != null && o.id))
146
147
  return;
147
- const t = e.data.id, n = p[p.length - 1];
148
+ const t = e.data.id, n = u[u.length - 1];
148
149
  if (n && n.isContext)
149
150
  return R.success("已开启新话题");
150
151
  e.clear().then(() => {
151
- const i = new Z("", t, Y.System);
152
- i.isContext = !0, I([i, ...p]);
152
+ const i = new Z("", t, Q.System);
153
+ i.isContext = !0, I([i, ...u]);
153
154
  });
154
155
  };
155
- C(() => {
156
- o != null && o.id && (N == null || N.getRecommendQues(o.id).then((t) => {
157
- rt(t);
156
+ N(() => {
157
+ o != null && o.id && (C == null || C.getRecommendQues(o.id).then((t) => {
158
+ ft(t);
158
159
  }));
159
- }, [nt, o]);
160
- const Me = (t) => z(void 0, null, function* () {
160
+ }, [lt, o]);
161
+ const Ve = (t) => U(void 0, null, function* () {
161
162
  var b, m;
162
- if (O)
163
+ if (H)
163
164
  return R.error("发送功能被禁用");
164
- const n = t || tt;
165
+ const n = t || st;
165
166
  if (!(n != null && n.trim()))
166
167
  return R.error("请输入你想问的");
167
168
  if (!(F == null ? void 0 : F.every((y) => !!(y != null && y.value)))) {
@@ -173,35 +174,35 @@ const Se = 10, yn = (x) => {
173
174
  return R.error("正在回复中");
174
175
  if (Ne)
175
176
  return R.error("等待初始化");
176
- if (!gt)
177
+ if (!kt)
177
178
  return R.error("正在解析文件");
178
- if (Fe)
179
+ if (Te)
179
180
  return R.error("正在上传图片");
180
- A(void 0), ee("");
181
+ B(void 0), ee("");
181
182
  const i = (b = e == null ? void 0 : e.data) == null ? void 0 : b.id;
182
183
  if (!i) {
183
184
  k == null || k({
184
185
  netOpen: D ? 1 : 2
185
186
  }).then((y) => {
186
- var E, V;
187
- U(!0), w(!!((E = y.data) != null && E.netOpen)), q(!!((V = y.data) != null && V.enableNetOpen)), Lt(y).then(() => {
188
- v == null || v(y), U(!1), Ie(n);
187
+ var T, V;
188
+ O(!0), w(!!((T = y.data) != null && T.netOpen)), Y(!!((V = y.data) != null && V.enableNetOpen)), Ft(y).then(() => {
189
+ v == null || v(y), O(!1), Le(n);
189
190
  });
190
191
  });
191
192
  return;
192
193
  }
193
194
  le(!0);
194
- const r = B ? `![](${B})
195
+ const r = q ? `![](${q})
195
196
  ${n}` : n;
196
197
  let s;
197
198
  try {
198
- M ? s = yield M == null ? void 0 : M({
199
+ z ? s = yield z == null ? void 0 : z({
199
200
  applicationId: o.id,
200
201
  sessionId: i,
201
202
  message: {
202
203
  content: r,
203
204
  sessionId: i,
204
- role: Ze.User,
205
+ role: Se.User,
205
206
  files: te[i]
206
207
  }
207
208
  }) : s = !0;
@@ -211,15 +212,15 @@ ${n}` : n;
211
212
  if (le(!1), s === !1)
212
213
  return;
213
214
  let d = n;
214
- typeof s == "object" && (d = s.content || n), ((m = te[i]) == null ? void 0 : m.length) > 0 ? Nt(d) : me(d);
215
- }), Lt = (t) => new Promise((n, l) => z(void 0, null, function* () {
215
+ typeof s == "object" && (d = s.content || n), ((m = te[i]) == null ? void 0 : m.length) > 0 ? Tt(d) : me(d);
216
+ }), Ft = (t) => new Promise((n, l) => U(void 0, null, function* () {
216
217
  const s = (t == null ? void 0 : t.promptVariables).filter((d) => d.key !== "query").map((d) => {
217
218
  var m;
218
219
  const b = (m = F.find((y) => y.key === d.key)) == null ? void 0 : m.value;
219
220
  return d.value = b || "", d;
220
221
  });
221
222
  se(s.sort((d, b) => d.key.localeCompare(b.key))), yield t == null ? void 0 : t.setPromptVariables(s), n();
222
- })), Nt = (t) => {
223
+ })), Tt = (t) => {
223
224
  var s, d, b;
224
225
  if (oe(!1), !((s = e == null ? void 0 : e.data) != null && s.id) || !(o != null && o.id))
225
226
  return;
@@ -227,7 +228,7 @@ ${n}` : n;
227
228
  let i = [], r = /* @__PURE__ */ new Set();
228
229
  (b = te[n]) == null || b.forEach((m) => {
229
230
  r.has(m.id) || (i.push(m), r.add(m.id));
230
- }), Promise.all(i.map((m) => N == null ? void 0 : N.patchApplicationIdKnowledgeIdFileId(o == null ? void 0 : o.id, n, m.id, {
231
+ }), Promise.all(i.map((m) => C == null ? void 0 : C.patchApplicationIdKnowledgeIdFileId(o == null ? void 0 : o.id, n, m.id, {
231
232
  enabled: 1
232
233
  }).then((y) => {
233
234
  l.push(m);
@@ -237,60 +238,60 @@ ${n}` : n;
237
238
  throw Error(m);
238
239
  });
239
240
  };
240
- C(() => {
241
+ N(() => {
241
242
  if (!de || !e)
242
243
  return;
243
- const t = de, n = () => z(void 0, null, function* () {
244
+ const t = de, n = () => U(void 0, null, function* () {
244
245
  le(!0);
245
- const l = B ? `![](${B})
246
+ const l = q ? `![](${q})
246
247
  ${t}` : t;
247
248
  let i;
248
249
  try {
249
- M ? i = yield M == null ? void 0 : M({
250
+ z ? i = yield z == null ? void 0 : z({
250
251
  applicationId: o.id,
251
252
  sessionId: e.id,
252
253
  message: {
253
254
  content: l,
254
255
  sessionId: e.id,
255
- role: Ze.User,
256
+ role: Se.User,
256
257
  files: te[e.id]
257
258
  }
258
259
  }) : i = !0;
259
260
  } catch (r) {
260
261
  i = !1;
261
262
  }
262
- le(!1), i !== !1 && (me(t), Ie(void 0));
263
+ le(!1), i !== !1 && (me(t), Le(void 0));
263
264
  });
264
265
  return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
265
266
  e == null || e.removeEventListener("ready", n);
266
267
  };
267
268
  }, [de, e]);
268
- const me = (t, n) => z(void 0, null, function* () {
269
+ const me = (t, n) => U(void 0, null, function* () {
269
270
  var m, y;
270
271
  const l = (m = e == null ? void 0 : e.data) == null ? void 0 : m.id;
271
272
  if (!l)
272
273
  return;
273
- j(!0), H(!0);
274
- const i = B ? `![](${B})
275
- ${t}` : t, r = new Z(i, l, Y.User, n);
276
- J(void 0), K(void 0), h.current = [r, ...p], I(h.current), o.id && S && S({
274
+ j(!0), M(!0);
275
+ const i = q ? `![](${q})
276
+ ${t}` : t, r = new Z(i, l, Q.User, n);
277
+ J(void 0), K(void 0), h.current = [r, ...u], I(h.current), o.id && S && S({
277
278
  applicationId: o.id,
278
279
  sessionId: l,
279
280
  message: r
280
281
  });
281
- const s = new Z("", l, Y.System);
282
+ const s = new Z("", l, Q.System);
282
283
  s.isWaiting = !0, h.current = [s, ...h.current], I(h.current);
283
- const d = (n == null ? void 0 : n.map((E) => E.id)) || [], b = {
284
+ const d = (n == null ? void 0 : n.map((T) => T.id)) || [], b = {
284
285
  stream: !0,
285
286
  referenceFirst: !1
286
287
  };
287
288
  if (c != null && c.promptVariables) {
288
- const E = F == null ? void 0 : F.reduce((V, Ge) => (V[Ge.key] = Ge.value, V), {});
289
- b.formatValues = E, e.setPromptVariables(F);
289
+ const T = F == null ? void 0 : F.reduce((V, Ze) => (V[Ze.key] = Ze.value, V), {});
290
+ b.formatValues = T, e.setPromptVariables(F);
290
291
  }
291
292
  if (c != null && c.knowledges) {
292
- const E = kt;
293
- b.knowledges = E, e.setKnowledges(E);
293
+ const T = It;
294
+ b.knowledges = T, e.setKnowledges(T);
294
295
  }
295
296
  yield e.send({
296
297
  text: i,
@@ -299,31 +300,31 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
299
300
  [l]: []
300
301
  }), (y = ie.current) == null || y.update();
301
302
  });
302
- C(() => {
303
+ N(() => {
303
304
  var l;
304
305
  const t = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
305
306
  if (!t)
306
307
  return;
307
308
  const n = (i) => {
308
- if (!i.sessionId || i.sessionId && i.sessionId !== Ce.current || i.role === Y.User)
309
+ if (!i.sessionId || i.sessionId && i.sessionId !== Fe.current || i.role === Q.User)
309
310
  return;
310
- if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (H(!1), j(!1), h.current = h.current.filter((d) => !d.isWaiting), I([...h.current]), h.current = [...h.current], i.content))
311
- return _t.error({
311
+ if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (M(!1), j(!1), h.current = h.current.filter((d) => !d.isWaiting), I([...h.current]), h.current = [...h.current], i.content))
312
+ return Jt.error({
312
313
  message: i.content
313
314
  });
314
- const r = i.actions || [], s = new Z(i.content, t, Y.Robot);
315
- s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = r, s.isLoading = !0, h.current = h.current.filter((d) => !d.isWaiting).filter((d) => !d.isReplying), i.index === void 0 && I([s, ...h.current]), i.code === 11915 && (H(!1), j(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, I([s, ...h.current])), i.index === -2 && (H(!1), j(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, I([s, ...h.current])), i.index === -1 && (H(!1), j(!1), s.isLoading = !1, s.reference = i.reference, I([s, ...h.current]), o.id && S && S({
315
+ const r = i.actions || [], s = new Z(i.content, t, Q.Robot);
316
+ s.messageId = i.messageId, s.reasoningContent = i.reasoningContent, s.searchReference = i.searchReference, s.thinkingSecs = i.thinkingSecs, s.thinkingStatus = i.thinkingStatus, s.actions = r, s.isLoading = !0, h.current = h.current.filter((d) => !d.isWaiting).filter((d) => !d.isReplying), i.index === void 0 && I([s, ...h.current]), i.code === 11915 && (M(!1), j(!1), s.isLoading = !1, s.content = "请您换个问题问我吧~", s.isSensitive = !0, I([s, ...h.current])), i.index === -2 && (M(!1), j(!1), s.isLoading = !1, s.content = "回答已中止~", s.isSuspend = !0, I([s, ...h.current])), i.index === -1 && (M(!1), j(!1), s.isLoading = !1, s.reference = i.reference, I([s, ...h.current]), o.id && S && S({
316
317
  applicationId: o.id,
317
318
  sessionId: t,
318
319
  message: s
319
- })), i.index === -3 && (H(!1), j(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, I([s, ...h.current]));
320
+ })), i.index === -3 && (M(!1), j(!1), s.isLoading = !1, s.reference = i.reference, s.relatedQuesion = i.relatedQuesion, I([s, ...h.current]));
320
321
  };
321
322
  return e.ready ? e.addEventListener("message:updated", n) : e.addEventListener("ready", () => {
322
323
  e.addEventListener("message:updated", n);
323
324
  }), () => {
324
325
  e == null || e.removeEventListener("message:updated", n);
325
326
  };
326
- }, [e]), C(() => {
327
+ }, [e]), N(() => {
327
328
  if (!e) {
328
329
  fe(!1);
329
330
  return;
@@ -334,118 +335,118 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
334
335
  return fe(e.frozen), e.addEventListener("frozen", t), () => {
335
336
  e == null || e.removeEventListener("frozen", t);
336
337
  };
337
- }, [e]), C(() => {
338
+ }, [e]), N(() => {
338
339
  if (!L)
339
340
  return;
340
341
  const t = L.questionContextMaxLength || 4e3;
341
- lt(t);
342
- }, [L, N]), C(() => {
342
+ ct(t);
343
+ }, [L, C]), N(() => {
343
344
  ce && K(ce.text);
344
345
  }, [ce]);
345
- const Ct = (t) => {
346
+ const Et = (t) => {
346
347
  const n = t.size;
347
- return n <= 0 ? (R.error("该文件为空,请重新上传"), !1) : n > 20 * Jt ? (R.error("图片须小于20M"), !1) : (A(t), !1);
348
- }, Ft = (t) => z(void 0, null, function* () {
348
+ return n <= 0 ? (R.error("该文件为空,请重新上传"), !1) : n > 20 * en ? (R.error("图片须小于20M"), !1) : (B(t), !1);
349
+ }, Pt = (t) => U(void 0, null, function* () {
349
350
  var n;
350
- return A(t), (n = e == null ? void 0 : e.data) != null && n.id ? je(e, t) : new Promise((l) => {
351
- U(!0), k == null || k({
351
+ return B(t), (n = e == null ? void 0 : e.data) != null && n.id ? $e(e, t) : new Promise((l) => {
352
+ O(!0), k == null || k({
352
353
  netOpen: D ? 1 : 2
353
354
  }).then((i) => {
354
355
  var r, s;
355
- v == null || v(i), U(!1), w(!!((r = i.data) != null && r.netOpen)), q(!!((s = i.data) != null && s.enableNetOpen)), l(je(i, t));
356
+ v == null || v(i), O(!1), w(!!((r = i.data) != null && r.netOpen)), Y(!!((s = i.data) != null && s.enableNetOpen)), l($e(i, t));
356
357
  });
357
358
  });
358
- }), je = (t, n) => {
359
- const l = en(n.name);
359
+ }), $e = (t, n) => {
360
+ const l = nn(n.name);
360
361
  return new Promise((i) => {
361
362
  var s;
362
363
  const r = {
363
- files: [`${et()}.${l}`],
364
+ files: [`${ot()}.${l}`],
364
365
  isv: "minio",
365
366
  knowledgeId: ((s = t.data) == null ? void 0 : s.id) || "",
366
367
  type: 1
367
368
  };
368
- ue(!0), N == null || N.postTicket(r).then((d) => {
369
- N.uploadMinioFile(d.minio, n).then(() => {
370
- var E, V;
371
- const b = (E = d.minio.endpoints) == null ? void 0 : E[0], m = d.minio.bucket, y = (V = d.minio.fileKeys) == null ? void 0 : V[0];
369
+ ue(!0), C == null || C.postTicket(r).then((d) => {
370
+ C.uploadMinioFile(d.minio, n).then(() => {
371
+ var T, V;
372
+ const b = (T = d.minio.endpoints) == null ? void 0 : T[0], m = d.minio.bucket, y = (V = d.minio.fileKeys) == null ? void 0 : V[0];
372
373
  i(`${location.protocol}//${b}/${m}/${y}`);
373
374
  }).catch(() => {
374
- ee(""), A(void 0);
375
+ ee(""), B(void 0);
375
376
  }).finally(() => {
376
377
  ue(!1);
377
378
  });
378
379
  }).catch(() => {
379
- ee(""), A(void 0), ue(!1);
380
+ ee(""), B(void 0), ue(!1);
380
381
  });
381
382
  });
382
383
  };
383
- C(() => {
384
- const t = T.current;
385
- t && !He && t.scrollTo({
384
+ N(() => {
385
+ const t = E.current;
386
+ t && !Oe && t.scrollTo({
386
387
  top: t.scrollHeight
387
388
  });
388
- }, [p]);
389
- const Et = (t, n) => new Promise((l) => {
389
+ }, [u]);
390
+ const Rt = (t, n) => new Promise((l) => {
390
391
  if (!n.file.url || !(o != null && o.id))
391
392
  return l();
392
- const i = we(ke({}, n.file), {
393
+ const i = be(we({}, n.file), {
393
394
  type: 1
394
395
  });
395
- N == null || N.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, i).finally(() => {
396
+ C == null || C.postApplicationIdSessionKnowledgeSessionFile(o == null ? void 0 : o.id, t, i).finally(() => {
396
397
  var r;
397
398
  (r = ie.current) == null || r.update().finally(l);
398
399
  });
399
- }), Tt = () => {
400
+ }), Dt = () => {
400
401
  var t;
401
- (t = e == null ? void 0 : e.data) != null && t.id && (H(!1), e.suspend());
402
- }, Pt = (t) => {
403
- const n = T.current;
402
+ (t = e == null ? void 0 : e.data) != null && t.id && (M(!1), e.suspend());
403
+ }, Ht = (t) => {
404
+ const n = E.current;
404
405
  n && setTimeout(() => {
405
406
  n.scrollTo({
406
407
  top: n.scrollHeight,
407
408
  behavior: t == null ? void 0 : t.behavior
408
409
  });
409
410
  }, t == null ? void 0 : t.ms);
410
- }, Rt = () => {
411
- if (!T.current)
411
+ }, Mt = () => {
412
+ if (!E.current)
412
413
  return;
413
- const t = T.current.scrollTop <= -80;
414
- vt(t);
415
- }, Dt = xe((t) => {
414
+ const t = E.current.scrollTop <= -80;
415
+ xt(t);
416
+ }, Ot = Ie((t) => {
416
417
  var n, l;
417
418
  (n = pe.current) == null || n.update(t), (l = pe.current) == null || l.focus();
418
- }), Ot = xe((t) => {
419
- Me(t);
420
- }), Ht = xe(() => {
419
+ }), Ut = Ie((t) => {
420
+ Ve(t);
421
+ }), zt = Ie(() => {
421
422
  var n;
422
423
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
423
424
  return;
424
- h.current = [...p.slice(1, p.length)], I(h.current);
425
- const t = new Z("", e.data.id, Y.System);
426
- t.isWaiting = !0, h.current = [t, ...h.current], I(h.current), j(!0), H(!0), e.answerAgain();
425
+ h.current = [...u.slice(1, u.length)], I(h.current);
426
+ const t = new Z("", e.data.id, Q.System);
427
+ t.isWaiting = !0, h.current = [t, ...h.current], I(h.current), j(!0), M(!0), e.answerAgain();
427
428
  });
428
- C(() => {
429
+ N(() => {
429
430
  var t, n;
430
- Ce.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Ue && ((n = he.current) == null || n.clear());
431
+ Fe.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Ue && ((n = he.current) == null || n.clear());
431
432
  }, [e]);
432
- const Ut = () => {
433
+ const jt = () => {
433
434
  var l;
434
435
  if (!((l = e == null ? void 0 : e.data) != null && l.id))
435
436
  return;
436
- const n = p[p.length - 1].messageTime;
437
+ const n = u[u.length - 1].messageTime;
437
438
  e.fetchMessages({
438
439
  endTime: n,
439
- pageSize: Se
440
+ pageSize: tt
440
441
  }).then((i) => {
441
442
  const r = i || [];
442
443
  if (!r || !(r != null && r.length)) {
443
444
  X(!1);
444
445
  return;
445
446
  }
446
- r.length < 10 ? X(!1) : X(!0), I([...p, ...r.reverse()]);
447
+ r.length < 10 ? X(!1) : X(!0), I([...u, ...r.reverse()]);
447
448
  });
448
- }, zt = (t) => z(void 0, null, function* () {
449
+ }, Vt = (t) => U(void 0, null, function* () {
449
450
  var n, l;
450
451
  if (!((n = e == null ? void 0 : e.data) != null && n.id))
451
452
  w(t);
@@ -454,18 +455,18 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
454
455
  return;
455
456
  w(t);
456
457
  }
457
- }), ye = () => z(void 0, null, function* () {
458
+ }), ye = () => U(void 0, null, function* () {
458
459
  e ? e.fetchData().then((t) => {
459
460
  var n;
460
- (n = e == null ? void 0 : e.data) != null && n.id && (w(t.netOpen), q(t.enableNetOpen));
461
- }) : (w(!1), q(o.arrange[0].enableNetOpen));
461
+ (n = e == null ? void 0 : e.data) != null && n.id && (w(t.netOpen), Y(t.enableNetOpen));
462
+ }) : (w(!1), Y(o.arrange[0].enableNetOpen));
462
463
  });
463
- C(() => {
464
+ N(() => {
464
465
  ye();
465
- }, [e]), C(() => {
466
+ }, [e]), N(() => {
466
467
  var t, n;
467
- if (T.current) {
468
- const l = document.getElementById("chat-main"), i = (t = T.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), r = (n = T.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
468
+ if (E.current) {
469
+ const l = document.getElementById("chat-main"), i = (t = E.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), r = (n = E.current) == null ? void 0 : n.querySelector(".infinite-scroll-component");
469
470
  if (!i || !r || !l)
470
471
  return;
471
472
  const s = l.offsetHeight;
@@ -479,7 +480,7 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
479
480
  i.style.height = "auto";
480
481
  }
481
482
  }
482
- }, [p]), C(() => {
483
+ }, [u]), N(() => {
483
484
  if (e)
484
485
  return;
485
486
  const t = () => {
@@ -502,27 +503,45 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
502
503
  L == null || L.removeEventListener("ready", t);
503
504
  };
504
505
  }, [e, L, f == null ? void 0 : f.promptVariables]);
505
- const Ve = () => {
506
+ const Ae = () => {
506
507
  k == null || k({
507
508
  netOpen: D ? 1 : 2
508
509
  }).then((t) => {
509
510
  var n, l;
510
- v == null || v(t), U(!1), w(!!((n = t.data) != null && n.netOpen)), q(!!((l = t.data) != null && l.enableNetOpen));
511
+ v == null || v(t), O(!1), w(!!((n = t.data) != null && n.netOpen)), Y(!!((l = t.data) != null && l.enableNetOpen));
511
512
  });
512
- };
513
- return /* @__PURE__ */ W("div", {
513
+ }, ve = Qt(() => {
514
+ var t;
515
+ return o.arrange && ((t = o.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ a(nt, {
516
+ application: o,
517
+ history: {
518
+ role: 1,
519
+ content: o.arrange[0].openingContent,
520
+ code: 200,
521
+ messageId: "opening-message",
522
+ sessionId: "",
523
+ reference: [],
524
+ searchReference: [],
525
+ messageTime: it(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
526
+ actions: [],
527
+ isLoading: !1
528
+ },
529
+ actions: !!u.length
530
+ }) : null;
531
+ }, [o == null ? void 0 : o.arrange, u]);
532
+ return console.log("openingMessage", ve), /* @__PURE__ */ $("div", {
514
533
  className: "agent-chat",
515
- children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ a(cn, {
516
- ref: Re,
534
+ children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ a(un, {
535
+ ref: De,
517
536
  appId: o.id,
518
537
  currentSession: e,
519
538
  promptVariables: F,
520
539
  setPromptVariables: se,
521
540
  setCurrentSession: v
522
- }), /* @__PURE__ */ W("div", {
541
+ }), /* @__PURE__ */ $("div", {
523
542
  className: "chat-main",
524
543
  id: "chat-main",
525
- style: ot,
544
+ style: at,
526
545
  children: [/* @__PURE__ */ a("div", {
527
546
  className: "chat-main-wrapper",
528
547
  id: "scrollableDiv",
@@ -532,93 +551,93 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
532
551
  display: "flex",
533
552
  flexDirection: "column-reverse"
534
553
  },
535
- ref: T,
536
- onScroll: Rt,
537
- children: ($e = e == null ? void 0 : e.data) != null && $e.id && (p != null && p.length) ? /* @__PURE__ */ a(un, {
538
- dataLength: p.length,
539
- next: Ut,
554
+ ref: E,
555
+ onScroll: Mt,
556
+ children: (Be = e == null ? void 0 : e.data) != null && Be.id && (u != null && u.length) ? /* @__PURE__ */ $(hn, {
557
+ dataLength: u.length,
558
+ next: jt,
540
559
  style: {
541
560
  display: "flex",
542
561
  flexDirection: "column-reverse",
543
562
  overflowX: "hidden"
544
563
  },
545
564
  inverse: !0,
546
- endMessage: p.length > Se && // 少于一页不展示这个提示
547
- ((Ae = T.current) != null && Ae.scrollTop) && ((Be = T.current) == null ? void 0 : Be.scrollTop) < -10 ? /* @__PURE__ */ a(qt, {
565
+ endMessage: u.length > tt && // 少于一页不展示这个提示
566
+ ((qe = E.current) != null && qe.scrollTop) && ((Ke = E.current) == null ? void 0 : Ke.scrollTop) < -10 ? /* @__PURE__ */ a(_t, {
548
567
  plain: !0,
549
568
  children: "没有更多数据了"
550
569
  }) : null,
551
- hasMore: bt,
570
+ hasMore: ze,
552
571
  loader: /* @__PURE__ */ a("div", {
553
572
  style: {
554
573
  height: "50px",
555
574
  textAlign: "center",
556
575
  overflow: "hidden"
557
576
  },
558
- children: /* @__PURE__ */ a(Wt, {})
577
+ children: /* @__PURE__ */ a(Gt, {})
559
578
  }),
560
579
  scrollableTarget: "scrollableDiv",
561
- children: p.map((t, n) => /* @__PURE__ */ a(gn, {
580
+ children: [u.map((t, n) => /* @__PURE__ */ a(yn, {
562
581
  application: o,
563
582
  currentSession: e,
564
583
  history: t,
565
584
  docViewerUrl: g,
566
585
  isLastHistory: n === 0,
567
- onRelatedClick: Ot,
568
- onAgainClick: Ht,
569
- onEditClick: Dt
570
- }, t.messageId + n))
571
- }) : /* @__PURE__ */ a("div", {
586
+ onRelatedClick: Ut,
587
+ onAgainClick: zt,
588
+ onEditClick: Ot
589
+ }, t.messageId + n)), !ze && ve]
590
+ }) : /* @__PURE__ */ $("div", {
572
591
  className: "main-empty",
573
- children: /* @__PURE__ */ a(on, we(ke({}, mn), {
574
- children: !!Ee.length && /* @__PURE__ */ a(nn, {
592
+ children: [/* @__PURE__ */ a(ln, be(we({}, vn), {
593
+ children: !!Ee.length && /* @__PURE__ */ a(sn, {
575
594
  ref: he,
576
- sid: (Ke = e == null ? void 0 : e.data) == null ? void 0 : Ke.id,
577
- isRecommendClearing: Te,
595
+ sid: (Ye = e == null ? void 0 : e.data) == null ? void 0 : Ye.id,
596
+ isRecommendClearing: Pe,
578
597
  data: Ee,
579
598
  onItemClick: (t) => {
580
599
  var l, i, r;
581
- if (J(t == null ? void 0 : t.question), K(t == null ? void 0 : t.question), Te)
600
+ if (J(t == null ? void 0 : t.question), K(t == null ? void 0 : t.question), Pe)
582
601
  return;
583
602
  t != null && t.id && G(!0);
584
603
  const n = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
585
604
  c != null && c.fileUpload ? (r = (i = ie.current) == null ? void 0 : i.clear()) == null || r.then(() => {
586
605
  var s;
587
- t != null && t.id && (n ? (s = Et(n, t)) == null || s.finally(() => {
606
+ t != null && t.id && (n ? (s = Rt(n, t)) == null || s.finally(() => {
588
607
  G(!1);
589
- }) : (G(!1), U(!0), Ve()));
590
- }) : n ? G(!1) : (G(!1), U(!0), Ve());
608
+ }) : (G(!1), O(!0), Ae()));
609
+ }) : n ? G(!1) : (G(!1), O(!0), Ae());
591
610
  }
592
611
  })
593
- }))
612
+ })), ve]
594
613
  })
595
- }), Oe && /* @__PURE__ */ a("div", {
614
+ }), Me && /* @__PURE__ */ a("div", {
596
615
  className: "session-stop",
597
- children: /* @__PURE__ */ a(Q, {
616
+ children: /* @__PURE__ */ a(W, {
598
617
  type: "primary",
599
618
  style: {
600
619
  background: "white"
601
620
  },
602
621
  ghost: !0,
603
622
  size: "small",
604
- icon: /* @__PURE__ */ a(be, {
623
+ icon: /* @__PURE__ */ a(xe, {
605
624
  type: "icon-zantinghuida",
606
625
  style: {
607
626
  fontSize: 16
608
627
  }
609
628
  }),
610
- onClick: () => Tt(),
629
+ onClick: () => Dt(),
611
630
  children: "停止回答"
612
631
  })
613
- }), He && (p == null ? void 0 : p.length) > 0 && /* @__PURE__ */ a("div", {
632
+ }), Oe && (u == null ? void 0 : u.length) > 0 && /* @__PURE__ */ a("div", {
614
633
  className: "back-bottom",
615
- children: /* @__PURE__ */ a(Q, {
634
+ children: /* @__PURE__ */ a(W, {
616
635
  size: "small",
617
- onClick: () => Pt({
636
+ onClick: () => Ht({
618
637
  behavior: "smooth"
619
638
  }),
620
639
  type: "link",
621
- icon: /* @__PURE__ */ a(be, {
640
+ icon: /* @__PURE__ */ a(xe, {
622
641
  type: "icon-yijianhuidaodibu",
623
642
  style: {
624
643
  fontSize: 24
@@ -628,32 +647,32 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
628
647
  })]
629
648
  }), /* @__PURE__ */ a("div", {
630
649
  className: "chat-footer",
631
- children: /* @__PURE__ */ W("div", {
650
+ children: /* @__PURE__ */ $("div", {
632
651
  className: "chat-footer-input",
633
652
  children: [_ && /* @__PURE__ */ a("div", {
634
653
  className: "input-files",
635
- children: /* @__PURE__ */ a(St, {
654
+ children: /* @__PURE__ */ a(tn, {
636
655
  file: _,
637
656
  actions: {
638
- upload: Ft,
657
+ upload: Pt,
639
658
  remove: () => {
640
- A(void 0);
659
+ B(void 0);
641
660
  }
642
661
  },
643
662
  onUrlChange: (t) => ee(t)
644
663
  })
645
- }), /* @__PURE__ */ W(re, {
664
+ }), /* @__PURE__ */ $(re, {
646
665
  className: "footer-upload-action",
647
666
  onClick: (t) => t.preventDefault(),
648
- children: [/* @__PURE__ */ W(re, {
649
- children: [o.type === 2 && (c == null ? void 0 : c.imageUpload) && /* @__PURE__ */ a(Qt, {
650
- disabled: !!_ || O,
667
+ children: [/* @__PURE__ */ $(re, {
668
+ children: [o.type === 2 && (c == null ? void 0 : c.imageUpload) && /* @__PURE__ */ a(Xt, {
669
+ disabled: !!_ || H,
651
670
  accept: ".jpg, .png, .jpeg,.bmp",
652
671
  listType: "picture-card",
653
- beforeUpload: Ct,
672
+ beforeUpload: Et,
654
673
  className: "footer-upload-picture",
655
674
  showUploadList: !1,
656
- children: _ ? /* @__PURE__ */ a(Q, {
675
+ children: _ ? /* @__PURE__ */ a(W, {
657
676
  type: "text",
658
677
  className: "camera-out-btn",
659
678
  style: {
@@ -661,20 +680,20 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
661
680
  position: "relative",
662
681
  bottom: "-2px"
663
682
  },
664
- disabled: !!_ || O,
665
- icon: /* @__PURE__ */ a(Je, {
683
+ disabled: !!_ || H,
684
+ icon: /* @__PURE__ */ a(et, {
666
685
  className: "icon-tianjia",
667
686
  style: {
668
687
  fontSize: "22px"
669
688
  }
670
689
  })
671
- }) : /* @__PURE__ */ a(Yt, {
690
+ }) : /* @__PURE__ */ a(Zt, {
672
691
  placement: "topLeft",
673
692
  overlayClassName: "footer-upload-tooltip",
674
693
  title: /* @__PURE__ */ a("div", {
675
694
  children: "支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"
676
695
  }),
677
- children: /* @__PURE__ */ a(Q, {
696
+ children: /* @__PURE__ */ a(W, {
678
697
  type: "text",
679
698
  className: "camera-out-btn",
680
699
  style: {
@@ -682,7 +701,7 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
682
701
  position: "relative",
683
702
  bottom: "-2px"
684
703
  },
685
- icon: /* @__PURE__ */ a(Je, {
704
+ icon: /* @__PURE__ */ a(et, {
686
705
  className: "icon-tianjia",
687
706
  style: {
688
707
  fontSize: "22px"
@@ -690,26 +709,26 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
690
709
  })
691
710
  })
692
711
  })
693
- }), ae && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ a(an, {
712
+ }), ae && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ a(cn, {
694
713
  appId: o == null ? void 0 : o.id,
695
714
  ref: ie,
696
715
  isFirstSession: Ue,
697
716
  docViewerUrl: g,
698
- onStatusChange: (t) => z(void 0, null, function* () {
717
+ onStatusChange: (t) => U(void 0, null, function* () {
699
718
  t !== "process" ? (oe(!0), ye()) : oe(!1);
700
719
  }),
701
720
  createSession: () => new Promise((t) => {
702
- U(!0), k == null || k({
721
+ O(!0), k == null || k({
703
722
  netOpen: D ? 1 : 2
704
723
  }).then((n) => {
705
724
  var i, r, s;
706
- v == null || v(n), U(!1), w(!!((i = n.data) != null && i.netOpen)), q(!!((r = n.data) != null && r.enableNetOpen));
725
+ v == null || v(n), O(!1), w(!!((i = n.data) != null && i.netOpen)), Y(!!((r = n.data) != null && r.enableNetOpen));
707
726
  const l = ((s = n.data) == null ? void 0 : s.id) || "";
708
727
  t(l);
709
728
  });
710
729
  }),
711
- sid: (qe = e == null ? void 0 : e.data) == null ? void 0 : qe.id,
712
- disabled: ge || O,
730
+ sid: (We = e == null ? void 0 : e.data) == null ? void 0 : We.id,
731
+ disabled: ge || H,
713
732
  afterFileAdd: (t, n) => {
714
733
  n && ne((l) => {
715
734
  const i = l[n] || [];
@@ -729,9 +748,9 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
729
748
  });
730
749
  },
731
750
  onFileListChange: (t) => {
732
- ht(t);
751
+ vt(t);
733
752
  },
734
- shouldContinue: mt,
753
+ shouldContinue: wt,
735
754
  afterFilesClear: () => {
736
755
  var n;
737
756
  const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
@@ -739,87 +758,87 @@ ${t}` : t, r = new Z(i, l, Y.User, n);
739
758
  [t]: []
740
759
  }), ye());
741
760
  }
742
- }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ a(sn, {
761
+ }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ a(rn, {
743
762
  appId: o.id,
744
763
  list: [],
745
- search: Pe ? dt : "",
764
+ search: Re ? pt : "",
746
765
  onPromptSelect: (t) => {
747
766
  K(t.context), J(t.context);
748
767
  },
749
- disabled: O
768
+ disabled: H
750
769
  })]
751
- }), /* @__PURE__ */ W(re, {
752
- children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((We = o.arrange) == null ? void 0 : We.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ a(pn, {
753
- sessionId: (Qe = e == null ? void 0 : e.data) == null ? void 0 : Qe.id,
770
+ }), /* @__PURE__ */ $(re, {
771
+ children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((Qe = o.arrange) == null ? void 0 : Qe.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ a(gn, {
772
+ sessionId: (_e = e == null ? void 0 : e.data) == null ? void 0 : _e.id,
754
773
  netStatus: D,
755
- enable: typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.diabled) == "boolean" ? !(f != null && f.connectNetwork.diabled) : xt,
774
+ enable: typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.diabled) == "boolean" ? !(f != null && f.connectNetwork.diabled) : Ct,
756
775
  disabledTip: e ? void 0 : "网络访问已被禁用",
757
776
  onNetStatusChange: (t) => {
758
- zt(t);
777
+ Vt(t);
759
778
  }
760
- }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ a(fn, {
761
- currentSessionId: (Ye = e == null ? void 0 : e.data) == null ? void 0 : Ye.id,
779
+ }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ a(pn, {
780
+ currentSessionId: (Ge = e == null ? void 0 : e.data) == null ? void 0 : Ge.id,
762
781
  onSessionChange: (t, n) => {
763
782
  K(void 0), v == null || v(n);
764
783
  },
765
- disabled: O
766
- }), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ a(Q, {
767
- icon: /* @__PURE__ */ a(rn, {}),
784
+ disabled: H
785
+ }), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ a(W, {
786
+ icon: /* @__PURE__ */ a(dn, {}),
768
787
  className: "add-btn",
769
788
  type: "primary",
770
- disabled: Oe || !e || !p.length || O,
789
+ disabled: Me || !e || !u.length || H,
771
790
  onClick: () => {
772
791
  var t, n;
773
- v == null || v(void 0), w(!1), (t = Re.current) == null || t.clear(), (n = he.current) == null || n.clear();
792
+ v == null || v(void 0), w(!1), (t = De.current) == null || t.clear(), (n = he.current) == null || n.clear();
774
793
  },
775
794
  children: "新会话"
776
795
  })]
777
796
  })]
778
797
  }), /* @__PURE__ */ a("div", {
779
798
  className: "footer-textarea",
780
- children: /* @__PURE__ */ a(tn, {
799
+ children: /* @__PURE__ */ a(on, {
781
800
  ref: pe,
782
- maxLength: st,
783
- text: ft,
801
+ maxLength: dt,
802
+ text: gt,
784
803
  networkStatus: !1,
785
- loading: ze,
786
- disabled: Ne || Fe || O || ze,
787
- onTextSend: Me,
804
+ loading: je,
805
+ disabled: Ne || Te || H || je,
806
+ onTextSend: Ve,
788
807
  onChange: (t, n) => {
789
808
  K(t);
790
809
  const l = n.getText().replace(/[\n\s]+$/, "");
791
- J(l), ct(l), Pe || at(!0);
810
+ J(l), ht(l), Re || ut(!0);
792
811
  },
793
812
  clearAction: /* @__PURE__ */ a(re, {
794
813
  size: 0,
795
- children: /* @__PURE__ */ a(Q, {
814
+ children: /* @__PURE__ */ a(W, {
796
815
  type: "link",
797
- disabled: ge || O,
816
+ disabled: ge || H,
798
817
  ghost: !0,
799
- icon: /* @__PURE__ */ a(be, {
818
+ icon: /* @__PURE__ */ a(xe, {
800
819
  style: {
801
820
  fontSize: 22
802
821
  },
803
822
  type: "icon-qingchujiyi"
804
823
  }),
805
- onClick: () => It()
824
+ onClick: () => Nt()
806
825
  })
807
826
  })
808
827
  })
809
828
  })]
810
829
  })
811
- }), /* @__PURE__ */ a(ln, {
812
- tips: it
813
- }), De && /* @__PURE__ */ a(dn, {
814
- isvisible: De,
815
- files: pt,
816
- sessionId: (_e = e == null ? void 0 : e.data) == null ? void 0 : _e.id,
830
+ }), /* @__PURE__ */ a(an, {
831
+ tips: rt
832
+ }), He && /* @__PURE__ */ a(fn, {
833
+ isvisible: He,
834
+ files: yt,
835
+ sessionId: (Xe = e == null ? void 0 : e.data) == null ? void 0 : Xe.id,
817
836
  onClose: (t) => {
818
- ut(!1), yt(!1);
837
+ mt(!1), bt(!1);
819
838
  }
820
839
  })]
821
840
  });
822
- }, Qn = yn;
841
+ };
823
842
  export {
824
843
  Qn as default
825
844
  };