@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.
@@ -1,290 +1,324 @@
1
- var ot = Object.defineProperty;
2
- var G = Object.getOwnPropertySymbols;
3
- var it = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable;
4
- var $ = (u, r, e) => r in u ? ot(u, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[r] = e, q = (u, r) => {
5
- for (var e in r || (r = {}))
6
- it.call(r, e) && $(u, e, r[e]);
7
- if (G)
8
- for (var e of G(r))
9
- nt.call(r, e) && $(u, e, r[e]);
10
- return u;
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 = (u, r, e) => new Promise((o, O) => {
13
- var w = (k) => {
12
+ var x = (N, m, e) => new Promise((n, E) => {
13
+ var A = (g) => {
14
14
  try {
15
- E(e.next(k));
15
+ O(e.next(g));
16
16
  } catch (j) {
17
- O(j);
17
+ E(j);
18
18
  }
19
- }, T = (k) => {
19
+ }, R = (g) => {
20
20
  try {
21
- E(e.throw(k));
21
+ O(e.throw(g));
22
22
  } catch (j) {
23
- O(j);
23
+ E(j);
24
24
  }
25
- }, E = (k) => k.done ? o(k.value) : Promise.resolve(k.value).then(w, T);
26
- E((e = e.apply(u, r)).next());
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 s, jsxs as A } from "react/jsx-runtime";
29
- import { forwardRef as lt, useState as C, useContext as ct, useEffect as L, useImperativeHandle as st, useMemo as rt } from "react";
30
- import { Button as mt, Popconfirm as J, Input as pt, Space as ht } from "antd";
31
- import f from "dayjs";
32
- import ft from "classnames";
33
- import Q from "../../components/Iconfont/index.mjs";
34
- import yt from "../../context.mjs";
35
- /* empty css */import { useMemoizedFn as S } from "ahooks";
36
- import { NET_OPEN_STATUS as W } from "../../constant.mjs";
37
- import { useSessionState as vt } from "../../hooks/useSessionState.mjs";
38
- const Nt = lt((u, r) => {
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: o,
42
- checkKnowledges: O,
43
- application: w,
44
- networkStatus: T,
45
- isShowHeader: E = !0,
46
- afterSessionClick: k,
41
+ setCurrentSession: n,
42
+ checkKnowledges: E,
43
+ application: A,
44
+ networkStatus: R,
45
+ isShowHeader: O = !0,
46
+ afterSessionClick: g,
47
47
  sessionId: j
48
- } = u, [V, B] = C(), {
49
- agentClient: N,
50
- mode: X,
48
+ } = N, [V, _] = L(), {
49
+ agentClient: v,
50
+ mode: lt,
51
51
  features: a
52
- } = ct(yt), [H, _] = C(O), {
52
+ } = kt(jt), [z, C] = L(E), {
53
53
  sessions: P,
54
- setSessions: Y
55
- } = vt(), K = S((t) => {
56
- t.id && Y((d) => [...d.map((n) => {
57
- var l;
58
- return ((l = n.data) == null ? void 0 : l.id) === t.id && (n.data = q({}, t)), n;
59
- })].sort((n, l) => {
60
- var g, m;
61
- const b = f((g = n.data) == null ? void 0 : g.createdAt).valueOf();
62
- return f((m = l.data) == null ? void 0 : m.createdAt).valueOf() - b;
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
- L(() => {
66
- N == null || N.getSessions().then((t) => x(void 0, null, function* () {
65
+ Y(() => {
66
+ v == null || v.getSessions().then((t) => x(void 0, null, function* () {
67
67
  var d;
68
- if (Y([...t]), !((d = e == null ? void 0 : e.data) != null && d.id) && (t != null && t.length) && X === "inlay") {
69
- const i = t[0];
70
- j || o == null || o(i);
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 || o == null || o(null));
72
+ e === void 0 && (j || n == null || n(null));
73
73
  }));
74
- }, []), L(() => {
74
+ }, []), Y(() => {
75
75
  var t;
76
- if (!((t = e == null ? void 0 : e.data) != null && t.id) && O === void 0) {
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
- _(d);
78
+ C(d);
79
79
  return;
80
80
  }
81
- _(O);
82
- }, [O]), L(() => {
83
- e == null || e.addEventListener("data:updated", K);
84
- }, [e]), st(r, () => ({
81
+ C(E);
82
+ }, [E]), Y(() => {
83
+ e == null || e.addEventListener("data:updated", U);
84
+ }, [e]), wt(m, () => ({
85
85
  create(t) {
86
- return z(t).then((d) => (o == null || o(d), d));
86
+ return X(t).then((d) => (n == null || n(d), d));
87
87
  },
88
88
  list: () => Promise.resolve(P)
89
89
  }));
90
- const z = (t) => {
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((i) => x(void 0, null, function* () {
93
- var l;
94
- const y = typeof (a == null ? void 0 : a.promptVariables) == "object" ? (a == null ? void 0 : a.promptVariables.default) || [] : void 0, n = yield N == null ? void 0 : N.loadSession("", {
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: (w == null ? void 0 : w.type) === 0 ? t != null && t.netOpen ? t.netOpen : d ? W.OPEN : W.CLOSE : void 0,
100
- knowledges: (l = e == null ? void 0 : e.data) != null && l.id ? t == null ? void 0 : t.knowledges : H,
101
- promptVariables: y
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
- n == null || n.addEventListener("data:created", () => x(void 0, null, function* () {
104
- Y([n, ...P]), i(n);
103
+ l == null || l.addEventListener("data:created", () => x(void 0, null, function* () {
104
+ S([l, ...P]), o(l);
105
105
  }));
106
106
  }));
107
- }, Z = () => {
108
- z({
109
- knowledges: H
107
+ }, st = () => {
108
+ X({
109
+ knowledges: z
110
110
  }).then((t) => {
111
- o == null || o(t);
111
+ n == null || n(t);
112
112
  });
113
- }, I = (t) => {
114
- N == null || N.removeSession(t, !0).then(() => x(void 0, null, function* () {
115
- var i, y;
116
- const d = P.filter((n) => {
117
- var l, b;
118
- return ((l = n.data) == null ? void 0 : l.id) !== ((b = t.data) == null ? void 0 : b.id);
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
- ((i = t.data) == null ? void 0 : i.id) === ((y = e == null ? void 0 : e.data) == null ? void 0 : y.id) && (d != null && d.length ? o == null || o(d[0]) : o == null || o(null)), Y([...d]);
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
- }, tt = (t) => {
123
- var d;
124
- B((d = t.data) == null ? void 0 : d.name);
125
- }, et = (t) => {
126
- V && (t.rename(V), t == null || t.addEventListener("data:updated", K));
127
- }, at = (t) => x(void 0, null, function* () {
128
- o == null || o(t), k == null || k(t);
129
- }), dt = (t) => {
130
- B(t.target.value);
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
- L(() => {
133
- var d, i, y, n;
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 = (i = a == null ? void 0 : a.knowledges) == null ? void 0 : i.default), typeof (a == null ? void 0 : a.promptVariables) == "object" && ((y = a == null ? void 0 : a.promptVariables) != null && y.default) && (t.promptVariables = (n = a == null ? void 0 : a.promptVariables) == null ? void 0 : n.default), N == null || N.loadSession(e.id, t);
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 F = S((t) => {
140
- const d = f().endOf("day"), i = d.subtract(1, "day"), y = d.subtract(7, "day"), n = d.subtract(30, "day"), l = [], b = [], M = [], g = [], m = {};
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 v;
143
- const p = f((v = c.data) == null ? void 0 : v.createdAt);
144
- if (p.isAfter(i))
145
- b.push(c);
146
- else if (p.isAfter(y))
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 (p.isAfter(n))
149
- g.push(c);
158
+ else if (i.isAfter(l))
159
+ w.push(c);
150
160
  else {
151
- const h = p.format("YYYY-MM");
152
- m[h] || (m[h] = []), m[h].push(c);
161
+ const p = i.format("YYYY-MM");
162
+ k[p] || (k[p] = []), k[p].push(c);
153
163
  }
154
- }), b.length > 0 && l.push({
164
+ }), u.length > 0 && s.push({
155
165
  title: "今天",
156
- sessions: b.sort((c, p) => {
157
- var v, h;
158
- return f((v = p.data) == null ? void 0 : v.createdAt).valueOf() - f((h = c.data) == null ? void 0 : h.createdAt).valueOf();
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 && l.push({
171
+ }), M.length > 0 && s.push({
162
172
  title: "7天内",
163
- sessions: M.sort((c, p) => {
164
- var v, h;
165
- return f((v = p.data) == null ? void 0 : v.createdAt).valueOf() - f((h = c.data) == null ? void 0 : h.createdAt).valueOf();
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
- }), g.length > 0 && l.push({
178
+ }), w.length > 0 && s.push({
169
179
  title: "30天内",
170
- sessions: g.sort((c, p) => {
171
- var v, h;
172
- return f((v = p.data) == null ? void 0 : v.createdAt).valueOf() - f((h = c.data) == null ? void 0 : h.createdAt).valueOf();
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(m).sort((c, p) => p.localeCompare(c)).forEach((c) => {
176
- const p = m[c].sort((v, h) => {
177
- var R, U;
178
- return f((R = h.data) == null ? void 0 : R.createdAt).valueOf() - f((U = v.data) == null ? void 0 : U.createdAt).valueOf();
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
- l.push({
181
- title: f(c).format("YYYY年MM月"),
182
- sessions: p,
190
+ s.push({
191
+ title: h(c).format("YYYY年MM月"),
192
+ sessions: i,
183
193
  key: `month-${c}`
184
194
  });
185
- }), l;
186
- }), D = rt(() => F(P), [P, F]);
187
- return /* @__PURE__ */ s("div", {
195
+ }), s;
196
+ }), H = At(() => Q(P), [P, Q]);
197
+ return /* @__PURE__ */ r("div", {
188
198
  className: "bot-session-container",
189
- children: /* @__PURE__ */ A("div", {
199
+ children: /* @__PURE__ */ b("div", {
190
200
  className: "agent-sessions",
191
- children: [E && (a == null ? void 0 : a.siderTitle) && /* @__PURE__ */ s("div", {
201
+ children: [O && (a == null ? void 0 : a.siderTitle) && /* @__PURE__ */ r("div", {
192
202
  className: "sessions-header",
193
- children: /* @__PURE__ */ s("div", {
203
+ children: /* @__PURE__ */ r("div", {
194
204
  className: "session-header-title",
195
- children: (w == null ? void 0 : w.name) || "-"
205
+ children: (A == null ? void 0 : A.name) || "-"
196
206
  })
197
- }), /* @__PURE__ */ A("div", {
207
+ }), /* @__PURE__ */ b("div", {
198
208
  className: "sessions-main",
199
- children: [E && /* @__PURE__ */ s("div", {
209
+ children: [O && /* @__PURE__ */ r("div", {
200
210
  className: "session-header-btn-wrapper",
201
- children: /* @__PURE__ */ s(mt, {
211
+ children: /* @__PURE__ */ r(bt, {
202
212
  className: "session-header-btn",
203
- onClick: Z,
213
+ onClick: st,
204
214
  type: "primary",
205
215
  children: "+ 新会话"
206
216
  })
207
- }), D == null ? void 0 : D.map((t) => {
217
+ }), H == null ? void 0 : H.map((t) => {
208
218
  var d;
209
- return /* @__PURE__ */ A("div", {
219
+ return /* @__PURE__ */ b("div", {
210
220
  className: "session-group",
211
- children: [/* @__PURE__ */ s("div", {
221
+ children: [/* @__PURE__ */ r("div", {
212
222
  className: "group-header",
213
223
  style: {
214
- top: E ? 48 : 0
224
+ top: O ? 48 : 0
215
225
  },
216
226
  children: t.title
217
- }), (d = t.sessions) == null ? void 0 : d.map((i) => {
218
- var y, n, l, b, M, g;
219
- return /* @__PURE__ */ s("div", {
220
- className: ft({
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": ((y = i.data) == null ? void 0 : y.id) === ((n = e == null ? void 0 : e.data) == null ? void 0 : n.id)
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: () => at(i),
225
- children: /* @__PURE__ */ A("div", {
234
+ onClick: () => ft(o),
235
+ children: /* @__PURE__ */ r("div", {
226
236
  className: "session-item-wrapper",
227
- children: [/* @__PURE__ */ A("div", {
237
+ children: /* @__PURE__ */ b("div", {
228
238
  className: "session-item-top",
229
- children: [/* @__PURE__ */ s("span", {
239
+ children: [/* @__PURE__ */ r(Et.Paragraph, {
230
240
  className: "item-top-title",
231
- children: ((l = i.data) == null ? void 0 : l.name) || "-"
232
- }), /* @__PURE__ */ A("div", {
233
- className: "item-top-action",
234
- onClick: (m) => m.stopPropagation(),
235
- children: [/* @__PURE__ */ s(J, {
236
- getPopupContainer: (m) => m.parentNode,
237
- icon: !1,
238
- title: /* @__PURE__ */ s(pt, {
239
- placeholder: "请输入内容",
240
- autoComplete: "off",
241
- showCount: !0,
242
- value: V,
243
- onChange: dt,
244
- maxLength: 15
245
- }),
246
- onConfirm: () => et(i),
247
- children: /* @__PURE__ */ s(Q, {
248
- type: "icon-bianji2",
249
- onClick: () => tt(i),
250
- className: "icon-action",
251
- style: {
252
- marginRight: "8px"
253
- }
254
- })
255
- }), /* @__PURE__ */ s(J, {
256
- getPopupContainer: (m) => m.parentNode,
257
- icon: !1,
258
- title: /* @__PURE__ */ A(ht, {
259
- direction: "vertical",
260
- children: [/* @__PURE__ */ s("div", {
261
- children: "删除确认?"
262
- }), /* @__PURE__ */ s("div", {
263
- children: "会话删除后不可恢复,请确认是否删除!"
264
- })]
265
- }),
266
- onConfirm: () => I(i),
267
- children: /* @__PURE__ */ s(Q, {
268
- style: {
269
- fontSize: "18px"
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
- className: "icon-action",
272
- type: "icon-del"
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
- }), /* @__PURE__ */ A("div", {
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
- }, (g = i.data) == null ? void 0 : g.id);
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
- Nt.displayName = "SessionList";
329
+ Pt.displayName = "SessionList";
296
330
  export {
297
- Nt as default
331
+ Pt as default
298
332
  };
@@ -1,4 +1,4 @@
1
- const e = "@glodon-aiot/agent-cli-ui", t = "3.4.1", s = "./dist/es/index.mjs", o = "./dist/lib/index.js", i = "./dist/src/index.d.ts", n = {
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.4.1",
29
- "@glodon-aiot/bot-client-sdk": "^3.4.1",
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",