@glodon-aiot/agent-cli-ui 3.11.0 → 3.11.1-alpha.1765331460
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/HistoryItem/SessionRefer/ReferItem/index.mjs +28 -28
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +10 -10
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRelated/index.mjs +2 -2
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +133 -118
- package/dist/es/Dialog/AgentChat/index.mjs +600 -569
- package/dist/es/Dialog/SessionList/index.mjs +271 -218
- package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +53 -53
- package/dist/es/components/FilePreview/index.mjs +6 -6
- package/dist/es/components/Iconfont/index.mjs +3 -3
- package/dist/es/packages/agent-cli-ui/package.json.mjs +11 -11
- package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Markdown/Code/index.mjs +8 -8
- package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Markdown/Image/index.mjs +3 -3
- package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Markdown/index.mjs +24 -25
- package/dist/es/packages/react-components/dist/es/index.mjs +10 -0
- 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/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.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/style28.css +1 -1
- package/dist/es/src/style29.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style32.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.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 +69 -68
- package/package.json +3 -3
- package/dist/es/node_modules/@glodon-aiot/react-components/dist/es/index.mjs +0 -10
- package/dist/es/node_modules/hast-util-from-parse5/lib/index.mjs +0 -162
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/index.mjs +0 -12
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/aria.mjs +0 -61
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/find.mjs +0 -33
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/html.mjs +0 -368
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/normalize.mjs +0 -6
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/svg.mjs +0 -566
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -7
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -6
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/create.mjs +0 -14
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/defined-info.mjs +0 -36
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/info.mjs +0 -28
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/merge.mjs +0 -10
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/schema.mjs +0 -21
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/types.mjs +0 -15
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xlink.mjs +0 -19
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xml.mjs +0 -15
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xmlns.mjs +0 -16
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/vfile-location/lib/index.mjs +0 -47
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/web-namespaces/index.mjs +0 -11
- package/dist/es/node_modules/rehype-raw/lib/index.mjs +0 -26
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode-codepoint.mjs +0 -38
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode.mjs +0 -251
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/generated/decode-data-html.mjs +0 -7
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-raw/lib/index.mjs +0 -249
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-to-parse5/lib/index.mjs +0 -125
- package/dist/es/node_modules/rehype-raw/node_modules/html-void-elements/index.mjs +0 -4
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/doctype.mjs +0 -34
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/error-codes.mjs +0 -7
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/foreign-content.mjs +0 -103
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/html.mjs +0 -44
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/token.mjs +0 -14
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/unicode.mjs +0 -38
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/formatting-element-list.mjs +0 -91
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/index.mjs +0 -2308
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/open-element-stack.mjs +0 -220
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/serializer/index.mjs +0 -2
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/index.mjs +0 -1948
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/preprocessor.mjs +0 -92
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tree-adapters/default.mjs +0 -173
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/index.mjs +0 -12
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/aria.mjs +0 -61
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/find.mjs +0 -33
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/html.mjs +0 -368
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/normalize.mjs +0 -6
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/svg.mjs +0 -566
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -7
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -6
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/create.mjs +0 -17
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/defined-info.mjs +0 -27
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/info.mjs +0 -23
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/merge.mjs +0 -11
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/schema.mjs +0 -17
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/types.mjs +0 -15
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xlink.mjs +0 -19
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xml.mjs +0 -15
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xmlns.mjs +0 -16
- package/dist/es/node_modules/rehype-raw/node_modules/unist-util-visit/lib/index.mjs +0 -16
- package/dist/es/node_modules/rehype-raw/node_modules/web-namespaces/index.mjs +0 -11
- package/dist/es/node_modules/zwitch/index.mjs +0 -18
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +0 -44
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +0 -1
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +0 -36
- package/dist/src/utils/reactCompatibility.d.ts +0 -27
- package/dist/src/utils/testAntdPrefix.d.ts +0 -3
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/Iconfont/index.mjs +0 -0
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Copy/index.mjs +0 -0
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Markdown/ATag/index.mjs +0 -0
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/components/Markdown/Video/index.mjs +0 -0
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/utils/clipboard.mjs +0 -0
- /package/dist/es/{node_modules/@glodon-aiot → packages}/react-components/dist/es/utils/markdown/index.mjs +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var ye = Object.defineProperty, ve = Object.defineProperties;
|
|
2
|
+
var Le = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Y = Object.getOwnPropertySymbols;
|
|
4
|
+
var Re = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Z = (s, i, l) => i in s ? ye(s, i, { enumerable: !0, configurable: !0, writable: !0, value: l }) : s[i] = l, L = (s, i) => {
|
|
6
6
|
for (var l in i || (i = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var l of
|
|
10
|
-
|
|
7
|
+
Re.call(i, l) && Z(s, l, i[l]);
|
|
8
|
+
if (Y)
|
|
9
|
+
for (var l of Y(i))
|
|
10
|
+
be.call(i, l) && Z(s, l, i[l]);
|
|
11
11
|
return s;
|
|
12
|
-
}, R = (s, i) =>
|
|
12
|
+
}, R = (s, i) => ve(s, Le(i));
|
|
13
13
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
14
|
-
import { memo as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { IHistoryRole as
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
/* empty css */import "../../../
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { CheckOutlined as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { escapeSlash as
|
|
31
|
-
import
|
|
32
|
-
import { Markdown as
|
|
33
|
-
const
|
|
14
|
+
import { memo as N, useContext as Se, useState as Ee } from "react";
|
|
15
|
+
import p from "./InputProgress/index.mjs";
|
|
16
|
+
import ke from "./SessionRefer/index.mjs";
|
|
17
|
+
import xe from "./SessionAction/index.mjs";
|
|
18
|
+
import { IHistoryRole as ee, ApplicationTypes as ne, IThinkingStatus as te } from "@glodon-aiot/apis";
|
|
19
|
+
import Ae from "./FileItem/index.mjs";
|
|
20
|
+
import { Row as ie, Col as le, Popover as Te, Space as se, Button as re, Collapse as ae, Divider as Oe, message as b } from "antd";
|
|
21
|
+
import Fe from "./SearchReference/index.mjs";
|
|
22
|
+
/* empty css */import "../../../packages/react-components/dist/es/index.mjs";
|
|
23
|
+
import _e from "classnames";
|
|
24
|
+
import m from "../../../components/Iconfont/index.mjs";
|
|
25
|
+
import { CheckOutlined as oe, CloseOutlined as de, LoadingOutlined as Ie } from "@ant-design/icons";
|
|
26
|
+
import u from "../../../components/JsonDisplay/index.mjs";
|
|
27
|
+
import Ue from "../../../context.mjs";
|
|
28
|
+
import je from "./SessionRelated/index.mjs";
|
|
29
|
+
import ze from "copy-to-clipboard";
|
|
30
|
+
import { escapeSlash as we } from "../../../utils/index.mjs";
|
|
31
|
+
import Be from "../../../assets/think.svg.mjs";
|
|
32
|
+
import { Markdown as Me } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
|
|
33
|
+
const Je = (s) => {
|
|
34
34
|
if (!s)
|
|
35
35
|
return s;
|
|
36
36
|
try {
|
|
@@ -38,7 +38,7 @@ const Be = (s) => {
|
|
|
38
38
|
} catch (i) {
|
|
39
39
|
return s;
|
|
40
40
|
}
|
|
41
|
-
},
|
|
41
|
+
}, Pe = N(Fe), ce = N(ke), h = N(Me), pe = N(Ae), g = (s) => {
|
|
42
42
|
if (!s)
|
|
43
43
|
return !1;
|
|
44
44
|
try {
|
|
@@ -47,41 +47,41 @@ const Be = (s) => {
|
|
|
47
47
|
} catch (i) {
|
|
48
48
|
return !0;
|
|
49
49
|
}
|
|
50
|
-
},
|
|
50
|
+
}, me = (s) => {
|
|
51
51
|
var n;
|
|
52
52
|
const i = JSON.parse(JSON.stringify(s)) || [], l = (n = i == null ? void 0 : i.pop()) == null ? void 0 : n.pop();
|
|
53
53
|
return l ? (l == null ? void 0 : l.type) === "BEFORE_CALL" || (l == null ? void 0 : l.type) === "FUNCTION_CALL" : !1;
|
|
54
|
-
},
|
|
55
|
-
var x,
|
|
54
|
+
}, mn = (s) => {
|
|
55
|
+
var x, A, T, O, F, _, I, U, j, z, w, B;
|
|
56
56
|
const {
|
|
57
57
|
application: i,
|
|
58
58
|
currentSession: l,
|
|
59
59
|
history: n,
|
|
60
|
-
isLastHistory:
|
|
61
|
-
onRelatedClick:
|
|
62
|
-
onAgainClick:
|
|
63
|
-
isLoading:
|
|
64
|
-
docViewerUrl:
|
|
60
|
+
isLastHistory: f,
|
|
61
|
+
onRelatedClick: ue,
|
|
62
|
+
onAgainClick: he,
|
|
63
|
+
isLoading: Qe,
|
|
64
|
+
docViewerUrl: d,
|
|
65
65
|
onEditClick: C,
|
|
66
|
-
actions:
|
|
67
|
-
markdown:
|
|
66
|
+
actions: ge = !0,
|
|
67
|
+
markdown: c
|
|
68
68
|
} = s, {
|
|
69
69
|
debug: S,
|
|
70
70
|
transform: r,
|
|
71
|
-
popupContainer:
|
|
72
|
-
} =
|
|
73
|
-
Panel:
|
|
74
|
-
} =
|
|
71
|
+
popupContainer: y
|
|
72
|
+
} = Se(Ue), E = n.role === ee.User, k = n.role === ee.Robot, {
|
|
73
|
+
Panel: Ne
|
|
74
|
+
} = ae, [v, fe] = Ee(!0), Ce = () => {
|
|
75
75
|
b.config({
|
|
76
|
-
getContainer: () => (
|
|
76
|
+
getContainer: () => (y == null ? void 0 : y.current) || document.body,
|
|
77
77
|
prefixCls: "gbot-message"
|
|
78
|
-
}),
|
|
78
|
+
}), ze(n.content), b.success("复制成功"), b.config({
|
|
79
79
|
getContainer: void 0,
|
|
80
80
|
prefixCls: "gbot-message"
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
return /* @__PURE__ */ o("div", {
|
|
84
|
-
className:
|
|
84
|
+
className: _e({
|
|
85
85
|
"history-item": !0,
|
|
86
86
|
"history-item__user": E,
|
|
87
87
|
"history-item__bot": k
|
|
@@ -90,40 +90,55 @@ const Be = (s) => {
|
|
|
90
90
|
className: "history-item-user",
|
|
91
91
|
children: [i.type === 0 && ((x = n == null ? void 0 : n.imageContent) == null ? void 0 : x.length) && /* @__PURE__ */ e("div", {
|
|
92
92
|
className: "item-user-images",
|
|
93
|
-
children: /* @__PURE__ */ e(
|
|
94
|
-
children: n.imageContent.map((t,
|
|
93
|
+
children: /* @__PURE__ */ e(h, {
|
|
94
|
+
children: n.imageContent.map((t, M) => ``).join(`
|
|
95
95
|
|
|
96
96
|
`)
|
|
97
97
|
})
|
|
98
|
+
}), i.type === ne.Dialog && /* @__PURE__ */ e("div", {
|
|
99
|
+
className: "item-user-file-dialog",
|
|
100
|
+
children: /* @__PURE__ */ e(ie, {
|
|
101
|
+
gutter: [12, 12],
|
|
102
|
+
justify: "end",
|
|
103
|
+
wrap: !0,
|
|
104
|
+
children: (A = n.files) == null ? void 0 : A.map((t) => /* @__PURE__ */ e(le, {
|
|
105
|
+
className: "user-file-col",
|
|
106
|
+
children: /* @__PURE__ */ e(pe, {
|
|
107
|
+
docViewerUrl: d,
|
|
108
|
+
currentSession: l,
|
|
109
|
+
file: t
|
|
110
|
+
})
|
|
111
|
+
}, t.id))
|
|
112
|
+
})
|
|
98
113
|
}), /* @__PURE__ */ e("div", {
|
|
99
114
|
className: "item-user-panel",
|
|
100
|
-
children: /* @__PURE__ */ e(
|
|
115
|
+
children: /* @__PURE__ */ e(Te, {
|
|
101
116
|
placement: "topLeft",
|
|
102
117
|
overlayStyle: {
|
|
103
118
|
padding: 4
|
|
104
119
|
},
|
|
105
120
|
overlayClassName: "session-item-overlay-popover",
|
|
106
121
|
getPopupContainer: (t) => t.parentNode,
|
|
107
|
-
content: r != null && r.userEdit || r != null && r.userCopy ? /* @__PURE__ */ o(
|
|
122
|
+
content: r != null && r.userEdit || r != null && r.userCopy ? /* @__PURE__ */ o(se, {
|
|
108
123
|
className: "item-user-popover",
|
|
109
124
|
size: 4,
|
|
110
125
|
children: [(r == null ? void 0 : r.userEdit) && /* @__PURE__ */ e("div", {
|
|
111
126
|
className: "user-pannel-item",
|
|
112
127
|
onClick: () => C == null ? void 0 : C(n.content),
|
|
113
|
-
children: /* @__PURE__ */ e(
|
|
128
|
+
children: /* @__PURE__ */ e(re, {
|
|
114
129
|
type: "link",
|
|
115
130
|
size: "small",
|
|
116
|
-
icon: /* @__PURE__ */ e(
|
|
131
|
+
icon: /* @__PURE__ */ e(m, {
|
|
117
132
|
type: "icon-bianji2"
|
|
118
133
|
})
|
|
119
134
|
})
|
|
120
135
|
}), (r == null ? void 0 : r.userCopy) && /* @__PURE__ */ e("div", {
|
|
121
136
|
className: "user-pannel-item",
|
|
122
|
-
onClick:
|
|
123
|
-
children: /* @__PURE__ */ e(
|
|
137
|
+
onClick: Ce,
|
|
138
|
+
children: /* @__PURE__ */ e(re, {
|
|
124
139
|
type: "link",
|
|
125
140
|
size: "small",
|
|
126
|
-
icon: /* @__PURE__ */ e(
|
|
141
|
+
icon: /* @__PURE__ */ e(m, {
|
|
127
142
|
type: "icon-fuzhi",
|
|
128
143
|
style: {
|
|
129
144
|
fontSize: "16px"
|
|
@@ -136,23 +151,23 @@ const Be = (s) => {
|
|
|
136
151
|
className: "user-panel-main",
|
|
137
152
|
children: /* @__PURE__ */ e("span", {
|
|
138
153
|
className: "item-user-content",
|
|
139
|
-
children: /* @__PURE__ */ e(
|
|
154
|
+
children: /* @__PURE__ */ e(h, {
|
|
140
155
|
showLatex: !1,
|
|
141
|
-
children:
|
|
156
|
+
children: we(n.content)
|
|
142
157
|
})
|
|
143
158
|
})
|
|
144
159
|
})
|
|
145
160
|
})
|
|
146
|
-
}), /* @__PURE__ */ e("div", {
|
|
161
|
+
}), i.type === ne.Agent && /* @__PURE__ */ e("div", {
|
|
147
162
|
className: "item-user-file",
|
|
148
|
-
children: /* @__PURE__ */ e(
|
|
163
|
+
children: /* @__PURE__ */ e(ie, {
|
|
149
164
|
gutter: [12, 12],
|
|
150
165
|
justify: "end",
|
|
151
166
|
wrap: !0,
|
|
152
|
-
children: (T = n.files) == null ? void 0 : T.map((t) => /* @__PURE__ */ e(
|
|
167
|
+
children: (T = n.files) == null ? void 0 : T.map((t) => /* @__PURE__ */ e(le, {
|
|
153
168
|
className: "user-file-col",
|
|
154
|
-
children: /* @__PURE__ */ e(
|
|
155
|
-
docViewerUrl:
|
|
169
|
+
children: /* @__PURE__ */ e(pe, {
|
|
170
|
+
docViewerUrl: d,
|
|
156
171
|
currentSession: l,
|
|
157
172
|
file: t
|
|
158
173
|
})
|
|
@@ -165,47 +180,47 @@ const Be = (s) => {
|
|
|
165
180
|
className: "bot-content-wrapper",
|
|
166
181
|
children: [i.type === 2 && /* @__PURE__ */ o("div", {
|
|
167
182
|
className: "item-bot-plugin",
|
|
168
|
-
children: [/* @__PURE__ */ e(
|
|
183
|
+
children: [/* @__PURE__ */ e(ae, {
|
|
169
184
|
ghost: !0,
|
|
170
185
|
expandIconPosition: "right",
|
|
171
|
-
children: (
|
|
172
|
-
var
|
|
173
|
-
return /* @__PURE__ */ o(
|
|
186
|
+
children: (O = n.actions) == null ? void 0 : O.map((t, M) => {
|
|
187
|
+
var J, P, Q, q, D, H, $, V, W, G, K, X;
|
|
188
|
+
return /* @__PURE__ */ o(Ne, {
|
|
174
189
|
collapsible: S ? "header" : "icon",
|
|
175
190
|
showArrow: S,
|
|
176
|
-
header: /* @__PURE__ */ o(
|
|
191
|
+
header: /* @__PURE__ */ o(se, {
|
|
177
192
|
size: 8,
|
|
178
193
|
style: {
|
|
179
194
|
width: "100%"
|
|
180
195
|
},
|
|
181
196
|
children: [/* @__PURE__ */ o("span", {
|
|
182
197
|
className: "bot-plugin-status",
|
|
183
|
-
children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") &&
|
|
198
|
+
children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && g((J = t.find((a) => a.type === "RESULT")) == null ? void 0 : J.data.result) && /* @__PURE__ */ e("span", {
|
|
184
199
|
className: "plugin-status-success",
|
|
185
|
-
children: /* @__PURE__ */ e(
|
|
200
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
186
201
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
187
202
|
className: "plugin-status-error",
|
|
188
|
-
children: /* @__PURE__ */ e(
|
|
189
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
203
|
+
children: /* @__PURE__ */ e(de, {})
|
|
204
|
+
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !g((P = t.find((a) => a.type === "RESULT")) == null ? void 0 : P.data.result) && /* @__PURE__ */ e("span", {
|
|
190
205
|
className: "plugin-status-error",
|
|
191
|
-
children: /* @__PURE__ */ e(
|
|
206
|
+
children: /* @__PURE__ */ e(de, {})
|
|
192
207
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
193
208
|
className: "plugin-status-loading",
|
|
194
|
-
children: /* @__PURE__ */ e(
|
|
209
|
+
children: /* @__PURE__ */ e(Ie, {})
|
|
195
210
|
})]
|
|
196
211
|
}), /* @__PURE__ */ e("span", {
|
|
197
212
|
className: "bot-plugin-title",
|
|
198
|
-
children: ((
|
|
213
|
+
children: ((Q = t[t.length - 1].data) == null ? void 0 : Q.pluginName) || ((q = t[t.length - 1].data) == null ? void 0 : q.pluginCode)
|
|
199
214
|
}), /* @__PURE__ */ e("span", {
|
|
200
215
|
className: "bot-plugin-action",
|
|
201
|
-
children: ((
|
|
216
|
+
children: ((D = t[t.length - 1].data) == null ? void 0 : D.funcName) || ((H = t[t.length - 1].data) == null ? void 0 : H.funcCode)
|
|
202
217
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
203
218
|
className: "bot-plugin-result",
|
|
204
219
|
children: "执行中"
|
|
205
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") &&
|
|
220
|
+
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && g(($ = t.find((a) => a.type === "RESULT")) == null ? void 0 : $.data.result) && /* @__PURE__ */ e("span", {
|
|
206
221
|
className: "bot-plugin-result",
|
|
207
222
|
children: "执行成功"
|
|
208
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
223
|
+
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !g((V = t.find((a) => a.type === "RESULT")) == null ? void 0 : V.data.result) && /* @__PURE__ */ e("span", {
|
|
209
224
|
className: "bot-plugin-result",
|
|
210
225
|
children: "执行失败"
|
|
211
226
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
@@ -218,7 +233,7 @@ const Be = (s) => {
|
|
|
218
233
|
children: "thought"
|
|
219
234
|
}), /* @__PURE__ */ e("div", {
|
|
220
235
|
className: "bot-plugin-json",
|
|
221
|
-
children: /* @__PURE__ */ e(
|
|
236
|
+
children: /* @__PURE__ */ e(u, {
|
|
222
237
|
josn: (W = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : W.data.thought
|
|
223
238
|
})
|
|
224
239
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -226,47 +241,47 @@ const Be = (s) => {
|
|
|
226
241
|
children: "parameters"
|
|
227
242
|
}), /* @__PURE__ */ e("div", {
|
|
228
243
|
className: "bot-plugin-json",
|
|
229
|
-
children: /* @__PURE__ */ e(
|
|
230
|
-
josn: (
|
|
244
|
+
children: /* @__PURE__ */ e(u, {
|
|
245
|
+
josn: (G = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : G.data.parameters
|
|
231
246
|
})
|
|
232
247
|
}), /* @__PURE__ */ e("div", {
|
|
233
248
|
className: "bot-plugin-content",
|
|
234
249
|
children: "requestBody"
|
|
235
250
|
}), /* @__PURE__ */ e("div", {
|
|
236
251
|
className: "bot-plugin-json",
|
|
237
|
-
children: /* @__PURE__ */ e(
|
|
238
|
-
josn: (
|
|
252
|
+
children: /* @__PURE__ */ e(u, {
|
|
253
|
+
josn: (K = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : K.data.requestBody
|
|
239
254
|
})
|
|
240
255
|
}), /* @__PURE__ */ e("div", {
|
|
241
256
|
className: "bot-plugin-content",
|
|
242
257
|
children: "Response"
|
|
243
258
|
}), /* @__PURE__ */ e("div", {
|
|
244
259
|
className: "bot-plugin-json",
|
|
245
|
-
children: /* @__PURE__ */ e(
|
|
246
|
-
josn:
|
|
260
|
+
children: /* @__PURE__ */ e(u, {
|
|
261
|
+
josn: Je((X = t.find((a) => a.type === "RESULT")) == null ? void 0 : X.data.result)
|
|
247
262
|
})
|
|
248
263
|
})]
|
|
249
|
-
},
|
|
264
|
+
}, M);
|
|
250
265
|
})
|
|
251
266
|
}), n.isLoading && /* @__PURE__ */ e("div", {
|
|
252
267
|
className: "history-input-progress",
|
|
253
268
|
style: {
|
|
254
269
|
padding: "4px 0"
|
|
255
270
|
},
|
|
256
|
-
children: n.content ||
|
|
271
|
+
children: n.content || me(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
257
272
|
size: 4,
|
|
258
273
|
text: "思考中"
|
|
259
274
|
})
|
|
260
275
|
})]
|
|
261
|
-
}), !!((
|
|
276
|
+
}), !!((F = n.searchReference) != null && F.length) && /* @__PURE__ */ e("div", {
|
|
262
277
|
className: "item-bot-net",
|
|
263
|
-
children: /* @__PURE__ */ e(
|
|
278
|
+
children: /* @__PURE__ */ e(Pe, {
|
|
264
279
|
history: n
|
|
265
280
|
})
|
|
266
|
-
}), (
|
|
281
|
+
}), (_ = n == null ? void 0 : n.reference) != null && _.length && ((I = r == null ? void 0 : r.reference) != null && I.referenceFirst) ? /* @__PURE__ */ e(ce, {
|
|
267
282
|
history: n,
|
|
268
|
-
docViewerUrl:
|
|
269
|
-
markdown:
|
|
283
|
+
docViewerUrl: d,
|
|
284
|
+
markdown: c
|
|
270
285
|
}) : null, /* @__PURE__ */ o("div", {
|
|
271
286
|
className: "item-bot-content",
|
|
272
287
|
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
@@ -274,10 +289,10 @@ const Be = (s) => {
|
|
|
274
289
|
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
275
290
|
className: "think-top",
|
|
276
291
|
onClick: () => {
|
|
277
|
-
|
|
292
|
+
fe(!v);
|
|
278
293
|
},
|
|
279
294
|
children: [/* @__PURE__ */ e("img", {
|
|
280
|
-
src:
|
|
295
|
+
src: Be,
|
|
281
296
|
alt: ""
|
|
282
297
|
}), (n == null ? void 0 : n.reasoningContent) && !(n != null && n.content) && /* @__PURE__ */ e("span", {
|
|
283
298
|
children: "我正在推理思考…"
|
|
@@ -285,47 +300,47 @@ const Be = (s) => {
|
|
|
285
300
|
children: ["已完成推理(用时 ", (n == null ? void 0 : n.thinkingSecs) || 0, " 秒)"]
|
|
286
301
|
}), /* @__PURE__ */ e("span", {
|
|
287
302
|
className: "think-action",
|
|
288
|
-
children: v ? /* @__PURE__ */ e(
|
|
303
|
+
children: v ? /* @__PURE__ */ e(m, {
|
|
289
304
|
type: "icon-zhankai",
|
|
290
305
|
style: {
|
|
291
306
|
fontSize: 16
|
|
292
307
|
}
|
|
293
|
-
}) : /* @__PURE__ */ e(
|
|
308
|
+
}) : /* @__PURE__ */ e(m, {
|
|
294
309
|
type: "icon-shouqi",
|
|
295
310
|
style: {
|
|
296
311
|
fontSize: 16
|
|
297
312
|
}
|
|
298
313
|
})
|
|
299
314
|
})]
|
|
300
|
-
}), !!((
|
|
315
|
+
}), !!((U = n == null ? void 0 : n.reasoningContent) != null && U.trim()) && v && /* @__PURE__ */ o("div", {
|
|
301
316
|
className: "think-bottom",
|
|
302
317
|
children: [/* @__PURE__ */ o("div", {
|
|
303
318
|
className: "bottom-left",
|
|
304
|
-
children: [(n == null ? void 0 : n.thinkingStatus) ===
|
|
319
|
+
children: [(n == null ? void 0 : n.thinkingStatus) === te.Start && /* @__PURE__ */ e("div", {
|
|
305
320
|
className: "thinking"
|
|
306
|
-
}), (n == null ? void 0 : n.thinkingStatus) ===
|
|
321
|
+
}), (n == null ? void 0 : n.thinkingStatus) === te.End && /* @__PURE__ */ e("div", {
|
|
307
322
|
className: "thinked",
|
|
308
|
-
children: /* @__PURE__ */ e(
|
|
323
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
309
324
|
})]
|
|
310
325
|
}), /* @__PURE__ */ e("div", {
|
|
311
326
|
className: "bottom-right",
|
|
312
|
-
children: /* @__PURE__ */ e(
|
|
327
|
+
children: /* @__PURE__ */ e(h, R(L({}, c), {
|
|
313
328
|
children: (n == null ? void 0 : n.reasoningContent) || ""
|
|
314
329
|
}))
|
|
315
330
|
})]
|
|
316
331
|
})]
|
|
317
|
-
}), /* @__PURE__ */ e(
|
|
332
|
+
}), /* @__PURE__ */ e(h, R(L({}, c), {
|
|
318
333
|
children: n.content
|
|
319
334
|
}))]
|
|
320
|
-
}), (
|
|
335
|
+
}), (j = n == null ? void 0 : n.reference) != null && j.length && !((z = r == null ? void 0 : r.reference) != null && z.referenceFirst) ? /* @__PURE__ */ e(ce, {
|
|
321
336
|
history: n,
|
|
322
|
-
docViewerUrl:
|
|
323
|
-
markdown:
|
|
324
|
-
}) : null, n.isRelatedQuestion &&
|
|
337
|
+
docViewerUrl: d,
|
|
338
|
+
markdown: c
|
|
339
|
+
}) : null, n.isRelatedQuestion && f ? /* @__PURE__ */ e("div", {
|
|
325
340
|
style: {
|
|
326
341
|
paddingBottom: 12
|
|
327
342
|
},
|
|
328
|
-
children: /* @__PURE__ */ e(
|
|
343
|
+
children: /* @__PURE__ */ e(p, {
|
|
329
344
|
size: 4
|
|
330
345
|
})
|
|
331
346
|
}) : null, n.isRelateLoading && /* @__PURE__ */ e("div", {
|
|
@@ -333,23 +348,23 @@ const Be = (s) => {
|
|
|
333
348
|
style: {
|
|
334
349
|
padding: "4px 0"
|
|
335
350
|
},
|
|
336
|
-
children:
|
|
351
|
+
children: me(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
337
352
|
size: 4,
|
|
338
353
|
text: "思考中"
|
|
339
354
|
})
|
|
340
|
-
}), i.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) &&
|
|
355
|
+
}), i.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) && f && !!((w = n.relatedQuesion) != null && w.length) && /* @__PURE__ */ e(je, {
|
|
341
356
|
relatedQuesion: n.relatedQuesion,
|
|
342
|
-
onRelatedClick:
|
|
343
|
-
}),
|
|
357
|
+
onRelatedClick: ue
|
|
358
|
+
}), ge && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(xe, {
|
|
344
359
|
appId: i.id,
|
|
345
360
|
history: n,
|
|
346
361
|
sessionId: (B = l == null ? void 0 : l.data) == null ? void 0 : B.id,
|
|
347
|
-
onAgainClick:
|
|
348
|
-
isLastHistory:
|
|
362
|
+
onAgainClick: he,
|
|
363
|
+
isLastHistory: f,
|
|
349
364
|
currentSession: l
|
|
350
365
|
})]
|
|
351
366
|
})
|
|
352
|
-
}), n.isContext && /* @__PURE__ */ o(
|
|
367
|
+
}), n.isContext && /* @__PURE__ */ o(Oe, {
|
|
353
368
|
children: [/* @__PURE__ */ e("div", {
|
|
354
369
|
style: {
|
|
355
370
|
color: "#84868C",
|
|
@@ -359,7 +374,7 @@ const Be = (s) => {
|
|
|
359
374
|
}), " "]
|
|
360
375
|
}), n.isWaiting && /* @__PURE__ */ e("div", {
|
|
361
376
|
className: "history-input-progress",
|
|
362
|
-
children: /* @__PURE__ */ e(
|
|
377
|
+
children: /* @__PURE__ */ e(p, {
|
|
363
378
|
size: 4,
|
|
364
379
|
text: "思考中"
|
|
365
380
|
})
|
|
@@ -367,6 +382,6 @@ const Be = (s) => {
|
|
|
367
382
|
});
|
|
368
383
|
};
|
|
369
384
|
export {
|
|
370
|
-
|
|
371
|
-
|
|
385
|
+
mn as default,
|
|
386
|
+
g as isResultExec
|
|
372
387
|
};
|