@glodon-aiot/agent-cli-ui 2.4.7
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/README.git.md +73 -0
- package/README.lib.md +135 -0
- package/dist/es/AgentClientUI.mjs +155 -0
- package/dist/es/Dialog/AgentChat/index.mjs +757 -0
- package/dist/es/Dialog/AgentChat/style.less.mjs +4 -0
- package/dist/es/Dialog/ConnectToNetwork/index.mjs +92 -0
- package/dist/es/Dialog/ConnectToNetwork/style.less.mjs +4 -0
- package/dist/es/Dialog/FileCard/doc-icons/doc.svg.mjs +4 -0
- package/dist/es/Dialog/FileCard/doc-icons/docx.svg.mjs +4 -0
- package/dist/es/Dialog/FileCard/doc-icons/pdf.svg.mjs +4 -0
- package/dist/es/Dialog/FileCard/index.mjs +142 -0
- package/dist/es/Dialog/FileCard/style.less.mjs +4 -0
- package/dist/es/Dialog/FilePreview/index.mjs +90 -0
- package/dist/es/Dialog/FilePreview/style.less.mjs +4 -0
- package/dist/es/Dialog/Greeting/index.mjs +31 -0
- package/dist/es/Dialog/Greeting/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryContent/index.mjs +14 -0
- package/dist/es/Dialog/HistoryContent/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryItem/index.mjs +355 -0
- package/dist/es/Dialog/HistoryItem/style.less.mjs +4 -0
- package/dist/es/Dialog/HistoryItem/think.svg.mjs +4 -0
- package/dist/es/Dialog/KnowledgeDoc/index.mjs +46 -0
- package/dist/es/Dialog/KnowledgeDoc/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/index.mjs +68 -0
- package/dist/es/Dialog/KnowledgeList/KnowledgeSelect/style.less.mjs +4 -0
- package/dist/es/Dialog/KnowledgeList/index.mjs +69 -0
- package/dist/es/Dialog/KnowledgeList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/PromptList/PromptListItem.mjs +89 -0
- package/dist/es/Dialog/PromptManager/PromptList/PublicPromptList.mjs +48 -0
- package/dist/es/Dialog/PromptManager/PromptList/access/empty.svg.mjs +4 -0
- package/dist/es/Dialog/PromptManager/PromptList/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptManager/index.mjs +128 -0
- package/dist/es/Dialog/PromptManager/style.less.mjs +4 -0
- package/dist/es/Dialog/PromptSetting/index.mjs +130 -0
- package/dist/es/Dialog/PromptSetting/style.less.mjs +4 -0
- package/dist/es/Dialog/Recommend/RecommendItem.mjs +96 -0
- package/dist/es/Dialog/Recommend/index.mjs +60 -0
- package/dist/es/Dialog/Recommend/style.less.mjs +4 -0
- package/dist/es/Dialog/Recommend/tip.svg.mjs +4 -0
- package/dist/es/Dialog/ReferCollapse/index.mjs +65 -0
- package/dist/es/Dialog/ReferCollapse/style.less.mjs +4 -0
- package/dist/es/Dialog/SearchReference/index.mjs +64 -0
- package/dist/es/Dialog/SearchReference/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionAction/index.mjs +232 -0
- package/dist/es/Dialog/SessionAction/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionList/index.mjs +197 -0
- package/dist/es/Dialog/SessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.mjs +48 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/SessionItem.mjs +142 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/doc.svg.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/docx.svg.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/pdf.svg.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +120 -0
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionListDrawer/index.mjs +44 -0
- package/dist/es/Dialog/SessionListDrawer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +94 -0
- package/dist/es/Dialog/SessionRefer/ReferItem/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRefer/index.mjs +86 -0
- package/dist/es/Dialog/SessionRefer/style.less.mjs +4 -0
- package/dist/es/Dialog/SessionRelated/index.mjs +43 -0
- package/dist/es/Dialog/SessionRelated/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/index.mjs +51 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/ClearModal/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +368 -0
- package/dist/es/Dialog/UploadKnowledgeFiles/style.less.mjs +4 -0
- package/dist/es/Dialog/UploadingPrompt/index.mjs +67 -0
- package/dist/es/Dialog/UploadingPrompt/style.less.mjs +4 -0
- package/dist/es/Dialog/index.mjs +128 -0
- package/dist/es/Dialog/style.less.mjs +4 -0
- package/dist/es/FileCard/doc-icons/doc.svg.mjs +4 -0
- package/dist/es/FileCard/doc-icons/docx.svg.mjs +4 -0
- package/dist/es/FileCard/doc-icons/pdf.svg.mjs +4 -0
- package/dist/es/FileItem/index.mjs +85 -0
- package/dist/es/FileItem/style.less.mjs +4 -0
- package/dist/es/Footer/FooterWarning.mjs +25 -0
- package/dist/es/Footer/index.mjs +18 -0
- package/dist/es/Footer/style.less.mjs +4 -0
- package/dist/es/Iconfont/index.mjs +12 -0
- package/dist/es/InputProgress/index.mjs +39 -0
- package/dist/es/InputProgress/style.less.mjs +4 -0
- package/dist/es/QuillEditor/index.mjs +219 -0
- 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/index2.mjs +4 -0
- package/dist/es/_virtual/index3.mjs +4 -0
- package/dist/es/_virtual/index4.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/minio-zj.mjs +4 -0
- package/dist/es/_virtual/react-jsx-runtime.production.min.mjs +4 -0
- package/dist/es/assets/brand.svg.mjs +4 -0
- package/dist/es/assets/icon.svg.mjs +4 -0
- package/dist/es/components/Copy/index.mjs +44 -0
- package/dist/es/components/Copy/style.less.mjs +4 -0
- package/dist/es/components/JsonDisplay/index.mjs +16 -0
- package/dist/es/components/JsonDisplay/style.less.mjs +4 -0
- package/dist/es/components/Markdown/Code/index.mjs +69 -0
- package/dist/es/components/Markdown/Image/index.mjs +26 -0
- package/dist/es/components/Markdown/index.mjs +48 -0
- package/dist/es/components/Markdown/style.less.mjs +4 -0
- package/dist/es/components/WebLink/index.mjs +26 -0
- package/dist/es/constant.mjs +96 -0
- package/dist/es/context.mjs +7 -0
- 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 +325 -0
- 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/@glodon-aiot/minio/dist/minio-zj.mjs +26485 -0
- package/dist/es/node_modules/@socket.io/component-emitter/lib/esm/index.mjs +54 -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/useUnmount/index.mjs +17 -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/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/base64-js/index.mjs +47 -0
- package/dist/es/node_modules/buffer/index.mjs +927 -0
- package/dist/es/node_modules/classnames/index.mjs +42 -0
- package/dist/es/node_modules/copy-to-clipboard/index.mjs +46 -0
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/has-cors.mjs +9 -0
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseqs.mjs +18 -0
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseuri.mjs +24 -0
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/yeast.mjs +19 -0
- package/dist/es/node_modules/engine.io-client/build/esm/globalThis.browser.mjs +4 -0
- package/dist/es/node_modules/engine.io-client/build/esm/socket.mjs +317 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transport.mjs +113 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/index.mjs +11 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/polling.mjs +273 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.mjs +8 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket.mjs +87 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/webtransport.mjs +52 -0
- package/dist/es/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.mjs +21 -0
- package/dist/es/node_modules/engine.io-client/build/esm/util.mjs +23 -0
- package/dist/es/node_modules/engine.io-parser/build/esm/commons.mjs +21 -0
- package/dist/es/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.mjs +14 -0
- package/dist/es/node_modules/engine.io-parser/build/esm/decodePacket.browser.mjs +39 -0
- package/dist/es/node_modules/engine.io-parser/build/esm/encodePacket.browser.mjs +28 -0
- package/dist/es/node_modules/engine.io-parser/build/esm/index.mjs +105 -0
- package/dist/es/node_modules/ieee754/index.mjs +28 -0
- package/dist/es/node_modules/js-base64/base64.mjs +31 -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/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-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/socket.io-client/build/esm/contrib/backo2.mjs +26 -0
- package/dist/es/node_modules/socket.io-client/build/esm/index.mjs +25 -0
- package/dist/es/node_modules/socket.io-client/build/esm/manager.mjs +242 -0
- package/dist/es/node_modules/socket.io-client/build/esm/on.mjs +8 -0
- package/dist/es/node_modules/socket.io-client/build/esm/socket.mjs +608 -0
- package/dist/es/node_modules/socket.io-client/build/esm/url.mjs +19 -0
- package/dist/es/node_modules/socket.io-parser/build/esm/binary.mjs +52 -0
- package/dist/es/node_modules/socket.io-parser/build/esm/index.mjs +203 -0
- package/dist/es/node_modules/socket.io-parser/build/esm/is-binary.mjs +26 -0
- package/dist/es/node_modules/toggle-selection/index.mjs +25 -0
- package/dist/es/node_modules/tslib/tslib.es6.mjs +15 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
- package/dist/es/packages/agent-cli-sdk/src/AgentSession.mjs +243 -0
- package/dist/es/packages/agent-cli-sdk/src/BotClient.mjs +242 -0
- package/dist/es/packages/agent-cli-sdk/src/Config.mjs +34 -0
- package/dist/es/packages/agent-cli-sdk/src/DialogSession.mjs +281 -0
- package/dist/es/packages/agent-cli-sdk/src/EventBus.mjs +64 -0
- package/dist/es/packages/agent-cli-sdk/src/Logger.mjs +31 -0
- package/dist/es/packages/agent-cli-sdk/src/PayloadTypes.mjs +4 -0
- package/dist/es/packages/agent-cli-sdk/src/Session.mjs +527 -0
- package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/fetch.mjs +112 -0
- package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/parse.mjs +97 -0
- package/dist/es/packages/agent-cli-sdk/src/api/index.mjs +48 -0
- package/dist/es/packages/agent-cli-sdk/src/utils.mjs +11 -0
- package/dist/es/packages/apis/dist/es/aecpilot/cosntant.mjs +5 -0
- package/dist/es/packages/apis/dist/es/aecpilot/model.mjs +9 -0
- package/dist/es/packages/apis/dist/es/aecpilotui/index.mjs +8 -0
- package/dist/es/packages/apis/dist/es/agentcliui/index.mjs +414 -0
- package/dist/es/packages/apis/dist/es/base/index.mjs +154 -0
- package/dist/es/packages/apis/dist/es/cvforce/index.mjs +431 -0
- package/dist/es/packages/apis/dist/es/cvforce/model.mjs +6 -0
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
- package/dist/es/packages/apis/dist/es/utils/fetchEventSource/fetch.mjs +106 -0
- package/dist/es/packages/apis/dist/es/utils/fetchEventSource/parse.mjs +97 -0
- package/dist/es/robots.txt +3 -0
- package/dist/es/style.less.mjs +4 -0
- package/dist/es/types.mjs +4 -0
- package/dist/es/utils/clipboard.mjs +38 -0
- package/dist/es/utils/index.mjs +33 -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 +169 -0
- 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/AgentClientUI.d.ts +4 -0
- package/dist/src/ConnectToNetwork/index.d.ts +13 -0
- package/dist/src/Dialog/AgentChat/index.d.ts +17 -0
- package/dist/src/Dialog/ChatEmptyView/index.d.ts +6 -0
- package/dist/src/Dialog/ConnectToNetwork/index.d.ts +13 -0
- package/dist/src/Dialog/FileCard/index.d.ts +22 -0
- package/dist/src/Dialog/FilePreview/index.d.ts +20 -0
- package/dist/src/Dialog/Greeting/index.d.ts +7 -0
- package/dist/src/Dialog/HistoryContent/index.d.ts +5 -0
- package/dist/src/Dialog/HistoryItem/index.d.ts +17 -0
- package/dist/src/Dialog/KnowledgeDoc/index.d.ts +9 -0
- package/dist/src/Dialog/KnowledgeList/KnowledgeSelect/index.d.ts +12 -0
- package/dist/src/Dialog/KnowledgeList/index.d.ts +13 -0
- package/dist/src/Dialog/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
- package/dist/src/Dialog/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
- package/dist/src/Dialog/PromptManager/PromptList/PromptListItem.d.ts +13 -0
- package/dist/src/Dialog/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
- package/dist/src/Dialog/PromptManager/index.d.ts +13 -0
- package/dist/src/Dialog/PromptSetting/index.d.ts +14 -0
- package/dist/src/Dialog/Recommend/RecommendItem.d.ts +12 -0
- package/dist/src/Dialog/Recommend/index.d.ts +14 -0
- package/dist/src/Dialog/ReferCollapse/index.d.ts +8 -0
- package/dist/src/Dialog/SearchReference/index.d.ts +7 -0
- package/dist/src/Dialog/SessionAction/index.d.ts +11 -0
- package/dist/src/Dialog/SessionList/index.d.ts +20 -0
- package/dist/src/Dialog/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
- package/dist/src/Dialog/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
- package/dist/src/Dialog/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
- package/dist/src/Dialog/SessionListDrawer/index.d.ts +9 -0
- package/dist/src/Dialog/SessionRefer/ReferItem/index.d.ts +9 -0
- package/dist/src/Dialog/SessionRefer/index.d.ts +8 -0
- package/dist/src/Dialog/SessionRelated/index.d.ts +9 -0
- package/dist/src/Dialog/UploadFiles/ClearModal/index.d.ts +7 -0
- package/dist/src/Dialog/UploadFiles/index.d.ts +21 -0
- package/dist/src/Dialog/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
- package/dist/src/Dialog/UploadKnowledgeFiles/index.d.ts +22 -0
- package/dist/src/Dialog/UploadingPrompt/index.d.ts +9 -0
- package/dist/src/Dialog/index.d.ts +9 -0
- package/dist/src/FileCard/index.d.ts +21 -0
- package/dist/src/FileItem/index.d.ts +11 -0
- package/dist/src/Footer/FooterWarning.d.ts +8 -0
- package/dist/src/Footer/index.d.ts +7 -0
- package/dist/src/Greeting/index.d.ts +7 -0
- package/dist/src/Iconfont/font_4108228_8te6zfkclqu.d.ts +0 -0
- package/dist/src/Iconfont/font_4439177_7rytwlvbmjj.d.ts +0 -0
- package/dist/src/Iconfont/index.d.ts +3 -0
- package/dist/src/InputProgress/index.d.ts +7 -0
- package/dist/src/QuillEditor/index.d.ts +19 -0
- package/dist/src/components/Copy/index.d.ts +5 -0
- package/dist/src/components/Header/index.d.ts +6 -0
- package/dist/src/components/JsonDisplay/index.d.ts +6 -0
- package/dist/src/components/Markdown/Code/index.d.ts +3 -0
- package/dist/src/components/Markdown/Image/index.d.ts +3 -0
- package/dist/src/components/Markdown/index.d.ts +6 -0
- package/dist/src/components/PDFViewer/index.d.ts +7 -0
- package/dist/src/components/WebLink/index.d.ts +7 -0
- package/dist/src/constant.d.ts +11 -0
- package/dist/src/context.d.ts +5 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/types.d.ts +183 -0
- package/dist/src/utils/clipboard.d.ts +11 -0
- package/dist/src/utils/fetchEventSource/fetch.d.ts +44 -0
- package/dist/src/utils/fetchEventSource/index.d.ts +1 -0
- package/dist/src/utils/fetchEventSource/parse.d.ts +36 -0
- package/dist/src/utils/index.d.ts +17 -0
- package/package.json +138 -0
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
var Rt = Object.defineProperty, Dt = Object.defineProperties;
|
|
2
|
+
var Ot = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Xe = Object.getOwnPropertySymbols;
|
|
4
|
+
var zt = Object.prototype.hasOwnProperty, Ut = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var fe = (x, n, u) => n in x ? Rt(x, n, { enumerable: !0, configurable: !0, writable: !0, value: u }) : x[n] = u, he = (x, n) => {
|
|
6
|
+
for (var u in n || (n = {}))
|
|
7
|
+
zt.call(n, u) && fe(x, u, n[u]);
|
|
8
|
+
if (Xe)
|
|
9
|
+
for (var u of Xe(n))
|
|
10
|
+
Ut.call(n, u) && fe(x, u, n[u]);
|
|
11
|
+
return x;
|
|
12
|
+
}, ue = (x, n) => Dt(x, Ot(n));
|
|
13
|
+
var N = (x, n, u) => (fe(x, typeof n != "symbol" ? n + "" : n, u), u);
|
|
14
|
+
var j = (x, n, u) => new Promise((e, y) => {
|
|
15
|
+
var te = (k) => {
|
|
16
|
+
try {
|
|
17
|
+
T(u.next(k));
|
|
18
|
+
} catch (c) {
|
|
19
|
+
y(c);
|
|
20
|
+
}
|
|
21
|
+
}, g = (k) => {
|
|
22
|
+
try {
|
|
23
|
+
T(u.throw(k));
|
|
24
|
+
} catch (c) {
|
|
25
|
+
y(c);
|
|
26
|
+
}
|
|
27
|
+
}, T = (k) => k.done ? e(k.value) : Promise.resolve(k.value).then(te, g);
|
|
28
|
+
T((u = u.apply(x, n)).next());
|
|
29
|
+
});
|
|
30
|
+
import { jsxs as A, jsx as d } from "../../_virtual/jsx-runtime.mjs";
|
|
31
|
+
import { memo as jt, useState as h, useRef as D, useContext as At, useEffect as b } from "react";
|
|
32
|
+
import "./style.less.mjs";
|
|
33
|
+
import { Divider as Bt, Spin as $t, Button as B, Space as ee, Upload as qt, Tooltip as Vt, message as P, notification as Wt } from "antd";
|
|
34
|
+
import pe from "../../Iconfont/index.mjs";
|
|
35
|
+
import "axios";
|
|
36
|
+
import "../../node_modules/@glodon-aiot/minio/dist/minio-zj.mjs";
|
|
37
|
+
import { IHistoryRole as $ } from "../../packages/apis/dist/es/aecpilot/model.mjs";
|
|
38
|
+
import Kt from "dayjs";
|
|
39
|
+
import "../../packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs";
|
|
40
|
+
import "../../packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs";
|
|
41
|
+
import "../../packages/apis/dist/es/agentcliui/index.mjs";
|
|
42
|
+
import "../../packages/apis/dist/es/aecpilotui/index.mjs";
|
|
43
|
+
import Qt from "../HistoryItem/index.mjs";
|
|
44
|
+
import Yt from "../../context.mjs";
|
|
45
|
+
import { MB as _t } from "../../constant.mjs";
|
|
46
|
+
import Gt from "../FilePreview/index.mjs";
|
|
47
|
+
import { getImageExtension as Xt } from "../../utils/index.mjs";
|
|
48
|
+
import Zt from "../../QuillEditor/index.mjs";
|
|
49
|
+
import Jt from "../Recommend/index.mjs";
|
|
50
|
+
import St from "../Greeting/index.mjs";
|
|
51
|
+
import ei from "../PromptManager/index.mjs";
|
|
52
|
+
import ti from "../../Footer/index.mjs";
|
|
53
|
+
import { CameraOutlined as Ze, PlusOutlined as ii } from "@ant-design/icons";
|
|
54
|
+
import ni from "../UploadKnowledgeFiles/index.mjs";
|
|
55
|
+
import oi from "../UploadingPrompt/index.mjs";
|
|
56
|
+
import ai from "../PromptSetting/index.mjs";
|
|
57
|
+
import ge from "../../node_modules/ahooks/es/useMemoizedFn/index.mjs";
|
|
58
|
+
import li from "../SessionListDrawer/index.mjs";
|
|
59
|
+
import ri from "../../node_modules/react-infinite-scroll-component/dist/index.es.mjs";
|
|
60
|
+
import si from "../ConnectToNetwork/index.mjs";
|
|
61
|
+
import di from "../../assets/icon.svg.mjs";
|
|
62
|
+
import Se from "../../node_modules/uuid/dist/esm-browser/v4.mjs";
|
|
63
|
+
const ci = jt(Qt), fi = {
|
|
64
|
+
icon: di,
|
|
65
|
+
text: "今天我能帮你什么?"
|
|
66
|
+
};
|
|
67
|
+
class Q {
|
|
68
|
+
constructor(n, u, e, y) {
|
|
69
|
+
N(this, "messageTime");
|
|
70
|
+
N(this, "isWaiting");
|
|
71
|
+
N(this, "messageId");
|
|
72
|
+
N(this, "isContext");
|
|
73
|
+
N(this, "actions");
|
|
74
|
+
N(this, "reference");
|
|
75
|
+
N(this, "isSensitive");
|
|
76
|
+
N(this, "isSuspend");
|
|
77
|
+
N(this, "comment");
|
|
78
|
+
this.content = n, this.sessionId = u, this.role = e, this.files = y, this.content = n, this.role = e, this.sessionId = u, this.files = y, this.messageTime = Kt(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = Se(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
|
|
79
|
+
isAgree: 0
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const Je = 10, Qi = (x) => {
|
|
84
|
+
var Oe, ze, Ue, je, Ae, Be, $e, qe, Ve, We, Ke, Qe, Ye, _e, Ge;
|
|
85
|
+
const {
|
|
86
|
+
application: n,
|
|
87
|
+
docViewerUrl: u = "",
|
|
88
|
+
currentSession: e,
|
|
89
|
+
onCreateSession: y,
|
|
90
|
+
embeddingService: te,
|
|
91
|
+
setCurrentSession: g,
|
|
92
|
+
networkStatus: T,
|
|
93
|
+
setNetworkStatus: k
|
|
94
|
+
} = x, [c, I] = h([]), [et, Y] = h(), [O, ie] = h(), C = D(null), {
|
|
95
|
+
service: m,
|
|
96
|
+
agentClient: ne,
|
|
97
|
+
depId: tt,
|
|
98
|
+
footer: it,
|
|
99
|
+
transform: v,
|
|
100
|
+
defaultInput: oe,
|
|
101
|
+
onMessage: _,
|
|
102
|
+
onHistoryLoad: me,
|
|
103
|
+
bodyStyle: nt
|
|
104
|
+
} = At(Yt), [ye, ve] = h(!1), f = D(c), xe = D(), [ot, at] = h(0), [q, z] = h(), [ke, G] = h(""), [Ie, ae] = h(!1), le = D(null), [we, lt] = h([]), [be, re] = h(!1), [Ce, rt] = h(!1), [st, dt] = h(""), [ct, U] = h(), [Le, X] = h({}), Z = D(null), Fe = D(null), se = D(null), [Ne, ft] = h(!1), [ht, ut] = h([]), [pt, J] = h(!0), [gt, mt] = h(!0), [Te, H] = h(!1), [de, R] = h(!1), [Ee, yt] = h(!1), [E, Pe] = h([]), [He, M] = h(!1), [vt, V] = h(!0), [xt, W] = h(!0);
|
|
105
|
+
b(() => {
|
|
106
|
+
var a, o;
|
|
107
|
+
f.current = [], I([]);
|
|
108
|
+
const t = C.current;
|
|
109
|
+
if (t && t.scrollTo({
|
|
110
|
+
top: 0
|
|
111
|
+
}), !((a = e == null ? void 0 : e.data) != null && a.id))
|
|
112
|
+
return;
|
|
113
|
+
if (R(!1), H(!1), (o = e.messages) != null && o.length) {
|
|
114
|
+
const l = [...e.messages.filter((s) => s == null ? void 0 : s.messageId)].reverse();
|
|
115
|
+
f.current = [...l], I([...l]);
|
|
116
|
+
}
|
|
117
|
+
const i = (r) => {
|
|
118
|
+
var l;
|
|
119
|
+
(l = e == null ? void 0 : e.data) != null && l.id && (f.current = [...r].reverse(), I([...r].reverse()), !r || r.length < 10 ? V(!1) : V(!0), me && me({
|
|
120
|
+
applicationId: n.id,
|
|
121
|
+
sessionId: e.data.id,
|
|
122
|
+
histories: r
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
return e.addEventListener("history:loaded", i), () => {
|
|
126
|
+
f.current = [], I([]), e == null || e.removeEventListener("history:loaded", i);
|
|
127
|
+
};
|
|
128
|
+
}, [(Oe = e == null ? void 0 : e.data) == null ? void 0 : Oe.id]), b(() => {
|
|
129
|
+
var i;
|
|
130
|
+
if (!((i = e == null ? void 0 : e.data) != null && i.id))
|
|
131
|
+
return;
|
|
132
|
+
const t = (a) => {
|
|
133
|
+
console.log(a.message, a.cause, "e.case");
|
|
134
|
+
};
|
|
135
|
+
return e.addEventListener("error", t), () => {
|
|
136
|
+
e == null || e.removeEventListener("error", t);
|
|
137
|
+
};
|
|
138
|
+
}, [(ze = e == null ? void 0 : e.data) == null ? void 0 : ze.id]), b(() => {
|
|
139
|
+
}, [c]);
|
|
140
|
+
const kt = () => {
|
|
141
|
+
var a;
|
|
142
|
+
if (!((a = e == null ? void 0 : e.data) != null && a.id) || !(n != null && n.id))
|
|
143
|
+
return;
|
|
144
|
+
const t = e.data.id, i = c[c.length - 1];
|
|
145
|
+
if (i && i.isContext)
|
|
146
|
+
return P.success("已开启新话题");
|
|
147
|
+
e.clear().then(() => {
|
|
148
|
+
const o = new Q("", t, $.System);
|
|
149
|
+
o.isContext = !0, I([o, ...c]);
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
b(() => {
|
|
153
|
+
n != null && n.id && (m == null || m.getRecommendQues(n.id).then((t) => {
|
|
154
|
+
lt(t);
|
|
155
|
+
}));
|
|
156
|
+
}, [tt, n]);
|
|
157
|
+
const Me = (t) => j(void 0, null, function* () {
|
|
158
|
+
var r, l;
|
|
159
|
+
const i = t || et;
|
|
160
|
+
if (!(i != null && i.trim()))
|
|
161
|
+
return P.error("请输入你想问的");
|
|
162
|
+
if (!(E == null ? void 0 : E.every((s) => !!(s != null && s.value))))
|
|
163
|
+
return P.error("变量值不能为空");
|
|
164
|
+
if (de)
|
|
165
|
+
return P.error("正在回复中");
|
|
166
|
+
if (ye)
|
|
167
|
+
return P.error("等待初始化");
|
|
168
|
+
if (!pt)
|
|
169
|
+
return P.error("正在解析文件");
|
|
170
|
+
if (Ie)
|
|
171
|
+
return P.error("正在上传图片");
|
|
172
|
+
z(void 0), G("");
|
|
173
|
+
const o = (r = e == null ? void 0 : e.data) == null ? void 0 : r.id;
|
|
174
|
+
if (!o) {
|
|
175
|
+
y == null || y({
|
|
176
|
+
netOpen: T ? 1 : 2
|
|
177
|
+
}).then((s) => {
|
|
178
|
+
var w, p;
|
|
179
|
+
M(!0), k(!!((w = s.data) != null && w.netOpen)), W(!!((p = s.data) != null && p.enableNetOpen)), It(s).then(() => {
|
|
180
|
+
g == null || g(s), M(!1), ie(i);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
((l = Le[o]) == null ? void 0 : l.length) > 0 ? wt(i) : S(i);
|
|
186
|
+
}), It = (t) => new Promise((i, a) => j(void 0, null, function* () {
|
|
187
|
+
const l = (t == null ? void 0 : t.promptVariables).filter((s) => s.key !== "query").map((s) => {
|
|
188
|
+
var p;
|
|
189
|
+
const w = (p = E.find((L) => L.key === s.key)) == null ? void 0 : p.value;
|
|
190
|
+
return s.value = w || "", s;
|
|
191
|
+
});
|
|
192
|
+
Pe(l.sort((s, w) => s.key.localeCompare(w.key))), yield t == null ? void 0 : t.setPromptVariables(l), i();
|
|
193
|
+
})), wt = (t) => {
|
|
194
|
+
var l, s, w;
|
|
195
|
+
if (J(!1), !((l = e == null ? void 0 : e.data) != null && l.id) || !(n != null && n.id))
|
|
196
|
+
return;
|
|
197
|
+
const i = ((s = e.data) == null ? void 0 : s.id) || "", a = [];
|
|
198
|
+
let o = [], r = /* @__PURE__ */ new Set();
|
|
199
|
+
(w = Le[i]) == null || w.forEach((p) => {
|
|
200
|
+
r.has(p.id) || (o.push(p), r.add(p.id));
|
|
201
|
+
}), Promise.all(o.map((p) => m == null ? void 0 : m.patchApplicationIdKnowledgeIdFileId(n == null ? void 0 : n.id, i, p.id, {
|
|
202
|
+
enabled: 1
|
|
203
|
+
}).then((L) => {
|
|
204
|
+
a.push(p);
|
|
205
|
+
}))).then((p) => {
|
|
206
|
+
J(!0), S(t, a);
|
|
207
|
+
}).catch((p) => {
|
|
208
|
+
throw Error(p);
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
b(() => {
|
|
212
|
+
var a;
|
|
213
|
+
if (n.type !== 0 || !O || !((a = e == null ? void 0 : e.data) != null && a.id))
|
|
214
|
+
return;
|
|
215
|
+
const t = O, i = () => {
|
|
216
|
+
ie(void 0), S(t);
|
|
217
|
+
};
|
|
218
|
+
return e.addEventListener("history:loaded", i), () => {
|
|
219
|
+
e == null || e.removeEventListener("history:loaded", i);
|
|
220
|
+
};
|
|
221
|
+
}, [O, e]), b(() => {
|
|
222
|
+
var a;
|
|
223
|
+
if (n.type !== 2 || !O || !((a = e == null ? void 0 : e.data) != null && a.id))
|
|
224
|
+
return;
|
|
225
|
+
const t = O, i = () => {
|
|
226
|
+
setTimeout(() => {
|
|
227
|
+
ie(void 0), S(t);
|
|
228
|
+
}, 1e3);
|
|
229
|
+
};
|
|
230
|
+
return e.addEventListener("history:loaded", i), () => {
|
|
231
|
+
e == null || e.removeEventListener("history:loaded", i);
|
|
232
|
+
};
|
|
233
|
+
}, [O, e]);
|
|
234
|
+
const S = (t, i) => {
|
|
235
|
+
var p, L;
|
|
236
|
+
const a = (p = e == null ? void 0 : e.data) == null ? void 0 : p.id;
|
|
237
|
+
if (!a)
|
|
238
|
+
return;
|
|
239
|
+
R(!0), H(!0);
|
|
240
|
+
const o = ke ? `
|
|
241
|
+
${t}` : t;
|
|
242
|
+
Y(void 0), U(void 0);
|
|
243
|
+
const r = new Q(o, a, $.User, i);
|
|
244
|
+
f.current = [r, ...c], I(f.current), n.id && _ && _({
|
|
245
|
+
applicationId: n.id,
|
|
246
|
+
sessionId: a,
|
|
247
|
+
message: r
|
|
248
|
+
});
|
|
249
|
+
const l = new Q("", a, $.System);
|
|
250
|
+
l.isWaiting = !0, f.current = [l, ...f.current], I(f.current);
|
|
251
|
+
const s = (i == null ? void 0 : i.map((F) => F.id)) || [], w = E == null ? void 0 : E.reduce((F, K) => (F[K.key] = K.value, F), {});
|
|
252
|
+
e.setPromptVariables(E), e.send({
|
|
253
|
+
text: o,
|
|
254
|
+
fileIds: s
|
|
255
|
+
}, {
|
|
256
|
+
stream: !0,
|
|
257
|
+
referenceFirst: !1,
|
|
258
|
+
formatValues: w
|
|
259
|
+
}), X({
|
|
260
|
+
[a]: []
|
|
261
|
+
}), (L = Z.current) == null || L.update();
|
|
262
|
+
};
|
|
263
|
+
b(() => {
|
|
264
|
+
var a;
|
|
265
|
+
const t = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
|
|
266
|
+
if (!t)
|
|
267
|
+
return;
|
|
268
|
+
const i = (o) => {
|
|
269
|
+
if (o.sessionId && o.sessionId !== xe.current || o.role === $.User)
|
|
270
|
+
return;
|
|
271
|
+
if (o.index === -1 && o.code !== 200 && o.code !== 11915 && (H(!1), R(!1), f.current = f.current.filter((s) => !s.isWaiting), I([...f.current]), f.current = [...f.current], o.content))
|
|
272
|
+
return Wt.error({
|
|
273
|
+
message: o.content
|
|
274
|
+
});
|
|
275
|
+
const r = o.actions || [], l = new Q(o.content, t, $.Robot);
|
|
276
|
+
l.messageId = o.messageId, l.reasoningContent = o.reasoningContent, l.searchReference = o.searchReference, l.thinkingSecs = o.thinkingSecs, l.thinkingStatus = o.thinkingStatus, l.actions = r, l.isLoading = !0, f.current = f.current.filter((s) => !s.isWaiting).filter((s) => !s.isReplying), o.index === void 0 && I([l, ...f.current]), o.code === 11915 && (H(!1), R(!1), l.isLoading = !1, l.content = "请您换个问题问我吧~", l.isSensitive = !0, I([l, ...f.current])), o.index === -2 && (H(!1), R(!1), l.isLoading = !1, l.content = "回答已中止~", l.isSuspend = !0, I([l, ...f.current])), o.index === -1 && (H(!1), R(!1), l.isLoading = !1, l.reference = o.reference, I([l, ...f.current]), n.id && _ && _({
|
|
277
|
+
applicationId: n.id,
|
|
278
|
+
sessionId: t,
|
|
279
|
+
message: l
|
|
280
|
+
})), o.index === -3 && (H(!1), R(!1), l.isLoading = !1, l.reference = o.reference, l.relatedQuesion = o.relatedQuesion, I([l, ...f.current]));
|
|
281
|
+
};
|
|
282
|
+
return e.ready ? e.addEventListener("message:updated", i) : e.addEventListener("ready", () => {
|
|
283
|
+
e.addEventListener("message:updated", i);
|
|
284
|
+
}), () => {
|
|
285
|
+
e == null || e.removeEventListener("message:updated", i);
|
|
286
|
+
};
|
|
287
|
+
}, [(Ue = e == null ? void 0 : e.data) == null ? void 0 : Ue.id]), b(() => {
|
|
288
|
+
var i;
|
|
289
|
+
if (!((i = e == null ? void 0 : e.data) != null && i.id))
|
|
290
|
+
return;
|
|
291
|
+
const t = (a) => {
|
|
292
|
+
ve(a);
|
|
293
|
+
};
|
|
294
|
+
return ve(e.frozen), e.addEventListener("frozen", t), () => {
|
|
295
|
+
e == null || e.removeEventListener("frozen", t);
|
|
296
|
+
};
|
|
297
|
+
}, [(je = e == null ? void 0 : e.data) == null ? void 0 : je.id]), b(() => {
|
|
298
|
+
if (!ne)
|
|
299
|
+
return;
|
|
300
|
+
const t = ne.questionContextMaxLength || 4e3;
|
|
301
|
+
at(t);
|
|
302
|
+
}, [ne, m]), b(() => {
|
|
303
|
+
oe && U(oe.text);
|
|
304
|
+
}, [oe]);
|
|
305
|
+
const bt = (t) => {
|
|
306
|
+
const i = t.size;
|
|
307
|
+
return i <= 0 ? (P.error("该文件为空,请重新上传"), !1) : i > 20 * _t ? (P.error("图片须小于20M"), !1) : (z(t), !1);
|
|
308
|
+
}, Ct = (t) => j(void 0, null, function* () {
|
|
309
|
+
var i;
|
|
310
|
+
return z(t), (i = e == null ? void 0 : e.data) != null && i.id ? Re(e, t) : new Promise((a) => {
|
|
311
|
+
M(!0), y == null || y({
|
|
312
|
+
netOpen: T ? 1 : 2
|
|
313
|
+
}).then((o) => {
|
|
314
|
+
var r, l;
|
|
315
|
+
g == null || g(o), M(!1), k(!!((r = o.data) != null && r.netOpen)), W(!!((l = o.data) != null && l.enableNetOpen)), a(Re(o, t));
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
}), Re = (t, i) => {
|
|
319
|
+
const a = Xt(i.name);
|
|
320
|
+
return new Promise((o) => {
|
|
321
|
+
var l;
|
|
322
|
+
const r = {
|
|
323
|
+
files: [`${Se()}.${a}`],
|
|
324
|
+
isv: "minio",
|
|
325
|
+
knowledgeId: ((l = t.data) == null ? void 0 : l.id) || "",
|
|
326
|
+
type: 1
|
|
327
|
+
};
|
|
328
|
+
ae(!0), m == null || m.postTicket(r).then((s) => {
|
|
329
|
+
m.uploadMinioFile(s.minio, i).then(() => {
|
|
330
|
+
var F, K;
|
|
331
|
+
const w = (F = s.minio.endpoints) == null ? void 0 : F[0], p = s.minio.bucket, L = (K = s.minio.fileKeys) == null ? void 0 : K[0];
|
|
332
|
+
o(`${location.protocol}//${w}/${p}/${L}`);
|
|
333
|
+
}).catch(() => {
|
|
334
|
+
G(""), z(void 0);
|
|
335
|
+
}).finally(() => {
|
|
336
|
+
ae(!1);
|
|
337
|
+
});
|
|
338
|
+
}).catch(() => {
|
|
339
|
+
G(""), z(void 0), ae(!1);
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
b(() => {
|
|
344
|
+
const t = C.current;
|
|
345
|
+
t && !Ee && t.scrollTo({
|
|
346
|
+
top: t.scrollHeight
|
|
347
|
+
});
|
|
348
|
+
}, [c]);
|
|
349
|
+
const De = (t, i) => new Promise((a) => {
|
|
350
|
+
if (!i.file.url || !(n != null && n.id))
|
|
351
|
+
return a();
|
|
352
|
+
const o = ue(he({}, i.file), {
|
|
353
|
+
type: 1
|
|
354
|
+
});
|
|
355
|
+
m == null || m.postApplicationIdSessionKnowledgeSessionFile(n == null ? void 0 : n.id, t, o).finally(() => {
|
|
356
|
+
var r;
|
|
357
|
+
(r = Z.current) == null || r.update().finally(a);
|
|
358
|
+
});
|
|
359
|
+
}), Lt = () => {
|
|
360
|
+
var t;
|
|
361
|
+
(t = e == null ? void 0 : e.data) != null && t.id && (H(!1), e.suspend());
|
|
362
|
+
}, Ft = (t) => {
|
|
363
|
+
const i = C.current;
|
|
364
|
+
i && setTimeout(() => {
|
|
365
|
+
i.scrollTo({
|
|
366
|
+
top: i.scrollHeight,
|
|
367
|
+
behavior: t == null ? void 0 : t.behavior
|
|
368
|
+
});
|
|
369
|
+
}, t == null ? void 0 : t.ms);
|
|
370
|
+
}, Nt = () => {
|
|
371
|
+
if (!C.current)
|
|
372
|
+
return;
|
|
373
|
+
const t = C.current.scrollTop <= -80;
|
|
374
|
+
yt(t);
|
|
375
|
+
}, Tt = ge((t) => {
|
|
376
|
+
var i, a;
|
|
377
|
+
(i = le.current) == null || i.update(t), (a = le.current) == null || a.focus();
|
|
378
|
+
}), Et = ge((t) => {
|
|
379
|
+
Me(t);
|
|
380
|
+
}), Pt = ge(() => {
|
|
381
|
+
var i;
|
|
382
|
+
if (!((i = e == null ? void 0 : e.data) != null && i.id))
|
|
383
|
+
return;
|
|
384
|
+
f.current = [...c.slice(1, c.length)], I(f.current);
|
|
385
|
+
const t = new Q("", e.data.id, $.System);
|
|
386
|
+
t.isWaiting = !0, f.current = [t, ...f.current], I(f.current), e.answerAgain();
|
|
387
|
+
});
|
|
388
|
+
b(() => {
|
|
389
|
+
var t, i;
|
|
390
|
+
xe.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !He && ((i = se.current) == null || i.clear());
|
|
391
|
+
}, [(Ae = e == null ? void 0 : e.data) == null ? void 0 : Ae.id]);
|
|
392
|
+
const Ht = () => {
|
|
393
|
+
var a;
|
|
394
|
+
if (!((a = e == null ? void 0 : e.data) != null && a.id))
|
|
395
|
+
return;
|
|
396
|
+
const i = c[c.length - 1].messageTime;
|
|
397
|
+
e.fetchMessages({
|
|
398
|
+
endTime: i,
|
|
399
|
+
pageSize: Je
|
|
400
|
+
}).then((o) => {
|
|
401
|
+
console.log(o, "loadMoreData");
|
|
402
|
+
const r = o || [];
|
|
403
|
+
if (!r || !(r != null && r.length)) {
|
|
404
|
+
V(!1);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
r.length < 10 ? V(!1) : V(!0), I([...c, ...r.reverse()]);
|
|
408
|
+
});
|
|
409
|
+
}, Mt = (t) => {
|
|
410
|
+
var i;
|
|
411
|
+
(i = e == null ? void 0 : e.data) != null && i.id ? m == null || m.updateSession(n.id, e.data.id, {
|
|
412
|
+
netOpen: t ? 1 : 2
|
|
413
|
+
}).then(() => {
|
|
414
|
+
var a;
|
|
415
|
+
(a = e.data) != null && a.id && k(t);
|
|
416
|
+
}) : k(t);
|
|
417
|
+
}, ce = () => j(void 0, null, function* () {
|
|
418
|
+
var t;
|
|
419
|
+
(t = e == null ? void 0 : e.data) != null && t.id && (m == null || m.getSession(n.id, e.data.id).then((i) => {
|
|
420
|
+
var a;
|
|
421
|
+
(a = e == null ? void 0 : e.data) != null && a.id && (k(i.netOpen), W(i.enableNetOpen));
|
|
422
|
+
}));
|
|
423
|
+
});
|
|
424
|
+
return b(() => {
|
|
425
|
+
ce();
|
|
426
|
+
}, [(Be = e == null ? void 0 : e.data) == null ? void 0 : Be.id]), b(() => {
|
|
427
|
+
var t, i;
|
|
428
|
+
if (C.current) {
|
|
429
|
+
const a = document.getElementById("chat-main"), o = (t = C.current) == null ? void 0 : t.querySelector(".infinite-scroll-component__outerdiv"), r = (i = C.current) == null ? void 0 : i.querySelector(".infinite-scroll-component");
|
|
430
|
+
if (!o || !r || !a)
|
|
431
|
+
return;
|
|
432
|
+
const l = a.offsetHeight;
|
|
433
|
+
if (r.offsetHeight <= l) {
|
|
434
|
+
if (o.style.height === "100%")
|
|
435
|
+
return;
|
|
436
|
+
o.style.height = "100%";
|
|
437
|
+
} else {
|
|
438
|
+
if (o.style.height === "auto")
|
|
439
|
+
return;
|
|
440
|
+
o.style.height = "auto";
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}, [c]), /* @__PURE__ */ A("div", {
|
|
444
|
+
className: "agent-chat",
|
|
445
|
+
children: [/* @__PURE__ */ d(ai, {
|
|
446
|
+
ref: Fe,
|
|
447
|
+
appId: n.id,
|
|
448
|
+
currentSession: e,
|
|
449
|
+
promptVariables: E,
|
|
450
|
+
setPromptVariables: Pe
|
|
451
|
+
}), /* @__PURE__ */ A("div", {
|
|
452
|
+
className: "chat-main",
|
|
453
|
+
id: "chat-main",
|
|
454
|
+
style: nt,
|
|
455
|
+
children: [/* @__PURE__ */ d("div", {
|
|
456
|
+
className: "chat-main-wrapper",
|
|
457
|
+
id: "scrollableDiv",
|
|
458
|
+
style: {
|
|
459
|
+
height: "100%",
|
|
460
|
+
overflowY: "auto",
|
|
461
|
+
display: "flex",
|
|
462
|
+
flexDirection: "column-reverse"
|
|
463
|
+
},
|
|
464
|
+
ref: C,
|
|
465
|
+
onScroll: Nt,
|
|
466
|
+
children: ($e = e == null ? void 0 : e.data) != null && $e.id && (c != null && c.length) ? /* @__PURE__ */ d(ri, {
|
|
467
|
+
dataLength: c.length,
|
|
468
|
+
next: Ht,
|
|
469
|
+
style: {
|
|
470
|
+
display: "flex",
|
|
471
|
+
flexDirection: "column-reverse",
|
|
472
|
+
overflowX: "hidden"
|
|
473
|
+
},
|
|
474
|
+
inverse: !0,
|
|
475
|
+
endMessage: c.length > Je && // 少于一页不展示这个提示
|
|
476
|
+
((qe = C.current) != null && qe.scrollTop) && ((Ve = C.current) == null ? void 0 : Ve.scrollTop) < -10 ? /* @__PURE__ */ d(Bt, {
|
|
477
|
+
plain: !0,
|
|
478
|
+
children: "没有更多数据了"
|
|
479
|
+
}) : null,
|
|
480
|
+
hasMore: vt,
|
|
481
|
+
loader: /* @__PURE__ */ d("div", {
|
|
482
|
+
style: {
|
|
483
|
+
height: "50px",
|
|
484
|
+
textAlign: "center",
|
|
485
|
+
overflow: "hidden"
|
|
486
|
+
},
|
|
487
|
+
children: /* @__PURE__ */ d($t, {})
|
|
488
|
+
}),
|
|
489
|
+
scrollableTarget: "scrollableDiv",
|
|
490
|
+
children: c.map((t, i) => /* @__PURE__ */ d(ci, {
|
|
491
|
+
application: n,
|
|
492
|
+
currentSession: e,
|
|
493
|
+
history: t,
|
|
494
|
+
docViewerUrl: u,
|
|
495
|
+
isLastHistory: i === 0,
|
|
496
|
+
onRelatedClick: Et,
|
|
497
|
+
onAgainClick: Pt,
|
|
498
|
+
onEditClick: Tt
|
|
499
|
+
}, t.messageId + i))
|
|
500
|
+
}) : /* @__PURE__ */ d("div", {
|
|
501
|
+
className: "main-empty",
|
|
502
|
+
children: /* @__PURE__ */ d(St, ue(he({}, fi), {
|
|
503
|
+
children: !!we.length && /* @__PURE__ */ d(Jt, {
|
|
504
|
+
ref: se,
|
|
505
|
+
sid: (We = e == null ? void 0 : e.data) == null ? void 0 : We.id,
|
|
506
|
+
isRecommendClearing: be,
|
|
507
|
+
data: we,
|
|
508
|
+
onItemClick: (t) => {
|
|
509
|
+
var a, o, r;
|
|
510
|
+
if (Y(t == null ? void 0 : t.question), U(t == null ? void 0 : t.question), be)
|
|
511
|
+
return;
|
|
512
|
+
t != null && t.id && re(!0);
|
|
513
|
+
const i = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
|
|
514
|
+
(r = (o = Z.current) == null ? void 0 : o.clear()) == null || r.then(() => {
|
|
515
|
+
var l;
|
|
516
|
+
t != null && t.id && (i ? (l = De(i, t)) == null || l.finally(() => {
|
|
517
|
+
re(!1);
|
|
518
|
+
}) : (re(!1), M(!0), y == null || y({
|
|
519
|
+
netOpen: T ? 1 : 2
|
|
520
|
+
}).then((s) => {
|
|
521
|
+
var p, L, F;
|
|
522
|
+
g == null || g(s), M(!1), k(!!((p = s.data) != null && p.netOpen)), W(!!((L = s.data) != null && L.enableNetOpen));
|
|
523
|
+
const w = ((F = s.data) == null ? void 0 : F.id) || "";
|
|
524
|
+
De(w, t);
|
|
525
|
+
})));
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
})
|
|
529
|
+
}))
|
|
530
|
+
})
|
|
531
|
+
}), Te && /* @__PURE__ */ d("div", {
|
|
532
|
+
className: "session-stop",
|
|
533
|
+
children: /* @__PURE__ */ d(B, {
|
|
534
|
+
type: "primary",
|
|
535
|
+
style: {
|
|
536
|
+
background: "white"
|
|
537
|
+
},
|
|
538
|
+
ghost: !0,
|
|
539
|
+
size: "small",
|
|
540
|
+
icon: /* @__PURE__ */ d(pe, {
|
|
541
|
+
type: "icon-zantinghuida",
|
|
542
|
+
style: {
|
|
543
|
+
fontSize: 16
|
|
544
|
+
}
|
|
545
|
+
}),
|
|
546
|
+
onClick: () => Lt(),
|
|
547
|
+
children: "停止回答"
|
|
548
|
+
})
|
|
549
|
+
}), Ee && (c == null ? void 0 : c.length) > 0 && /* @__PURE__ */ d("div", {
|
|
550
|
+
className: "back-bottom",
|
|
551
|
+
children: /* @__PURE__ */ d(B, {
|
|
552
|
+
size: "small",
|
|
553
|
+
onClick: () => Ft({
|
|
554
|
+
behavior: "smooth"
|
|
555
|
+
}),
|
|
556
|
+
type: "link",
|
|
557
|
+
icon: /* @__PURE__ */ d(pe, {
|
|
558
|
+
type: "icon-yijianhuidaodibu",
|
|
559
|
+
style: {
|
|
560
|
+
fontSize: 24
|
|
561
|
+
}
|
|
562
|
+
})
|
|
563
|
+
})
|
|
564
|
+
})]
|
|
565
|
+
}), /* @__PURE__ */ d("div", {
|
|
566
|
+
className: "chat-footer",
|
|
567
|
+
children: /* @__PURE__ */ A("div", {
|
|
568
|
+
className: "chat-footer-input",
|
|
569
|
+
children: [q && /* @__PURE__ */ d("div", {
|
|
570
|
+
className: "input-files",
|
|
571
|
+
children: /* @__PURE__ */ d(Gt, {
|
|
572
|
+
file: q,
|
|
573
|
+
actions: {
|
|
574
|
+
upload: Ct,
|
|
575
|
+
remove: () => {
|
|
576
|
+
z(void 0);
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
onUrlChange: (t) => G(t)
|
|
580
|
+
})
|
|
581
|
+
}), /* @__PURE__ */ A(ee, {
|
|
582
|
+
className: "footer-upload-action",
|
|
583
|
+
onClick: (t) => t.preventDefault(),
|
|
584
|
+
children: [/* @__PURE__ */ A(ee, {
|
|
585
|
+
children: [n.type === 2 && (v == null ? void 0 : v.imageUpload) && /* @__PURE__ */ d(qt, {
|
|
586
|
+
disabled: !!q,
|
|
587
|
+
accept: ".jpg, .png, .jpeg,.bmp",
|
|
588
|
+
listType: "picture-card",
|
|
589
|
+
beforeUpload: bt,
|
|
590
|
+
className: "footer-upload-picture",
|
|
591
|
+
showUploadList: !1,
|
|
592
|
+
children: q ? /* @__PURE__ */ d(B, {
|
|
593
|
+
type: "text",
|
|
594
|
+
className: "camera-out-btn",
|
|
595
|
+
style: {
|
|
596
|
+
width: "22px",
|
|
597
|
+
position: "relative",
|
|
598
|
+
bottom: "-2px"
|
|
599
|
+
},
|
|
600
|
+
disabled: !!q,
|
|
601
|
+
icon: /* @__PURE__ */ d(Ze, {
|
|
602
|
+
className: "icon-tianjia",
|
|
603
|
+
style: {
|
|
604
|
+
fontSize: "22px"
|
|
605
|
+
}
|
|
606
|
+
})
|
|
607
|
+
}) : /* @__PURE__ */ d(Vt, {
|
|
608
|
+
placement: "topLeft",
|
|
609
|
+
overlayClassName: "footer-upload-tooltip",
|
|
610
|
+
title: /* @__PURE__ */ d("div", {
|
|
611
|
+
children: "支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"
|
|
612
|
+
}),
|
|
613
|
+
children: /* @__PURE__ */ d(B, {
|
|
614
|
+
type: "text",
|
|
615
|
+
className: "camera-out-btn",
|
|
616
|
+
style: {
|
|
617
|
+
width: "22px",
|
|
618
|
+
position: "relative",
|
|
619
|
+
bottom: "-2px"
|
|
620
|
+
},
|
|
621
|
+
icon: /* @__PURE__ */ d(Ze, {
|
|
622
|
+
className: "icon-tianjia",
|
|
623
|
+
style: {
|
|
624
|
+
fontSize: "22px"
|
|
625
|
+
}
|
|
626
|
+
})
|
|
627
|
+
})
|
|
628
|
+
})
|
|
629
|
+
}), te && (v != null && v.fileUpload) && (n != null && n.id) ? /* @__PURE__ */ d(ni, {
|
|
630
|
+
appId: n == null ? void 0 : n.id,
|
|
631
|
+
ref: Z,
|
|
632
|
+
isFirstSession: He,
|
|
633
|
+
docViewerUrl: u,
|
|
634
|
+
onStatusChange: (t) => j(void 0, null, function* () {
|
|
635
|
+
t !== "process" ? (J(!0), ce()) : J(!1);
|
|
636
|
+
}),
|
|
637
|
+
createSession: () => new Promise((t) => {
|
|
638
|
+
M(!0), y == null || y({
|
|
639
|
+
netOpen: T ? 1 : 2
|
|
640
|
+
}).then((i) => {
|
|
641
|
+
var o, r, l;
|
|
642
|
+
g == null || g(i), M(!1), k(!!((o = i.data) != null && o.netOpen)), W(!!((r = i.data) != null && r.enableNetOpen));
|
|
643
|
+
const a = ((l = i.data) == null ? void 0 : l.id) || "";
|
|
644
|
+
t(a);
|
|
645
|
+
});
|
|
646
|
+
}),
|
|
647
|
+
sid: (Ke = e == null ? void 0 : e.data) == null ? void 0 : Ke.id,
|
|
648
|
+
disabled: de,
|
|
649
|
+
afterFileAdd: (t, i) => {
|
|
650
|
+
i && X((a) => {
|
|
651
|
+
const o = a[i] || [];
|
|
652
|
+
return {
|
|
653
|
+
[i]: [...o, t]
|
|
654
|
+
};
|
|
655
|
+
});
|
|
656
|
+
},
|
|
657
|
+
afterFileDelete: (t) => {
|
|
658
|
+
var a;
|
|
659
|
+
const i = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
|
|
660
|
+
i && X((o) => {
|
|
661
|
+
const r = o[i] || [];
|
|
662
|
+
return {
|
|
663
|
+
[i]: r.filter((l) => l.id !== t)
|
|
664
|
+
};
|
|
665
|
+
});
|
|
666
|
+
},
|
|
667
|
+
onFileListChange: (t) => {
|
|
668
|
+
ut(t);
|
|
669
|
+
},
|
|
670
|
+
shouldContinue: gt,
|
|
671
|
+
afterFilesClear: () => {
|
|
672
|
+
var i;
|
|
673
|
+
const t = (i = e == null ? void 0 : e.data) == null ? void 0 : i.id;
|
|
674
|
+
t && (X({
|
|
675
|
+
[t]: []
|
|
676
|
+
}), ce());
|
|
677
|
+
}
|
|
678
|
+
}) : null, (v == null ? void 0 : v.prompt) && (n == null ? void 0 : n.id) && /* @__PURE__ */ d(ei, {
|
|
679
|
+
appId: n.id,
|
|
680
|
+
list: [],
|
|
681
|
+
search: Ce ? st : "",
|
|
682
|
+
onPromptSelect: (t) => {
|
|
683
|
+
U(t.context), Y(t.context);
|
|
684
|
+
}
|
|
685
|
+
})]
|
|
686
|
+
}), /* @__PURE__ */ A(ee, {
|
|
687
|
+
children: [(v == null ? void 0 : v.connectNetwork) && n.type === 0 && ((Qe = n.arrange) == null ? void 0 : Qe.length) && !!n.arrange[0].enableNetOpen && /* @__PURE__ */ d(si, {
|
|
688
|
+
sessionId: (Ye = e == null ? void 0 : e.data) == null ? void 0 : Ye.id,
|
|
689
|
+
netStatus: T,
|
|
690
|
+
enable: xt,
|
|
691
|
+
onNetStatusChange: (t) => {
|
|
692
|
+
Mt(t);
|
|
693
|
+
}
|
|
694
|
+
}), (v == null ? void 0 : v.sessionList) && /* @__PURE__ */ d(li, {
|
|
695
|
+
currentSessionId: (_e = e == null ? void 0 : e.data) == null ? void 0 : _e.id,
|
|
696
|
+
onSessionChange: (t, i) => {
|
|
697
|
+
U(void 0), g == null || g(i);
|
|
698
|
+
}
|
|
699
|
+
}), (v == null ? void 0 : v.sessionOpen) && /* @__PURE__ */ d(B, {
|
|
700
|
+
icon: /* @__PURE__ */ d(ii, {}),
|
|
701
|
+
className: "add-btn",
|
|
702
|
+
type: "primary",
|
|
703
|
+
disabled: Te || !e || !c.length,
|
|
704
|
+
onClick: () => {
|
|
705
|
+
var t, i;
|
|
706
|
+
g == null || g(void 0), k(!1), (t = Fe.current) == null || t.clear(), (i = se.current) == null || i.clear();
|
|
707
|
+
},
|
|
708
|
+
children: "新会话"
|
|
709
|
+
})]
|
|
710
|
+
})]
|
|
711
|
+
}), /* @__PURE__ */ d("div", {
|
|
712
|
+
className: "footer-textarea",
|
|
713
|
+
children: /* @__PURE__ */ d(Zt, {
|
|
714
|
+
ref: le,
|
|
715
|
+
maxLength: ot,
|
|
716
|
+
text: ct,
|
|
717
|
+
networkStatus: !1,
|
|
718
|
+
disabled: ye || Ie,
|
|
719
|
+
onTextSend: Me,
|
|
720
|
+
onChange: (t, i) => {
|
|
721
|
+
U(t);
|
|
722
|
+
const a = i.getText().replace(/[\n\s]+$/, "");
|
|
723
|
+
Y(a), dt(a), Ce || rt(!0);
|
|
724
|
+
},
|
|
725
|
+
clearAction: /* @__PURE__ */ d(ee, {
|
|
726
|
+
size: 0,
|
|
727
|
+
children: /* @__PURE__ */ d(B, {
|
|
728
|
+
type: "link",
|
|
729
|
+
disabled: de,
|
|
730
|
+
ghost: !0,
|
|
731
|
+
icon: /* @__PURE__ */ d(pe, {
|
|
732
|
+
style: {
|
|
733
|
+
fontSize: 22
|
|
734
|
+
},
|
|
735
|
+
type: "icon-qingchujiyi"
|
|
736
|
+
}),
|
|
737
|
+
onClick: () => kt()
|
|
738
|
+
})
|
|
739
|
+
})
|
|
740
|
+
})
|
|
741
|
+
})]
|
|
742
|
+
})
|
|
743
|
+
}), /* @__PURE__ */ d(ti, {
|
|
744
|
+
tips: it
|
|
745
|
+
}), Ne && /* @__PURE__ */ d(oi, {
|
|
746
|
+
isvisible: Ne,
|
|
747
|
+
files: ht,
|
|
748
|
+
sessionId: (Ge = e == null ? void 0 : e.data) == null ? void 0 : Ge.id,
|
|
749
|
+
onClose: (t) => {
|
|
750
|
+
ft(!1), mt(!1);
|
|
751
|
+
}
|
|
752
|
+
})]
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
export {
|
|
756
|
+
Qi as default
|
|
757
|
+
};
|