@glodon-aiot/agent-cli-ui 3.4.1 → 3.5.0-alpha.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/Tools/UploadKnowledgeFiles/index.mjs +1 -0
- package/dist/es/Dialog/AgentChat/index.mjs +306 -308
- package/dist/es/Dialog/SessionList/index.mjs +238 -204
- package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style10.css +1 -1
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.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/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -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/style29.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/lib/index.css +1 -1
- package/dist/lib/index.js +54 -54
- package/package.json +3 -3
|
@@ -1,290 +1,324 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var e in
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var e of
|
|
9
|
-
|
|
10
|
-
return
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var I = Object.getOwnPropertySymbols;
|
|
3
|
+
var Nt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var tt = (N, m, e) => m in N ? vt(N, m, { enumerable: !0, configurable: !0, writable: !0, value: e }) : N[m] = e, et = (N, m) => {
|
|
5
|
+
for (var e in m || (m = {}))
|
|
6
|
+
Nt.call(m, e) && tt(N, e, m[e]);
|
|
7
|
+
if (I)
|
|
8
|
+
for (var e of I(m))
|
|
9
|
+
gt.call(m, e) && tt(N, e, m[e]);
|
|
10
|
+
return N;
|
|
11
11
|
};
|
|
12
|
-
var x = (
|
|
13
|
-
var
|
|
12
|
+
var x = (N, m, e) => new Promise((n, E) => {
|
|
13
|
+
var A = (g) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
15
|
+
O(e.next(g));
|
|
16
16
|
} catch (j) {
|
|
17
|
-
|
|
17
|
+
E(j);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, R = (g) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
21
|
+
O(e.throw(g));
|
|
22
22
|
} catch (j) {
|
|
23
|
-
|
|
23
|
+
E(j);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, O = (g) => g.done ? n(g.value) : Promise.resolve(g.value).then(A, R);
|
|
26
|
+
O((e = e.apply(N, m)).next());
|
|
27
27
|
});
|
|
28
|
-
import { jsx as
|
|
29
|
-
import { forwardRef as
|
|
30
|
-
import { Button as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
/* empty css */import { useMemoizedFn as
|
|
36
|
-
import { NET_OPEN_STATUS as
|
|
37
|
-
import { useSessionState as
|
|
38
|
-
const
|
|
28
|
+
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
29
|
+
import { forwardRef as ut, useState as L, useContext as kt, useEffect as Y, useImperativeHandle as wt, useMemo as At } from "react";
|
|
30
|
+
import { Button as bt, Typography as Et, Space as at, Popconfirm as dt, Input as Ot } from "antd";
|
|
31
|
+
import h from "dayjs";
|
|
32
|
+
import Mt from "classnames";
|
|
33
|
+
import ot from "../../components/Iconfont/index.mjs";
|
|
34
|
+
import jt from "../../context.mjs";
|
|
35
|
+
/* empty css */import { useMemoizedFn as it } from "ahooks";
|
|
36
|
+
import { NET_OPEN_STATUS as nt } from "../../constant.mjs";
|
|
37
|
+
import { useSessionState as xt } from "../../hooks/useSessionState.mjs";
|
|
38
|
+
const F = 15, Pt = ut((N, m) => {
|
|
39
39
|
const {
|
|
40
40
|
currentSession: e,
|
|
41
|
-
setCurrentSession:
|
|
42
|
-
checkKnowledges:
|
|
43
|
-
application:
|
|
44
|
-
networkStatus:
|
|
45
|
-
isShowHeader:
|
|
46
|
-
afterSessionClick:
|
|
41
|
+
setCurrentSession: n,
|
|
42
|
+
checkKnowledges: E,
|
|
43
|
+
application: A,
|
|
44
|
+
networkStatus: R,
|
|
45
|
+
isShowHeader: O = !0,
|
|
46
|
+
afterSessionClick: g,
|
|
47
47
|
sessionId: j
|
|
48
|
-
} =
|
|
49
|
-
agentClient:
|
|
50
|
-
mode:
|
|
48
|
+
} = N, [V, _] = L(), {
|
|
49
|
+
agentClient: v,
|
|
50
|
+
mode: lt,
|
|
51
51
|
features: a
|
|
52
|
-
} =
|
|
52
|
+
} = kt(jt), [z, C] = L(E), {
|
|
53
53
|
sessions: P,
|
|
54
|
-
setSessions:
|
|
55
|
-
} =
|
|
56
|
-
t.id &&
|
|
57
|
-
var
|
|
58
|
-
return ((
|
|
59
|
-
})].sort((
|
|
60
|
-
var
|
|
61
|
-
const
|
|
62
|
-
return
|
|
54
|
+
setSessions: S
|
|
55
|
+
} = xt(), [K, D] = L(0), [$, T] = L(""), [ct, G] = L(null), U = it((t) => {
|
|
56
|
+
t.id && S((d) => [...d.map((l) => {
|
|
57
|
+
var s;
|
|
58
|
+
return ((s = l.data) == null ? void 0 : s.id) === t.id && (l.data = et({}, t)), l;
|
|
59
|
+
})].sort((l, s) => {
|
|
60
|
+
var w, k;
|
|
61
|
+
const u = h((w = l.data) == null ? void 0 : w.createdAt).valueOf();
|
|
62
|
+
return h((k = s.data) == null ? void 0 : k.createdAt).valueOf() - u;
|
|
63
63
|
}));
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
Y(() => {
|
|
66
|
+
v == null || v.getSessions().then((t) => x(void 0, null, function* () {
|
|
67
67
|
var d;
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
j ||
|
|
68
|
+
if (S([...t]), !((d = e == null ? void 0 : e.data) != null && d.id) && (t != null && t.length) && lt === "inlay") {
|
|
69
|
+
const o = t[0];
|
|
70
|
+
j || n == null || n(o);
|
|
71
71
|
} else
|
|
72
|
-
e === void 0 && (j ||
|
|
72
|
+
e === void 0 && (j || n == null || n(null));
|
|
73
73
|
}));
|
|
74
|
-
}, []),
|
|
74
|
+
}, []), Y(() => {
|
|
75
75
|
var t;
|
|
76
|
-
if (!((t = e == null ? void 0 : e.data) != null && t.id) &&
|
|
76
|
+
if (!((t = e == null ? void 0 : e.data) != null && t.id) && E === void 0) {
|
|
77
77
|
const d = typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0;
|
|
78
|
-
|
|
78
|
+
C(d);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
e == null || e.addEventListener("data:updated",
|
|
84
|
-
}, [e]),
|
|
81
|
+
C(E);
|
|
82
|
+
}, [E]), Y(() => {
|
|
83
|
+
e == null || e.addEventListener("data:updated", U);
|
|
84
|
+
}, [e]), wt(m, () => ({
|
|
85
85
|
create(t) {
|
|
86
|
-
return
|
|
86
|
+
return X(t).then((d) => (n == null || n(d), d));
|
|
87
87
|
},
|
|
88
88
|
list: () => Promise.resolve(P)
|
|
89
89
|
}));
|
|
90
|
-
const
|
|
90
|
+
const X = (t) => {
|
|
91
91
|
const d = typeof (a == null ? void 0 : a.connectNetwork) == "object" && typeof (a == null ? void 0 : a.connectNetwork.default) == "boolean" ? a.connectNetwork.default : !1;
|
|
92
|
-
return new Promise((
|
|
93
|
-
var
|
|
94
|
-
const
|
|
92
|
+
return new Promise((o) => x(void 0, null, function* () {
|
|
93
|
+
var s;
|
|
94
|
+
const f = typeof (a == null ? void 0 : a.promptVariables) == "object" ? (a == null ? void 0 : a.promptVariables.default) || [] : void 0, l = yield v == null ? void 0 : v.loadSession("", {
|
|
95
95
|
name: t == null ? void 0 : t.name,
|
|
96
96
|
// @ts-ignore netOpen入参是number 响应是boolen
|
|
97
97
|
// 只有对话有联网 其它没有
|
|
98
98
|
// 不传netOpen会默认取defaultNetOpen
|
|
99
|
-
netOpen: (
|
|
100
|
-
knowledges: (
|
|
101
|
-
promptVariables:
|
|
99
|
+
netOpen: (A == null ? void 0 : A.type) === 0 ? t != null && t.netOpen ? t.netOpen : d ? nt.OPEN : nt.CLOSE : void 0,
|
|
100
|
+
knowledges: (s = e == null ? void 0 : e.data) != null && s.id ? t == null ? void 0 : t.knowledges : z,
|
|
101
|
+
promptVariables: f
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
l == null || l.addEventListener("data:created", () => x(void 0, null, function* () {
|
|
104
|
+
S([l, ...P]), o(l);
|
|
105
105
|
}));
|
|
106
106
|
}));
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
knowledges:
|
|
107
|
+
}, st = () => {
|
|
108
|
+
X({
|
|
109
|
+
knowledges: z
|
|
110
110
|
}).then((t) => {
|
|
111
|
-
|
|
111
|
+
n == null || n(t);
|
|
112
112
|
});
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
var
|
|
116
|
-
const d = P.filter((
|
|
117
|
-
var
|
|
118
|
-
return ((
|
|
113
|
+
}, rt = (t) => {
|
|
114
|
+
v == null || v.removeSession(t, !0).then(() => x(void 0, null, function* () {
|
|
115
|
+
var o, f;
|
|
116
|
+
const d = P.filter((l) => {
|
|
117
|
+
var s, u;
|
|
118
|
+
return ((s = l.data) == null ? void 0 : s.id) !== ((u = t.data) == null ? void 0 : u.id);
|
|
119
119
|
});
|
|
120
|
-
((
|
|
120
|
+
((o = t.data) == null ? void 0 : o.id) === ((f = e == null ? void 0 : e.data) == null ? void 0 : f.id) && (d != null && d.length ? n == null || n(d[0]) : n == null || n(null)), S([...d]);
|
|
121
121
|
}));
|
|
122
|
-
},
|
|
123
|
-
var d;
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
}, mt = (t) => {
|
|
123
|
+
var d, o;
|
|
124
|
+
_((d = t.data) == null ? void 0 : d.name), T(""), G(((o = t.data) == null ? void 0 : o.id) || null);
|
|
125
|
+
}, pt = (t) => {
|
|
126
|
+
const d = J(V || "");
|
|
127
|
+
if (d) {
|
|
128
|
+
T(d);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
t.rename(V.trim()), t == null || t.addEventListener("data:updated", U), q();
|
|
132
|
+
}, ht = () => {
|
|
133
|
+
q();
|
|
134
|
+
}, q = () => {
|
|
135
|
+
G(null), _(""), T(""), D((t) => t + 1);
|
|
136
|
+
}, J = (t) => !t || t.trim().length === 0 ? "会话名称不能为空" : t.length > F ? `不能超过${F}个字符` : "", ft = (t) => x(void 0, null, function* () {
|
|
137
|
+
n == null || n(t), g == null || g(t);
|
|
138
|
+
}), yt = (t) => {
|
|
139
|
+
const d = t.target.value;
|
|
140
|
+
_(d), T(J(d));
|
|
131
141
|
};
|
|
132
|
-
|
|
133
|
-
var d,
|
|
142
|
+
Y(() => {
|
|
143
|
+
var d, o, f, l;
|
|
134
144
|
if (!(e != null && e.id))
|
|
135
145
|
return;
|
|
136
146
|
const t = {};
|
|
137
|
-
typeof (a == null ? void 0 : a.knowledges) == "object" && ((d = a == null ? void 0 : a.knowledges) != null && d.default) && (t.knowledges = (
|
|
147
|
+
typeof (a == null ? void 0 : a.knowledges) == "object" && ((d = a == null ? void 0 : a.knowledges) != null && d.default) && (t.knowledges = (o = a == null ? void 0 : a.knowledges) == null ? void 0 : o.default), typeof (a == null ? void 0 : a.promptVariables) == "object" && ((f = a == null ? void 0 : a.promptVariables) != null && f.default) && (t.promptVariables = (l = a == null ? void 0 : a.promptVariables) == null ? void 0 : l.default), v == null || v.loadSession(e.id, t);
|
|
138
148
|
}, [e]);
|
|
139
|
-
const
|
|
140
|
-
const d =
|
|
149
|
+
const Q = it((t) => {
|
|
150
|
+
const d = h().endOf("day"), o = d.subtract(1, "day"), f = d.subtract(7, "day"), l = d.subtract(30, "day"), s = [], u = [], M = [], w = [], k = {};
|
|
141
151
|
return t.forEach((c) => {
|
|
142
|
-
var
|
|
143
|
-
const
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
else if (
|
|
152
|
+
var y;
|
|
153
|
+
const i = h((y = c.data) == null ? void 0 : y.createdAt);
|
|
154
|
+
if (i.isAfter(o))
|
|
155
|
+
u.push(c);
|
|
156
|
+
else if (i.isAfter(f))
|
|
147
157
|
M.push(c);
|
|
148
|
-
else if (
|
|
149
|
-
|
|
158
|
+
else if (i.isAfter(l))
|
|
159
|
+
w.push(c);
|
|
150
160
|
else {
|
|
151
|
-
const
|
|
152
|
-
|
|
161
|
+
const p = i.format("YYYY-MM");
|
|
162
|
+
k[p] || (k[p] = []), k[p].push(c);
|
|
153
163
|
}
|
|
154
|
-
}),
|
|
164
|
+
}), u.length > 0 && s.push({
|
|
155
165
|
title: "今天",
|
|
156
|
-
sessions:
|
|
157
|
-
var
|
|
158
|
-
return
|
|
166
|
+
sessions: u.sort((c, i) => {
|
|
167
|
+
var y, p;
|
|
168
|
+
return h((y = i.data) == null ? void 0 : y.createdAt).valueOf() - h((p = c.data) == null ? void 0 : p.createdAt).valueOf();
|
|
159
169
|
}),
|
|
160
170
|
key: "today"
|
|
161
|
-
}), M.length > 0 &&
|
|
171
|
+
}), M.length > 0 && s.push({
|
|
162
172
|
title: "7天内",
|
|
163
|
-
sessions: M.sort((c,
|
|
164
|
-
var
|
|
165
|
-
return
|
|
173
|
+
sessions: M.sort((c, i) => {
|
|
174
|
+
var y, p;
|
|
175
|
+
return h((y = i.data) == null ? void 0 : y.createdAt).valueOf() - h((p = c.data) == null ? void 0 : p.createdAt).valueOf();
|
|
166
176
|
}),
|
|
167
177
|
key: "seven-days"
|
|
168
|
-
}),
|
|
178
|
+
}), w.length > 0 && s.push({
|
|
169
179
|
title: "30天内",
|
|
170
|
-
sessions:
|
|
171
|
-
var
|
|
172
|
-
return
|
|
180
|
+
sessions: w.sort((c, i) => {
|
|
181
|
+
var y, p;
|
|
182
|
+
return h((y = i.data) == null ? void 0 : y.createdAt).valueOf() - h((p = c.data) == null ? void 0 : p.createdAt).valueOf();
|
|
173
183
|
}),
|
|
174
184
|
key: "thirty-days"
|
|
175
|
-
}), Object.keys(
|
|
176
|
-
const
|
|
177
|
-
var
|
|
178
|
-
return
|
|
185
|
+
}), Object.keys(k).sort((c, i) => i.localeCompare(c)).forEach((c) => {
|
|
186
|
+
const i = k[c].sort((y, p) => {
|
|
187
|
+
var W, Z;
|
|
188
|
+
return h((W = p.data) == null ? void 0 : W.createdAt).valueOf() - h((Z = y.data) == null ? void 0 : Z.createdAt).valueOf();
|
|
179
189
|
});
|
|
180
|
-
|
|
181
|
-
title:
|
|
182
|
-
sessions:
|
|
190
|
+
s.push({
|
|
191
|
+
title: h(c).format("YYYY年MM月"),
|
|
192
|
+
sessions: i,
|
|
183
193
|
key: `month-${c}`
|
|
184
194
|
});
|
|
185
|
-
}),
|
|
186
|
-
}),
|
|
187
|
-
return /* @__PURE__ */
|
|
195
|
+
}), s;
|
|
196
|
+
}), H = At(() => Q(P), [P, Q]);
|
|
197
|
+
return /* @__PURE__ */ r("div", {
|
|
188
198
|
className: "bot-session-container",
|
|
189
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ b("div", {
|
|
190
200
|
className: "agent-sessions",
|
|
191
|
-
children: [
|
|
201
|
+
children: [O && (a == null ? void 0 : a.siderTitle) && /* @__PURE__ */ r("div", {
|
|
192
202
|
className: "sessions-header",
|
|
193
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ r("div", {
|
|
194
204
|
className: "session-header-title",
|
|
195
|
-
children: (
|
|
205
|
+
children: (A == null ? void 0 : A.name) || "-"
|
|
196
206
|
})
|
|
197
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ b("div", {
|
|
198
208
|
className: "sessions-main",
|
|
199
|
-
children: [
|
|
209
|
+
children: [O && /* @__PURE__ */ r("div", {
|
|
200
210
|
className: "session-header-btn-wrapper",
|
|
201
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ r(bt, {
|
|
202
212
|
className: "session-header-btn",
|
|
203
|
-
onClick:
|
|
213
|
+
onClick: st,
|
|
204
214
|
type: "primary",
|
|
205
215
|
children: "+ 新会话"
|
|
206
216
|
})
|
|
207
|
-
}),
|
|
217
|
+
}), H == null ? void 0 : H.map((t) => {
|
|
208
218
|
var d;
|
|
209
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ b("div", {
|
|
210
220
|
className: "session-group",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ r("div", {
|
|
212
222
|
className: "group-header",
|
|
213
223
|
style: {
|
|
214
|
-
top:
|
|
224
|
+
top: O ? 48 : 0
|
|
215
225
|
},
|
|
216
226
|
children: t.title
|
|
217
|
-
}), (d = t.sessions) == null ? void 0 : d.map((
|
|
218
|
-
var
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
className:
|
|
227
|
+
}), (d = t.sessions) == null ? void 0 : d.map((o) => {
|
|
228
|
+
var f, l, s, u, M, w, k, B, c;
|
|
229
|
+
return /* @__PURE__ */ r("div", {
|
|
230
|
+
className: Mt({
|
|
221
231
|
"session-item": !0,
|
|
222
|
-
"session-item__active": ((
|
|
232
|
+
"session-item__active": ((f = o.data) == null ? void 0 : f.id) === ((l = e == null ? void 0 : e.data) == null ? void 0 : l.id)
|
|
223
233
|
}),
|
|
224
|
-
onClick: () =>
|
|
225
|
-
children: /* @__PURE__ */
|
|
234
|
+
onClick: () => ft(o),
|
|
235
|
+
children: /* @__PURE__ */ r("div", {
|
|
226
236
|
className: "session-item-wrapper",
|
|
227
|
-
children:
|
|
237
|
+
children: /* @__PURE__ */ b("div", {
|
|
228
238
|
className: "session-item-top",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ r(Et.Paragraph, {
|
|
230
240
|
className: "item-top-title",
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
241
|
+
style: {
|
|
242
|
+
margin: 0,
|
|
243
|
+
width: "100%"
|
|
244
|
+
},
|
|
245
|
+
ellipsis: {
|
|
246
|
+
rows: 1,
|
|
247
|
+
tooltip: {
|
|
248
|
+
title: ((s = o.data) == null ? void 0 : s.name) || "-",
|
|
249
|
+
placement: "topLeft"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
children: ((u = o.data) == null ? void 0 : u.name) || "-"
|
|
253
|
+
}), /* @__PURE__ */ b(at, {
|
|
254
|
+
children: [/* @__PURE__ */ r("span", {
|
|
255
|
+
className: "item-top-time",
|
|
256
|
+
children: h((M = o.data) == null ? void 0 : M.createdAt).format("MM/DD HH:mm:ss")
|
|
257
|
+
}), /* @__PURE__ */ b("div", {
|
|
258
|
+
className: "item-top-action",
|
|
259
|
+
onClick: (i) => i.stopPropagation(),
|
|
260
|
+
children: [/* @__PURE__ */ r(dt, {
|
|
261
|
+
open: ct === ((w = o.data) == null ? void 0 : w.id),
|
|
262
|
+
getPopupContainer: (i) => i.parentNode,
|
|
263
|
+
icon: !1,
|
|
264
|
+
title: /* @__PURE__ */ b("div", {
|
|
265
|
+
children: [/* @__PURE__ */ r(Ot, {
|
|
266
|
+
placeholder: "请输入内容",
|
|
267
|
+
autoComplete: "off",
|
|
268
|
+
showCount: !0,
|
|
269
|
+
value: V,
|
|
270
|
+
onChange: yt,
|
|
271
|
+
maxLength: F,
|
|
272
|
+
status: $ ? "error" : ""
|
|
273
|
+
}), $ && /* @__PURE__ */ r("div", {
|
|
274
|
+
style: {
|
|
275
|
+
color: "#ff4d4f",
|
|
276
|
+
fontSize: "12px",
|
|
277
|
+
marginTop: "4px"
|
|
278
|
+
},
|
|
279
|
+
children: $
|
|
280
|
+
})]
|
|
281
|
+
}),
|
|
282
|
+
onConfirm: () => pt(o),
|
|
283
|
+
onCancel: ht,
|
|
284
|
+
children: /* @__PURE__ */ r(ot, {
|
|
285
|
+
type: "icon-bianji2",
|
|
286
|
+
onClick: () => mt(o),
|
|
287
|
+
className: "icon-action",
|
|
288
|
+
style: {
|
|
289
|
+
marginRight: "8px"
|
|
290
|
+
}
|
|
291
|
+
})
|
|
292
|
+
}, `edit-${(k = o.data) == null ? void 0 : k.id}-${K}`), /* @__PURE__ */ r(dt, {
|
|
293
|
+
getPopupContainer: (i) => i.parentNode,
|
|
294
|
+
icon: !1,
|
|
295
|
+
title: /* @__PURE__ */ b(at, {
|
|
296
|
+
direction: "vertical",
|
|
297
|
+
children: [/* @__PURE__ */ r("div", {
|
|
298
|
+
children: "删除确认?"
|
|
299
|
+
}), /* @__PURE__ */ r("div", {
|
|
300
|
+
children: "会话删除后不可恢复,请确认是否删除!"
|
|
301
|
+
})]
|
|
302
|
+
}),
|
|
303
|
+
onConfirm: () => {
|
|
304
|
+
rt(o), D((i) => i + 1);
|
|
270
305
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
306
|
+
onCancel: () => {
|
|
307
|
+
D((i) => i + 1);
|
|
308
|
+
},
|
|
309
|
+
children: /* @__PURE__ */ r(ot, {
|
|
310
|
+
style: {
|
|
311
|
+
fontSize: "18px"
|
|
312
|
+
},
|
|
313
|
+
className: "icon-action",
|
|
314
|
+
type: "icon-del"
|
|
315
|
+
})
|
|
316
|
+
}, `delete-${(B = o.data) == null ? void 0 : B.id}-${K}`)]
|
|
274
317
|
})]
|
|
275
318
|
})]
|
|
276
|
-
})
|
|
277
|
-
className: "session-item-bottom",
|
|
278
|
-
children: [/* @__PURE__ */ s("span", {
|
|
279
|
-
className: "item-bottom-desc",
|
|
280
|
-
children: ((b = i.data) == null ? void 0 : b.finialMessage) || "-"
|
|
281
|
-
}), /* @__PURE__ */ s("span", {
|
|
282
|
-
className: "item-bottom-time",
|
|
283
|
-
children: f((M = i.data) == null ? void 0 : M.createdAt).format("MM/DD HH:mm:ss")
|
|
284
|
-
})]
|
|
285
|
-
})]
|
|
319
|
+
})
|
|
286
320
|
})
|
|
287
|
-
}, (
|
|
321
|
+
}, (c = o.data) == null ? void 0 : c.id);
|
|
288
322
|
})]
|
|
289
323
|
}, t.key);
|
|
290
324
|
})]
|
|
@@ -292,7 +326,7 @@ const Nt = lt((u, r) => {
|
|
|
292
326
|
})
|
|
293
327
|
});
|
|
294
328
|
});
|
|
295
|
-
|
|
329
|
+
Pt.displayName = "SessionList";
|
|
296
330
|
export {
|
|
297
|
-
|
|
331
|
+
Pt as default
|
|
298
332
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "@glodon-aiot/agent-cli-ui", t = "3.
|
|
1
|
+
const e = "@glodon-aiot/agent-cli-ui", t = "3.5.0-alpha.2", s = "./dist/es/index.mjs", o = "./dist/lib/index.js", i = "./dist/src/index.d.ts", n = {
|
|
2
2
|
import: "./dist/es/index.mjs",
|
|
3
3
|
require: "./dist/lib/index.js",
|
|
4
4
|
types: "./dist/src/index.d.ts"
|
|
@@ -25,8 +25,8 @@ const e = "@glodon-aiot/agent-cli-ui", t = "3.4.1", s = "./dist/es/index.mjs", o
|
|
|
25
25
|
webpack: "*"
|
|
26
26
|
}, p = {
|
|
27
27
|
"@ant-design/icons": "^5.3.4",
|
|
28
|
-
"@glodon-aiot/apis": "^3.
|
|
29
|
-
"@glodon-aiot/bot-client-sdk": "^3.
|
|
28
|
+
"@glodon-aiot/apis": "^3.5.0-alpha.2",
|
|
29
|
+
"@glodon-aiot/bot-client-sdk": "^3.5.0-alpha.2",
|
|
30
30
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
31
31
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
32
32
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|