@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.
- package/dist/es/AgentClientUI.mjs +40 -39
- package/dist/es/Dialog/AgentChat/index.mjs +283 -264
- package/dist/es/Dialog/AgentChat/style.less.mjs +4 -0
- package/dist/es/Dialog/ConnectToNetwork/index.mjs +19 -18
- package/dist/es/Dialog/ConnectToNetwork/style.less.mjs +4 -0
- package/dist/es/Dialog/FileCard/index.mjs +22 -21
- package/dist/es/Dialog/FileCard/style.less.mjs +4 -0
- package/dist/es/Dialog/FilePreview/index.mjs +14 -13
- package/dist/es/Dialog/FilePreview/style.less.mjs +4 -0
- package/dist/es/Dialog/Greeting/index.mjs +5 -4
- package/dist/es/Dialog/Greeting/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryContent/index.mjs +6 -5
- package/dist/es/Dialog/HistoryContent/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryItem/index.mjs +127 -125
- package/dist/es/Dialog/HistoryItem/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeDoc/index.mjs +23 -22
- package/dist/es/Dialog/KnowledgeDoc/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/index.mjs +14 -13
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/index.mjs +29 -28
- package/dist/es/Dialog/KnowledgeList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/PromptList/PromptListItem.mjs +19 -19
- package/dist/es/Dialog/PromptManager/PromptList/PublicPromptList.mjs +17 -16
- package/dist/es/Dialog/PromptManager/PromptList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/index.mjs +17 -16
- package/dist/es/Dialog/PromptManager/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptSetting/index.mjs +32 -32
- package/dist/es/Dialog/PromptSetting/style.less.mjs +4 -0
- package/dist/es/Dialog/Recommend/RecommendItem.mjs +12 -11
- package/dist/es/Dialog/Recommend/index.mjs +23 -23
- package/dist/es/Dialog/Recommend/style.less.mjs +4 -0
- package/dist/es/Dialog/ReferCollapse/index.mjs +29 -28
- package/dist/es/Dialog/ReferCollapse/style.less.mjs +4 -0
- package/dist/es/Dialog/SearchReference/index.mjs +13 -12
- package/dist/es/Dialog/SearchReference/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionAction/index.mjs +30 -29
- package/dist/es/Dialog/SessionAction/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionList/index.mjs +51 -51
- package/dist/es/Dialog/SessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +11 -10
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/SessionItem.mjs +15 -14
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +48 -47
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/index.mjs +9 -8
- package/dist/es/Dialog/SessionListDrawer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +26 -25
- package/dist/es/Dialog/SessionRefer/ReferItem/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/index.mjs +21 -20
- package/dist/es/Dialog/SessionRefer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRelated/index.mjs +18 -17
- package/dist/es/Dialog/SessionRelated/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/index.mjs +9 -8
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +117 -117
- package/dist/es/Dialog/UploadKnowledgeFiles/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadingPrompt/index.mjs +6 -5
- package/dist/es/Dialog/UploadingPrompt/style.less.mjs +4 -0
- package/dist/es/Dialog/index.mjs +58 -57
- package/dist/es/Dialog/style.less.mjs +4 -0
- package/dist/es/FileItem/index.mjs +23 -22
- package/dist/es/FileItem/style.less.mjs +4 -0
- package/dist/es/Footer/FooterWarning.mjs +14 -13
- package/dist/es/Footer/index.mjs +7 -6
- package/dist/es/Footer/style.less.mjs +4 -0
- package/dist/es/InputProgress/index.mjs +10 -9
- package/dist/es/InputProgress/style.less.mjs +4 -0
- package/dist/es/QuillEditor/index.mjs +34 -34
- package/dist/es/QuillEditor/style.less.mjs +4 -0
- package/dist/es/_virtual/_cloneBuffer.mjs +4 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +8 -0
- package/dist/es/_virtual/_nodeUtil.mjs +4 -0
- package/dist/es/_virtual/index.mjs +4 -0
- package/dist/es/_virtual/isBuffer.mjs +4 -0
- package/dist/es/_virtual/jsx-runtime.mjs +7 -0
- package/dist/es/_virtual/jsx-runtime2.mjs +4 -0
- package/dist/es/_virtual/lib.mjs +4 -0
- package/dist/es/_virtual/react-jsx-runtime.production.min.mjs +4 -0
- package/dist/es/_virtual/ua-parser.min.mjs +4 -0
- package/dist/es/components/Copy/index.mjs +21 -20
- package/dist/es/components/Copy/style.less.mjs +4 -0
- package/dist/es/components/JsonDisplay/index.mjs +5 -4
- package/dist/es/components/JsonDisplay/style.less.mjs +4 -0
- package/dist/es/components/Markdown/ATag/index.mjs +7 -7
- package/dist/es/components/Markdown/Code/index.mjs +33 -33
- package/dist/es/components/Markdown/Image/index.mjs +17 -16
- package/dist/es/components/Markdown/Video/index.mjs +13 -13
- package/dist/es/components/Markdown/index.mjs +36 -35
- package/dist/es/components/Markdown/style.less.mjs +4 -0
- package/dist/es/components/WebLink/index.mjs +9 -9
- package/dist/es/favicon.ico +0 -0
- package/dist/es/favicon2.ico +0 -0
- package/dist/es/font/font_4108228_4w5nlhafpte.js +1 -0
- package/dist/es/font/font_4439177_0sppkcnqiqgs.js +1 -0
- package/dist/es/font/gos-font.js +64 -0
- package/dist/es/images/empty.svg +40 -0
- package/dist/es/images/loading.gif +0 -0
- package/dist/es/images/logo.png +0 -0
- package/dist/es/images/map-example.png +0 -0
- package/dist/es/images/sketch.png +0 -0
- package/dist/es/index.html +43 -0
- package/dist/es/index.mjs +32 -26
- package/dist/es/logo192.png +0 -0
- package/dist/es/logo512.png +0 -0
- package/dist/es/manifest.json +25 -0
- package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +13 -0
- package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +201 -0
- package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +1087 -0
- package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +104 -0
- package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +568 -0
- package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +158 -0
- package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +847 -0
- package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +35 -0
- package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +226 -0
- package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +33 -0
- package/dist/es/node_modules/ahooks/es/useKeyPress/index.mjs +221 -0
- package/dist/es/node_modules/ahooks/es/useLatest/index.mjs +8 -0
- package/dist/es/node_modules/ahooks/es/useMemoizedFn/index.mjs +19 -0
- package/dist/es/node_modules/ahooks/es/useRafState/index.mjs +16 -0
- package/dist/es/node_modules/ahooks/es/useSize/index.mjs +34 -0
- package/dist/es/node_modules/ahooks/es/useUnmount/index.mjs +17 -0
- package/dist/es/node_modules/ahooks/es/useUnmountedRef/index.mjs +13 -0
- package/dist/es/node_modules/ahooks/es/utils/createEffectWithTarget.mjs +27 -0
- package/dist/es/node_modules/ahooks/es/utils/depsAreSame.mjs +11 -0
- package/dist/es/node_modules/ahooks/es/utils/depsEqual.mjs +7 -0
- package/dist/es/node_modules/ahooks/es/utils/domTarget.mjs +13 -0
- package/dist/es/node_modules/ahooks/es/utils/index.mjs +12 -0
- package/dist/es/node_modules/ahooks/es/utils/isAppleDevice.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/isBrowser.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/isDev.mjs +5 -0
- package/dist/es/node_modules/ahooks/es/utils/useDeepCompareWithTarget.mjs +11 -0
- package/dist/es/node_modules/ahooks/es/utils/useEffectWithTarget.mjs +7 -0
- package/dist/es/node_modules/ahooks/es/utils/useIsomorphicLayoutEffectWithTarget.mjs +8 -0
- package/dist/es/node_modules/ahooks/es/utils/useLayoutEffectWithTarget.mjs +7 -0
- package/dist/es/node_modules/antd/es/calendar/locale/zh_CN.mjs +4 -0
- package/dist/es/node_modules/antd/es/date-picker/locale/zh_CN.mjs +23 -0
- package/dist/es/node_modules/antd/es/locale/zh_CN.mjs +132 -0
- package/dist/es/node_modules/antd/es/time-picker/locale/zh_CN.mjs +8 -0
- package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +20 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +76 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +14 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +34 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +172 -0
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +81 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +84 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +5 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/global/index.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +141 -0
- package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +7 -0
- package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +4 -0
- package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +9 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +22 -0
- package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +46 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +12 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +13 -0
- package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +52 -0
- package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +10 -0
- package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +15 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +6 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +8 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +54 -0
- package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +32 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +11 -0
- package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +19 -0
- package/dist/es/node_modules/classnames/index.mjs +42 -0
- package/dist/es/node_modules/comma-separated-tokens/index.mjs +13 -0
- package/dist/es/node_modules/copy-to-clipboard/index.mjs +46 -0
- package/dist/es/node_modules/devlop/lib/default.mjs +5 -0
- package/dist/es/node_modules/hast-util-from-dom/lib/index.mjs +93 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/create-h.mjs +126 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/index.mjs +8 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/svg-case-sensitive-tag-names.mjs +4 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/create.mjs +14 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/defined-info.mjs +36 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/info.mjs +28 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/merge.mjs +10 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/schema.mjs +21 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/hast-util-from-html-isomorphic/lib/browser.mjs +16 -0
- package/dist/es/node_modules/hast-util-is-element/lib/index.mjs +61 -0
- package/dist/es/node_modules/hast-util-parse-selector/lib/index.mjs +20 -0
- package/dist/es/node_modules/hast-util-to-text/lib/index.mjs +223 -0
- package/dist/es/node_modules/katex/dist/katex.min.css.mjs +4 -0
- package/dist/es/node_modules/katex/dist/katex.mjs +11700 -0
- package/dist/es/node_modules/lodash/_Hash.mjs +22 -0
- package/dist/es/node_modules/lodash/_ListCache.mjs +22 -0
- package/dist/es/node_modules/lodash/_Map.mjs +6 -0
- package/dist/es/node_modules/lodash/_MapCache.mjs +22 -0
- package/dist/es/node_modules/lodash/_Stack.mjs +20 -0
- package/dist/es/node_modules/lodash/_Symbol.mjs +5 -0
- package/dist/es/node_modules/lodash/_Uint8Array.mjs +5 -0
- package/dist/es/node_modules/lodash/_apply.mjs +17 -0
- package/dist/es/node_modules/lodash/_arrayLikeKeys.mjs +21 -0
- package/dist/es/node_modules/lodash/_assignMergeValue.mjs +10 -0
- package/dist/es/node_modules/lodash/_assignValue.mjs +11 -0
- package/dist/es/node_modules/lodash/_assocIndexOf.mjs +12 -0
- package/dist/es/node_modules/lodash/_baseAssignValue.mjs +14 -0
- package/dist/es/node_modules/lodash/_baseCreate.mjs +17 -0
- package/dist/es/node_modules/lodash/_baseFor.mjs +5 -0
- package/dist/es/node_modules/lodash/_baseGetTag.mjs +11 -0
- package/dist/es/node_modules/lodash/_baseIsArguments.mjs +10 -0
- package/dist/es/node_modules/lodash/_baseIsNative.mjs +15 -0
- package/dist/es/node_modules/lodash/_baseIsTypedArray.mjs +13 -0
- package/dist/es/node_modules/lodash/_baseKeysIn.mjs +16 -0
- package/dist/es/node_modules/lodash/_baseMerge.mjs +22 -0
- package/dist/es/node_modules/lodash/_baseMergeDeep.mjs +33 -0
- package/dist/es/node_modules/lodash/_baseRest.mjs +11 -0
- package/dist/es/node_modules/lodash/_baseSetToString.mjs +14 -0
- package/dist/es/node_modules/lodash/_baseTimes.mjs +9 -0
- package/dist/es/node_modules/lodash/_baseTrim.mjs +9 -0
- package/dist/es/node_modules/lodash/_baseUnary.mjs +9 -0
- package/dist/es/node_modules/lodash/_cloneArrayBuffer.mjs +10 -0
- package/dist/es/node_modules/lodash/_cloneBuffer.mjs +17 -0
- package/dist/es/node_modules/lodash/_cloneTypedArray.mjs +10 -0
- package/dist/es/node_modules/lodash/_copyArray.mjs +10 -0
- package/dist/es/node_modules/lodash/_copyObject.mjs +16 -0
- package/dist/es/node_modules/lodash/_coreJsData.mjs +5 -0
- package/dist/es/node_modules/lodash/_createAssigner.mjs +17 -0
- package/dist/es/node_modules/lodash/_createBaseFor.mjs +14 -0
- package/dist/es/node_modules/lodash/_defineProperty.mjs +11 -0
- package/dist/es/node_modules/lodash/_freeGlobal.mjs +5 -0
- package/dist/es/node_modules/lodash/_getMapData.mjs +10 -0
- package/dist/es/node_modules/lodash/_getNative.mjs +11 -0
- package/dist/es/node_modules/lodash/_getPrototype.mjs +5 -0
- package/dist/es/node_modules/lodash/_getRawTag.mjs +16 -0
- package/dist/es/node_modules/lodash/_getValue.mjs +7 -0
- package/dist/es/node_modules/lodash/_hashClear.mjs +9 -0
- package/dist/es/node_modules/lodash/_hashDelete.mjs +8 -0
- package/dist/es/node_modules/lodash/_hashGet.mjs +14 -0
- package/dist/es/node_modules/lodash/_hashHas.mjs +10 -0
- package/dist/es/node_modules/lodash/_hashSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_initCloneObject.mjs +11 -0
- package/dist/es/node_modules/lodash/_isIndex.mjs +9 -0
- package/dist/es/node_modules/lodash/_isIterateeCall.mjs +15 -0
- package/dist/es/node_modules/lodash/_isKeyable.mjs +8 -0
- package/dist/es/node_modules/lodash/_isMasked.mjs +12 -0
- package/dist/es/node_modules/lodash/_isPrototype.mjs +9 -0
- package/dist/es/node_modules/lodash/_listCacheClear.mjs +7 -0
- package/dist/es/node_modules/lodash/_listCacheDelete.mjs +13 -0
- package/dist/es/node_modules/lodash/_listCacheGet.mjs +10 -0
- package/dist/es/node_modules/lodash/_listCacheHas.mjs +9 -0
- package/dist/es/node_modules/lodash/_listCacheSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_mapCacheClear.mjs +15 -0
- package/dist/es/node_modules/lodash/_mapCacheDelete.mjs +10 -0
- package/dist/es/node_modules/lodash/_mapCacheGet.mjs +9 -0
- package/dist/es/node_modules/lodash/_mapCacheHas.mjs +9 -0
- package/dist/es/node_modules/lodash/_mapCacheSet.mjs +10 -0
- package/dist/es/node_modules/lodash/_nativeCreate.mjs +5 -0
- package/dist/es/node_modules/lodash/_nativeKeysIn.mjs +11 -0
- package/dist/es/node_modules/lodash/_nodeUtil.mjs +17 -0
- package/dist/es/node_modules/lodash/_objectToString.mjs +8 -0
- package/dist/es/node_modules/lodash/_overArg.mjs +9 -0
- package/dist/es/node_modules/lodash/_overRest.mjs +16 -0
- package/dist/es/node_modules/lodash/_root.mjs +5 -0
- package/dist/es/node_modules/lodash/_safeGet.mjs +8 -0
- package/dist/es/node_modules/lodash/_setToString.mjs +6 -0
- package/dist/es/node_modules/lodash/_shortOut.mjs +17 -0
- package/dist/es/node_modules/lodash/_stackClear.mjs +9 -0
- package/dist/es/node_modules/lodash/_stackDelete.mjs +8 -0
- package/dist/es/node_modules/lodash/_stackGet.mjs +7 -0
- package/dist/es/node_modules/lodash/_stackHas.mjs +7 -0
- package/dist/es/node_modules/lodash/_stackSet.mjs +18 -0
- package/dist/es/node_modules/lodash/_toSource.mjs +18 -0
- package/dist/es/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
- package/dist/es/node_modules/lodash/constant.mjs +9 -0
- package/dist/es/node_modules/lodash/debounce.mjs +57 -0
- package/dist/es/node_modules/lodash/eq.mjs +7 -0
- package/dist/es/node_modules/lodash/identity.mjs +7 -0
- package/dist/es/node_modules/lodash/isArguments.mjs +10 -0
- package/dist/es/node_modules/lodash/isArray.mjs +4 -0
- package/dist/es/node_modules/lodash/isArrayLike.mjs +10 -0
- package/dist/es/node_modules/lodash/isArrayLikeObject.mjs +10 -0
- package/dist/es/node_modules/lodash/isBuffer.mjs +12 -0
- package/dist/es/node_modules/lodash/isFunction.mjs +13 -0
- package/dist/es/node_modules/lodash/isLength.mjs +8 -0
- package/dist/es/node_modules/lodash/isObject.mjs +8 -0
- package/dist/es/node_modules/lodash/isObjectLike.mjs +7 -0
- package/dist/es/node_modules/lodash/isPlainObject.mjs +17 -0
- package/dist/es/node_modules/lodash/isSymbol.mjs +10 -0
- package/dist/es/node_modules/lodash/isTypedArray.mjs +7 -0
- package/dist/es/node_modules/lodash/keysIn.mjs +11 -0
- package/dist/es/node_modules/lodash/merge.mjs +10 -0
- package/dist/es/node_modules/lodash/now.mjs +7 -0
- package/dist/es/node_modules/lodash/stubFalse.mjs +7 -0
- package/dist/es/node_modules/lodash/toNumber.mjs +23 -0
- package/dist/es/node_modules/lodash/toPlainObject.mjs +10 -0
- package/dist/es/node_modules/longest-streak/index.mjs +12 -0
- package/dist/es/node_modules/mdast-util-math/lib/index.mjs +170 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-flow.mjs +76 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-text.mjs +48 -0
- package/dist/es/node_modules/micromark-extension-math/lib/syntax.mjs +15 -0
- package/dist/es/node_modules/micromark-factory-space/index.mjs +15 -0
- package/dist/es/node_modules/micromark-util-character/index.mjs +10 -0
- package/dist/es/node_modules/object-assign/index.mjs +34 -0
- package/dist/es/node_modules/rc-pagination/es/locale/zh_CN.mjs +18 -0
- package/dist/es/node_modules/rc-picker/es/locale/zh_CN.mjs +31 -0
- package/dist/es/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +45 -0
- package/dist/es/node_modules/react/jsx-runtime.mjs +8 -0
- package/dist/es/node_modules/react-device-detect/dist/lib.mjs +723 -0
- package/dist/es/node_modules/react-fast-compare/index.mjs +78 -0
- package/dist/es/node_modules/react-infinite-scroll-component/dist/index.es.mjs +188 -0
- package/dist/es/node_modules/react-quill/dist/quill.snow.css.mjs +4 -0
- package/dist/es/node_modules/rehype-katex/lib/index.mjs +83 -0
- package/dist/es/node_modules/remark-math/lib/index.mjs +13 -0
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs +294 -0
- package/dist/es/node_modules/space-separated-tokens/index.mjs +7 -0
- package/dist/es/node_modules/toggle-selection/index.mjs +25 -0
- package/dist/es/node_modules/tslib/tslib.es6.mjs +64 -0
- package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +120 -0
- package/dist/es/node_modules/unist-util-find-after/lib/index.mjs +32 -0
- package/dist/es/node_modules/unist-util-is/lib/index.mjs +81 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/color.mjs +6 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/index.mjs +56 -0
- package/dist/es/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/native.mjs +4 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/rng.mjs +13 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
- package/dist/es/packages/agent-cli-ui/node_modules/uuid/dist/esm-browser/v4.mjs +23 -0
- package/dist/es/robots.txt +3 -0
- package/dist/es/style.less.mjs +4 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/favicon2.ico +0 -0
- package/dist/lib/font/font_4108228_4w5nlhafpte.js +1 -0
- package/dist/lib/font/font_4439177_0sppkcnqiqgs.js +1 -0
- package/dist/lib/font/gos-font.js +64 -0
- package/dist/lib/images/empty.svg +40 -0
- package/dist/lib/images/loading.gif +0 -0
- package/dist/lib/images/logo.png +0 -0
- package/dist/lib/images/map-example.png +0 -0
- package/dist/lib/images/sketch.png +0 -0
- package/dist/lib/index.html +43 -0
- package/dist/lib/index.js +311 -5
- package/dist/lib/logo192.png +0 -0
- package/dist/lib/logo512.png +0 -0
- package/dist/lib/manifest.json +25 -0
- package/dist/lib/robots.txt +3 -0
- package/dist/src/Dialog/HistoryItem/index.d.ts +1 -0
- package/dist/src/types.d.ts +1 -1
- package/package.json +6 -24
- package/dist/es/src/style.css +0 -1
- package/dist/es/src/style10.css +0 -1
- package/dist/es/src/style11.css +0 -1
- package/dist/es/src/style12.css +0 -1
- package/dist/es/src/style13.css +0 -1
- package/dist/es/src/style14.css +0 -1
- package/dist/es/src/style15.css +0 -1
- package/dist/es/src/style16.css +0 -1
- package/dist/es/src/style17.css +0 -1
- package/dist/es/src/style18.css +0 -1
- package/dist/es/src/style19.css +0 -1
- package/dist/es/src/style2.css +0 -1
- package/dist/es/src/style20.css +0 -1
- package/dist/es/src/style21.css +0 -1
- package/dist/es/src/style22.css +0 -1
- package/dist/es/src/style23.css +0 -1
- package/dist/es/src/style24.css +0 -0
- package/dist/es/src/style25.css +0 -1
- package/dist/es/src/style26.css +0 -1
- package/dist/es/src/style27.css +0 -1
- package/dist/es/src/style28.css +0 -1
- package/dist/es/src/style29.css +0 -1
- package/dist/es/src/style3.css +0 -1
- package/dist/es/src/style30.css +0 -1
- package/dist/es/src/style31.css +0 -1
- package/dist/es/src/style32.css +0 -1
- package/dist/es/src/style33.css +0 -1
- package/dist/es/src/style4.css +0 -1
- package/dist/es/src/style5.css +0 -1
- package/dist/es/src/style6.css +0 -1
- package/dist/es/src/style7.css +0 -1
- package/dist/es/src/style8.css +0 -1
- package/dist/es/src/style9.css +0 -1
- package/dist/lib/index.css +0 -1
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var g of
|
|
10
|
-
|
|
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
|
-
},
|
|
13
|
-
var P = (x, o, g) => (
|
|
14
|
-
var
|
|
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 (
|
|
19
|
-
k(
|
|
18
|
+
} catch (u) {
|
|
19
|
+
k(u);
|
|
20
20
|
}
|
|
21
21
|
}, v = (w) => {
|
|
22
22
|
try {
|
|
23
23
|
D(g.throw(w));
|
|
24
|
-
} catch (
|
|
25
|
-
k(
|
|
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 {
|
|
31
|
-
import { memo as
|
|
32
|
-
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import { MB as
|
|
40
|
-
import
|
|
41
|
-
import { getImageExtension as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import { CameraOutlined as
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
|
|
57
|
-
|
|
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 =
|
|
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
|
|
77
|
-
var
|
|
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, [
|
|
88
|
-
service:
|
|
88
|
+
} = x, [u, I] = p([]), [st, J] = p(), [de, Le] = p(), E = A(null), {
|
|
89
|
+
service: C,
|
|
89
90
|
agentClient: L,
|
|
90
|
-
depId:
|
|
91
|
-
footer:
|
|
91
|
+
depId: lt,
|
|
92
|
+
footer: rt,
|
|
92
93
|
transform: c,
|
|
93
94
|
defaultInput: ce,
|
|
94
95
|
onMessage: S,
|
|
95
|
-
onHistoryLoad:
|
|
96
|
-
beforeMessageSend:
|
|
97
|
-
bodyStyle:
|
|
98
|
-
disabled:
|
|
96
|
+
onHistoryLoad: Ce,
|
|
97
|
+
beforeMessageSend: z,
|
|
98
|
+
bodyStyle: at,
|
|
99
|
+
disabled: H,
|
|
99
100
|
features: f
|
|
100
|
-
} =
|
|
101
|
-
|
|
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 =
|
|
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),
|
|
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),
|
|
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]),
|
|
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 &&
|
|
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]),
|
|
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
|
|
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 =
|
|
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,
|
|
152
|
-
i.isContext = !0, I([i, ...
|
|
152
|
+
const i = new Z("", t, Q.System);
|
|
153
|
+
i.isContext = !0, I([i, ...u]);
|
|
153
154
|
});
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
-
o != null && o.id && (
|
|
157
|
-
|
|
156
|
+
N(() => {
|
|
157
|
+
o != null && o.id && (C == null || C.getRecommendQues(o.id).then((t) => {
|
|
158
|
+
ft(t);
|
|
158
159
|
}));
|
|
159
|
-
}, [
|
|
160
|
-
const
|
|
160
|
+
}, [lt, o]);
|
|
161
|
+
const Ve = (t) => U(void 0, null, function* () {
|
|
161
162
|
var b, m;
|
|
162
|
-
if (
|
|
163
|
+
if (H)
|
|
163
164
|
return R.error("发送功能被禁用");
|
|
164
|
-
const n = t ||
|
|
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 (!
|
|
177
|
+
if (!kt)
|
|
177
178
|
return R.error("正在解析文件");
|
|
178
|
-
if (
|
|
179
|
+
if (Te)
|
|
179
180
|
return R.error("正在上传图片");
|
|
180
|
-
|
|
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
|
|
187
|
-
|
|
188
|
-
v == null || v(y),
|
|
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 =
|
|
195
|
+
const r = q ? `
|
|
195
196
|
${n}` : n;
|
|
196
197
|
let s;
|
|
197
198
|
try {
|
|
198
|
-
|
|
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:
|
|
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 ?
|
|
215
|
-
}),
|
|
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
|
-
})),
|
|
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) =>
|
|
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
|
-
|
|
241
|
+
N(() => {
|
|
241
242
|
if (!de || !e)
|
|
242
243
|
return;
|
|
243
|
-
const t = de, n = () =>
|
|
244
|
+
const t = de, n = () => U(void 0, null, function* () {
|
|
244
245
|
le(!0);
|
|
245
|
-
const l =
|
|
246
|
+
const l = q ? `
|
|
246
247
|
${t}` : t;
|
|
247
248
|
let i;
|
|
248
249
|
try {
|
|
249
|
-
|
|
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:
|
|
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),
|
|
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) =>
|
|
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),
|
|
274
|
-
const i =
|
|
275
|
-
${t}` : t, r = new Z(i, l,
|
|
276
|
-
J(void 0), K(void 0), h.current = [r, ...
|
|
274
|
+
j(!0), M(!0);
|
|
275
|
+
const i = 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,
|
|
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((
|
|
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
|
|
289
|
-
b.formatValues =
|
|
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
|
|
293
|
-
b.knowledges =
|
|
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
|
-
|
|
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 !==
|
|
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 && (
|
|
311
|
-
return
|
|
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,
|
|
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 && (
|
|
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 && (
|
|
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]),
|
|
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]),
|
|
338
|
+
}, [e]), N(() => {
|
|
338
339
|
if (!L)
|
|
339
340
|
return;
|
|
340
341
|
const t = L.questionContextMaxLength || 4e3;
|
|
341
|
-
|
|
342
|
-
}, [L,
|
|
342
|
+
ct(t);
|
|
343
|
+
}, [L, C]), N(() => {
|
|
343
344
|
ce && K(ce.text);
|
|
344
345
|
}, [ce]);
|
|
345
|
-
const
|
|
346
|
+
const Et = (t) => {
|
|
346
347
|
const n = t.size;
|
|
347
|
-
return n <= 0 ? (R.error("该文件为空,请重新上传"), !1) : n > 20 *
|
|
348
|
-
},
|
|
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
|
|
351
|
-
|
|
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),
|
|
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
|
-
}),
|
|
359
|
-
const l =
|
|
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: [`${
|
|
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),
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
-
const b = (
|
|
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(""),
|
|
375
|
+
ee(""), B(void 0);
|
|
375
376
|
}).finally(() => {
|
|
376
377
|
ue(!1);
|
|
377
378
|
});
|
|
378
379
|
}).catch(() => {
|
|
379
|
-
ee(""),
|
|
380
|
+
ee(""), B(void 0), ue(!1);
|
|
380
381
|
});
|
|
381
382
|
});
|
|
382
383
|
};
|
|
383
|
-
|
|
384
|
-
const t =
|
|
385
|
-
t && !
|
|
384
|
+
N(() => {
|
|
385
|
+
const t = E.current;
|
|
386
|
+
t && !Oe && t.scrollTo({
|
|
386
387
|
top: t.scrollHeight
|
|
387
388
|
});
|
|
388
|
-
}, [
|
|
389
|
-
const
|
|
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(
|
|
393
|
+
const i = be(we({}, n.file), {
|
|
393
394
|
type: 1
|
|
394
395
|
});
|
|
395
|
-
|
|
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
|
-
}),
|
|
400
|
+
}), Dt = () => {
|
|
400
401
|
var t;
|
|
401
|
-
(t = e == null ? void 0 : e.data) != null && t.id && (
|
|
402
|
-
},
|
|
403
|
-
const n =
|
|
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
|
-
},
|
|
411
|
-
if (!
|
|
411
|
+
}, Mt = () => {
|
|
412
|
+
if (!E.current)
|
|
412
413
|
return;
|
|
413
|
-
const t =
|
|
414
|
-
|
|
415
|
-
},
|
|
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
|
-
}),
|
|
419
|
-
|
|
420
|
-
}),
|
|
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 = [...
|
|
425
|
-
const t = new Z("", e.data.id,
|
|
426
|
-
t.isWaiting = !0, h.current = [t, ...h.current], I(h.current), j(!0),
|
|
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
|
-
|
|
429
|
+
N(() => {
|
|
429
430
|
var t, n;
|
|
430
|
-
|
|
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
|
|
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 =
|
|
437
|
+
const n = u[u.length - 1].messageTime;
|
|
437
438
|
e.fetchMessages({
|
|
438
439
|
endTime: n,
|
|
439
|
-
pageSize:
|
|
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([...
|
|
447
|
+
r.length < 10 ? X(!1) : X(!0), I([...u, ...r.reverse()]);
|
|
447
448
|
});
|
|
448
|
-
},
|
|
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 = () =>
|
|
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),
|
|
461
|
-
}) : (w(!1),
|
|
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
|
-
|
|
464
|
+
N(() => {
|
|
464
465
|
ye();
|
|
465
|
-
}, [e]),
|
|
466
|
+
}, [e]), N(() => {
|
|
466
467
|
var t, n;
|
|
467
|
-
if (
|
|
468
|
-
const l = document.getElementById("chat-main"), i = (t =
|
|
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
|
-
}, [
|
|
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
|
|
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),
|
|
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
|
-
|
|
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(
|
|
516
|
-
ref:
|
|
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__ */
|
|
541
|
+
}), /* @__PURE__ */ $("div", {
|
|
523
542
|
className: "chat-main",
|
|
524
543
|
id: "chat-main",
|
|
525
|
-
style:
|
|
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:
|
|
536
|
-
onScroll:
|
|
537
|
-
children: (
|
|
538
|
-
dataLength:
|
|
539
|
-
next:
|
|
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:
|
|
547
|
-
((
|
|
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:
|
|
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(
|
|
577
|
+
children: /* @__PURE__ */ a(Gt, {})
|
|
559
578
|
}),
|
|
560
579
|
scrollableTarget: "scrollableDiv",
|
|
561
|
-
children:
|
|
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:
|
|
568
|
-
onAgainClick:
|
|
569
|
-
onEditClick:
|
|
570
|
-
}, t.messageId + n))
|
|
571
|
-
}) : /* @__PURE__ */
|
|
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(
|
|
574
|
-
children: !!Ee.length && /* @__PURE__ */ a(
|
|
592
|
+
children: [/* @__PURE__ */ a(ln, be(we({}, vn), {
|
|
593
|
+
children: !!Ee.length && /* @__PURE__ */ a(sn, {
|
|
575
594
|
ref: he,
|
|
576
|
-
sid: (
|
|
577
|
-
isRecommendClearing:
|
|
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),
|
|
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 =
|
|
606
|
+
t != null && t.id && (n ? (s = Rt(n, t)) == null || s.finally(() => {
|
|
588
607
|
G(!1);
|
|
589
|
-
}) : (G(!1),
|
|
590
|
-
}) : n ? G(!1) : (G(!1),
|
|
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
|
-
}),
|
|
614
|
+
}), Me && /* @__PURE__ */ a("div", {
|
|
596
615
|
className: "session-stop",
|
|
597
|
-
children: /* @__PURE__ */ a(
|
|
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(
|
|
623
|
+
icon: /* @__PURE__ */ a(xe, {
|
|
605
624
|
type: "icon-zantinghuida",
|
|
606
625
|
style: {
|
|
607
626
|
fontSize: 16
|
|
608
627
|
}
|
|
609
628
|
}),
|
|
610
|
-
onClick: () =>
|
|
629
|
+
onClick: () => Dt(),
|
|
611
630
|
children: "停止回答"
|
|
612
631
|
})
|
|
613
|
-
}),
|
|
632
|
+
}), Oe && (u == null ? void 0 : u.length) > 0 && /* @__PURE__ */ a("div", {
|
|
614
633
|
className: "back-bottom",
|
|
615
|
-
children: /* @__PURE__ */ a(
|
|
634
|
+
children: /* @__PURE__ */ a(W, {
|
|
616
635
|
size: "small",
|
|
617
|
-
onClick: () =>
|
|
636
|
+
onClick: () => Ht({
|
|
618
637
|
behavior: "smooth"
|
|
619
638
|
}),
|
|
620
639
|
type: "link",
|
|
621
|
-
icon: /* @__PURE__ */ a(
|
|
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__ */
|
|
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(
|
|
654
|
+
children: /* @__PURE__ */ a(tn, {
|
|
636
655
|
file: _,
|
|
637
656
|
actions: {
|
|
638
|
-
upload:
|
|
657
|
+
upload: Pt,
|
|
639
658
|
remove: () => {
|
|
640
|
-
|
|
659
|
+
B(void 0);
|
|
641
660
|
}
|
|
642
661
|
},
|
|
643
662
|
onUrlChange: (t) => ee(t)
|
|
644
663
|
})
|
|
645
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ $(re, {
|
|
646
665
|
className: "footer-upload-action",
|
|
647
666
|
onClick: (t) => t.preventDefault(),
|
|
648
|
-
children: [/* @__PURE__ */
|
|
649
|
-
children: [o.type === 2 && (c == null ? void 0 : c.imageUpload) && /* @__PURE__ */ a(
|
|
650
|
-
disabled: !!_ ||
|
|
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:
|
|
672
|
+
beforeUpload: Et,
|
|
654
673
|
className: "footer-upload-picture",
|
|
655
674
|
showUploadList: !1,
|
|
656
|
-
children: _ ? /* @__PURE__ */ a(
|
|
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: !!_ ||
|
|
665
|
-
icon: /* @__PURE__ */ a(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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) =>
|
|
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
|
-
|
|
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),
|
|
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: (
|
|
712
|
-
disabled: ge ||
|
|
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
|
-
|
|
751
|
+
vt(t);
|
|
733
752
|
},
|
|
734
|
-
shouldContinue:
|
|
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(
|
|
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:
|
|
764
|
+
search: Re ? pt : "",
|
|
746
765
|
onPromptSelect: (t) => {
|
|
747
766
|
K(t.context), J(t.context);
|
|
748
767
|
},
|
|
749
|
-
disabled:
|
|
768
|
+
disabled: H
|
|
750
769
|
})]
|
|
751
|
-
}), /* @__PURE__ */
|
|
752
|
-
children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((
|
|
753
|
-
sessionId: (
|
|
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) :
|
|
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
|
-
|
|
777
|
+
Vt(t);
|
|
759
778
|
}
|
|
760
|
-
}), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ a(
|
|
761
|
-
currentSessionId: (
|
|
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:
|
|
766
|
-
}), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ a(
|
|
767
|
-
icon: /* @__PURE__ */ a(
|
|
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:
|
|
789
|
+
disabled: Me || !e || !u.length || H,
|
|
771
790
|
onClick: () => {
|
|
772
791
|
var t, n;
|
|
773
|
-
v == null || v(void 0), w(!1), (t =
|
|
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(
|
|
799
|
+
children: /* @__PURE__ */ a(on, {
|
|
781
800
|
ref: pe,
|
|
782
|
-
maxLength:
|
|
783
|
-
text:
|
|
801
|
+
maxLength: dt,
|
|
802
|
+
text: gt,
|
|
784
803
|
networkStatus: !1,
|
|
785
|
-
loading:
|
|
786
|
-
disabled: Ne ||
|
|
787
|
-
onTextSend:
|
|
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),
|
|
810
|
+
J(l), ht(l), Re || ut(!0);
|
|
792
811
|
},
|
|
793
812
|
clearAction: /* @__PURE__ */ a(re, {
|
|
794
813
|
size: 0,
|
|
795
|
-
children: /* @__PURE__ */ a(
|
|
814
|
+
children: /* @__PURE__ */ a(W, {
|
|
796
815
|
type: "link",
|
|
797
|
-
disabled: ge ||
|
|
816
|
+
disabled: ge || H,
|
|
798
817
|
ghost: !0,
|
|
799
|
-
icon: /* @__PURE__ */ a(
|
|
818
|
+
icon: /* @__PURE__ */ a(xe, {
|
|
800
819
|
style: {
|
|
801
820
|
fontSize: 22
|
|
802
821
|
},
|
|
803
822
|
type: "icon-qingchujiyi"
|
|
804
823
|
}),
|
|
805
|
-
onClick: () =>
|
|
824
|
+
onClick: () => Nt()
|
|
806
825
|
})
|
|
807
826
|
})
|
|
808
827
|
})
|
|
809
828
|
})]
|
|
810
829
|
})
|
|
811
|
-
}), /* @__PURE__ */ a(
|
|
812
|
-
tips:
|
|
813
|
-
}),
|
|
814
|
-
isvisible:
|
|
815
|
-
files:
|
|
816
|
-
sessionId: (
|
|
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
|
-
|
|
837
|
+
mt(!1), bt(!1);
|
|
819
838
|
}
|
|
820
839
|
})]
|
|
821
840
|
});
|
|
822
|
-
}
|
|
841
|
+
};
|
|
823
842
|
export {
|
|
824
843
|
Qn as default
|
|
825
844
|
};
|