@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
|
@@ -2,78 +2,79 @@ var z = (L, P, u) => new Promise((a, C) => {
|
|
|
2
2
|
var R = (h) => {
|
|
3
3
|
try {
|
|
4
4
|
S(u.next(h));
|
|
5
|
-
} catch (
|
|
6
|
-
C(
|
|
5
|
+
} catch (F) {
|
|
6
|
+
C(F);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, U = (h) => {
|
|
9
9
|
try {
|
|
10
10
|
S(u.throw(h));
|
|
11
|
-
} catch (
|
|
12
|
-
C(
|
|
11
|
+
} catch (F) {
|
|
12
|
+
C(F);
|
|
13
13
|
}
|
|
14
|
-
}, S = (h) => h.done ? a(h.value) : Promise.resolve(h.value).then(R,
|
|
14
|
+
}, S = (h) => h.done ? a(h.value) : Promise.resolve(h.value).then(R, U);
|
|
15
15
|
S((u = u.apply(L, P)).next());
|
|
16
16
|
});
|
|
17
|
-
import { jsx as r, Fragment as
|
|
18
|
-
import { message as p, Upload as W, Button as
|
|
19
|
-
import { forwardRef as
|
|
20
|
-
import { LoadingOutlined as
|
|
21
|
-
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
|
|
17
|
+
import { jsx as r, Fragment as ce, jsxs as N } from "../../_virtual/jsx-runtime.mjs";
|
|
18
|
+
import { message as p, Upload as W, Button as M, Badge as ue, Spin as fe, Popover as pe, Space as he } from "antd";
|
|
19
|
+
import { forwardRef as me, useState as A, useRef as G, useContext as ge, useEffect as w, useImperativeHandle as ye } from "react";
|
|
20
|
+
import { LoadingOutlined as xe, CloseCircleFilled as Se, CloudUploadOutlined as Ne } from "@ant-design/icons";
|
|
21
|
+
import "./style.less.mjs";
|
|
22
|
+
import Fe from "../../node_modules/lodash/debounce.mjs";
|
|
23
|
+
import we from "../FileCard/index.mjs";
|
|
24
|
+
import { IFileOrigin as Ce } from "@glodon-aiot/apis";
|
|
25
|
+
import be from "./ClearModal/index.mjs";
|
|
26
|
+
import j from "../../Iconfont/index.mjs";
|
|
27
|
+
import Ie from "../../context.mjs";
|
|
28
|
+
import { isValidImageUrlWithAnyExtension as Ee, extractFileName as ze, FILE_NAME_MAX_LENGTH as X, fileTypes as Ae } from "../../utils/index.mjs";
|
|
29
|
+
import { MB as Ue } from "../../constant.mjs";
|
|
30
|
+
const ke = me((L, P) => {
|
|
30
31
|
const {
|
|
31
32
|
appId: u,
|
|
32
33
|
sid: a,
|
|
33
34
|
onStatusChange: C,
|
|
34
35
|
createSession: R,
|
|
35
|
-
disabled:
|
|
36
|
+
disabled: U = !1,
|
|
36
37
|
afterFileAdd: S,
|
|
37
38
|
afterFileDelete: h,
|
|
38
|
-
onFileListChange:
|
|
39
|
+
onFileListChange: F,
|
|
39
40
|
shouldContinue: D = !0,
|
|
40
|
-
afterFilesClear:
|
|
41
|
-
docViewerUrl:
|
|
42
|
-
isFirstSession:
|
|
43
|
-
} = L, [i, f] =
|
|
44
|
-
Dragger:
|
|
41
|
+
afterFilesClear: K,
|
|
42
|
+
docViewerUrl: q,
|
|
43
|
+
isFirstSession: J
|
|
44
|
+
} = L, [i, f] = A([]), c = G(i), [Q, k] = A([]), [Y, T] = A(!1), [b, v] = A(""), I = G(D), [$, B] = A(!1), {
|
|
45
|
+
Dragger: Z
|
|
45
46
|
} = W, {
|
|
46
47
|
service: o,
|
|
47
48
|
popupContainer: m
|
|
48
|
-
} =
|
|
49
|
+
} = ge(Ie);
|
|
49
50
|
w(() => {
|
|
50
51
|
I.current = D;
|
|
51
|
-
}, [D]),
|
|
52
|
+
}, [D]), ye(P, () => ({
|
|
52
53
|
update: H,
|
|
53
54
|
clear: _
|
|
54
55
|
})), w(() => {
|
|
55
|
-
|
|
56
|
+
J || (k([]), f([]), H());
|
|
56
57
|
}, [a]);
|
|
57
58
|
const H = () => a ? new Promise((e, s) => {
|
|
58
59
|
o == null || o.getApplicationIdSessionKnowledgeFiles(u, a, {
|
|
59
60
|
enabled: 1
|
|
60
|
-
}).then((
|
|
61
|
-
k(
|
|
61
|
+
}).then((n) => {
|
|
62
|
+
k(n), f(n), ee(n);
|
|
62
63
|
}).finally(() => {
|
|
63
64
|
e();
|
|
64
65
|
});
|
|
65
|
-
}) : Promise.resolve(),
|
|
66
|
+
}) : Promise.resolve(), ee = (e) => z(void 0, null, function* () {
|
|
66
67
|
a && (e == null || e.map((s) => z(void 0, null, function* () {
|
|
67
|
-
var
|
|
68
|
+
var n;
|
|
68
69
|
try {
|
|
69
70
|
if (yield o == null ? void 0 : o.checkFileReady(u, a, s.id)) {
|
|
70
|
-
const
|
|
71
|
-
g !== -1 && (
|
|
71
|
+
const d = [...c.current], g = e.findIndex((l) => l.id === s.id);
|
|
72
|
+
g !== -1 && (d[g].status = 2), f(d), S && S(s, a);
|
|
72
73
|
}
|
|
73
|
-
} catch (
|
|
74
|
-
if (((
|
|
75
|
-
const
|
|
76
|
-
g !== -1 && (
|
|
74
|
+
} catch (t) {
|
|
75
|
+
if (((n = t.cause) == null ? void 0 : n.code) === -101) {
|
|
76
|
+
const d = [...c.current], g = e.findIndex((l) => l.id === s.id);
|
|
77
|
+
g !== -1 && (d[g].status = 3), f(d);
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
@@ -89,15 +90,15 @@ const q = ge((L, P) => {
|
|
|
89
90
|
const O = (e) => z(void 0, null, function* () {
|
|
90
91
|
if (e.size <= 0)
|
|
91
92
|
return p.error("该文件为空,请重新上传文档"), !1;
|
|
92
|
-
if (
|
|
93
|
+
if (ze(e.name).length > X)
|
|
93
94
|
return p.error(`文件名称不能超过${X}字符`), !1;
|
|
94
|
-
if (e.size > 50 *
|
|
95
|
+
if (e.size > 50 * Ue)
|
|
95
96
|
return p.error(`${e.name}文件大小不能超过 50M`), !1;
|
|
96
|
-
if (Ae.some((
|
|
97
|
-
const
|
|
98
|
-
|
|
97
|
+
if (Ae.some((t) => t === e.type)) {
|
|
98
|
+
const t = e;
|
|
99
|
+
t.status = 1, f((d) => d.length >= 10 ? d : [...d, t]);
|
|
99
100
|
} else
|
|
100
|
-
|
|
101
|
+
oe("存在文件格式不正确的文件,已自动去除");
|
|
101
102
|
return !1;
|
|
102
103
|
});
|
|
103
104
|
w(() => {
|
|
@@ -105,68 +106,68 @@ const q = ge((L, P) => {
|
|
|
105
106
|
v("");
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
108
|
-
const e = i.find((
|
|
109
|
-
i.every((
|
|
109
|
+
const e = i.find((t) => t.status === 1), s = i.find((t) => t.status === 3);
|
|
110
|
+
i.every((t) => t.status === 2) ? v("successed") : e ? v("process") : s && v("failed"), F && F(i);
|
|
110
111
|
}, [i]), w(() => {
|
|
111
112
|
c.current = i;
|
|
112
|
-
const e = i.filter((s) => !
|
|
113
|
-
|
|
113
|
+
const e = i.filter((s) => !Q.includes(s));
|
|
114
|
+
re(e), k(i);
|
|
114
115
|
}, [i]);
|
|
115
|
-
const te = (e, s,
|
|
116
|
+
const te = (e, s, n) => z(void 0, null, function* () {
|
|
116
117
|
var g;
|
|
117
|
-
const
|
|
118
|
-
|
|
118
|
+
const t = [...c.current], d = c.current.findIndex((l) => l === n);
|
|
119
|
+
d !== -1 && (t[d].id = s), f(t);
|
|
119
120
|
try {
|
|
120
|
-
const
|
|
121
|
-
const x = [...c.current], E = c.current.findIndex((
|
|
121
|
+
const l = yield o == null ? void 0 : o.checkFileReady(u, e, s, () => I.current, void 0, (y) => {
|
|
122
|
+
const x = [...c.current], E = c.current.findIndex((le) => le === n);
|
|
122
123
|
x[E].url = y.url, f(x);
|
|
123
124
|
});
|
|
124
|
-
if (
|
|
125
|
-
const y = [...c.current], x = c.current.findIndex((E) => E ===
|
|
126
|
-
x !== -1 && (y[x].status = 2, y[x].url =
|
|
125
|
+
if (l) {
|
|
126
|
+
const y = [...c.current], x = c.current.findIndex((E) => E === n);
|
|
127
|
+
x !== -1 && (y[x].status = 2, y[x].url = l.url), f(y), S && S(l, e);
|
|
127
128
|
}
|
|
128
|
-
} catch (
|
|
129
|
-
if (((g =
|
|
130
|
-
const y = [...c.current], x = c.current.findIndex((E) => E ===
|
|
129
|
+
} catch (l) {
|
|
130
|
+
if (((g = l.cause) == null ? void 0 : g.code) === -101) {
|
|
131
|
+
const y = [...c.current], x = c.current.findIndex((E) => E === n);
|
|
131
132
|
x !== -1 && (y[x].status = 3), f(y);
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
|
-
}),
|
|
136
|
-
e.length &&
|
|
137
|
-
e == null || e.forEach((
|
|
138
|
-
var
|
|
139
|
-
I.current = !0, (
|
|
140
|
-
var
|
|
141
|
-
if (!
|
|
136
|
+
}), ne = () => a ? Promise.resolve(a) : R(), re = (e) => {
|
|
137
|
+
e.length && ne().then((s) => {
|
|
138
|
+
e == null || e.forEach((n) => {
|
|
139
|
+
var t;
|
|
140
|
+
I.current = !0, (t = de(s, n)) == null || t.then((d) => {
|
|
141
|
+
var l;
|
|
142
|
+
if (!d)
|
|
142
143
|
return;
|
|
143
144
|
const g = {
|
|
144
|
-
url:
|
|
145
|
-
name:
|
|
146
|
-
size:
|
|
145
|
+
url: d,
|
|
146
|
+
name: n.name,
|
|
147
|
+
size: n.size,
|
|
147
148
|
type: 1,
|
|
148
|
-
origin:
|
|
149
|
+
origin: Ce.AECPILOT
|
|
149
150
|
};
|
|
150
|
-
I.current && ((
|
|
151
|
+
I.current && ((l = se(s, g)) == null || l.then((y) => te(s, y, n)));
|
|
151
152
|
});
|
|
152
153
|
});
|
|
153
154
|
});
|
|
154
|
-
},
|
|
155
|
+
}, se = (e, s) => o == null ? void 0 : o.postApplicationIdSessionKnowledgeSessionFile(u, e, s), oe = Fe((e) => {
|
|
155
156
|
p.error(e);
|
|
156
|
-
}, 300),
|
|
157
|
+
}, 300), ie = (e) => {
|
|
157
158
|
a && e != null && e.id && (o == null || o.delApplicationIdSessionKnowledgeFileId(u, a, e.id).then((s) => {
|
|
158
|
-
const
|
|
159
|
-
f(
|
|
159
|
+
const n = i.filter((t) => t.id !== e.id);
|
|
160
|
+
f(n), p.config({
|
|
160
161
|
getContainer: () => (m == null ? void 0 : m.current) || document.body
|
|
161
162
|
}), p.success("删除成功"), h && h(e.id);
|
|
162
163
|
}));
|
|
163
|
-
},
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
}, ae = /* @__PURE__ */ r(ce, {
|
|
165
|
+
children: /* @__PURE__ */ N("div", {
|
|
165
166
|
className: "card-title",
|
|
166
167
|
children: [/* @__PURE__ */ r("span", {
|
|
167
168
|
className: "name",
|
|
168
169
|
children: "上传列表"
|
|
169
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ N("div", {
|
|
170
171
|
className: "actions",
|
|
171
172
|
children: [/* @__PURE__ */ r(W, {
|
|
172
173
|
accept: ".doc, .docx, .pdf",
|
|
@@ -176,13 +177,13 @@ const q = ge((L, P) => {
|
|
|
176
177
|
margin: 0
|
|
177
178
|
},
|
|
178
179
|
multiple: !0,
|
|
179
|
-
children: /* @__PURE__ */ r(
|
|
180
|
+
children: /* @__PURE__ */ r(M, {
|
|
180
181
|
className: "action",
|
|
181
182
|
type: "link",
|
|
182
|
-
disabled:
|
|
183
|
-
children: /* @__PURE__ */
|
|
183
|
+
disabled: Y,
|
|
184
|
+
children: /* @__PURE__ */ N("div", {
|
|
184
185
|
className: "detail",
|
|
185
|
-
children: [/* @__PURE__ */ r(
|
|
186
|
+
children: [/* @__PURE__ */ r(j, {
|
|
186
187
|
type: "icon-tianjia",
|
|
187
188
|
style: {
|
|
188
189
|
fontSize: 16
|
|
@@ -192,16 +193,16 @@ const q = ge((L, P) => {
|
|
|
192
193
|
})]
|
|
193
194
|
})
|
|
194
195
|
})
|
|
195
|
-
}), /* @__PURE__ */ r(
|
|
196
|
+
}), /* @__PURE__ */ r(M, {
|
|
196
197
|
className: "action",
|
|
197
198
|
type: "link",
|
|
198
199
|
disabled: !i.length,
|
|
199
200
|
onClick: () => {
|
|
200
201
|
B(!0);
|
|
201
202
|
},
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ N("div", {
|
|
203
204
|
className: "detail",
|
|
204
|
-
children: [/* @__PURE__ */ r(
|
|
205
|
+
children: [/* @__PURE__ */ r(j, {
|
|
205
206
|
type: "icon-shanchu",
|
|
206
207
|
style: {
|
|
207
208
|
fontSize: 16
|
|
@@ -218,25 +219,25 @@ const q = ge((L, P) => {
|
|
|
218
219
|
throw Error("session is not exist.");
|
|
219
220
|
return o == null ? void 0 : o.uploadFile(e, s).catch(() => (p.error("服务异常,请稍后再试"), ""));
|
|
220
221
|
}, V = /* @__PURE__ */ r("div", {
|
|
221
|
-
className: `upload-enter ${
|
|
222
|
-
children: /* @__PURE__ */ r(
|
|
222
|
+
className: `upload-enter ${U ? "disabled" : ""}`,
|
|
223
|
+
children: /* @__PURE__ */ r(ue, {
|
|
223
224
|
size: "small",
|
|
224
225
|
color: "#9C24F2",
|
|
225
|
-
count: b === "successed" ? i.length : b === "process" ? /* @__PURE__ */ r(
|
|
226
|
+
count: b === "successed" ? i.length : b === "process" ? /* @__PURE__ */ r(fe, {
|
|
226
227
|
className: "file-action file-process",
|
|
227
|
-
indicator: /* @__PURE__ */ r(
|
|
228
|
+
indicator: /* @__PURE__ */ r(xe, {
|
|
228
229
|
style: {
|
|
229
230
|
fontSize: 14
|
|
230
231
|
},
|
|
231
232
|
spin: !0
|
|
232
233
|
})
|
|
233
|
-
}) : b === "failed" ? /* @__PURE__ */ r(
|
|
234
|
+
}) : b === "failed" ? /* @__PURE__ */ r(Se, {
|
|
234
235
|
style: {
|
|
235
236
|
color: "#dc4446",
|
|
236
237
|
fontSize: 14
|
|
237
238
|
}
|
|
238
239
|
}) : 0,
|
|
239
|
-
children: /* @__PURE__ */ r(
|
|
240
|
+
children: /* @__PURE__ */ r(j, {
|
|
240
241
|
type: "icon-shangchuanwenjian",
|
|
241
242
|
style: {
|
|
242
243
|
fontSize: 24
|
|
@@ -247,19 +248,19 @@ const q = ge((L, P) => {
|
|
|
247
248
|
const s = c.current;
|
|
248
249
|
if (!a)
|
|
249
250
|
return e();
|
|
250
|
-
const
|
|
251
|
-
s.filter((
|
|
252
|
-
id:
|
|
253
|
-
status:
|
|
251
|
+
const n = [];
|
|
252
|
+
s.filter((t) => t.id).forEach((t) => n.push({
|
|
253
|
+
id: t.id,
|
|
254
|
+
status: t.status
|
|
254
255
|
})), o == null || o.delApplicationIdSessionKnowledgeFile(u, a, {
|
|
255
|
-
files:
|
|
256
|
+
files: n
|
|
256
257
|
}).then(() => {
|
|
257
|
-
k([]), f([]), c.current = [],
|
|
258
|
+
k([]), f([]), c.current = [], K && K(), I.current = !1, e();
|
|
258
259
|
});
|
|
259
260
|
});
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ N("div", {
|
|
261
262
|
className: "footer-upload",
|
|
262
|
-
children: [
|
|
263
|
+
children: [U ? V : /* @__PURE__ */ r(pe, {
|
|
263
264
|
overlayClassName: "upload-popover",
|
|
264
265
|
overlayInnerStyle: {
|
|
265
266
|
width: 264,
|
|
@@ -280,33 +281,33 @@ const q = ge((L, P) => {
|
|
|
280
281
|
display: "flex",
|
|
281
282
|
flexDirection: "column"
|
|
282
283
|
},
|
|
283
|
-
children: i == null ? void 0 : i.map((e, s) => /* @__PURE__ */ r(
|
|
284
|
+
children: i == null ? void 0 : i.map((e, s) => /* @__PURE__ */ r(we, {
|
|
284
285
|
file: e,
|
|
285
286
|
actions: {
|
|
286
287
|
preview: () => {
|
|
287
288
|
if (!(e != null && e.url))
|
|
288
289
|
return p.error("正在上传中");
|
|
289
|
-
if (!
|
|
290
|
+
if (!Ee(e.url))
|
|
290
291
|
return p.error("链接格式不正确");
|
|
291
|
-
window.open(`${
|
|
292
|
+
window.open(`${q}#/doc?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
|
|
292
293
|
},
|
|
293
294
|
remove: () => {
|
|
294
|
-
|
|
295
|
+
ie(e);
|
|
295
296
|
},
|
|
296
297
|
download: () => {
|
|
297
|
-
a && (o == null || o.getApplicationIdSessionKnowledgeFileId(u, a, e.id).then((
|
|
298
|
-
if (!(
|
|
298
|
+
a && (o == null || o.getApplicationIdSessionKnowledgeFileId(u, a, e.id).then((n) => {
|
|
299
|
+
if (!(n != null && n.url)) {
|
|
299
300
|
p.error("下载失败");
|
|
300
301
|
return;
|
|
301
302
|
}
|
|
302
|
-
const
|
|
303
|
-
|
|
303
|
+
const t = document.createElement("a");
|
|
304
|
+
t.href = n.url, t.download = n.name || "", t.click();
|
|
304
305
|
}));
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
}, s))
|
|
308
309
|
})
|
|
309
|
-
}) : /* @__PURE__ */
|
|
310
|
+
}) : /* @__PURE__ */ N(Z, {
|
|
310
311
|
name: "file",
|
|
311
312
|
showUploadList: !1,
|
|
312
313
|
multiple: !0,
|
|
@@ -317,16 +318,16 @@ const q = ge((L, P) => {
|
|
|
317
318
|
children: [/* @__PURE__ */ r("span", {
|
|
318
319
|
className: "file-upload-icon",
|
|
319
320
|
children: /* @__PURE__ */ r(Ne, {})
|
|
320
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ N(he, {
|
|
321
322
|
className: "file-upload-action",
|
|
322
|
-
children: ["拖拽文件至此,或者", /* @__PURE__ */ r(
|
|
323
|
+
children: ["拖拽文件至此,或者", /* @__PURE__ */ r(M, {
|
|
323
324
|
type: "link",
|
|
324
325
|
style: {
|
|
325
326
|
padding: 0
|
|
326
327
|
},
|
|
327
328
|
children: "上传文件"
|
|
328
329
|
})]
|
|
329
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ N("div", {
|
|
330
331
|
className: "file-upload-desc",
|
|
331
332
|
children: [/* @__PURE__ */ r("div", {
|
|
332
333
|
className: "item-upload-desc",
|
|
@@ -343,10 +344,10 @@ const q = ge((L, P) => {
|
|
|
343
344
|
})]
|
|
344
345
|
})
|
|
345
346
|
}),
|
|
346
|
-
title:
|
|
347
|
+
title: ae,
|
|
347
348
|
trigger: "click",
|
|
348
349
|
children: V
|
|
349
|
-
}), $ && /* @__PURE__ */ r(
|
|
350
|
+
}), $ && /* @__PURE__ */ r(be, {
|
|
350
351
|
isvisible: $,
|
|
351
352
|
onClose: (e) => {
|
|
352
353
|
e === "clear" && _(), B(!1);
|
|
@@ -354,8 +355,7 @@ const q = ge((L, P) => {
|
|
|
354
355
|
})]
|
|
355
356
|
});
|
|
356
357
|
});
|
|
357
|
-
|
|
358
|
-
const We = q;
|
|
358
|
+
ke.displayName = "UploadFiles";
|
|
359
359
|
export {
|
|
360
|
-
|
|
360
|
+
ke as default
|
|
361
361
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as e, jsxs as p } from "
|
|
1
|
+
import { jsx as e, jsxs as p } from "../../_virtual/jsx-runtime.mjs";
|
|
2
2
|
import { ExclamationCircleFilled as f } from "@ant-design/icons";
|
|
3
3
|
import { Modal as u, Button as s } from "antd";
|
|
4
4
|
import { useContext as h } from "react";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import "./style.less.mjs";
|
|
6
|
+
import C from "../../context.mjs";
|
|
7
|
+
const E = (r) => {
|
|
7
8
|
const {
|
|
8
9
|
files: a,
|
|
9
10
|
sessionId: l,
|
|
@@ -58,7 +59,7 @@ const g = (r) => {
|
|
|
58
59
|
children: "你可以选择后台继续上传,也可以直接离开放弃上传中的文件。"
|
|
59
60
|
})
|
|
60
61
|
});
|
|
61
|
-
}
|
|
62
|
+
};
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
E as default
|
|
64
65
|
};
|
package/dist/es/Dialog/index.mjs
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var x = (t,
|
|
6
|
-
for (var s in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var s of
|
|
10
|
-
|
|
1
|
+
var q = Object.defineProperty, z = Object.defineProperties;
|
|
2
|
+
var B = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var L = Object.getOwnPropertySymbols;
|
|
4
|
+
var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var x = (t, n, s) => n in t ? q(t, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[n] = s, j = (t, n) => {
|
|
6
|
+
for (var s in n || (n = {}))
|
|
7
|
+
F.call(n, s) && x(t, s, n[s]);
|
|
8
|
+
if (L)
|
|
9
|
+
for (var s of L(n))
|
|
10
|
+
G.call(n, s) && x(t, s, n[s]);
|
|
11
11
|
return t;
|
|
12
|
-
},
|
|
13
|
-
var p = (t,
|
|
12
|
+
}, A = (t, n) => z(t, B(n));
|
|
13
|
+
var p = (t, n, s) => new Promise((I, N) => {
|
|
14
14
|
var e = (r) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
u(s.next(r));
|
|
17
17
|
} catch (h) {
|
|
18
|
-
|
|
18
|
+
N(h);
|
|
19
19
|
}
|
|
20
20
|
}, a = (r) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
u(s.throw(r));
|
|
23
23
|
} catch (h) {
|
|
24
|
-
|
|
24
|
+
N(h);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, u = (r) => r.done ? I(r.value) : Promise.resolve(r.value).then(e, a);
|
|
27
|
+
u((s = s.apply(t, n)).next());
|
|
28
28
|
});
|
|
29
|
-
import { jsx as c, jsxs as R } from "
|
|
30
|
-
import { useState as v, useContext as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
|
|
29
|
+
import { jsx as c, jsxs as R } from "../_virtual/jsx-runtime.mjs";
|
|
30
|
+
import { useState as v, useContext as J, useRef as M, useEffect as y } from "react";
|
|
31
|
+
import P from "../context.mjs";
|
|
32
|
+
import Q from "./AgentChat/index.mjs";
|
|
33
|
+
import T from "./KnowledgeList/index.mjs";
|
|
34
|
+
import W from "./SessionList/index.mjs";
|
|
35
|
+
import "./style.less.mjs";
|
|
36
|
+
const re = (t) => {
|
|
36
37
|
const {
|
|
37
|
-
sessionId:
|
|
38
|
+
sessionId: n,
|
|
38
39
|
appId: s,
|
|
39
40
|
docViewerUrl: I,
|
|
40
|
-
bodyStyle:
|
|
41
|
+
bodyStyle: N
|
|
41
42
|
} = t, [e, a] = v(), {
|
|
42
|
-
service:
|
|
43
|
+
service: u,
|
|
43
44
|
mode: r,
|
|
44
45
|
showHeader: h,
|
|
45
46
|
token: X,
|
|
46
|
-
agentClient:
|
|
47
|
-
sider:
|
|
47
|
+
agentClient: o,
|
|
48
|
+
sider: H,
|
|
48
49
|
onSessionLoad: f,
|
|
49
50
|
onSessionUnload: Y,
|
|
50
51
|
footer: Z,
|
|
51
52
|
transform: _,
|
|
52
|
-
depId:
|
|
53
|
+
depId: $,
|
|
53
54
|
features: l
|
|
54
|
-
} =
|
|
55
|
+
} = J(P), [m, K] = v(), w = M(null), [U, D] = v(""), [k, b] = v(), [E, S] = v(!1);
|
|
55
56
|
y(() => {
|
|
56
57
|
var i;
|
|
57
|
-
|
|
58
|
+
S(e ? !!((i = e.data) != null && i.netOpen) : typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.default) == "boolean" ? l.connectNetwork.default : !1);
|
|
58
59
|
}, [e]), y(() => {
|
|
59
60
|
const i = () => p(void 0, null, function* () {
|
|
60
|
-
const d =
|
|
61
|
+
const d = o == null ? void 0 : o.application;
|
|
61
62
|
if (!(d != null && d.id))
|
|
62
63
|
return;
|
|
63
|
-
const
|
|
64
|
-
if (!(
|
|
64
|
+
const g = d == null ? void 0 : d.arrange;
|
|
65
|
+
if (!(g != null && g.length))
|
|
65
66
|
return;
|
|
66
|
-
const V =
|
|
67
|
-
|
|
67
|
+
const V = g[0].embeddingService;
|
|
68
|
+
D(V), K(d);
|
|
68
69
|
});
|
|
69
|
-
return
|
|
70
|
-
|
|
70
|
+
return o == null || o.addEventListener("ready", () => i()), () => {
|
|
71
|
+
o == null || o.removeEventListener("ready", i);
|
|
71
72
|
};
|
|
72
73
|
}, []), y(() => {
|
|
73
|
-
|
|
74
|
-
a == null || a(i.find((d) => d.id ===
|
|
75
|
-
})) :
|
|
76
|
-
|
|
77
|
-
a == null || a(i.find((d) => d.id ===
|
|
74
|
+
o && n && (o.ready ? o == null || o.getSessions().then((i) => p(void 0, null, function* () {
|
|
75
|
+
a == null || a(i.find((d) => d.id === n));
|
|
76
|
+
})) : o.addEventListener("ready", () => p(void 0, null, function* () {
|
|
77
|
+
o == null || o.getSessions().then((i) => p(void 0, null, function* () {
|
|
78
|
+
a == null || a(i.find((d) => d.id === n));
|
|
78
79
|
}));
|
|
79
80
|
}), !0));
|
|
80
|
-
}, [
|
|
81
|
+
}, [o, n]), y(() => {
|
|
81
82
|
if (!e) {
|
|
82
83
|
f && f({
|
|
83
84
|
applicationId: s,
|
|
@@ -103,7 +104,7 @@ import T from "./SessionList/index.mjs";
|
|
|
103
104
|
}, [e]);
|
|
104
105
|
const O = (i) => {
|
|
105
106
|
var d;
|
|
106
|
-
return (d =
|
|
107
|
+
return (d = w.current) == null ? void 0 : d.create(A(j({}, i), {
|
|
107
108
|
knowledges: k
|
|
108
109
|
}));
|
|
109
110
|
};
|
|
@@ -113,11 +114,11 @@ import T from "./SessionList/index.mjs";
|
|
|
113
114
|
className: "dialog-pannel",
|
|
114
115
|
children: [/* @__PURE__ */ c("div", {
|
|
115
116
|
className: "dialog-sider",
|
|
116
|
-
children: /* @__PURE__ */ c(
|
|
117
|
-
ref:
|
|
118
|
-
sider:
|
|
117
|
+
children: /* @__PURE__ */ c(W, {
|
|
118
|
+
ref: w,
|
|
119
|
+
sider: H,
|
|
119
120
|
appId: s,
|
|
120
|
-
networkStatus:
|
|
121
|
+
networkStatus: E,
|
|
121
122
|
currentSession: e,
|
|
122
123
|
application: m,
|
|
123
124
|
setCurrentSession: a,
|
|
@@ -130,7 +131,7 @@ import T from "./SessionList/index.mjs";
|
|
|
130
131
|
className: "dialog-chat",
|
|
131
132
|
children: [h && /* @__PURE__ */ c("div", {
|
|
132
133
|
className: "dialog-chat-header",
|
|
133
|
-
children: /* @__PURE__ */ c(
|
|
134
|
+
children: /* @__PURE__ */ c(T, {
|
|
134
135
|
setCheckKnowledges: b,
|
|
135
136
|
application: m,
|
|
136
137
|
currentSession: e,
|
|
@@ -138,9 +139,9 @@ import T from "./SessionList/index.mjs";
|
|
|
138
139
|
})
|
|
139
140
|
}), /* @__PURE__ */ c("div", {
|
|
140
141
|
className: "dialog-chat-content",
|
|
141
|
-
children: (m == null ? void 0 : m.id) && /* @__PURE__ */ c(
|
|
142
|
-
setNetworkStatus:
|
|
143
|
-
networkStatus:
|
|
142
|
+
children: (m == null ? void 0 : m.id) && /* @__PURE__ */ c(Q, {
|
|
143
|
+
setNetworkStatus: S,
|
|
144
|
+
networkStatus: E,
|
|
144
145
|
application: m,
|
|
145
146
|
currentSession: e,
|
|
146
147
|
onCreateSession: O,
|
|
@@ -153,7 +154,7 @@ import T from "./SessionList/index.mjs";
|
|
|
153
154
|
})]
|
|
154
155
|
})
|
|
155
156
|
});
|
|
156
|
-
}
|
|
157
|
+
};
|
|
157
158
|
export {
|
|
158
|
-
|
|
159
|
+
re as default
|
|
159
160
|
};
|