@glodon-aiot/agent-cli-ui 3.3.7-beta.2 → 3.3.8
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/AgentClientUI.mjs +107 -94
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +46 -59
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +46 -47
- package/dist/es/Dialog/AgentChat/index.mjs +378 -376
- package/dist/es/Dialog/SessionList/index.mjs +115 -119
- package/dist/es/Dialog/index.mjs +26 -30
- package/dist/es/QuillEditor/index.mjs +59 -70
- package/dist/es/components/Recommend/index.mjs +34 -52
- package/dist/es/constant.mjs +3 -11
- package/dist/es/index.mjs +293 -285
- package/dist/es/packages/agent-cli-ui/package.json.mjs +17 -19
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style.css +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/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/style18.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style24.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/style6.css +1 -1
- package/dist/es/src/style7.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 +54 -54
- package/dist/src/AgentClientUI.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +0 -2
- package/dist/src/Dialog/index.d.ts +1 -1
- package/dist/src/Footer/index.d.ts +1 -2
- package/dist/src/QuillEditor/index.d.ts +1 -1
- package/dist/src/components/Greeting/index.d.ts +1 -2
- package/dist/src/components/Header/index.d.ts +1 -2
- package/dist/src/components/Recommend/index.d.ts +0 -1
- package/dist/src/constant.d.ts +0 -4
- package/dist/src/index.d.ts +1 -5
- package/dist/src/types.d.ts +2 -3
- package/dist/src/utils/antdConfig.d.ts +7 -0
- package/dist/src/utils/testAntdPrefix.d.ts +3 -0
- package/package.json +11 -13
|
@@ -1,180 +1,176 @@
|
|
|
1
|
-
var
|
|
1
|
+
var N = (V, E, f) => new Promise((t, i) => {
|
|
2
2
|
var v = (p) => {
|
|
3
3
|
try {
|
|
4
|
-
|
|
4
|
+
k(f.next(p));
|
|
5
5
|
} catch (s) {
|
|
6
|
-
|
|
6
|
+
i(s);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, g = (p) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
10
|
+
k(f.throw(p));
|
|
11
11
|
} catch (s) {
|
|
12
|
-
|
|
12
|
+
i(s);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
14
|
+
}, k = (p) => p.done ? t(p.value) : Promise.resolve(p.value).then(v, g);
|
|
15
|
+
k((f = f.apply(V, E)).next());
|
|
16
16
|
});
|
|
17
|
-
import { jsx as n, jsxs as
|
|
18
|
-
import { forwardRef as
|
|
19
|
-
import { Button as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
/* empty css */import { useMemoizedFn as
|
|
25
|
-
|
|
26
|
-
const u = B((x, P) => {
|
|
17
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
18
|
+
import { forwardRef as U, useState as L, useContext as q, useEffect as x, useImperativeHandle as u } from "react";
|
|
19
|
+
import { Button as G, Popconfirm as H, Input as J, Space as Q } from "antd";
|
|
20
|
+
import T from "dayjs";
|
|
21
|
+
import W from "classnames";
|
|
22
|
+
import O from "../../components/Iconfont/index.mjs";
|
|
23
|
+
import X from "../../context.mjs";
|
|
24
|
+
/* empty css */import { useMemoizedFn as Y } from "ahooks";
|
|
25
|
+
const Z = U((V, E) => {
|
|
27
26
|
const {
|
|
28
|
-
sider:
|
|
29
|
-
currentSession:
|
|
30
|
-
setCurrentSession:
|
|
27
|
+
sider: f,
|
|
28
|
+
currentSession: t,
|
|
29
|
+
setCurrentSession: i,
|
|
31
30
|
checkKnowledges: v,
|
|
32
|
-
application:
|
|
33
|
-
networkStatus:
|
|
34
|
-
} =
|
|
31
|
+
application: g,
|
|
32
|
+
networkStatus: k
|
|
33
|
+
} = V, [p, s] = L(), {
|
|
35
34
|
agentClient: m,
|
|
36
|
-
mode:
|
|
37
|
-
features:
|
|
38
|
-
} = q(
|
|
39
|
-
var
|
|
40
|
-
if (!((
|
|
35
|
+
mode: P,
|
|
36
|
+
features: a
|
|
37
|
+
} = q(X), [h, j] = L([]), [D, K] = L(v), M = Y(() => {
|
|
38
|
+
var e;
|
|
39
|
+
if (!((e = t == null ? void 0 : t.data) != null && e.id))
|
|
41
40
|
return;
|
|
42
|
-
const d =
|
|
43
|
-
var
|
|
44
|
-
return ((
|
|
41
|
+
const d = h.map((l) => {
|
|
42
|
+
var o, c;
|
|
43
|
+
return ((o = l.data) == null ? void 0 : o.id) === ((c = t.data) == null ? void 0 : c.id) ? t : l;
|
|
45
44
|
});
|
|
46
|
-
|
|
45
|
+
j([...d]);
|
|
47
46
|
});
|
|
48
|
-
|
|
49
|
-
m == null || m.getSessions().then((d) =>
|
|
50
|
-
var
|
|
51
|
-
if (
|
|
47
|
+
x(() => {
|
|
48
|
+
m == null || m.getSessions().then((d) => N(void 0, null, function* () {
|
|
49
|
+
var e;
|
|
50
|
+
if (j([...d]), !((e = t == null ? void 0 : t.data) != null && e.id) && (d != null && d.length) && P === "inlay") {
|
|
52
51
|
const l = d[0];
|
|
53
|
-
|
|
52
|
+
i == null || i(l);
|
|
54
53
|
}
|
|
55
54
|
}));
|
|
56
|
-
}, []),
|
|
55
|
+
}, []), x(() => {
|
|
57
56
|
var d;
|
|
58
|
-
if (!((d =
|
|
59
|
-
const
|
|
60
|
-
|
|
57
|
+
if (!((d = t == null ? void 0 : t.data) != null && d.id) && v === void 0) {
|
|
58
|
+
const e = typeof (a == null ? void 0 : a.knowledges) == "object" && a.knowledges.default || void 0;
|
|
59
|
+
K(e);
|
|
61
60
|
return;
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
}, [v]),
|
|
65
|
-
|
|
66
|
-
}, [
|
|
62
|
+
K(v);
|
|
63
|
+
}, [v]), x(() => {
|
|
64
|
+
t == null || t.addEventListener("data:updated", M);
|
|
65
|
+
}, [t]), u(E, () => ({
|
|
67
66
|
create(d) {
|
|
68
|
-
return
|
|
67
|
+
return C(d);
|
|
69
68
|
},
|
|
70
|
-
list: () => Promise.resolve(
|
|
69
|
+
list: () => Promise.resolve(h)
|
|
71
70
|
}));
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
i == null || i.addEventListener("data:created", () => k(void 0, null, function* () {
|
|
86
|
-
E([i, ...r]), l(i);
|
|
87
|
-
}));
|
|
71
|
+
const C = (d) => new Promise((e) => N(void 0, null, function* () {
|
|
72
|
+
var c;
|
|
73
|
+
const l = typeof (a == null ? void 0 : a.promptVariables) == "object" ? (a == null ? void 0 : a.promptVariables.default) || [] : void 0, o = yield m == null ? void 0 : m.loadSession("", {
|
|
74
|
+
name: d == null ? void 0 : d.name,
|
|
75
|
+
// @ts-ignore netOpen入参是number 响应是boolen
|
|
76
|
+
// 只有对话有联网 其它没有
|
|
77
|
+
netOpen: (g == null ? void 0 : g.type) === 0 ? d == null ? void 0 : d.netOpen : void 0,
|
|
78
|
+
knowledges: (c = t == null ? void 0 : t.data) != null && c.id ? d == null ? void 0 : d.knowledges : D,
|
|
79
|
+
promptVariables: l
|
|
80
|
+
});
|
|
81
|
+
o == null || o.addEventListener("data:created", () => N(void 0, null, function* () {
|
|
82
|
+
j([o, ...h]), e(o);
|
|
88
83
|
}));
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
})), z = () => {
|
|
85
|
+
C({
|
|
86
|
+
netOpen: (h == null ? void 0 : h.length) > 0 ? 2 : k ? 1 : 2,
|
|
87
|
+
knowledges: D
|
|
92
88
|
}).then((d) => {
|
|
93
|
-
|
|
89
|
+
i == null || i(d);
|
|
94
90
|
});
|
|
95
|
-
},
|
|
96
|
-
m == null || m.removeSession(d, !0).then(() =>
|
|
97
|
-
var l,
|
|
98
|
-
const
|
|
99
|
-
var
|
|
100
|
-
return ((
|
|
91
|
+
}, A = (d) => {
|
|
92
|
+
m == null || m.removeSession(d, !0).then(() => N(void 0, null, function* () {
|
|
93
|
+
var l, o;
|
|
94
|
+
const e = h.filter((c) => {
|
|
95
|
+
var w, y;
|
|
96
|
+
return ((w = c.data) == null ? void 0 : w.id) !== ((y = d.data) == null ? void 0 : y.id);
|
|
101
97
|
});
|
|
102
|
-
((l = d.data) == null ? void 0 : l.id) === ((
|
|
98
|
+
((l = d.data) == null ? void 0 : l.id) === ((o = t == null ? void 0 : t.data) == null ? void 0 : o.id) && (e != null && e.length ? i == null || i(e[0]) : i == null || i(void 0)), j([...e]);
|
|
103
99
|
}));
|
|
104
|
-
}, C = (d) => {
|
|
105
|
-
var a;
|
|
106
|
-
s((a = d.data) == null ? void 0 : a.name);
|
|
107
100
|
}, F = (d) => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
var e;
|
|
102
|
+
s((e = d.data) == null ? void 0 : e.name);
|
|
103
|
+
}, R = (d) => {
|
|
104
|
+
p && (d.rename(p), d == null || d.addEventListener("data:updated", M));
|
|
105
|
+
}, _ = (d) => N(void 0, null, function* () {
|
|
106
|
+
i == null || i(d);
|
|
107
|
+
}), B = (d) => {
|
|
112
108
|
s(d.target.value);
|
|
113
109
|
};
|
|
114
|
-
return
|
|
115
|
-
var
|
|
116
|
-
if (!(
|
|
110
|
+
return x(() => {
|
|
111
|
+
var e, l, o, c;
|
|
112
|
+
if (!(t != null && t.id))
|
|
117
113
|
return;
|
|
118
114
|
const d = {};
|
|
119
|
-
typeof (
|
|
120
|
-
}, [
|
|
115
|
+
typeof (a == null ? void 0 : a.knowledges) == "object" && ((e = a == null ? void 0 : a.knowledges) != null && e.default) && (d.knowledges = (l = a == null ? void 0 : a.knowledges) == null ? void 0 : l.default), typeof (a == null ? void 0 : a.promptVariables) == "object" && ((o = a == null ? void 0 : a.promptVariables) != null && o.default) && (d.promptVariables = (c = a == null ? void 0 : a.promptVariables) == null ? void 0 : c.default), m == null || m.loadSession(t.id, d);
|
|
116
|
+
}, [t]), /* @__PURE__ */ n("div", {
|
|
121
117
|
className: "bot-session-container",
|
|
122
|
-
children:
|
|
118
|
+
children: f && P === "inlay" && /* @__PURE__ */ r("div", {
|
|
123
119
|
className: "agent-sessions",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ r("div", {
|
|
125
121
|
className: "sessions-header",
|
|
126
122
|
children: [/* @__PURE__ */ n("span", {
|
|
127
123
|
className: "session-header-title",
|
|
128
124
|
children: "会话列表"
|
|
129
|
-
}), /* @__PURE__ */ n(
|
|
125
|
+
}), /* @__PURE__ */ n(G, {
|
|
130
126
|
className: "session-header-btn",
|
|
131
|
-
onClick:
|
|
127
|
+
onClick: z,
|
|
132
128
|
children: "+ 新建会话"
|
|
133
129
|
})]
|
|
134
130
|
}), /* @__PURE__ */ n("div", {
|
|
135
131
|
className: "sessions-main",
|
|
136
|
-
children:
|
|
137
|
-
var
|
|
132
|
+
children: h == null ? void 0 : h.map((d) => {
|
|
133
|
+
var e, l, o, c, w, y;
|
|
138
134
|
return /* @__PURE__ */ n("div", {
|
|
139
|
-
className:
|
|
135
|
+
className: W({
|
|
140
136
|
"session-item": !0,
|
|
141
|
-
"session-item__active": ((
|
|
137
|
+
"session-item__active": ((e = d.data) == null ? void 0 : e.id) === ((l = t == null ? void 0 : t.data) == null ? void 0 : l.id)
|
|
142
138
|
}),
|
|
143
|
-
onClick: () =>
|
|
144
|
-
children: /* @__PURE__ */
|
|
139
|
+
onClick: () => _(d),
|
|
140
|
+
children: /* @__PURE__ */ r("div", {
|
|
145
141
|
className: "session-item-wrapper",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ r("div", {
|
|
147
143
|
className: "session-item-top",
|
|
148
144
|
children: [/* @__PURE__ */ n("span", {
|
|
149
145
|
className: "item-top-title",
|
|
150
|
-
children: ((
|
|
151
|
-
}), /* @__PURE__ */
|
|
146
|
+
children: ((o = d.data) == null ? void 0 : o.name) || "-"
|
|
147
|
+
}), /* @__PURE__ */ r("div", {
|
|
152
148
|
className: "item-top-action",
|
|
153
|
-
onClick: (
|
|
154
|
-
children: [/* @__PURE__ */ n(
|
|
155
|
-
getPopupContainer: (
|
|
149
|
+
onClick: (b) => b.stopPropagation(),
|
|
150
|
+
children: [/* @__PURE__ */ n(H, {
|
|
151
|
+
getPopupContainer: (b) => b.parentNode,
|
|
156
152
|
icon: !1,
|
|
157
|
-
title: /* @__PURE__ */ n(
|
|
153
|
+
title: /* @__PURE__ */ n(J, {
|
|
158
154
|
placeholder: "请输入内容",
|
|
159
155
|
autoComplete: "off",
|
|
160
156
|
showCount: !0,
|
|
161
157
|
value: p,
|
|
162
|
-
onChange:
|
|
158
|
+
onChange: B,
|
|
163
159
|
maxLength: 15
|
|
164
160
|
}),
|
|
165
|
-
onConfirm: () =>
|
|
166
|
-
children: /* @__PURE__ */ n(
|
|
161
|
+
onConfirm: () => R(d),
|
|
162
|
+
children: /* @__PURE__ */ n(O, {
|
|
167
163
|
type: "icon-bianji2",
|
|
168
|
-
onClick: () =>
|
|
164
|
+
onClick: () => F(d),
|
|
169
165
|
className: "icon-action",
|
|
170
166
|
style: {
|
|
171
167
|
marginRight: "8px"
|
|
172
168
|
}
|
|
173
169
|
})
|
|
174
|
-
}), /* @__PURE__ */ n(
|
|
175
|
-
getPopupContainer: (
|
|
170
|
+
}), /* @__PURE__ */ n(H, {
|
|
171
|
+
getPopupContainer: (b) => b.parentNode,
|
|
176
172
|
icon: !1,
|
|
177
|
-
title: /* @__PURE__ */
|
|
173
|
+
title: /* @__PURE__ */ r(Q, {
|
|
178
174
|
direction: "vertical",
|
|
179
175
|
children: [/* @__PURE__ */ n("div", {
|
|
180
176
|
children: "删除确认?"
|
|
@@ -182,8 +178,8 @@ const u = B((x, P) => {
|
|
|
182
178
|
children: "会话删除后不可恢复,请确认是否删除!"
|
|
183
179
|
})]
|
|
184
180
|
}),
|
|
185
|
-
onConfirm: () =>
|
|
186
|
-
children: /* @__PURE__ */ n(
|
|
181
|
+
onConfirm: () => A(d),
|
|
182
|
+
children: /* @__PURE__ */ n(O, {
|
|
187
183
|
style: {
|
|
188
184
|
fontSize: "18px"
|
|
189
185
|
},
|
|
@@ -192,24 +188,24 @@ const u = B((x, P) => {
|
|
|
192
188
|
})
|
|
193
189
|
})]
|
|
194
190
|
})]
|
|
195
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ r("div", {
|
|
196
192
|
className: "session-item-bottom",
|
|
197
193
|
children: [/* @__PURE__ */ n("span", {
|
|
198
194
|
className: "item-bottom-desc",
|
|
199
|
-
children: ((
|
|
195
|
+
children: ((c = d.data) == null ? void 0 : c.finialMessage) || "-"
|
|
200
196
|
}), /* @__PURE__ */ n("span", {
|
|
201
197
|
className: "item-bottom-time",
|
|
202
|
-
children:
|
|
198
|
+
children: T((w = d.data) == null ? void 0 : w.createdAt).format("MM/DD HH:mm:ss")
|
|
203
199
|
})]
|
|
204
200
|
})]
|
|
205
201
|
})
|
|
206
|
-
}, (
|
|
202
|
+
}, (y = d.data) == null ? void 0 : y.id);
|
|
207
203
|
})
|
|
208
204
|
})]
|
|
209
205
|
})
|
|
210
206
|
});
|
|
211
207
|
});
|
|
212
|
-
|
|
208
|
+
Z.displayName = "SessionList";
|
|
213
209
|
export {
|
|
214
|
-
|
|
210
|
+
Z as default
|
|
215
211
|
};
|
package/dist/es/Dialog/index.mjs
CHANGED
|
@@ -17,17 +17,17 @@ var v = (i, o, n) => new Promise((l, g) => {
|
|
|
17
17
|
} catch (u) {
|
|
18
18
|
g(u);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, a = (e) => {
|
|
21
21
|
try {
|
|
22
22
|
f(n.throw(e));
|
|
23
23
|
} catch (u) {
|
|
24
24
|
g(u);
|
|
25
25
|
}
|
|
26
|
-
}, f = (e) => e.done ? l(e.value) : Promise.resolve(e.value).then(s,
|
|
26
|
+
}, f = (e) => e.done ? l(e.value) : Promise.resolve(e.value).then(s, a);
|
|
27
27
|
f((n = n.apply(i, o)).next());
|
|
28
28
|
});
|
|
29
|
-
import { jsx as
|
|
30
|
-
import { forwardRef as B, useState as p, useContext as F, useRef as G, useEffect as
|
|
29
|
+
import { jsx as r, jsxs as A } from "react/jsx-runtime";
|
|
30
|
+
import { forwardRef as B, useState as p, useContext as F, useRef as G, useEffect as I, useImperativeHandle as J } from "react";
|
|
31
31
|
import M from "../context.mjs";
|
|
32
32
|
import Q from "./AgentChat/index.mjs";
|
|
33
33
|
import T from "../components/KnowledgeList/index.mjs";
|
|
@@ -37,17 +37,17 @@ import W from "./SessionList/index.mjs";
|
|
|
37
37
|
sessionId: n,
|
|
38
38
|
appId: l,
|
|
39
39
|
docViewerUrl: g
|
|
40
|
-
} = i, [s,
|
|
40
|
+
} = i, [s, a] = p(), {
|
|
41
41
|
showHeader: f,
|
|
42
42
|
agentClient: e,
|
|
43
43
|
sider: u,
|
|
44
44
|
onSessionLoad: m,
|
|
45
45
|
features: c
|
|
46
|
-
} = F(M), [h, H] = p(),
|
|
47
|
-
|
|
46
|
+
} = F(M), [h, H] = p(), y = G(null), [K, D] = p(""), [S, k] = p(), [b, N] = p(!1);
|
|
47
|
+
I(() => {
|
|
48
48
|
var d;
|
|
49
49
|
N(s ? !!((d = s.data) != null && d.netOpen) : typeof (c == null ? void 0 : c.connectNetwork) == "object" && typeof (c == null ? void 0 : c.connectNetwork.default) == "boolean" ? c.connectNetwork.default : !1);
|
|
50
|
-
}, [s]),
|
|
50
|
+
}, [s]), I(() => {
|
|
51
51
|
const d = () => v(void 0, null, function* () {
|
|
52
52
|
const t = e == null ? void 0 : e.application;
|
|
53
53
|
if (!(t != null && t.id))
|
|
@@ -58,22 +58,18 @@ import W from "./SessionList/index.mjs";
|
|
|
58
58
|
const O = w[0].embeddingService;
|
|
59
59
|
D(O), H(t);
|
|
60
60
|
});
|
|
61
|
-
if (e != null && e.ready) {
|
|
62
|
-
d();
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
61
|
return e == null || e.addEventListener("ready", () => d()), () => {
|
|
66
62
|
e == null || e.removeEventListener("ready", d);
|
|
67
63
|
};
|
|
68
|
-
}, [
|
|
64
|
+
}, []), I(() => {
|
|
69
65
|
e && n && (e.ready ? e == null || e.getSessions().then((d) => v(void 0, null, function* () {
|
|
70
|
-
|
|
66
|
+
a == null || a(d.find((t) => t.id === n));
|
|
71
67
|
})) : e.addEventListener("ready", () => v(void 0, null, function* () {
|
|
72
68
|
e == null || e.getSessions().then((d) => v(void 0, null, function* () {
|
|
73
|
-
|
|
69
|
+
a == null || a(d.find((t) => t.id === n));
|
|
74
70
|
}));
|
|
75
71
|
}), !0));
|
|
76
|
-
}, [e, n]),
|
|
72
|
+
}, [e, n]), I(() => {
|
|
77
73
|
if (!s) {
|
|
78
74
|
m && m({
|
|
79
75
|
applicationId: l,
|
|
@@ -99,48 +95,48 @@ import W from "./SessionList/index.mjs";
|
|
|
99
95
|
}, [s]);
|
|
100
96
|
const L = (d) => {
|
|
101
97
|
var t;
|
|
102
|
-
return (t =
|
|
98
|
+
return (t = y.current) == null ? void 0 : t.create(j(R({}, d), {
|
|
103
99
|
knowledges: S
|
|
104
100
|
}));
|
|
105
101
|
};
|
|
106
102
|
return J(o, () => ({
|
|
107
|
-
|
|
103
|
+
sessionCreate: (d) => L(d),
|
|
108
104
|
getSessionList: () => {
|
|
109
105
|
var t;
|
|
110
|
-
const d = ((t =
|
|
106
|
+
const d = ((t = y.current) == null ? void 0 : t.list()) || [];
|
|
111
107
|
return Promise.resolve(d);
|
|
112
108
|
}
|
|
113
|
-
})), /* @__PURE__ */
|
|
109
|
+
})), /* @__PURE__ */ r("div", {
|
|
114
110
|
className: "dialog",
|
|
115
111
|
children: /* @__PURE__ */ A("div", {
|
|
116
112
|
className: "dialog-pannel",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ r("div", {
|
|
118
114
|
className: "dialog-sider",
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
ref:
|
|
115
|
+
children: /* @__PURE__ */ r(W, {
|
|
116
|
+
ref: y,
|
|
121
117
|
sider: u,
|
|
122
118
|
appId: l,
|
|
123
119
|
networkStatus: b,
|
|
124
120
|
currentSession: s,
|
|
125
121
|
application: h,
|
|
126
|
-
setCurrentSession:
|
|
122
|
+
setCurrentSession: a,
|
|
127
123
|
checkKnowledges: S,
|
|
128
124
|
setCheckKnowledges: f ? k : void 0
|
|
129
125
|
})
|
|
130
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ r("div", {
|
|
131
127
|
className: "dialog-content",
|
|
132
128
|
children: /* @__PURE__ */ A("div", {
|
|
133
129
|
className: "dialog-chat",
|
|
134
|
-
children: [f && /* @__PURE__ */
|
|
130
|
+
children: [f && /* @__PURE__ */ r("div", {
|
|
135
131
|
className: "dialog-chat-header",
|
|
136
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ r(T, {
|
|
137
133
|
setCheckKnowledges: k,
|
|
138
134
|
application: h,
|
|
139
135
|
currentSession: s
|
|
140
136
|
})
|
|
141
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ r("div", {
|
|
142
138
|
className: "dialog-chat-content",
|
|
143
|
-
children: (h == null ? void 0 : h.id) && /* @__PURE__ */
|
|
139
|
+
children: (h == null ? void 0 : h.id) && /* @__PURE__ */ r(Q, {
|
|
144
140
|
setNetworkStatus: N,
|
|
145
141
|
networkStatus: b,
|
|
146
142
|
application: h,
|
|
@@ -148,7 +144,7 @@ import W from "./SessionList/index.mjs";
|
|
|
148
144
|
onCreateSession: L,
|
|
149
145
|
docViewerUrl: g,
|
|
150
146
|
embeddingService: K,
|
|
151
|
-
setCurrentSession:
|
|
147
|
+
setCurrentSession: a
|
|
152
148
|
})
|
|
153
149
|
})]
|
|
154
150
|
})
|