@glodon-aiot/agent-cli-ui 3.8.0-alpha.4 → 3.8.0-beta.6

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