@glodon-aiot/agent-cli-ui 3.9.0-beta.10 → 3.11.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/Dialog/AgentChat/HistoryItem/FileItem/index.mjs +12 -12
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +11 -11
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRelated/index.mjs +2 -2
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +118 -133
- package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.mjs +1 -1
- package/dist/es/Dialog/AgentChat/index.mjs +573 -604
- package/dist/es/Dialog/SessionList/index.mjs +218 -271
- package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +53 -53
- package/dist/es/components/FilePreview/index.mjs +6 -6
- package/dist/es/components/Iconfont/index.mjs +3 -3
- package/dist/es/constant.mjs +4 -4
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Code/index.mjs +1 -1
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Image/index.mjs +3 -3
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/index.mjs +25 -24
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/index.mjs +1 -1
- package/dist/es/node_modules/hast-util-from-parse5/lib/index.mjs +162 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/create.mjs +14 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/defined-info.mjs +36 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/info.mjs +28 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/merge.mjs +10 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/schema.mjs +21 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/vfile-location/lib/index.mjs +47 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/node_modules/rehype-raw/lib/index.mjs +26 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode-codepoint.mjs +38 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode.mjs +251 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/generated/decode-data-html.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-raw/lib/index.mjs +249 -0
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-to-parse5/lib/index.mjs +125 -0
- package/dist/es/node_modules/rehype-raw/node_modules/html-void-elements/index.mjs +4 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/doctype.mjs +34 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/error-codes.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/foreign-content.mjs +103 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/html.mjs +44 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/token.mjs +14 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/unicode.mjs +38 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/formatting-element-list.mjs +91 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/index.mjs +2308 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/open-element-stack.mjs +220 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/serializer/index.mjs +2 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/index.mjs +1948 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/preprocessor.mjs +92 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tree-adapters/default.mjs +173 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/create.mjs +17 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/defined-info.mjs +27 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/info.mjs +23 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/merge.mjs +11 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/schema.mjs +17 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/rehype-raw/node_modules/unist-util-visit/lib/index.mjs +16 -0
- package/dist/es/node_modules/rehype-raw/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/node_modules/zwitch/index.mjs +18 -0
- package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +1 -1
- package/dist/es/src/style26.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style31.css +1 -1
- package/dist/es/src/style32.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.js +68 -69
- package/dist/src/constant.d.ts +2 -2
- package/package.json +3 -3
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/Iconfont/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Copy/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/ATag/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Video/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/utils/clipboard.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/utils/markdown/index.mjs +0 -0
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
1
|
+
var pn = Object.defineProperty, vn = Object.defineProperties;
|
|
2
|
+
var bn = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Ct = Object.getOwnPropertySymbols;
|
|
4
|
+
var xn = Object.prototype.hasOwnProperty, kn = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Re = (w, h, i) => h in w ? pn(w, h, { enumerable: !0, configurable: !0, writable: !0, value: i }) : w[h] = i, Fe = (w, h) => {
|
|
6
|
+
for (var i in h || (h = {}))
|
|
7
|
+
xn.call(h, i) && Re(w, i, h[i]);
|
|
8
|
+
if (Ct)
|
|
9
|
+
for (var i of Ct(h))
|
|
10
|
+
kn.call(h, i) && Re(w, i, h[i]);
|
|
11
11
|
return w;
|
|
12
|
-
},
|
|
13
|
-
var U = (w, h,
|
|
14
|
-
var
|
|
15
|
-
var x = (
|
|
12
|
+
}, Ue = (w, h) => vn(w, bn(h));
|
|
13
|
+
var U = (w, h, i) => (Re(w, typeof h != "symbol" ? h + "" : h, i), i);
|
|
14
|
+
var V = (w, h, i) => new Promise((j, e) => {
|
|
15
|
+
var x = (E) => {
|
|
16
16
|
try {
|
|
17
|
-
p(
|
|
17
|
+
p(i.next(E));
|
|
18
18
|
} catch (P) {
|
|
19
19
|
e(P);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, X = (E) => {
|
|
22
22
|
try {
|
|
23
|
-
p(
|
|
23
|
+
p(i.throw(E));
|
|
24
24
|
} catch (P) {
|
|
25
25
|
e(P);
|
|
26
26
|
}
|
|
27
|
-
}, p = (
|
|
28
|
-
p((
|
|
27
|
+
}, p = (E) => E.done ? j(E.value) : Promise.resolve(E.value).then(x, X);
|
|
28
|
+
p((i = i.apply(w, h)).next());
|
|
29
29
|
});
|
|
30
|
-
import { jsx as d, jsxs as
|
|
31
|
-
import { memo as
|
|
32
|
-
/* empty css */import { Spin as
|
|
33
|
-
import
|
|
34
|
-
import { IHistoryRole as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import { v4 as
|
|
38
|
-
import
|
|
39
|
-
import { configuration as
|
|
40
|
-
import { MAX_KNOWLEDGES_AND_FILES_COUNT as
|
|
41
|
-
import
|
|
42
|
-
import { calcKnowledgesLeafCount as
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import { PlusOutlined as
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import { useMemoizedFn as
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import { useSessionState as
|
|
58
|
-
import
|
|
59
|
-
const
|
|
60
|
-
icon:
|
|
30
|
+
import { jsx as d, jsxs as z, Fragment as wn } from "react/jsx-runtime";
|
|
31
|
+
import { memo as Cn, forwardRef as In, useState as u, useRef as Q, useContext as Nn, useEffect as L, useMemo as Ln, useImperativeHandle as En } from "react";
|
|
32
|
+
/* empty css */import { Spin as It, Divider as Pn, Button as G, Space as Ce, Upload as Tn, Tooltip as On, Popover as Dn, notification as ne, message as m } from "antd";
|
|
33
|
+
import ge from "../../components/Iconfont/index.mjs";
|
|
34
|
+
import { IHistoryRole as ie, ApplicationTypes as oe, ChatMessageRole as Nt, PromptVariableType as Ie } from "@glodon-aiot/apis";
|
|
35
|
+
import Tt from "./HistoryItem/index.mjs";
|
|
36
|
+
import Ot from "dayjs";
|
|
37
|
+
import { v4 as Me } from "uuid";
|
|
38
|
+
import Hn from "../../context.mjs";
|
|
39
|
+
import { configuration as Rn } from "@glodon-aiot/bot-client-sdk";
|
|
40
|
+
import { MAX_KNOWLEDGES_AND_FILES_COUNT as Lt, NET_OPEN_STATUS as K, MB as Fn } from "../../constant.mjs";
|
|
41
|
+
import Un from "../../components/FilePreview/index.mjs";
|
|
42
|
+
import { calcKnowledgesLeafCount as jn, getImageExtension as An } from "../../utils/index.mjs";
|
|
43
|
+
import Mn from "../../QuillEditor/index.mjs";
|
|
44
|
+
import Vn from "../../components/Recommend/index.mjs";
|
|
45
|
+
import zn from "../../components/Greeting/index.mjs";
|
|
46
|
+
import $n from "../../Footer/index.mjs";
|
|
47
|
+
import { CameraOutlined as qn, PlusOutlined as Bn } from "@ant-design/icons";
|
|
48
|
+
import Wn from "./Tools/UploadKnowledgeFiles/index.mjs";
|
|
49
|
+
import _n from "../UploadingPrompt/index.mjs";
|
|
50
|
+
import Kn from "./PromptSetting/index.mjs";
|
|
51
|
+
import { useMemoizedFn as je } from "ahooks";
|
|
52
|
+
import Yn from "./Tools/SessionListDrawer/index.mjs";
|
|
53
|
+
import Qn from "./Tools/SessionHistoryDrawer/index.mjs";
|
|
54
|
+
import Gn from "react-infinite-scroll-component";
|
|
55
|
+
import Xn from "./Tools/ConnectToNetwork/index.mjs";
|
|
56
|
+
import Zn from "./Tools/PromptManager/index.mjs";
|
|
57
|
+
import { useSessionState as Jn } from "../../hooks/useSessionState.mjs";
|
|
58
|
+
import Sn from "../../assets/icon.svg.mjs";
|
|
59
|
+
const ei = Cn(Tt), Et = {
|
|
60
|
+
icon: Sn,
|
|
61
61
|
text: "今天我能帮你什么?"
|
|
62
62
|
};
|
|
63
|
-
class
|
|
64
|
-
constructor(h,
|
|
63
|
+
class me {
|
|
64
|
+
constructor(h, i, j, e, x) {
|
|
65
65
|
U(this, "messageTime");
|
|
66
66
|
U(this, "isWaiting");
|
|
67
67
|
U(this, "messageId");
|
|
@@ -73,132 +73,124 @@ class ge {
|
|
|
73
73
|
U(this, "imageContent");
|
|
74
74
|
// 新增:支持对话型应用的图片内容
|
|
75
75
|
U(this, "comment");
|
|
76
|
-
this.content = h, this.sessionId =
|
|
76
|
+
this.content = h, this.sessionId = i, this.role = j, this.files = e, this.content = h, this.role = j, this.sessionId = i, this.files = e, this.imageContent = x, this.messageTime = Ot(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"), this.isWaiting = !1, this.messageId = Me(), this.isContext = !1, this.actions = [], this.reference = [], this.isSensitive = !1, this.isSuspend = !1, this.comment = {
|
|
77
77
|
isAgree: 0
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const Pt = 10, Ae = (w, h, i, j) => {
|
|
82
82
|
let e = w;
|
|
83
|
-
if (
|
|
84
|
-
if (
|
|
85
|
-
const x =
|
|
86
|
-
`);
|
|
87
|
-
e = x ? `${x}
|
|
88
|
-
${e}` : e;
|
|
89
|
-
}
|
|
90
|
-
if (h && h.length > 0) {
|
|
91
|
-
const x = h.filter(Boolean).map(($) => ``).join(`
|
|
83
|
+
if (j === oe.Agent) {
|
|
84
|
+
if (i && i.length > 0) {
|
|
85
|
+
const x = i.map((X) => `[${X.name.replace(/\.[^/.]+$/, "")}](${X.url})`).join(`
|
|
92
86
|
`);
|
|
93
87
|
e = x ? `${x}
|
|
94
88
|
${e}` : e;
|
|
95
89
|
}
|
|
90
|
+
h && (e = `
|
|
91
|
+
${e}`);
|
|
96
92
|
}
|
|
97
93
|
return e;
|
|
98
|
-
},
|
|
99
|
-
var
|
|
94
|
+
}, Hi = In((w, h) => {
|
|
95
|
+
var lt, dt, ct, ft, gt, mt, ut, ht, yt, pt, vt, bt, xt, kt;
|
|
100
96
|
const {
|
|
101
|
-
application:
|
|
102
|
-
docViewerUrl:
|
|
97
|
+
application: i,
|
|
98
|
+
docViewerUrl: j = "",
|
|
103
99
|
currentSession: e,
|
|
104
100
|
onCreateSession: x,
|
|
105
|
-
embeddingService:
|
|
101
|
+
embeddingService: X,
|
|
106
102
|
setCurrentSession: p,
|
|
107
|
-
networkStatus:
|
|
103
|
+
networkStatus: E,
|
|
108
104
|
setNetworkStatus: P
|
|
109
|
-
} = w, [v,
|
|
110
|
-
service:
|
|
111
|
-
agentClient:
|
|
112
|
-
depId:
|
|
113
|
-
footer:
|
|
114
|
-
transform:
|
|
115
|
-
defaultInput:
|
|
116
|
-
onMessage:
|
|
117
|
-
onHistoryLoad:
|
|
118
|
-
beforeMessageSend:
|
|
105
|
+
} = w, [v, C] = u([]), [Dt, ue] = u(), [Ne, Ve] = u(), T = Q(null), {
|
|
106
|
+
service: O,
|
|
107
|
+
agentClient: I,
|
|
108
|
+
depId: Ht,
|
|
109
|
+
footer: Rt,
|
|
110
|
+
transform: g,
|
|
111
|
+
defaultInput: Le,
|
|
112
|
+
onMessage: he,
|
|
113
|
+
onHistoryLoad: ze,
|
|
114
|
+
beforeMessageSend: $,
|
|
119
115
|
bodyStyle: Ft,
|
|
120
|
-
disabled:
|
|
121
|
-
features:
|
|
122
|
-
popupContainer:
|
|
123
|
-
icon:
|
|
116
|
+
disabled: D,
|
|
117
|
+
features: s,
|
|
118
|
+
popupContainer: f,
|
|
119
|
+
icon: Ut,
|
|
124
120
|
sider: jt,
|
|
125
|
-
mode:
|
|
126
|
-
} =
|
|
127
|
-
|
|
128
|
-
Bt(qe > 0);
|
|
129
|
-
}, [qe]);
|
|
130
|
-
const pe = Y(null), [Ye, _t] = m([]), [Qe, J] = m(!1), [Ge, qt] = m(!1), [Wt, Kt] = m(""), [Yt, S] = m(), [ee, ae] = m({}), ve = Y(null), Xe = Y(null), Oe = Y(null), [Ze, Qt] = m(!1), [Gt, Xt] = m([]), [Zt, be] = m(!0), [Jt, St] = m(!0), [Je, j] = m(!1), [Re, _] = m(!1), [Se, en] = m(!1), [D, le] = m(typeof (a == null ? void 0 : a.promptVariables) == "object" ? a.promptVariables.default || [] : []), [tn, nn] = m(() => {
|
|
131
|
-
const t = typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0;
|
|
121
|
+
mode: At
|
|
122
|
+
} = Nn(Hn), [$e, Ee] = u(!1), y = Q(v), qe = Q(void 0), [Mt, Vt] = u(0), [se, Z] = u(), [re, ae] = u(""), [Be, Pe] = u(!1), ye = Q(null), [We, zt] = u([]), [_e, J] = u(!1), [Ke, $t] = u(!1), [qt, Bt] = u(""), [Wt, S] = u(), [ee, le] = u({}), pe = Q(null), Ye = Q(null), Te = Q(null), [Qe, _t] = u(!1), [Kt, Yt] = u([]), [Qt, ve] = u(!0), [Gt, Xt] = u(!0), [Ge, A] = u(!1), [Oe, q] = u(!1), [Xe, Zt] = u(!1), [H, de] = u(typeof (s == null ? void 0 : s.promptVariables) == "object" ? s.promptVariables.default || [] : []), [Jt, St] = u(() => {
|
|
123
|
+
const t = typeof (s == null ? void 0 : s.knowledges) == "object" && s.knowledges.default || void 0;
|
|
132
124
|
if (t) {
|
|
133
|
-
if (Array.isArray(t) && t.some((
|
|
125
|
+
if (Array.isArray(t) && t.some((l) => Array.isArray(l.fileIds) && l.fileIds.length === 0))
|
|
134
126
|
throw Error("fileIds cannot be an empty array");
|
|
135
|
-
if (
|
|
136
|
-
throw Error(`knowledges and fileIds total count cannot exceed ${
|
|
127
|
+
if (jn(t) > Lt)
|
|
128
|
+
throw Error(`knowledges and fileIds total count cannot exceed ${Lt}`);
|
|
137
129
|
}
|
|
138
130
|
return t;
|
|
139
|
-
}), [
|
|
140
|
-
isSwitchingToExistingSession:
|
|
141
|
-
setIsSwitchingToExistingSession:
|
|
142
|
-
} =
|
|
143
|
-
|
|
144
|
-
if (
|
|
145
|
-
|
|
131
|
+
}), [Ze, M] = u(!1), [Je, ce] = u(!1), [en, te] = u(typeof (s == null ? void 0 : s.connectNetwork) == "object" && typeof (s == null ? void 0 : s.connectNetwork.default) == "boolean" ? s.connectNetwork.default : !1), [Se, be] = u(!1), [tn, B] = u(!1), [nn, on] = u(null), [xe, Y] = u(!1), [et, tt] = u(!1), {
|
|
132
|
+
isSwitchingToExistingSession: nt,
|
|
133
|
+
setIsSwitchingToExistingSession: ke
|
|
134
|
+
} = Jn();
|
|
135
|
+
L(() => {
|
|
136
|
+
if (on(e), e === null)
|
|
137
|
+
B(!1);
|
|
146
138
|
else if (e === void 0)
|
|
147
|
-
|
|
139
|
+
B(!0);
|
|
148
140
|
else {
|
|
149
|
-
if (
|
|
150
|
-
if (
|
|
151
|
-
|
|
141
|
+
if (nn === null) {
|
|
142
|
+
if (nt) {
|
|
143
|
+
B(!0), ke(!1);
|
|
152
144
|
return;
|
|
153
145
|
}
|
|
154
|
-
|
|
146
|
+
B(!1);
|
|
155
147
|
return;
|
|
156
148
|
}
|
|
157
|
-
e.ready ?
|
|
149
|
+
e.ready ? B(!1) : B(!0);
|
|
158
150
|
}
|
|
159
|
-
}, [e, e == null ? void 0 : e.ready,
|
|
160
|
-
var
|
|
161
|
-
e && (y.current = []),
|
|
162
|
-
const t =
|
|
151
|
+
}, [e, e == null ? void 0 : e.ready, nt]), L(() => {
|
|
152
|
+
var a, l;
|
|
153
|
+
e && (y.current = []), C([]);
|
|
154
|
+
const t = T.current;
|
|
163
155
|
if (t && t.scrollTo({
|
|
164
156
|
top: 0
|
|
165
|
-
}), !((
|
|
157
|
+
}), !((a = e == null ? void 0 : e.data) != null && a.id))
|
|
166
158
|
return;
|
|
167
|
-
if (
|
|
168
|
-
const c = [...e.messages.filter((
|
|
169
|
-
y.current = [...c],
|
|
159
|
+
if (q(!1), A(!1), (l = e.messages) != null && l.length) {
|
|
160
|
+
const c = [...e.messages.filter((r) => r == null ? void 0 : r.messageId)].reverse();
|
|
161
|
+
y.current = [...c], C([...c]), B(!1);
|
|
170
162
|
}
|
|
171
|
-
const n = (
|
|
163
|
+
const n = (o) => {
|
|
172
164
|
var c;
|
|
173
|
-
(c = e == null ? void 0 : e.data) != null && c.id && (y.current = [...
|
|
174
|
-
applicationId:
|
|
165
|
+
(c = e == null ? void 0 : e.data) != null && c.id && (y.current = [...o].reverse(), C([...o].reverse()), !o || o.length < 10 ? ce(!1) : ce(!0), B(!1), ze && ze({
|
|
166
|
+
applicationId: i.id,
|
|
175
167
|
sessionId: e.data.id,
|
|
176
|
-
histories:
|
|
168
|
+
histories: o
|
|
177
169
|
}));
|
|
178
170
|
};
|
|
179
171
|
return e.addEventListener("history:loaded", n), () => {
|
|
180
|
-
y.current = [],
|
|
172
|
+
y.current = [], C([]), e == null || e.removeEventListener("history:loaded", n);
|
|
181
173
|
};
|
|
182
|
-
}, [e]),
|
|
174
|
+
}, [e]), L(() => {
|
|
183
175
|
const t = () => {
|
|
184
176
|
var n;
|
|
185
|
-
(n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables &&
|
|
177
|
+
(n = e == null ? void 0 : e.data) != null && n.id && (e.promptVariables && de(e.promptVariables.sort((a, l) => a.key.localeCompare(l.key))), e.knowledges && St(e.knowledges), P(e.netOpen));
|
|
186
178
|
};
|
|
187
179
|
return e == null || e.addEventListener("data:updated", t), () => {
|
|
188
180
|
e == null || e.removeEventListener("data:updated", t);
|
|
189
181
|
};
|
|
190
|
-
}, [e]),
|
|
182
|
+
}, [e]), L(() => {
|
|
191
183
|
var n;
|
|
192
184
|
if (!((n = e == null ? void 0 : e.data) != null && n.id))
|
|
193
185
|
return;
|
|
194
|
-
const t = (
|
|
195
|
-
var
|
|
196
|
-
console.error(
|
|
197
|
-
getContainer: () => (
|
|
186
|
+
const t = (a) => {
|
|
187
|
+
var l;
|
|
188
|
+
console.error(a.message, a.cause, "e.case"), ne.config({
|
|
189
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
198
190
|
prefixCls: "gbot-notification"
|
|
199
|
-
}),
|
|
200
|
-
message: ((
|
|
201
|
-
}),
|
|
191
|
+
}), ne.error({
|
|
192
|
+
message: ((l = a.cause) == null ? void 0 : l.message) || a.message
|
|
193
|
+
}), ne.config({
|
|
202
194
|
getContainer: void 0,
|
|
203
195
|
prefixCls: "gbot-notification"
|
|
204
196
|
});
|
|
@@ -207,204 +199,204 @@ ${e}` : e;
|
|
|
207
199
|
e == null || e.removeEventListener("error", t);
|
|
208
200
|
};
|
|
209
201
|
}, [e]);
|
|
210
|
-
const
|
|
211
|
-
var
|
|
212
|
-
if (!((
|
|
202
|
+
const sn = () => {
|
|
203
|
+
var a;
|
|
204
|
+
if (!((a = e == null ? void 0 : e.data) != null && a.id) || !(i != null && i.id))
|
|
213
205
|
return;
|
|
214
206
|
const t = e.data.id, n = v[v.length - 1];
|
|
215
207
|
if (n && n.isContext) {
|
|
216
|
-
|
|
217
|
-
getContainer: () => (
|
|
208
|
+
m.config({
|
|
209
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
218
210
|
prefixCls: "gbot-message"
|
|
219
|
-
}),
|
|
211
|
+
}), m.success("已开启新话题"), m.config({
|
|
220
212
|
getContainer: void 0,
|
|
221
213
|
prefixCls: "gbot-message"
|
|
222
214
|
});
|
|
223
215
|
return;
|
|
224
216
|
} else
|
|
225
217
|
e.clear().then(() => {
|
|
226
|
-
const
|
|
227
|
-
|
|
218
|
+
const l = new me("", t, ie.System);
|
|
219
|
+
l.isContext = !0, C([l, ...v]);
|
|
228
220
|
});
|
|
229
221
|
};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
222
|
+
L(() => {
|
|
223
|
+
i != null && i.id && (O == null || O.getRecommendQues(i.id).then((t) => {
|
|
224
|
+
zt(t);
|
|
233
225
|
}));
|
|
234
|
-
}, [
|
|
235
|
-
const
|
|
236
|
-
var W,
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
getContainer: () => (
|
|
226
|
+
}, [Ht, i]);
|
|
227
|
+
const it = (t) => V(void 0, null, function* () {
|
|
228
|
+
var W, _;
|
|
229
|
+
if (D) {
|
|
230
|
+
m.config({
|
|
231
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
240
232
|
prefixCls: "gbot-message"
|
|
241
|
-
}),
|
|
233
|
+
}), m.error("发送功能被禁用"), m.config({
|
|
242
234
|
getContainer: void 0,
|
|
243
235
|
prefixCls: "gbot-message"
|
|
244
236
|
});
|
|
245
237
|
return;
|
|
246
238
|
}
|
|
247
|
-
const n = t ||
|
|
239
|
+
const n = t || Dt;
|
|
248
240
|
if (!(n != null && n.trim())) {
|
|
249
|
-
|
|
250
|
-
getContainer: () => (
|
|
241
|
+
m.config({
|
|
242
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
251
243
|
prefixCls: "gbot-message"
|
|
252
|
-
}),
|
|
244
|
+
}), m.error("请输入你想问的"), m.config({
|
|
253
245
|
getContainer: void 0,
|
|
254
246
|
prefixCls: "gbot-message"
|
|
255
247
|
});
|
|
256
248
|
return;
|
|
257
249
|
}
|
|
258
|
-
if (!(
|
|
259
|
-
if (
|
|
260
|
-
|
|
261
|
-
getContainer: () => (
|
|
250
|
+
if (!(H == null ? void 0 : H.every((k) => !!(k != null && k.value))))
|
|
251
|
+
if (g != null && g.promptVariables) {
|
|
252
|
+
m.config({
|
|
253
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
262
254
|
prefixCls: "gbot-message"
|
|
263
|
-
}),
|
|
255
|
+
}), m.error("变量值不能为空"), m.config({
|
|
264
256
|
getContainer: void 0,
|
|
265
257
|
prefixCls: "gbot-message"
|
|
266
258
|
});
|
|
267
259
|
return;
|
|
268
260
|
} else
|
|
269
|
-
console.error("变量值不能为空",
|
|
270
|
-
if (
|
|
271
|
-
|
|
272
|
-
getContainer: () => (
|
|
261
|
+
console.error("变量值不能为空", H == null ? void 0 : H.map((k) => !!(k != null && k.value)));
|
|
262
|
+
if (Oe) {
|
|
263
|
+
m.config({
|
|
264
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
273
265
|
prefixCls: "gbot-message"
|
|
274
|
-
}),
|
|
266
|
+
}), m.error("正在回复中"), m.config({
|
|
275
267
|
getContainer: void 0,
|
|
276
268
|
prefixCls: "gbot-message"
|
|
277
269
|
});
|
|
278
270
|
return;
|
|
279
271
|
}
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
getContainer: () => (
|
|
272
|
+
if ($e) {
|
|
273
|
+
m.config({
|
|
274
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
283
275
|
prefixCls: "gbot-message"
|
|
284
|
-
}),
|
|
276
|
+
}), m.error("等待初始化"), m.config({
|
|
285
277
|
getContainer: void 0,
|
|
286
278
|
prefixCls: "gbot-message"
|
|
287
279
|
});
|
|
288
280
|
return;
|
|
289
281
|
}
|
|
290
|
-
if (!
|
|
291
|
-
|
|
292
|
-
getContainer: () => (
|
|
282
|
+
if (!Qt) {
|
|
283
|
+
m.config({
|
|
284
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
293
285
|
prefixCls: "gbot-message"
|
|
294
|
-
}),
|
|
286
|
+
}), m.error("正在解析文件"), m.config({
|
|
295
287
|
getContainer: void 0,
|
|
296
288
|
prefixCls: "gbot-message"
|
|
297
289
|
});
|
|
298
290
|
return;
|
|
299
291
|
}
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
getContainer: () => (
|
|
292
|
+
if (Be) {
|
|
293
|
+
m.config({
|
|
294
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
303
295
|
prefixCls: "gbot-message"
|
|
304
|
-
}),
|
|
296
|
+
}), m.error("正在上传图片"), m.config({
|
|
305
297
|
getContainer: void 0,
|
|
306
298
|
prefixCls: "gbot-message"
|
|
307
299
|
});
|
|
308
300
|
return;
|
|
309
301
|
}
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
if (!
|
|
313
|
-
if (
|
|
302
|
+
Z(void 0), ae("");
|
|
303
|
+
const l = (W = e == null ? void 0 : e.data) == null ? void 0 : W.id;
|
|
304
|
+
if (!l) {
|
|
305
|
+
if (xe)
|
|
314
306
|
return;
|
|
315
|
-
|
|
316
|
-
netOpen:
|
|
317
|
-
}).then((
|
|
318
|
-
var
|
|
319
|
-
|
|
320
|
-
p == null || p(
|
|
307
|
+
Y(!0), x == null || x({
|
|
308
|
+
netOpen: E ? K.OPEN : K.CLOSE
|
|
309
|
+
}).then((k) => {
|
|
310
|
+
var F, fe;
|
|
311
|
+
M(!0), P(!!((F = k.data) != null && F.netOpen)), te(!!((fe = k.data) != null && fe.enableNetOpen)), we(k).then(() => {
|
|
312
|
+
p == null || p(k), M(!1), Ve(n);
|
|
321
313
|
});
|
|
322
|
-
}).catch((
|
|
323
|
-
|
|
314
|
+
}).catch((k) => {
|
|
315
|
+
Y(!1);
|
|
324
316
|
});
|
|
325
317
|
return;
|
|
326
318
|
}
|
|
327
|
-
if (
|
|
319
|
+
if (xe)
|
|
328
320
|
return;
|
|
329
|
-
|
|
330
|
-
const
|
|
321
|
+
Y(!0), be(!0);
|
|
322
|
+
const o = Ae(n, re, ee[l], (i == null ? void 0 : i.type) || 0);
|
|
331
323
|
let c;
|
|
332
324
|
try {
|
|
333
|
-
|
|
334
|
-
applicationId:
|
|
335
|
-
sessionId:
|
|
325
|
+
$ ? c = yield $ == null ? void 0 : $({
|
|
326
|
+
applicationId: i.id,
|
|
327
|
+
sessionId: l,
|
|
336
328
|
message: {
|
|
337
|
-
content:
|
|
338
|
-
sessionId:
|
|
339
|
-
role:
|
|
340
|
-
files: ee[
|
|
329
|
+
content: o,
|
|
330
|
+
sessionId: l,
|
|
331
|
+
role: Nt.User,
|
|
332
|
+
files: ee[l]
|
|
341
333
|
}
|
|
342
334
|
}) : c = !0;
|
|
343
|
-
} catch (
|
|
335
|
+
} catch (k) {
|
|
344
336
|
c = !1;
|
|
345
337
|
}
|
|
346
|
-
if (
|
|
347
|
-
|
|
338
|
+
if (be(!1), c === !1) {
|
|
339
|
+
Y(!1);
|
|
348
340
|
return;
|
|
349
341
|
}
|
|
350
|
-
let
|
|
351
|
-
typeof c == "object" && (
|
|
352
|
-
const
|
|
353
|
-
|
|
342
|
+
let r = n;
|
|
343
|
+
typeof c == "object" && (r = c.content || n);
|
|
344
|
+
const N = yield (() => new Promise((k) => {
|
|
345
|
+
de((F) => (k(F), F));
|
|
354
346
|
}))();
|
|
355
|
-
if (!(yield e.setPromptVariables(
|
|
356
|
-
|
|
347
|
+
if (!(yield e.setPromptVariables(N))) {
|
|
348
|
+
Y(!1);
|
|
357
349
|
return;
|
|
358
350
|
}
|
|
359
|
-
((
|
|
360
|
-
}),
|
|
361
|
-
const c = (t == null ? void 0 : t.promptVariables).filter((
|
|
362
|
-
var
|
|
363
|
-
const b = (
|
|
364
|
-
return
|
|
351
|
+
((_ = ee[l]) == null ? void 0 : _.length) > 0 ? rn(r) : De(r);
|
|
352
|
+
}), we = (t) => new Promise((n, a) => V(void 0, null, function* () {
|
|
353
|
+
const c = (t == null ? void 0 : t.promptVariables).filter((r) => r.type ? !((r.type === Ie.User || r.type === void 0) && r.key === "query") && !((r.type === Ie.System || r.type === void 0) && r.key === "datetime") : r.key !== "query").map((r) => {
|
|
354
|
+
var N;
|
|
355
|
+
const b = (N = H.find((R) => R.key === r.key && R.type === r.type)) == null ? void 0 : N.value;
|
|
356
|
+
return r.value = b || "", r;
|
|
365
357
|
});
|
|
366
|
-
|
|
367
|
-
console.error(
|
|
368
|
-
getContainer: () => (
|
|
358
|
+
de(c.sort((r, b) => r.key.localeCompare(b.key))), yield t == null ? void 0 : t.setPromptVariables(c).catch((r) => {
|
|
359
|
+
console.error(r), m.config({
|
|
360
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
369
361
|
prefixCls: "gbot-message"
|
|
370
|
-
}),
|
|
362
|
+
}), m.error(r.message), m.config({
|
|
371
363
|
getContainer: void 0,
|
|
372
364
|
prefixCls: "gbot-message"
|
|
373
365
|
});
|
|
374
366
|
}), n();
|
|
375
|
-
})),
|
|
376
|
-
var
|
|
377
|
-
if (
|
|
367
|
+
})), rn = (t) => {
|
|
368
|
+
var o, c, r;
|
|
369
|
+
if (ve(!1), !((o = e == null ? void 0 : e.data) != null && o.id) || !(i != null && i.id))
|
|
378
370
|
return;
|
|
379
371
|
const n = ((c = e.data) == null ? void 0 : c.id) || "";
|
|
380
|
-
let
|
|
381
|
-
(
|
|
382
|
-
|
|
383
|
-
}),
|
|
372
|
+
let a = [], l = /* @__PURE__ */ new Set();
|
|
373
|
+
(r = ee[n]) == null || r.forEach((b) => {
|
|
374
|
+
l.has(b.id) || (a.push(b), l.add(b.id));
|
|
375
|
+
}), ve(!0), De(t, a);
|
|
384
376
|
};
|
|
385
|
-
|
|
386
|
-
if (!
|
|
377
|
+
L(() => {
|
|
378
|
+
if (!Ne || !e)
|
|
387
379
|
return;
|
|
388
|
-
const t =
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
let
|
|
380
|
+
const t = Ne, n = () => V(void 0, null, function* () {
|
|
381
|
+
be(!0);
|
|
382
|
+
const a = Ae(t, re, ee[e.id], (i == null ? void 0 : i.type) || 0);
|
|
383
|
+
let l;
|
|
392
384
|
try {
|
|
393
|
-
|
|
394
|
-
applicationId:
|
|
385
|
+
$ ? l = yield $ == null ? void 0 : $({
|
|
386
|
+
applicationId: i.id,
|
|
395
387
|
sessionId: e.id,
|
|
396
388
|
message: {
|
|
397
|
-
content:
|
|
389
|
+
content: a,
|
|
398
390
|
sessionId: e.id,
|
|
399
|
-
role:
|
|
391
|
+
role: Nt.User,
|
|
400
392
|
files: ee[e.id]
|
|
401
393
|
}
|
|
402
|
-
}) :
|
|
403
|
-
} catch (
|
|
404
|
-
|
|
394
|
+
}) : l = !0;
|
|
395
|
+
} catch (o) {
|
|
396
|
+
l = !1;
|
|
405
397
|
}
|
|
406
|
-
if (
|
|
407
|
-
|
|
398
|
+
if (be(!1), l === !1) {
|
|
399
|
+
Y(!1);
|
|
408
400
|
return;
|
|
409
401
|
}
|
|
410
402
|
De(t), Ve(void 0);
|
|
@@ -412,332 +404,325 @@ ${e}` : e;
|
|
|
412
404
|
return e.ready ? n() : e.addEventListener("ready", n, !0), () => {
|
|
413
405
|
e == null || e.removeEventListener("ready", n);
|
|
414
406
|
};
|
|
415
|
-
}, [
|
|
416
|
-
const De = (t, n) =>
|
|
417
|
-
var W,
|
|
418
|
-
const
|
|
419
|
-
if (!
|
|
407
|
+
}, [Ne, e]);
|
|
408
|
+
const De = (t, n) => V(void 0, null, function* () {
|
|
409
|
+
var W, _, k;
|
|
410
|
+
const a = (W = e == null ? void 0 : e.data) == null ? void 0 : W.id;
|
|
411
|
+
if (!a)
|
|
420
412
|
return;
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
let
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
} else
|
|
430
|
-
i = void 0;
|
|
431
|
-
const c = new ge(
|
|
432
|
-
r,
|
|
433
|
-
s,
|
|
434
|
-
se.User,
|
|
413
|
+
q(!0), A(!0);
|
|
414
|
+
const l = Ae(t, re, n, (i == null ? void 0 : i.type) || 0);
|
|
415
|
+
let o;
|
|
416
|
+
i.type === oe.Agent ? o = void 0 : i.type === oe.Dialog && ((_ = i.arrange) != null && _.length) && i.arrange[0].visionOpen ? o = re ? [re] : void 0 : o = void 0;
|
|
417
|
+
const c = new me(
|
|
418
|
+
l,
|
|
419
|
+
a,
|
|
420
|
+
ie.User,
|
|
435
421
|
n,
|
|
436
|
-
|
|
422
|
+
o
|
|
437
423
|
// 新增:传入图片内容
|
|
438
424
|
);
|
|
439
|
-
|
|
440
|
-
applicationId:
|
|
441
|
-
sessionId:
|
|
425
|
+
ue(void 0), S(void 0), y.current = [c, ...v], C(y.current), i.id && he && he({
|
|
426
|
+
applicationId: i.id,
|
|
427
|
+
sessionId: a,
|
|
442
428
|
message: c
|
|
443
429
|
});
|
|
444
|
-
const
|
|
445
|
-
|
|
446
|
-
const b = (n == null ? void 0 : n.map((
|
|
447
|
-
stream:
|
|
430
|
+
const r = new me("", a, ie.System);
|
|
431
|
+
r.isWaiting = !0, y.current = [r, ...y.current], C(y.current);
|
|
432
|
+
const b = (n == null ? void 0 : n.map((F) => F.id)) || [], N = {
|
|
433
|
+
stream: Rn.stream,
|
|
448
434
|
referenceFirst: !1
|
|
449
435
|
};
|
|
450
|
-
if (
|
|
451
|
-
const
|
|
452
|
-
|
|
436
|
+
if (g != null && g.promptVariables) {
|
|
437
|
+
const F = H == null ? void 0 : H.reduce((fe, wt) => (fe[wt.key] = wt.value, fe), {});
|
|
438
|
+
N.formatValues = F;
|
|
453
439
|
}
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
|
|
440
|
+
if (g != null && g.knowledges) {
|
|
441
|
+
const F = Jt;
|
|
442
|
+
N.knowledges = F;
|
|
457
443
|
}
|
|
458
|
-
const
|
|
459
|
-
text:
|
|
444
|
+
const R = {
|
|
445
|
+
text: l,
|
|
460
446
|
fileIds: b,
|
|
461
447
|
files: n
|
|
462
448
|
};
|
|
463
|
-
|
|
464
|
-
[
|
|
465
|
-
}), (
|
|
449
|
+
o && o.length > 0 && (R.imageContent = o), yield e.send(R, N), le({
|
|
450
|
+
[a]: []
|
|
451
|
+
}), (k = pe.current) == null || k.update(), Y(!1);
|
|
466
452
|
});
|
|
467
|
-
|
|
468
|
-
var
|
|
469
|
-
const t = (
|
|
453
|
+
L(() => {
|
|
454
|
+
var l;
|
|
455
|
+
const t = (l = e == null ? void 0 : e.data) == null ? void 0 : l.id;
|
|
470
456
|
if (!t)
|
|
471
457
|
return;
|
|
472
|
-
const n = (
|
|
473
|
-
if (!
|
|
458
|
+
const n = (o) => {
|
|
459
|
+
if (!o.sessionId || o.sessionId && o.sessionId !== qe.current || o.role === ie.User)
|
|
474
460
|
return;
|
|
475
|
-
if (
|
|
476
|
-
|
|
477
|
-
getContainer: () => (
|
|
461
|
+
if (o.index === -1 && o.code !== 200 && o.code !== 11915 && (A(!1), q(!1), y.current = y.current.filter((b) => !b.isWaiting), C([...y.current]), y.current = [...y.current], o.content)) {
|
|
462
|
+
ne.config({
|
|
463
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
478
464
|
prefixCls: "gbot-notification"
|
|
479
|
-
}),
|
|
480
|
-
message:
|
|
481
|
-
}),
|
|
465
|
+
}), ne.error({
|
|
466
|
+
message: o.content
|
|
467
|
+
}), ne.config({
|
|
482
468
|
getContainer: void 0,
|
|
483
469
|
prefixCls: "gbot-notification"
|
|
484
470
|
});
|
|
485
471
|
return;
|
|
486
472
|
}
|
|
487
|
-
const c =
|
|
488
|
-
|
|
489
|
-
applicationId:
|
|
473
|
+
const c = o.actions || [], r = new me(o.content, t, ie.Robot);
|
|
474
|
+
r.messageId = o.messageId || Me(), r.reasoningContent = o.reasoningContent, r.searchReference = o.searchReference, r.thinkingSecs = o.thinkingSecs, r.thinkingStatus = o.thinkingStatus, r.actions = c, r.isLoading = !0, r.searchingStatus = o.searchingStatus, y.current = y.current.filter((b) => !b.isWaiting).filter((b) => !b.isReplying), o.index === void 0 && C([r, ...y.current]), o.code === 11915 && (A(!1), q(!1), r.isLoading = !1, r.content = "请您换个问题问我吧~", r.isSensitive = !0, C([r, ...y.current])), o.index === -2 && (A(!1), q(!1), r.isLoading = !1, r.content = "回答已中止~", r.isSuspend = !0, C([r, ...y.current])), o.index === -1 && (A(!1), q(!1), r.isLoading = !1, r.reference = o.reference, C([r, ...y.current]), i.id && he && he({
|
|
475
|
+
applicationId: i.id,
|
|
490
476
|
sessionId: t,
|
|
491
|
-
message:
|
|
492
|
-
})),
|
|
493
|
-
},
|
|
477
|
+
message: r
|
|
478
|
+
})), o.index === -3 && (A(!1), q(!1), r.isLoading = !1, r.reference = o.reference, r.relatedQuesion = o.relatedQuesion, C([r, ...y.current]));
|
|
479
|
+
}, a = () => {
|
|
494
480
|
e.addEventListener("message:updated", n);
|
|
495
481
|
};
|
|
496
|
-
return e.ready ? e.addEventListener("message:updated", n) : e.addEventListener("ready",
|
|
497
|
-
e == null || e.removeEventListener("message:updated", n), e == null || e.removeEventListener("ready",
|
|
482
|
+
return e.ready ? e.addEventListener("message:updated", n) : e.addEventListener("ready", a), () => {
|
|
483
|
+
e == null || e.removeEventListener("message:updated", n), e == null || e.removeEventListener("ready", a);
|
|
498
484
|
};
|
|
499
|
-
}, [e]),
|
|
485
|
+
}, [e]), L(() => {
|
|
500
486
|
if (!e) {
|
|
501
|
-
|
|
487
|
+
Ee(!1);
|
|
502
488
|
return;
|
|
503
489
|
}
|
|
504
490
|
const t = (n) => {
|
|
505
|
-
|
|
491
|
+
Ee(n);
|
|
506
492
|
};
|
|
507
|
-
return
|
|
493
|
+
return Ee(e.frozen), e.addEventListener("frozen", t), () => {
|
|
508
494
|
e == null || e.removeEventListener("frozen", t);
|
|
509
495
|
};
|
|
510
|
-
}, [e]),
|
|
511
|
-
if (!
|
|
496
|
+
}, [e]), L(() => {
|
|
497
|
+
if (!I)
|
|
512
498
|
return;
|
|
513
|
-
const t =
|
|
514
|
-
|
|
515
|
-
}, [
|
|
516
|
-
|
|
517
|
-
}, [
|
|
518
|
-
const
|
|
499
|
+
const t = I.questionContextMaxLength || 4e3;
|
|
500
|
+
Vt(t);
|
|
501
|
+
}, [I, O]), L(() => {
|
|
502
|
+
Le && S(Le.text);
|
|
503
|
+
}, [Le]);
|
|
504
|
+
const an = (t) => {
|
|
519
505
|
const n = t.size;
|
|
520
|
-
return n <= 0 ? (
|
|
521
|
-
getContainer: () => (
|
|
506
|
+
return n <= 0 ? (m.config({
|
|
507
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
522
508
|
prefixCls: "gbot-message"
|
|
523
|
-
}),
|
|
509
|
+
}), m.error("该文件为空,请重新上传"), m.config({
|
|
524
510
|
getContainer: void 0,
|
|
525
511
|
prefixCls: "gbot-message"
|
|
526
|
-
}), !1) : n > 20 *
|
|
527
|
-
getContainer: () => (
|
|
512
|
+
}), !1) : n > 20 * Fn ? (m.config({
|
|
513
|
+
getContainer: () => (f == null ? void 0 : f.current) || document.body,
|
|
528
514
|
prefixCls: "gbot-message"
|
|
529
|
-
}),
|
|
515
|
+
}), m.error("图片须小于20M"), m.config({
|
|
530
516
|
getContainer: void 0,
|
|
531
517
|
prefixCls: "gbot-message"
|
|
532
|
-
}), !1) : (
|
|
533
|
-
},
|
|
534
|
-
var
|
|
535
|
-
return (t = e == null ? void 0 : e.data) != null &&
|
|
536
|
-
|
|
537
|
-
netOpen:
|
|
538
|
-
}).then((
|
|
539
|
-
var
|
|
540
|
-
p == null || p(
|
|
541
|
-
}).catch((r) => {
|
|
542
|
-
ne.current = null, s(r);
|
|
518
|
+
}), !1) : (Z(t), !1);
|
|
519
|
+
}, ln = (t) => V(void 0, null, function* () {
|
|
520
|
+
var n;
|
|
521
|
+
return Z(t), (n = e == null ? void 0 : e.data) != null && n.id ? ot(e, t) : new Promise((a) => {
|
|
522
|
+
M(!0), x == null || x({
|
|
523
|
+
netOpen: E ? K.OPEN : K.CLOSE
|
|
524
|
+
}).then((l) => {
|
|
525
|
+
var o, c;
|
|
526
|
+
p == null || p(l), M(!1), P(!!((o = l.data) != null && o.netOpen)), te(!!((c = l.data) != null && c.enableNetOpen)), we(l), a(ot(l, t));
|
|
543
527
|
});
|
|
544
|
-
})
|
|
545
|
-
}),
|
|
546
|
-
const
|
|
547
|
-
return
|
|
548
|
-
}), un = (t, n) => {
|
|
549
|
-
const s = Bn(n.name);
|
|
550
|
-
return new Promise((r) => {
|
|
528
|
+
});
|
|
529
|
+
}), ot = (t, n) => {
|
|
530
|
+
const a = An(n.name);
|
|
531
|
+
return new Promise((l) => {
|
|
551
532
|
var c;
|
|
552
|
-
const
|
|
553
|
-
files: [`${
|
|
533
|
+
const o = {
|
|
534
|
+
files: [`${Me()}.${a}`],
|
|
554
535
|
isv: "minio",
|
|
555
536
|
knowledgeId: ((c = t.data) == null ? void 0 : c.id) || "",
|
|
556
537
|
type: 1
|
|
557
538
|
};
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
var W,
|
|
561
|
-
const b = (W =
|
|
562
|
-
|
|
539
|
+
Pe(!0), O == null || O.postTicket(o).then((r) => {
|
|
540
|
+
O.uploadMinioFile(r.minio, n).then(() => {
|
|
541
|
+
var W, _;
|
|
542
|
+
const b = (W = r.minio.endpoints) == null ? void 0 : W[0], N = r.minio.bucket, R = (_ = r.minio.fileKeys) == null ? void 0 : _[0];
|
|
543
|
+
l(`${location.protocol}//${b}/${N}/${R}`);
|
|
563
544
|
}).catch(() => {
|
|
545
|
+
ae(""), Z(void 0);
|
|
546
|
+
}).finally(() => {
|
|
547
|
+
Pe(!1);
|
|
564
548
|
});
|
|
565
549
|
}).catch(() => {
|
|
550
|
+
ae(""), Z(void 0), Pe(!1);
|
|
566
551
|
});
|
|
567
552
|
});
|
|
568
553
|
};
|
|
569
|
-
|
|
570
|
-
const t =
|
|
571
|
-
t && !
|
|
554
|
+
L(() => {
|
|
555
|
+
const t = T.current;
|
|
556
|
+
t && !Xe && t.scrollTo({
|
|
572
557
|
top: t.scrollHeight
|
|
573
558
|
});
|
|
574
559
|
}, [v]);
|
|
575
|
-
const
|
|
576
|
-
if (!n.file.url || !(
|
|
577
|
-
return
|
|
578
|
-
const
|
|
560
|
+
const st = (t, n) => new Promise((a) => {
|
|
561
|
+
if (!n.file.url || !(i != null && i.id))
|
|
562
|
+
return a();
|
|
563
|
+
const l = Ue(Fe({}, n.file), {
|
|
579
564
|
type: 1
|
|
580
565
|
});
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
(
|
|
566
|
+
O == null || O.postApplicationIdSessionKnowledgeSessionFile(i == null ? void 0 : i.id, t, l).finally(() => {
|
|
567
|
+
var o;
|
|
568
|
+
(o = pe.current) == null || o.update().finally(a);
|
|
584
569
|
});
|
|
585
|
-
}),
|
|
570
|
+
}), dn = () => {
|
|
586
571
|
var t;
|
|
587
|
-
(t = e == null ? void 0 : e.data) != null && t.id && (
|
|
588
|
-
},
|
|
589
|
-
const n =
|
|
572
|
+
(t = e == null ? void 0 : e.data) != null && t.id && (A(!1), e.suspend());
|
|
573
|
+
}, cn = (t) => {
|
|
574
|
+
const n = T.current;
|
|
590
575
|
n && setTimeout(() => {
|
|
591
576
|
n.scrollTo({
|
|
592
577
|
top: n.scrollHeight,
|
|
593
578
|
behavior: t == null ? void 0 : t.behavior
|
|
594
579
|
});
|
|
595
580
|
}, t == null ? void 0 : t.ms);
|
|
596
|
-
},
|
|
597
|
-
if (!
|
|
581
|
+
}, fn = () => {
|
|
582
|
+
if (!T.current)
|
|
598
583
|
return;
|
|
599
|
-
const t =
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
var n,
|
|
603
|
-
(n =
|
|
604
|
-
}),
|
|
605
|
-
|
|
606
|
-
}),
|
|
584
|
+
const t = T.current.scrollTop <= -80;
|
|
585
|
+
Zt(t);
|
|
586
|
+
}, gn = je((t) => {
|
|
587
|
+
var n, a;
|
|
588
|
+
(n = ye.current) == null || n.update(t), (a = ye.current) == null || a.focus();
|
|
589
|
+
}), mn = je((t) => {
|
|
590
|
+
it(t);
|
|
591
|
+
}), un = je(() => {
|
|
607
592
|
var n;
|
|
608
593
|
if (!((n = e == null ? void 0 : e.data) != null && n.id))
|
|
609
594
|
return;
|
|
610
|
-
y.current = [...v.slice(1, v.length)],
|
|
611
|
-
const t = new
|
|
612
|
-
t.isWaiting = !0, y.current = [t, ...y.current],
|
|
595
|
+
y.current = [...v.slice(1, v.length)], C(y.current);
|
|
596
|
+
const t = new me("", e.data.id, ie.System);
|
|
597
|
+
t.isWaiting = !0, y.current = [t, ...y.current], C(y.current), q(!0), A(!0), e.answerAgain();
|
|
613
598
|
});
|
|
614
|
-
|
|
599
|
+
L(() => {
|
|
615
600
|
var t, n;
|
|
616
|
-
|
|
601
|
+
qe.current = (t = e == null ? void 0 : e.data) == null ? void 0 : t.id, !Ze && ((n = Te.current) == null || n.clear());
|
|
617
602
|
}, [e]);
|
|
618
|
-
const
|
|
619
|
-
var
|
|
620
|
-
if (!((
|
|
603
|
+
const hn = () => {
|
|
604
|
+
var a;
|
|
605
|
+
if (!((a = e == null ? void 0 : e.data) != null && a.id))
|
|
621
606
|
return;
|
|
622
607
|
const n = v[v.length - 1].messageTime;
|
|
623
608
|
e.fetchMessages({
|
|
624
609
|
endTime: n,
|
|
625
|
-
pageSize:
|
|
626
|
-
}).then((
|
|
627
|
-
const
|
|
628
|
-
if (!
|
|
629
|
-
|
|
610
|
+
pageSize: Pt
|
|
611
|
+
}).then((l) => {
|
|
612
|
+
const o = l || [];
|
|
613
|
+
if (!o || !(o != null && o.length)) {
|
|
614
|
+
ce(!1);
|
|
630
615
|
return;
|
|
631
616
|
}
|
|
632
|
-
|
|
617
|
+
o.length < 10 ? ce(!1) : ce(!0), C([...v, ...o.reverse()]);
|
|
633
618
|
});
|
|
634
|
-
},
|
|
635
|
-
var n,
|
|
619
|
+
}, yn = (t) => V(void 0, null, function* () {
|
|
620
|
+
var n, a;
|
|
636
621
|
if (!((n = e == null ? void 0 : e.data) != null && n.id))
|
|
637
622
|
P(t);
|
|
638
623
|
else {
|
|
639
|
-
if (yield e.setNetOpen(t), !((
|
|
624
|
+
if (yield e.setNetOpen(t), !((a = e.data) != null && a.id))
|
|
640
625
|
return;
|
|
641
626
|
P(t);
|
|
642
627
|
}
|
|
643
|
-
}), He = () =>
|
|
628
|
+
}), He = () => V(void 0, null, function* () {
|
|
644
629
|
e ? e.fetchData().then((t) => {
|
|
645
630
|
var n;
|
|
646
631
|
(n = e == null ? void 0 : e.data) != null && n.id && (P(t.netOpen), te(t.enableNetOpen));
|
|
647
|
-
}) : (P(typeof (
|
|
632
|
+
}) : (P(typeof (s == null ? void 0 : s.connectNetwork) == "object" && typeof (s == null ? void 0 : s.connectNetwork.default) == "boolean" ? s.connectNetwork.default : !1), te(i.arrange[0].enableNetOpen));
|
|
648
633
|
});
|
|
649
|
-
|
|
634
|
+
L(() => {
|
|
650
635
|
He();
|
|
651
|
-
}, [e]),
|
|
636
|
+
}, [e]), L(() => {
|
|
652
637
|
requestAnimationFrame(() => {
|
|
653
|
-
var n,
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
if (!
|
|
638
|
+
var n, a;
|
|
639
|
+
if (T.current) {
|
|
640
|
+
const l = document.getElementById("chat-main"), o = (n = T.current) == null ? void 0 : n.querySelector(".infinite-scroll-component__outerdiv"), c = (a = T.current) == null ? void 0 : a.querySelector(".infinite-scroll-component");
|
|
641
|
+
if (!o || !c || !l)
|
|
657
642
|
return;
|
|
658
|
-
const
|
|
659
|
-
if (c.offsetHeight <=
|
|
660
|
-
if (
|
|
643
|
+
const r = l.offsetHeight;
|
|
644
|
+
if (c.offsetHeight <= r) {
|
|
645
|
+
if (o.style.height === "100%")
|
|
661
646
|
return;
|
|
662
|
-
|
|
647
|
+
o.style.height = "100%";
|
|
663
648
|
} else {
|
|
664
|
-
if (
|
|
649
|
+
if (o.style.height === "auto")
|
|
665
650
|
return;
|
|
666
|
-
|
|
651
|
+
o.style.height = "auto";
|
|
667
652
|
}
|
|
668
653
|
}
|
|
669
654
|
});
|
|
670
|
-
}, [v]),
|
|
655
|
+
}, [v]), L(() => {
|
|
671
656
|
if (e)
|
|
672
657
|
return;
|
|
673
658
|
const t = () => {
|
|
674
|
-
const
|
|
675
|
-
var b,
|
|
676
|
-
let
|
|
677
|
-
return typeof (
|
|
659
|
+
const l = ((I == null ? void 0 : I.promptVariables) || []).filter((o) => o.type ? !(o.type === Ie.User && o.key === "query") && !(o.type === Ie.System && o.key === "datetime") && o.status === 1 : o.key !== "query" && o.status === 1).map((o, c) => {
|
|
660
|
+
var b, N;
|
|
661
|
+
let r = "";
|
|
662
|
+
return typeof (s == null ? void 0 : s.promptVariables) == "object" && (r = ((N = (b = s.promptVariables.default) == null ? void 0 : b.find((R) => R.key === o.key && R.type === o.type)) == null ? void 0 : N.value) || ""), {
|
|
678
663
|
id: c + "",
|
|
679
|
-
key:
|
|
680
|
-
name:
|
|
681
|
-
value:
|
|
682
|
-
type:
|
|
664
|
+
key: o.key,
|
|
665
|
+
name: o.name,
|
|
666
|
+
value: r,
|
|
667
|
+
type: o.type
|
|
683
668
|
};
|
|
684
669
|
});
|
|
685
|
-
|
|
670
|
+
de([...l].sort((o, c) => o.key.localeCompare(c.key)));
|
|
686
671
|
};
|
|
687
|
-
return
|
|
688
|
-
|
|
672
|
+
return I != null && I.ready ? t() : I == null || I.addEventListener("ready", t), () => {
|
|
673
|
+
I == null || I.removeEventListener("ready", t);
|
|
689
674
|
};
|
|
690
|
-
}, [e,
|
|
691
|
-
const
|
|
692
|
-
netOpen:
|
|
675
|
+
}, [e, I, s == null ? void 0 : s.promptVariables]);
|
|
676
|
+
const rt = () => x == null ? void 0 : x({
|
|
677
|
+
netOpen: E ? K.OPEN : K.CLOSE
|
|
693
678
|
}).then((t) => {
|
|
694
|
-
var n,
|
|
695
|
-
return p == null || p(t),
|
|
696
|
-
}),
|
|
679
|
+
var n, a;
|
|
680
|
+
return p == null || p(t), M(!1), P(!!((n = t.data) != null && n.netOpen)), te(!!((a = t.data) != null && a.enableNetOpen)), we(t), t;
|
|
681
|
+
}), at = Ln(() => {
|
|
697
682
|
var t;
|
|
698
|
-
return
|
|
699
|
-
application:
|
|
683
|
+
return i.arrange && ((t = i.arrange[0]) != null && t.openingContent) ? /* @__PURE__ */ d(Tt, {
|
|
684
|
+
application: i,
|
|
700
685
|
history: {
|
|
701
686
|
role: 1,
|
|
702
|
-
content:
|
|
687
|
+
content: i.arrange[0].openingContent,
|
|
703
688
|
code: 200,
|
|
704
689
|
messageId: "opening-message",
|
|
705
690
|
sessionId: "",
|
|
706
691
|
reference: [],
|
|
707
692
|
searchReference: [],
|
|
708
|
-
messageTime:
|
|
693
|
+
messageTime: Ot(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
|
|
709
694
|
actions: [],
|
|
710
695
|
isLoading: !1
|
|
711
696
|
},
|
|
712
697
|
actions: !!v.length,
|
|
713
|
-
markdown:
|
|
698
|
+
markdown: s == null ? void 0 : s.markdown
|
|
714
699
|
}) : null;
|
|
715
|
-
}, [
|
|
716
|
-
return
|
|
700
|
+
}, [i == null ? void 0 : i.arrange, v]);
|
|
701
|
+
return En(h, () => ({
|
|
717
702
|
getCurrentInputText: () => {
|
|
718
703
|
var t;
|
|
719
|
-
return (t =
|
|
704
|
+
return (t = ye.current) == null ? void 0 : t.getCurrentText();
|
|
720
705
|
}
|
|
721
|
-
})),
|
|
706
|
+
})), L(() => {
|
|
722
707
|
var n;
|
|
723
708
|
const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
|
|
724
|
-
t &&
|
|
709
|
+
t && le((a) => Ue(Fe({}, a), {
|
|
725
710
|
[t]: []
|
|
726
711
|
}));
|
|
727
|
-
}, [(
|
|
712
|
+
}, [(lt = e == null ? void 0 : e.data) == null ? void 0 : lt.id]), /* @__PURE__ */ z("div", {
|
|
728
713
|
className: "agent-chat",
|
|
729
|
-
children: [
|
|
714
|
+
children: [tn ? /* @__PURE__ */ d("div", {
|
|
730
715
|
className: "session-loading",
|
|
731
|
-
children: /* @__PURE__ */ d(
|
|
732
|
-
}) : /* @__PURE__ */
|
|
733
|
-
children: [(
|
|
734
|
-
ref:
|
|
735
|
-
appId:
|
|
716
|
+
children: /* @__PURE__ */ d(It, {})
|
|
717
|
+
}) : /* @__PURE__ */ z(wn, {
|
|
718
|
+
children: [(g == null ? void 0 : g.promptVariables) && /* @__PURE__ */ d(Kn, {
|
|
719
|
+
ref: Ye,
|
|
720
|
+
appId: i.id,
|
|
736
721
|
currentSession: e,
|
|
737
|
-
promptVariables:
|
|
738
|
-
setPromptVariables:
|
|
722
|
+
promptVariables: H,
|
|
723
|
+
setPromptVariables: de,
|
|
739
724
|
setCurrentSession: p
|
|
740
|
-
}), /* @__PURE__ */
|
|
725
|
+
}), /* @__PURE__ */ z("div", {
|
|
741
726
|
className: "chat-main",
|
|
742
727
|
id: "chat-main",
|
|
743
728
|
style: Ft,
|
|
@@ -750,111 +735,111 @@ ${e}` : e;
|
|
|
750
735
|
display: "flex",
|
|
751
736
|
flexDirection: "column-reverse"
|
|
752
737
|
},
|
|
753
|
-
ref:
|
|
754
|
-
onScroll:
|
|
755
|
-
children: (
|
|
738
|
+
ref: T,
|
|
739
|
+
onScroll: fn,
|
|
740
|
+
children: (dt = e == null ? void 0 : e.data) != null && dt.id && (v != null && v.length) ? /* @__PURE__ */ z(Gn, {
|
|
756
741
|
dataLength: v.length,
|
|
757
|
-
next:
|
|
742
|
+
next: hn,
|
|
758
743
|
style: {
|
|
759
744
|
display: "flex",
|
|
760
745
|
flexDirection: "column-reverse",
|
|
761
746
|
overflowX: "hidden"
|
|
762
747
|
},
|
|
763
748
|
inverse: !0,
|
|
764
|
-
endMessage: v.length >
|
|
765
|
-
((
|
|
749
|
+
endMessage: v.length > Pt && // 少于一页不展示这个提示
|
|
750
|
+
((ct = T.current) != null && ct.scrollTop) && ((ft = T.current) == null ? void 0 : ft.scrollTop) < -10 ? /* @__PURE__ */ d(Pn, {
|
|
766
751
|
plain: !0,
|
|
767
752
|
children: "没有更多数据了"
|
|
768
753
|
}) : null,
|
|
769
|
-
hasMore:
|
|
754
|
+
hasMore: Je,
|
|
770
755
|
loader: /* @__PURE__ */ d("div", {
|
|
771
756
|
style: {
|
|
772
757
|
height: "50px",
|
|
773
758
|
textAlign: "center",
|
|
774
759
|
overflow: "hidden"
|
|
775
760
|
},
|
|
776
|
-
children: /* @__PURE__ */ d(
|
|
761
|
+
children: /* @__PURE__ */ d(It, {})
|
|
777
762
|
}),
|
|
778
763
|
scrollableTarget: "scrollableDiv",
|
|
779
|
-
children: [v.map((t, n) => /* @__PURE__ */ d(
|
|
780
|
-
application:
|
|
764
|
+
children: [v.map((t, n) => /* @__PURE__ */ d(ei, {
|
|
765
|
+
application: i,
|
|
781
766
|
currentSession: e,
|
|
782
767
|
history: t,
|
|
783
|
-
docViewerUrl:
|
|
768
|
+
docViewerUrl: j,
|
|
784
769
|
isLastHistory: n === 0,
|
|
785
|
-
onRelatedClick:
|
|
786
|
-
onAgainClick:
|
|
787
|
-
onEditClick:
|
|
788
|
-
markdown:
|
|
789
|
-
}, t.messageId + n)), !
|
|
790
|
-
}) : /* @__PURE__ */
|
|
770
|
+
onRelatedClick: mn,
|
|
771
|
+
onAgainClick: un,
|
|
772
|
+
onEditClick: gn,
|
|
773
|
+
markdown: s == null ? void 0 : s.markdown
|
|
774
|
+
}, t.messageId + n)), !Je && at]
|
|
775
|
+
}) : /* @__PURE__ */ z("div", {
|
|
791
776
|
className: "main-empty",
|
|
792
|
-
children: [(
|
|
777
|
+
children: [(s == null ? void 0 : s.greeting) !== !1 && /* @__PURE__ */ d(zn, {
|
|
793
778
|
text: (
|
|
794
779
|
// 第一优先级:features配置
|
|
795
|
-
|
|
780
|
+
s != null && s.greeting && typeof s.greeting == "object" && s.greeting.text !== void 0 ? s.greeting.text : (
|
|
796
781
|
// 第二优先级:application.arrange[0].greetings
|
|
797
|
-
(
|
|
782
|
+
(gt = i.arrange) != null && gt.length && ((mt = i.arrange[0]) != null && mt.greetings) ? i.arrange[0].greetings : (
|
|
798
783
|
// 第三优先级:默认文本
|
|
799
|
-
|
|
784
|
+
Et.text
|
|
800
785
|
)
|
|
801
786
|
)
|
|
802
787
|
),
|
|
803
|
-
icon:
|
|
804
|
-
children: !!
|
|
805
|
-
ref:
|
|
806
|
-
sid: (
|
|
807
|
-
isRecommendClearing:
|
|
808
|
-
data:
|
|
809
|
-
layoutBreakpoints: typeof (
|
|
788
|
+
icon: s === void 0 || s.greeting === !0 || ((ut = s.greeting) == null ? void 0 : ut.icon) === void 0 ? Ut || Et.icon : s.greeting.icon,
|
|
789
|
+
children: !!We.length && (((s == null ? void 0 : s.greeting) === void 0 || (s == null ? void 0 : s.greeting)) === !0 || typeof (s == null ? void 0 : s.greeting) == "object" && s.greeting.questions !== !1) && /* @__PURE__ */ d(Vn, {
|
|
790
|
+
ref: Te,
|
|
791
|
+
sid: (ht = e == null ? void 0 : e.data) == null ? void 0 : ht.id,
|
|
792
|
+
isRecommendClearing: _e,
|
|
793
|
+
data: We,
|
|
794
|
+
layoutBreakpoints: typeof (s == null ? void 0 : s.greeting) == "object" ? s.greeting.layoutBreakpoints : void 0,
|
|
810
795
|
onItemClick: (t) => {
|
|
811
|
-
var
|
|
812
|
-
if (
|
|
796
|
+
var a, l, o;
|
|
797
|
+
if (ue(t == null ? void 0 : t.question), S(t == null ? void 0 : t.question), _e)
|
|
813
798
|
return;
|
|
814
799
|
t != null && t.id && J(!0);
|
|
815
|
-
const n = (
|
|
816
|
-
|
|
817
|
-
var c,
|
|
818
|
-
t != null && t.id && (n ? (c =
|
|
800
|
+
const n = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
|
|
801
|
+
g != null && g.fileUpload ? (o = (l = pe.current) == null ? void 0 : l.clear()) == null || o.then(() => {
|
|
802
|
+
var c, r;
|
|
803
|
+
t != null && t.id && (n ? (c = st(n, t)) == null || c.finally(() => {
|
|
819
804
|
J(!1);
|
|
820
|
-
}) : (J(!1),
|
|
821
|
-
var
|
|
822
|
-
(
|
|
805
|
+
}) : (J(!1), M(!0), (r = rt()) == null || r.then((b) => {
|
|
806
|
+
var N;
|
|
807
|
+
(N = st(b.id, t)) == null || N.finally(() => {
|
|
823
808
|
J(!1);
|
|
824
809
|
});
|
|
825
810
|
})));
|
|
826
|
-
}) : n ? J(!1) : (J(!1),
|
|
811
|
+
}) : n ? J(!1) : (J(!1), M(!0), rt());
|
|
827
812
|
}
|
|
828
813
|
})
|
|
829
|
-
}),
|
|
814
|
+
}), at]
|
|
830
815
|
})
|
|
831
|
-
}),
|
|
816
|
+
}), Ge && /* @__PURE__ */ d("div", {
|
|
832
817
|
className: "session-stop",
|
|
833
|
-
children: /* @__PURE__ */ d(
|
|
818
|
+
children: /* @__PURE__ */ d(G, {
|
|
834
819
|
type: "primary",
|
|
835
820
|
style: {
|
|
836
821
|
background: "white"
|
|
837
822
|
},
|
|
838
823
|
ghost: !0,
|
|
839
824
|
size: "small",
|
|
840
|
-
icon: /* @__PURE__ */ d(
|
|
825
|
+
icon: /* @__PURE__ */ d(ge, {
|
|
841
826
|
type: "icon-zantinghuida",
|
|
842
827
|
style: {
|
|
843
828
|
fontSize: 16
|
|
844
829
|
}
|
|
845
830
|
}),
|
|
846
|
-
onClick: () =>
|
|
831
|
+
onClick: () => dn(),
|
|
847
832
|
children: "停止回答"
|
|
848
833
|
})
|
|
849
|
-
}),
|
|
834
|
+
}), Xe && (v == null ? void 0 : v.length) > 0 && /* @__PURE__ */ d("div", {
|
|
850
835
|
className: "back-bottom",
|
|
851
|
-
children: /* @__PURE__ */ d(
|
|
836
|
+
children: /* @__PURE__ */ d(G, {
|
|
852
837
|
size: "small",
|
|
853
|
-
onClick: () =>
|
|
838
|
+
onClick: () => cn({
|
|
854
839
|
behavior: "smooth"
|
|
855
840
|
}),
|
|
856
841
|
type: "link",
|
|
857
|
-
icon: /* @__PURE__ */ d(
|
|
842
|
+
icon: /* @__PURE__ */ d(ge, {
|
|
858
843
|
type: "icon-yijianhuidaodibu",
|
|
859
844
|
style: {
|
|
860
845
|
fontSize: 24
|
|
@@ -864,53 +849,53 @@ ${e}` : e;
|
|
|
864
849
|
})]
|
|
865
850
|
}), /* @__PURE__ */ d("div", {
|
|
866
851
|
className: "chat-footer",
|
|
867
|
-
children: /* @__PURE__ */
|
|
852
|
+
children: /* @__PURE__ */ z("div", {
|
|
868
853
|
className: "chat-footer-input",
|
|
869
|
-
children: [
|
|
854
|
+
children: [se && /* @__PURE__ */ d("div", {
|
|
870
855
|
className: "input-files",
|
|
871
|
-
children:
|
|
872
|
-
|
|
873
|
-
file: t,
|
|
856
|
+
children: /* @__PURE__ */ d(Un, {
|
|
857
|
+
file: se,
|
|
874
858
|
actions: {
|
|
875
|
-
upload:
|
|
876
|
-
We((r) => r + 1);
|
|
877
|
-
try {
|
|
878
|
-
return yield fn(s);
|
|
879
|
-
} finally {
|
|
880
|
-
We((r) => Math.max(0, r - 1));
|
|
881
|
-
}
|
|
882
|
-
}),
|
|
859
|
+
upload: ln,
|
|
883
860
|
remove: () => {
|
|
884
|
-
|
|
861
|
+
ae(""), Z(void 0);
|
|
885
862
|
}
|
|
886
863
|
},
|
|
887
|
-
onUrlChange: (
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
return i[n] = s, i;
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
}, n))
|
|
894
|
-
}), /* @__PURE__ */ V(Ie, {
|
|
864
|
+
onUrlChange: (t) => ae(t)
|
|
865
|
+
})
|
|
866
|
+
}), /* @__PURE__ */ z(Ce, {
|
|
895
867
|
className: "footer-upload-action",
|
|
896
868
|
onClick: (t) => t.preventDefault(),
|
|
897
|
-
children: [/* @__PURE__ */
|
|
898
|
-
children: [(
|
|
899
|
-
|
|
900
|
-
disabled: me.length >= Ee || F,
|
|
869
|
+
children: [/* @__PURE__ */ z(Ce, {
|
|
870
|
+
children: [(i.type === oe.Agent && (g == null ? void 0 : g.imageUpload) || i.type === oe.Dialog && ((yt = i.arrange) == null ? void 0 : yt.length) && !!i.arrange[0].visionOpen && (g == null ? void 0 : g.imageUpload)) && /* @__PURE__ */ d(Tn, {
|
|
871
|
+
disabled: !!se || D,
|
|
901
872
|
accept: ".jpg, .png, .jpeg,.bmp",
|
|
902
873
|
listType: "picture-card",
|
|
903
|
-
beforeUpload:
|
|
874
|
+
beforeUpload: an,
|
|
904
875
|
className: "footer-upload-picture",
|
|
905
876
|
showUploadList: !1,
|
|
906
|
-
children:
|
|
877
|
+
children: se ? /* @__PURE__ */ d(G, {
|
|
878
|
+
type: "text",
|
|
879
|
+
className: "camera-out-btn",
|
|
880
|
+
style: {
|
|
881
|
+
width: "22px",
|
|
882
|
+
position: "relative",
|
|
883
|
+
bottom: "-2px"
|
|
884
|
+
},
|
|
885
|
+
disabled: !!se || D,
|
|
886
|
+
icon: /* @__PURE__ */ d(qn, {
|
|
887
|
+
className: "icon-tianjia",
|
|
888
|
+
style: {
|
|
889
|
+
fontSize: "22px"
|
|
890
|
+
}
|
|
891
|
+
})
|
|
892
|
+
}) : /* @__PURE__ */ d(On, {
|
|
907
893
|
placement: "topLeft",
|
|
908
894
|
overlayClassName: "footer-upload-tooltip",
|
|
909
895
|
title: /* @__PURE__ */ d("div", {
|
|
910
|
-
children:
|
|
911
|
-
.bmp格式的图片数据,单文件最大20M,最多${Ee}张`
|
|
896
|
+
children: "支持上传.jpg .png .jpeg .bmp格式的图片数据,最大20M,单次仅可上传1个"
|
|
912
897
|
}),
|
|
913
|
-
children: /* @__PURE__ */ d(
|
|
898
|
+
children: /* @__PURE__ */ d(G, {
|
|
914
899
|
type: "text",
|
|
915
900
|
className: "camera-out-btn",
|
|
916
901
|
style: {
|
|
@@ -918,107 +903,91 @@ ${e}` : e;
|
|
|
918
903
|
position: "relative",
|
|
919
904
|
bottom: "-2px"
|
|
920
905
|
},
|
|
921
|
-
icon: /* @__PURE__ */ d(
|
|
922
|
-
type: "icon-
|
|
906
|
+
icon: /* @__PURE__ */ d(ge, {
|
|
907
|
+
type: "icon-Vector",
|
|
923
908
|
className: "icon-tianjia",
|
|
924
909
|
style: {
|
|
925
910
|
fontSize: "22px"
|
|
926
911
|
}
|
|
927
912
|
})
|
|
928
913
|
})
|
|
929
|
-
}) : /* @__PURE__ */ d(X, {
|
|
930
|
-
type: "text",
|
|
931
|
-
className: "camera-out-btn",
|
|
932
|
-
style: {
|
|
933
|
-
width: "22px",
|
|
934
|
-
position: "relative",
|
|
935
|
-
bottom: "-2px"
|
|
936
|
-
},
|
|
937
|
-
disabled: !0,
|
|
938
|
-
icon: /* @__PURE__ */ d(oe, {
|
|
939
|
-
type: "icon-shangchuantupian",
|
|
940
|
-
className: "icon-tianjia",
|
|
941
|
-
style: {
|
|
942
|
-
fontSize: "22px"
|
|
943
|
-
}
|
|
944
|
-
})
|
|
945
914
|
})
|
|
946
|
-
}),
|
|
947
|
-
appId:
|
|
948
|
-
ref:
|
|
949
|
-
isFirstSession:
|
|
950
|
-
docViewerUrl:
|
|
951
|
-
onStatusChange: (t) =>
|
|
952
|
-
t !== "process" ? (
|
|
915
|
+
}), X && (g != null && g.fileUpload) && (i != null && i.id) ? /* @__PURE__ */ d(Wn, {
|
|
916
|
+
appId: i == null ? void 0 : i.id,
|
|
917
|
+
ref: pe,
|
|
918
|
+
isFirstSession: Ze,
|
|
919
|
+
docViewerUrl: j,
|
|
920
|
+
onStatusChange: (t) => V(void 0, null, function* () {
|
|
921
|
+
t !== "process" ? (ve(!0), He()) : ve(!1);
|
|
953
922
|
}),
|
|
954
923
|
createSession: () => new Promise((t) => {
|
|
955
|
-
|
|
956
|
-
netOpen:
|
|
924
|
+
M(!0), x == null || x({
|
|
925
|
+
netOpen: E ? K.OPEN : K.CLOSE
|
|
957
926
|
}).then((n) => {
|
|
958
|
-
var
|
|
959
|
-
p == null || p(n),
|
|
960
|
-
const
|
|
961
|
-
t(
|
|
927
|
+
var l, o, c;
|
|
928
|
+
p == null || p(n), M(!1), P(!!((l = n.data) != null && l.netOpen)), te(!!((o = n.data) != null && o.enableNetOpen)), we(n);
|
|
929
|
+
const a = ((c = n.data) == null ? void 0 : c.id) || "";
|
|
930
|
+
t(a);
|
|
962
931
|
});
|
|
963
932
|
}),
|
|
964
|
-
sid: (
|
|
965
|
-
disabled:
|
|
933
|
+
sid: (pt = e == null ? void 0 : e.data) == null ? void 0 : pt.id,
|
|
934
|
+
disabled: Oe || D,
|
|
966
935
|
afterFileAdd: (t, n) => {
|
|
967
|
-
n &&
|
|
968
|
-
const
|
|
936
|
+
n && le((a) => {
|
|
937
|
+
const l = a[n] || [];
|
|
969
938
|
return {
|
|
970
|
-
[n]: [...
|
|
939
|
+
[n]: [...l, t]
|
|
971
940
|
};
|
|
972
941
|
});
|
|
973
942
|
},
|
|
974
943
|
afterFileDelete: (t) => {
|
|
975
|
-
var
|
|
976
|
-
const n = (
|
|
977
|
-
n &&
|
|
978
|
-
const
|
|
944
|
+
var a;
|
|
945
|
+
const n = (a = e == null ? void 0 : e.data) == null ? void 0 : a.id;
|
|
946
|
+
n && le((l) => {
|
|
947
|
+
const o = l[n] || [];
|
|
979
948
|
return {
|
|
980
|
-
[n]:
|
|
949
|
+
[n]: o.filter((c) => c.id !== t)
|
|
981
950
|
};
|
|
982
951
|
});
|
|
983
952
|
},
|
|
984
953
|
onFileListChange: (t) => {
|
|
985
|
-
|
|
954
|
+
Yt(t);
|
|
986
955
|
},
|
|
987
|
-
shouldContinue:
|
|
956
|
+
shouldContinue: Gt,
|
|
988
957
|
afterFilesClear: () => {
|
|
989
958
|
var n;
|
|
990
959
|
const t = (n = e == null ? void 0 : e.data) == null ? void 0 : n.id;
|
|
991
|
-
t && (
|
|
960
|
+
t && (le({
|
|
992
961
|
[t]: []
|
|
993
962
|
}), He());
|
|
994
963
|
}
|
|
995
|
-
}) : null, (
|
|
996
|
-
appId:
|
|
964
|
+
}) : null, (g == null ? void 0 : g.prompt) && (i == null ? void 0 : i.id) && /* @__PURE__ */ d(Zn, {
|
|
965
|
+
appId: i.id,
|
|
997
966
|
list: [],
|
|
998
|
-
search:
|
|
967
|
+
search: Ke ? qt : "",
|
|
999
968
|
onPromptSelect: (t) => {
|
|
1000
|
-
S(t.context),
|
|
969
|
+
S(t.context), ue(t.context);
|
|
1001
970
|
},
|
|
1002
|
-
disabled:
|
|
971
|
+
disabled: D
|
|
1003
972
|
})]
|
|
1004
|
-
}), /* @__PURE__ */
|
|
1005
|
-
children: [(
|
|
1006
|
-
sessionId: (
|
|
1007
|
-
netStatus:
|
|
1008
|
-
enable: typeof (
|
|
973
|
+
}), /* @__PURE__ */ z(Ce, {
|
|
974
|
+
children: [(g == null ? void 0 : g.connectNetwork) && i.type === oe.Dialog && ((vt = i.arrange) == null ? void 0 : vt.length) && !!i.arrange[0].enableNetOpen && /* @__PURE__ */ d(Xn, {
|
|
975
|
+
sessionId: (bt = e == null ? void 0 : e.data) == null ? void 0 : bt.id,
|
|
976
|
+
netStatus: E,
|
|
977
|
+
enable: typeof (s == null ? void 0 : s.connectNetwork) == "object" && typeof (s == null ? void 0 : s.connectNetwork.diabled) == "boolean" ? !(s != null && s.connectNetwork.diabled) : en,
|
|
1009
978
|
disabledTip: e ? void 0 : "网络访问已被禁用",
|
|
1010
979
|
onNetStatusChange: (t) => {
|
|
1011
|
-
|
|
980
|
+
yn(t);
|
|
1012
981
|
}
|
|
1013
|
-
}), (
|
|
1014
|
-
currentSessionId: (
|
|
982
|
+
}), (g == null ? void 0 : g.sessionList) && /* @__PURE__ */ d(Yn, {
|
|
983
|
+
currentSessionId: (xt = e == null ? void 0 : e.data) == null ? void 0 : xt.id,
|
|
1015
984
|
onSessionChange: (t, n) => {
|
|
1016
|
-
S(void 0),
|
|
985
|
+
S(void 0), ke(!0), p == null || p(n);
|
|
1017
986
|
},
|
|
1018
|
-
disabled:
|
|
1019
|
-
}), jt &&
|
|
987
|
+
disabled: D
|
|
988
|
+
}), jt && At === "float" && /* @__PURE__ */ d("div", {
|
|
1020
989
|
className: "session-history-drawer-component",
|
|
1021
|
-
children: /* @__PURE__ */ d(
|
|
990
|
+
children: /* @__PURE__ */ d(Dn, {
|
|
1022
991
|
placement: "topRight",
|
|
1023
992
|
showArrow: !1,
|
|
1024
993
|
overlayClassName: "session-history-overlay",
|
|
@@ -1027,88 +996,88 @@ ${e}` : e;
|
|
|
1027
996
|
},
|
|
1028
997
|
getPopupContainer: (t) => t.parentNode,
|
|
1029
998
|
content: "会话历史记录",
|
|
1030
|
-
children: /* @__PURE__ */ d(
|
|
999
|
+
children: /* @__PURE__ */ d(G, {
|
|
1031
1000
|
className: "history-overlay-action",
|
|
1032
|
-
disabled:
|
|
1001
|
+
disabled: D,
|
|
1033
1002
|
type: "text",
|
|
1034
|
-
icon: /* @__PURE__ */ d(
|
|
1003
|
+
icon: /* @__PURE__ */ d(ge, {
|
|
1035
1004
|
type: "icon-lishijilu",
|
|
1036
1005
|
style: {
|
|
1037
1006
|
fontSize: 24
|
|
1038
1007
|
}
|
|
1039
1008
|
}),
|
|
1040
|
-
onClick: () =>
|
|
1009
|
+
onClick: () => tt(!0)
|
|
1041
1010
|
})
|
|
1042
1011
|
})
|
|
1043
|
-
}), (
|
|
1044
|
-
icon: /* @__PURE__ */ d(
|
|
1012
|
+
}), (g == null ? void 0 : g.sessionOpen) && /* @__PURE__ */ d(G, {
|
|
1013
|
+
icon: /* @__PURE__ */ d(Bn, {}),
|
|
1045
1014
|
className: "add-btn",
|
|
1046
1015
|
type: "primary",
|
|
1047
|
-
disabled:
|
|
1016
|
+
disabled: Ge || !e || !v.length || D,
|
|
1048
1017
|
onClick: () => {
|
|
1049
1018
|
var t, n;
|
|
1050
|
-
|
|
1019
|
+
ke(!1), p == null || p(null), P(!1), (t = Ye.current) == null || t.clear(), (n = Te.current) == null || n.clear();
|
|
1051
1020
|
},
|
|
1052
1021
|
children: "新会话"
|
|
1053
1022
|
})]
|
|
1054
1023
|
})]
|
|
1055
1024
|
}), /* @__PURE__ */ d("div", {
|
|
1056
1025
|
className: "footer-textarea",
|
|
1057
|
-
children: /* @__PURE__ */ d(
|
|
1058
|
-
ref:
|
|
1059
|
-
maxLength:
|
|
1060
|
-
text:
|
|
1026
|
+
children: /* @__PURE__ */ d(Mn, {
|
|
1027
|
+
ref: ye,
|
|
1028
|
+
maxLength: Mt,
|
|
1029
|
+
text: Wt,
|
|
1061
1030
|
networkStatus: !1,
|
|
1062
|
-
loading:
|
|
1063
|
-
disabled:
|
|
1064
|
-
onTextSend:
|
|
1031
|
+
loading: Se || xe,
|
|
1032
|
+
disabled: $e || Be || D || Se || xe,
|
|
1033
|
+
onTextSend: it,
|
|
1065
1034
|
onChange: (t, n) => {
|
|
1066
1035
|
S(t);
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1036
|
+
const a = n.getText().replace(/[\n\s]+$/, "");
|
|
1037
|
+
ue(a), Bt(a), Ke || $t(!0);
|
|
1069
1038
|
},
|
|
1070
|
-
clearAction: /* @__PURE__ */ d(
|
|
1039
|
+
clearAction: /* @__PURE__ */ d(Ce, {
|
|
1071
1040
|
size: 0,
|
|
1072
|
-
children: /* @__PURE__ */ d(
|
|
1041
|
+
children: /* @__PURE__ */ d(G, {
|
|
1073
1042
|
type: "link",
|
|
1074
|
-
disabled:
|
|
1043
|
+
disabled: Oe || D,
|
|
1075
1044
|
ghost: !0,
|
|
1076
|
-
icon: /* @__PURE__ */ d(
|
|
1045
|
+
icon: /* @__PURE__ */ d(ge, {
|
|
1077
1046
|
style: {
|
|
1078
1047
|
fontSize: 22
|
|
1079
1048
|
},
|
|
1080
1049
|
type: "icon-qingchujiyi"
|
|
1081
1050
|
}),
|
|
1082
|
-
onClick: () =>
|
|
1051
|
+
onClick: () => sn()
|
|
1083
1052
|
})
|
|
1084
1053
|
})
|
|
1085
1054
|
})
|
|
1086
1055
|
})]
|
|
1087
1056
|
})
|
|
1088
|
-
}), /* @__PURE__ */ d(
|
|
1089
|
-
tips:
|
|
1090
|
-
}),
|
|
1091
|
-
isvisible:
|
|
1092
|
-
files:
|
|
1057
|
+
}), /* @__PURE__ */ d($n, {
|
|
1058
|
+
tips: Rt
|
|
1059
|
+
}), Qe && /* @__PURE__ */ d(_n, {
|
|
1060
|
+
isvisible: Qe,
|
|
1061
|
+
files: Kt,
|
|
1093
1062
|
sessionId: (kt = e == null ? void 0 : e.data) == null ? void 0 : kt.id,
|
|
1094
1063
|
onClose: (t) => {
|
|
1095
|
-
|
|
1064
|
+
_t(!1), Xt(!1);
|
|
1096
1065
|
}
|
|
1097
1066
|
})]
|
|
1098
|
-
}),
|
|
1067
|
+
}), et && /* @__PURE__ */ d(Qn, {
|
|
1099
1068
|
currentSession: e,
|
|
1100
|
-
application:
|
|
1101
|
-
networkStatus:
|
|
1069
|
+
application: i,
|
|
1070
|
+
networkStatus: E,
|
|
1102
1071
|
setCurrentSession: p,
|
|
1103
|
-
disabled:
|
|
1104
|
-
isSessionHistoryVisible:
|
|
1105
|
-
setIsSessionHistoryVisible:
|
|
1072
|
+
disabled: D,
|
|
1073
|
+
isSessionHistoryVisible: et,
|
|
1074
|
+
setIsSessionHistoryVisible: tt,
|
|
1106
1075
|
onSessionChange: (t) => {
|
|
1107
|
-
|
|
1076
|
+
ke(!0);
|
|
1108
1077
|
}
|
|
1109
1078
|
})]
|
|
1110
1079
|
});
|
|
1111
1080
|
});
|
|
1112
1081
|
export {
|
|
1113
|
-
|
|
1082
|
+
Hi as default
|
|
1114
1083
|
};
|