@glodon-aiot/agent-cli-ui 3.4.0-alpha.3 → 3.4.0-alpha.4

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,74 +1,53 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { Popover as S, Button as h, Drawer as C } from "antd";
3
- import { useState as w, useContext as x } from "react";
4
- /* empty css */import b from "../../../../components/Iconfont/index.mjs";
5
- import g from "../../../../context.mjs";
6
- import v from "../../../../components/Sider/index.mjs";
7
- const V = (a) => {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Drawer as p } from "antd";
3
+ import { useContext as u } from "react";
4
+ /* empty css */import C from "../../../../context.mjs";
5
+ import S from "../../../../components/Sider/index.mjs";
6
+ const j = (n) => {
8
7
  const {
9
8
  currentSession: s,
10
- disabled: l = !1,
11
- application: c,
12
- networkStatus: m,
13
- setCurrentSession: d,
14
- sessions: p,
9
+ disabled: y = !1,
10
+ application: a,
11
+ networkStatus: l,
12
+ setCurrentSession: m,
13
+ sessions: d,
15
14
  // 👈 新增
16
- setSessions: f
15
+ setSessions: f,
17
16
  // 👈 新增
18
- } = a, [y, t] = w(!1), {
19
- popupContainer: o
20
- } = x(g);
21
- return /* @__PURE__ */ u("div", {
22
- className: "session-history-drawer-component",
23
- children: [/* @__PURE__ */ e(S, {
24
- placement: "topRight",
25
- showArrow: !1,
26
- overlayClassName: "session-history-overlay",
27
- overlayStyle: {
28
- padding: "4px"
29
- },
30
- getPopupContainer: (i) => i.parentNode,
31
- content: "会话历史记录",
32
- children: /* @__PURE__ */ e(h, {
33
- className: "history-overlay-action",
34
- disabled: l,
35
- type: "text",
36
- icon: /* @__PURE__ */ e(b, {
37
- type: "icon-lishijilu",
38
- style: {
39
- fontSize: 24
40
- }
41
- }),
42
- onClick: () => t(!0)
43
- })
44
- }), y && /* @__PURE__ */ e(C, {
45
- title: "分组会话列表",
46
- open: !0,
47
- placement: "bottom",
48
- onClose: () => t(!1),
49
- className: "session-history-drawer",
50
- size: "large",
51
- getContainer: () => (o == null ? void 0 : o.current) || document.body,
52
- destroyOnClose: !0,
53
- style: {
54
- position: "absolute"
55
- },
56
- children: /* @__PURE__ */ e(v, {
57
- isShowHeader: !1,
58
- application: c,
59
- networkStatus: m,
60
- currentSession: s,
61
- setCurrentSession: d,
62
- sessions: p,
63
- setSessions: f,
64
- afterSessionClick: (i) => {
65
- var r, n;
66
- ((r = i.data) == null ? void 0 : r.id) !== ((n = s == null ? void 0 : s.data) == null ? void 0 : n.id) && t(!1);
67
- }
68
- })
69
- })]
17
+ isSessionHistoryVisible: b,
18
+ setIsSessionHistoryVisible: t
19
+ } = n, {
20
+ popupContainer: e
21
+ } = u(C);
22
+ return /* @__PURE__ */ r(p, {
23
+ title: "会话历史",
24
+ open: !0,
25
+ placement: "bottom",
26
+ onClose: () => {
27
+ t(!1);
28
+ },
29
+ className: "session-history-drawer",
30
+ size: "large",
31
+ getContainer: () => (e == null ? void 0 : e.current) || document.body,
32
+ destroyOnClose: !0,
33
+ style: {
34
+ position: "absolute"
35
+ },
36
+ children: /* @__PURE__ */ r(S, {
37
+ isShowHeader: !1,
38
+ application: a,
39
+ networkStatus: l,
40
+ currentSession: s,
41
+ setCurrentSession: m,
42
+ sessions: d,
43
+ setSessions: f,
44
+ afterSessionClick: (c) => {
45
+ var o, i;
46
+ ((o = c.data) == null ? void 0 : o.id) !== ((i = s == null ? void 0 : s.data) == null ? void 0 : i.id) && t(!1);
47
+ }
48
+ })
70
49
  });
71
50
  };
72
51
  export {
73
- V as default
52
+ j as default
74
53
  };