@glodon-aiot/agent-cli-ui 3.2.10-beta.12 → 3.2.10-beta.2
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/index.mjs +418 -478
- package/dist/es/Dialog/HistoryItem/index.mjs +50 -52
- package/dist/es/Dialog/KnowledgeList/index.mjs +19 -19
- package/dist/es/Dialog/Recommend/RecommendItem.mjs +43 -52
- package/dist/es/Dialog/SearchReference/index.mjs +41 -68
- package/dist/es/Dialog/SessionAction/index.mjs +32 -34
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +69 -74
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +164 -198
- package/dist/es/Dialog/index.mjs +56 -56
- package/dist/es/FileItem/index.mjs +50 -63
- package/dist/es/Iconfont/index.mjs +2 -2
- package/dist/es/constant.mjs +2 -8
- package/dist/es/index.mjs +48 -49
- 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/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -0
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +0 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style25.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/style3.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/style4.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 +5 -5
- package/dist/src/Dialog/SearchReference/index.d.ts +1 -4
- package/dist/src/types.d.ts +1 -10
- package/package.json +3 -3
- package/dist/src/Iconfont/font_4108228_z72fskklg2.d.ts +0 -0
|
@@ -1,95 +1,68 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
/* empty css */import { CheckOutlined as
|
|
5
|
-
import { Collapse as
|
|
6
|
-
import I from "dayjs";
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N } from "react";
|
|
3
|
+
import R from "../../assets/think.svg.mjs";
|
|
4
|
+
/* empty css */import { CheckOutlined as k, CloseOutlined as x } from "@ant-design/icons";
|
|
5
|
+
import { Collapse as p, Space as S } from "antd";
|
|
7
6
|
const {
|
|
8
|
-
Panel:
|
|
9
|
-
} =
|
|
10
|
-
var
|
|
7
|
+
Panel: b
|
|
8
|
+
} = p, E = (m) => {
|
|
9
|
+
var t, a, c, l, i, h;
|
|
11
10
|
const {
|
|
12
|
-
history:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onShowList: c
|
|
16
|
-
} = u, [f, R] = S(!1), t = a.searchingStatus ? a.searchingStatus : (r = a.searchReference) != null && r.length ? "end" : "";
|
|
17
|
-
return t ? /* @__PURE__ */ e("div", {
|
|
11
|
+
history: n
|
|
12
|
+
} = m, [u, g] = N(!1), s = n.searchingStatus ? n.searchingStatus : (t = n.searchReference) != null && t.length ? "end" : "";
|
|
13
|
+
return s ? /* @__PURE__ */ e("div", {
|
|
18
14
|
className: "search-reference",
|
|
19
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ r("div", {
|
|
20
16
|
className: "item-bot-plugin",
|
|
21
17
|
onClick: () => {
|
|
22
|
-
|
|
18
|
+
g(!u);
|
|
23
19
|
},
|
|
24
|
-
children: [
|
|
20
|
+
children: [s === "start" && /* @__PURE__ */ r(f, {
|
|
25
21
|
children: [/* @__PURE__ */ e("img", {
|
|
26
|
-
src:
|
|
22
|
+
src: R,
|
|
27
23
|
alt: ""
|
|
28
24
|
}), /* @__PURE__ */ e("span", {
|
|
29
25
|
children: "正在搜索…"
|
|
30
26
|
})]
|
|
31
|
-
}),
|
|
27
|
+
}), s === "end" && /* @__PURE__ */ e(p, {
|
|
32
28
|
ghost: !0,
|
|
33
29
|
expandIconPosition: "right",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
collapsible: l ? "disabled" : "icon",
|
|
39
|
-
showArrow: !!(t === "end" && ((h = a.searchReference) != null && h.length)),
|
|
40
|
-
header: /* @__PURE__ */ n(i, {
|
|
30
|
+
children: /* @__PURE__ */ e(b, {
|
|
31
|
+
collapsible: "icon",
|
|
32
|
+
showArrow: !!(s === "end" && ((a = n.searchReference) != null && a.length)),
|
|
33
|
+
header: /* @__PURE__ */ r(S, {
|
|
41
34
|
size: 8,
|
|
42
35
|
style: {
|
|
43
36
|
width: "100%"
|
|
44
37
|
},
|
|
45
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ r("span", {
|
|
46
39
|
className: "bot-plugin-status",
|
|
47
|
-
children: [
|
|
40
|
+
children: [s === "end" && ((c = n.searchReference) == null ? void 0 : c.length) > 0 && /* @__PURE__ */ e("span", {
|
|
48
41
|
className: "plugin-status-success",
|
|
49
|
-
children: /* @__PURE__ */ e(
|
|
50
|
-
}),
|
|
42
|
+
children: /* @__PURE__ */ e(k, {})
|
|
43
|
+
}), s === "end" && !((l = n.searchReference) != null && l.length) && /* @__PURE__ */ e("span", {
|
|
51
44
|
className: "plugin-status-error",
|
|
52
|
-
children: /* @__PURE__ */ e(
|
|
45
|
+
children: /* @__PURE__ */ e(x, {})
|
|
53
46
|
})]
|
|
54
|
-
}),
|
|
47
|
+
}), s === "end" && /* @__PURE__ */ e("span", {
|
|
55
48
|
className: "bot-plugin-title",
|
|
56
|
-
children: (
|
|
49
|
+
children: (i = n.searchReference) != null && i.length ? `已搜索到${n.searchReference.length}个网页` : "未找到搜索内容,请检查搜索服务"
|
|
57
50
|
})]
|
|
58
51
|
}),
|
|
59
|
-
children:
|
|
60
|
-
className: "
|
|
61
|
-
children: (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children:
|
|
71
|
-
className: "number",
|
|
72
|
-
children: [b + 1, "."]
|
|
73
|
-
}), s.title]
|
|
74
|
-
}), s.snippet && /* @__PURE__ */ e("span", {
|
|
75
|
-
className: "search-reference-list-item-content",
|
|
76
|
-
children: s.snippet
|
|
77
|
-
}), /* @__PURE__ */ n("div", {
|
|
78
|
-
className: "search-reference-list-item-footer",
|
|
79
|
-
children: [/* @__PURE__ */ n(i, {
|
|
80
|
-
children: [(s == null ? void 0 : s.siteIcon) && /* @__PURE__ */ e("img", {
|
|
81
|
-
className: "logo",
|
|
82
|
-
src: s == null ? void 0 : s.siteIcon
|
|
83
|
-
}), /* @__PURE__ */ e("span", {
|
|
84
|
-
className: "name",
|
|
85
|
-
children: s.siteName
|
|
86
|
-
})]
|
|
87
|
-
}), /* @__PURE__ */ e("span", {
|
|
88
|
-
className: "time",
|
|
89
|
-
children: I(s.ts || s.datePublished).format("YYYY-MM-DD")
|
|
90
|
-
})]
|
|
52
|
+
children: /* @__PURE__ */ e("div", {
|
|
53
|
+
className: "bot-net-main",
|
|
54
|
+
children: (h = n.searchReference) == null ? void 0 : h.map((o, d) => /* @__PURE__ */ r("div", {
|
|
55
|
+
className: "text",
|
|
56
|
+
children: [/* @__PURE__ */ r("span", {
|
|
57
|
+
children: [d + 1, ". "]
|
|
58
|
+
}), /* @__PURE__ */ e("span", {
|
|
59
|
+
className: "link",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
window.open(o.link);
|
|
62
|
+
},
|
|
63
|
+
children: o.title
|
|
91
64
|
})]
|
|
92
|
-
},
|
|
65
|
+
}, d))
|
|
93
66
|
})
|
|
94
67
|
}, "")
|
|
95
68
|
})]
|
|
@@ -97,5 +70,5 @@ const {
|
|
|
97
70
|
}) : null;
|
|
98
71
|
};
|
|
99
72
|
export {
|
|
100
|
-
|
|
73
|
+
E as default
|
|
101
74
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useContext as O, useEffect as D } from "react";
|
|
3
|
-
import { Space as
|
|
3
|
+
import { Space as z, Popover as L, Popconfirm as M, Input as H, message as w, notification as u, Button as Q } from "antd";
|
|
4
4
|
import m from "../../Iconfont/index.mjs";
|
|
5
5
|
import $ from "copy-to-clipboard";
|
|
6
6
|
import F from "classnames";
|
|
@@ -18,15 +18,15 @@ const J = [{
|
|
|
18
18
|
id: 4,
|
|
19
19
|
name: "其他原因"
|
|
20
20
|
}], te = (P) => {
|
|
21
|
-
var
|
|
21
|
+
var A;
|
|
22
22
|
const {
|
|
23
|
-
appId:
|
|
23
|
+
appId: v,
|
|
24
24
|
history: t,
|
|
25
25
|
isLastHistory: T = !1,
|
|
26
26
|
sessionId: d,
|
|
27
|
-
currentSession:
|
|
27
|
+
currentSession: i,
|
|
28
28
|
onAgainClick: g
|
|
29
|
-
} = P, [a, h] = l([]), [C,
|
|
29
|
+
} = P, [a, h] = l([]), [C, x] = l(), [_, I] = l(!1), [y, b] = l(!1), {
|
|
30
30
|
service: K,
|
|
31
31
|
popupContainer: o,
|
|
32
32
|
transform: N,
|
|
@@ -39,75 +39,73 @@ const J = [{
|
|
|
39
39
|
D(() => {
|
|
40
40
|
var e;
|
|
41
41
|
k((e = t == null ? void 0 : t.comment) == null ? void 0 : e.isAgree);
|
|
42
|
-
}, [(
|
|
42
|
+
}, [(A = t == null ? void 0 : t.comment) == null ? void 0 : A.isAgree]);
|
|
43
43
|
const R = () => {
|
|
44
|
-
|
|
44
|
+
w.config({
|
|
45
45
|
getContainer: () => (o == null ? void 0 : o.current) || document.body
|
|
46
|
-
}), $(t.content),
|
|
47
|
-
getContainer: void 0
|
|
48
|
-
});
|
|
46
|
+
}), $(t.content), w.success("复制成功");
|
|
49
47
|
}, S = (e) => {
|
|
50
48
|
if (!d || !(t != null && t.messageId))
|
|
51
49
|
return;
|
|
52
|
-
const
|
|
50
|
+
const s = {
|
|
53
51
|
messageId: t.messageId,
|
|
54
52
|
isAgree: e
|
|
55
53
|
};
|
|
56
|
-
|
|
57
|
-
k(e), t != null && t.comment && (t.comment.isAgree = e), !(e <= 0) && (
|
|
58
|
-
|
|
54
|
+
i == null || i.postMessageComment(s).then(() => {
|
|
55
|
+
k(e), t != null && t.comment && (t.comment.isAgree = e), !(e <= 0) && (b(!0), setTimeout(() => {
|
|
56
|
+
b(!1);
|
|
59
57
|
}, 2e3));
|
|
60
58
|
}), p && p({
|
|
61
|
-
applicationId:
|
|
59
|
+
applicationId: v,
|
|
62
60
|
sessionId: d,
|
|
63
|
-
comment:
|
|
61
|
+
comment: s
|
|
64
62
|
});
|
|
65
63
|
}, j = (e) => {
|
|
66
|
-
if (a.some((
|
|
67
|
-
const
|
|
68
|
-
h([...
|
|
64
|
+
if (a.some((s) => s.id === e.id)) {
|
|
65
|
+
const s = a.filter((c) => c.id !== e.id);
|
|
66
|
+
h([...s]);
|
|
69
67
|
} else
|
|
70
68
|
h([...a, e]);
|
|
71
69
|
}, B = (e) => {
|
|
72
|
-
|
|
70
|
+
x(e.target.value);
|
|
73
71
|
}, E = () => {
|
|
74
72
|
if (!d)
|
|
75
73
|
return;
|
|
76
74
|
if (!(a != null && a.length))
|
|
77
|
-
return
|
|
75
|
+
return I(!0), Promise.reject();
|
|
78
76
|
let e = [];
|
|
79
|
-
a != null && a.length && (e = [...e, ...a.map((
|
|
80
|
-
const
|
|
77
|
+
a != null && a.length && (e = [...e, ...a.map((c) => c.name)]), C && (e = [...e, C]);
|
|
78
|
+
const s = {
|
|
81
79
|
messageId: t.messageId,
|
|
82
80
|
isAgree: -1,
|
|
83
81
|
againstReason: e
|
|
84
82
|
};
|
|
85
83
|
u.config({
|
|
86
84
|
getContainer: () => (o == null ? void 0 : o.current) || document.body
|
|
87
|
-
}),
|
|
85
|
+
}), i == null || i.postMessageComment(s).then(() => {
|
|
88
86
|
k(-1), t != null && t.comment && (t.comment.isAgree = -1);
|
|
89
|
-
const
|
|
87
|
+
const c = `open${Date.now()}`;
|
|
90
88
|
u.success({
|
|
91
89
|
message: "提交反馈成功",
|
|
92
90
|
description: "感谢您的参与,我们会认真评估每一条建议!",
|
|
93
91
|
duration: 2,
|
|
94
92
|
btn: /* @__PURE__ */ n(Q, {
|
|
95
93
|
type: "primary",
|
|
96
|
-
onClick: () => u.close(
|
|
94
|
+
onClick: () => u.close(c),
|
|
97
95
|
children: "我知道了"
|
|
98
96
|
}),
|
|
99
|
-
key:
|
|
100
|
-
onClose: () => u.close(
|
|
97
|
+
key: c,
|
|
98
|
+
onClose: () => u.close(c)
|
|
101
99
|
});
|
|
102
100
|
}), p && p({
|
|
103
|
-
applicationId:
|
|
101
|
+
applicationId: v,
|
|
104
102
|
sessionId: d,
|
|
105
|
-
comment:
|
|
103
|
+
comment: s
|
|
106
104
|
});
|
|
107
105
|
};
|
|
108
106
|
return /* @__PURE__ */ r("div", {
|
|
109
107
|
className: "session-action",
|
|
110
|
-
children: [N != null && N.again && T ? /* @__PURE__ */ r(
|
|
108
|
+
children: [N != null && N.again && T ? /* @__PURE__ */ r(z, {
|
|
111
109
|
className: "session-action-again",
|
|
112
110
|
onClick: () => g == null ? void 0 : g(),
|
|
113
111
|
children: [/* @__PURE__ */ n(m, {
|
|
@@ -120,7 +118,7 @@ const J = [{
|
|
|
120
118
|
})]
|
|
121
119
|
}) : /* @__PURE__ */ n("span", {}), /* @__PURE__ */ n("div", {
|
|
122
120
|
className: "session-action-comment",
|
|
123
|
-
children: /* @__PURE__ */ r(
|
|
121
|
+
children: /* @__PURE__ */ r(z, {
|
|
124
122
|
size: 8,
|
|
125
123
|
className: "action-comment-feedback",
|
|
126
124
|
children: [!t.isSuspend && /* @__PURE__ */ n("span", {
|
|
@@ -156,7 +154,7 @@ const J = [{
|
|
|
156
154
|
cancelText: "取消",
|
|
157
155
|
getPopupContainer: (e) => e.parentNode,
|
|
158
156
|
onOpenChange: (e) => {
|
|
159
|
-
e && (h([]),
|
|
157
|
+
e && (h([]), x(""), I(!1));
|
|
160
158
|
},
|
|
161
159
|
icon: !1,
|
|
162
160
|
title: /* @__PURE__ */ r("div", {
|
|
@@ -175,7 +173,7 @@ const J = [{
|
|
|
175
173
|
children: J.map((e) => /* @__PURE__ */ n("span", {
|
|
176
174
|
className: F({
|
|
177
175
|
"cai-item": !0,
|
|
178
|
-
"cai-item__active": a.some((
|
|
176
|
+
"cai-item__active": a.some((s) => s.id === e.id)
|
|
179
177
|
}),
|
|
180
178
|
onClick: () => j(e),
|
|
181
179
|
children: e.name
|
|
@@ -1,89 +1,84 @@
|
|
|
1
|
-
var h = (
|
|
2
|
-
var r = (
|
|
1
|
+
var h = (w, i, n) => new Promise((I, e) => {
|
|
2
|
+
var r = (c) => {
|
|
3
3
|
try {
|
|
4
|
-
|
|
4
|
+
a(n.next(c));
|
|
5
5
|
} catch (f) {
|
|
6
6
|
e(f);
|
|
7
7
|
}
|
|
8
|
-
}, E = (
|
|
8
|
+
}, E = (c) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
a(n.throw(c));
|
|
11
11
|
} catch (f) {
|
|
12
12
|
e(f);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
14
|
+
}, a = (c) => c.done ? I(c.value) : Promise.resolve(c.value).then(r, E);
|
|
15
|
+
a((n = n.apply(w, i)).next());
|
|
16
16
|
});
|
|
17
17
|
import { jsx as L } from "react/jsx-runtime";
|
|
18
|
-
import { useContext as
|
|
19
|
-
import { Drawer as
|
|
20
|
-
/* empty css */import { LoadingOutlined as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
const
|
|
18
|
+
import { useContext as O, useState as b, useRef as R, useEffect as x } from "react";
|
|
19
|
+
import { Drawer as j, Spin as v, message as m } from "antd";
|
|
20
|
+
/* empty css */import { LoadingOutlined as B } from "@ant-design/icons";
|
|
21
|
+
import H from "./SessionItem.mjs";
|
|
22
|
+
import P from "../../../context.mjs";
|
|
23
|
+
const M = (w) => {
|
|
24
24
|
const {
|
|
25
|
-
currentSessionId:
|
|
26
|
-
onSessionChange:
|
|
25
|
+
currentSessionId: i,
|
|
26
|
+
onSessionChange: n,
|
|
27
27
|
onClose: I
|
|
28
|
-
} =
|
|
28
|
+
} = w, {
|
|
29
29
|
agentClient: e,
|
|
30
30
|
popupContainer: r
|
|
31
|
-
} =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
} = O(P), [E, a] = b(!1), [c, f] = b(!1), [p, T] = b(""), [l, S] = b([]), s = R(l);
|
|
32
|
+
x(() => {
|
|
33
|
+
s.current = [], S(s.current), a(!0), e == null || e.getSessions().then((t) => h(void 0, null, function* () {
|
|
34
|
+
a(!1), s.current = [...t], S(s.current);
|
|
35
35
|
}));
|
|
36
|
-
}, []),
|
|
37
|
-
|
|
36
|
+
}, []), x(() => {
|
|
37
|
+
l.length && i && setTimeout(() => {
|
|
38
38
|
var t;
|
|
39
|
-
(t = document.getElementById(
|
|
39
|
+
(t = document.getElementById(i)) == null || t.scrollIntoView(!0);
|
|
40
40
|
}, 100);
|
|
41
|
-
}, [
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
}, [l]);
|
|
42
|
+
const _ = (t, o) => {
|
|
43
|
+
m.config({
|
|
44
|
+
getContainer: () => (r == null ? void 0 : r.current) || document.body
|
|
45
|
+
}), e == null || e.removeSession(t, !0).then(() => h(void 0, null, function* () {
|
|
46
|
+
const d = l.filter((u) => {
|
|
47
|
+
var g, y;
|
|
48
|
+
return ((g = u.data) == null ? void 0 : g.id) !== ((y = t.data) == null ? void 0 : y.id);
|
|
47
49
|
});
|
|
48
|
-
t.data.id ===
|
|
49
|
-
getContainer: () => (r == null ? void 0 : r.current) || document.body
|
|
50
|
-
}), d.success("删除成功"), d.config({
|
|
51
|
-
getContainer: void 0
|
|
52
|
-
}), n.current = [...c], l(n.current);
|
|
50
|
+
t.data.id === i && n && n(""), m.success("删除成功"), s.current = [...d], S(s.current);
|
|
53
51
|
})), o == null || o.stopPropagation();
|
|
54
|
-
},
|
|
55
|
-
t && (
|
|
56
|
-
},
|
|
52
|
+
}, $ = (t) => {
|
|
53
|
+
t && (n && n(t.sessionId, t), I());
|
|
54
|
+
}, z = (t, o) => h(void 0, null, function* () {
|
|
55
|
+
m.config({
|
|
56
|
+
getContainer: () => (r == null ? void 0 : r.current) || document.body
|
|
57
|
+
});
|
|
57
58
|
try {
|
|
58
|
-
yield e == null ? void 0 : e.setTop(t.data.id, o),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
getContainer: void 0
|
|
62
|
-
});
|
|
63
|
-
} catch (c) {
|
|
64
|
-
d.config({
|
|
65
|
-
getContainer: () => (r == null ? void 0 : r.current) || document.body
|
|
66
|
-
}), d.error(`${o ? "" : "取消"}置顶失败`), d.config({
|
|
67
|
-
getContainer: void 0
|
|
68
|
-
});
|
|
59
|
+
yield e == null ? void 0 : e.setTop(t.data.id, o), m.success(`${o ? "" : "取消"}置顶成功`);
|
|
60
|
+
} catch (d) {
|
|
61
|
+
m.error(`${o ? "" : "取消"}置顶失败`);
|
|
69
62
|
}
|
|
70
63
|
e == null || e.getSessions({
|
|
71
64
|
order: "top_time desc, sort_status desc, updated_at desc"
|
|
72
|
-
}).then((
|
|
73
|
-
|
|
65
|
+
}).then((d) => h(void 0, null, function* () {
|
|
66
|
+
s.current = [...d], S(s.current);
|
|
74
67
|
}));
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
}), D = (t, o) => {
|
|
69
|
+
m.config({
|
|
70
|
+
getContainer: () => (r == null ? void 0 : r.current) || document.body
|
|
71
|
+
}), o && (t.rename(o), t == null || t.addEventListener("data:updated", () => {
|
|
72
|
+
const d = s.current.map((u) => {
|
|
73
|
+
var g, y;
|
|
74
|
+
return ((g = u.data) == null ? void 0 : g.id) === ((y = u.data) == null ? void 0 : y.id), u;
|
|
80
75
|
});
|
|
81
|
-
|
|
76
|
+
s.current = [...d], S(s.current);
|
|
82
77
|
}));
|
|
83
|
-
},
|
|
84
|
-
f(o),
|
|
78
|
+
}, N = (t, o) => {
|
|
79
|
+
f(o), T(t);
|
|
85
80
|
};
|
|
86
|
-
return /* @__PURE__ */ L(
|
|
81
|
+
return /* @__PURE__ */ L(j, {
|
|
87
82
|
title: "会话历史记录",
|
|
88
83
|
open: !0,
|
|
89
84
|
placement: "bottom",
|
|
@@ -95,30 +90,30 @@ const K = (v) => {
|
|
|
95
90
|
style: {
|
|
96
91
|
position: "absolute"
|
|
97
92
|
},
|
|
98
|
-
children: E ? /* @__PURE__ */ L(
|
|
99
|
-
indicator: /* @__PURE__ */ L(
|
|
93
|
+
children: E ? /* @__PURE__ */ L(v, {
|
|
94
|
+
indicator: /* @__PURE__ */ L(B, {
|
|
100
95
|
style: {
|
|
101
96
|
fontSize: 24
|
|
102
97
|
},
|
|
103
98
|
spin: !0
|
|
104
99
|
})
|
|
105
|
-
}) :
|
|
106
|
-
var
|
|
107
|
-
return /* @__PURE__ */ L(
|
|
100
|
+
}) : l.map((t, o) => {
|
|
101
|
+
var d;
|
|
102
|
+
return /* @__PURE__ */ L(H, {
|
|
108
103
|
session: t,
|
|
109
104
|
index: o,
|
|
110
|
-
currentSessionId:
|
|
111
|
-
onChangeSession:
|
|
112
|
-
onDelSession:
|
|
113
|
-
onTopSession:
|
|
114
|
-
onEditNameConfirm:
|
|
115
|
-
editSessionId:
|
|
116
|
-
isEdit:
|
|
117
|
-
onChangeEditStatus:
|
|
118
|
-
}, (
|
|
105
|
+
currentSessionId: i,
|
|
106
|
+
onChangeSession: $,
|
|
107
|
+
onDelSession: _,
|
|
108
|
+
onTopSession: z,
|
|
109
|
+
onEditNameConfirm: D,
|
|
110
|
+
editSessionId: p,
|
|
111
|
+
isEdit: c,
|
|
112
|
+
onChangeEditStatus: N
|
|
113
|
+
}, (d = t.data) == null ? void 0 : d.id);
|
|
119
114
|
})
|
|
120
115
|
});
|
|
121
116
|
};
|
|
122
117
|
export {
|
|
123
|
-
|
|
118
|
+
M as default
|
|
124
119
|
};
|