@glodon-aiot/agent-cli-ui 3.3.0-beta.13 → 3.3.0-beta.15

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.
Files changed (146) hide show
  1. package/dist/es/AgentClientUI.mjs +17 -17
  2. package/dist/es/{FileItem → Dialog/AgentChat/HistoryItem/FileItem}/index.mjs +34 -40
  3. package/dist/es/Dialog/{SearchReference → AgentChat/HistoryItem/SearchReference}/index.mjs +7 -7
  4. package/dist/es/Dialog/{SessionAction → AgentChat/HistoryItem/SessionAction}/index.mjs +11 -12
  5. package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/ReferItem/index.mjs +19 -19
  6. package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/index.mjs +3 -3
  7. package/dist/es/Dialog/{SessionRelated → AgentChat/HistoryItem/SessionRelated}/index.mjs +3 -3
  8. package/dist/es/Dialog/{HistoryItem → AgentChat/HistoryItem}/index.mjs +56 -62
  9. package/dist/es/Dialog/{PromptSetting → AgentChat/PromptSetting}/index.mjs +2 -2
  10. package/dist/es/Dialog/{ConnectToNetwork → AgentChat/Tools/ConnectToNetwork}/index.mjs +1 -1
  11. package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PromptListItem.mjs +2 -2
  12. package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/index.mjs +4 -4
  13. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/SessionItem.mjs +24 -30
  14. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/index.mjs +1 -1
  15. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/index.mjs +1 -1
  16. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.mjs +128 -0
  17. package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/index.mjs +5 -5
  18. package/dist/es/Dialog/AgentChat/index.mjs +24 -24
  19. package/dist/es/Dialog/SessionList/index.mjs +1 -1
  20. package/dist/es/Dialog/index.mjs +109 -118
  21. package/dist/es/Footer/FooterWarning.mjs +3 -3
  22. package/dist/es/Footer/index.mjs +3 -3
  23. package/dist/es/QuillEditor/index.mjs +11 -11
  24. package/dist/es/components/Copy/index.mjs +1 -1
  25. package/dist/es/{Dialog → components}/FilePreview/index.mjs +16 -16
  26. package/dist/es/{Dialog → components}/KnowledgeList/KnowledgeSelect/index.mjs +1 -1
  27. package/dist/es/{Dialog → components}/KnowledgeList/index.mjs +21 -23
  28. package/dist/es/{Dialog → components}/Recommend/RecommendItem.mjs +31 -37
  29. package/dist/es/{Dialog → components}/Recommend/index.mjs +0 -1
  30. package/dist/es/constant.mjs +16 -8
  31. package/dist/es/index.mjs +26 -33
  32. package/dist/es/src/style10.css +1 -1
  33. package/dist/es/src/style11.css +1 -1
  34. package/dist/es/src/style12.css +1 -1
  35. package/dist/es/src/style13.css +1 -1
  36. package/dist/es/src/style15.css +1 -1
  37. package/dist/es/src/style17.css +1 -1
  38. package/dist/es/src/style20.css +1 -1
  39. package/dist/es/src/style21.css +1 -1
  40. package/dist/es/src/style23.css +1 -0
  41. package/dist/es/src/style25.css +1 -1
  42. package/dist/es/src/style26.css +1 -1
  43. package/dist/es/src/style27.css +1 -1
  44. package/dist/es/src/style28.css +1 -1
  45. package/dist/es/src/style29.css +1 -1
  46. package/dist/es/src/style30.css +1 -1
  47. package/dist/es/src/style31.css +1 -1
  48. package/dist/es/src/style4.css +1 -1
  49. package/dist/es/src/style5.css +1 -1
  50. package/dist/es/src/style7.css +1 -1
  51. package/dist/es/src/style8.css +1 -1
  52. package/dist/es/src/style9.css +1 -1
  53. package/dist/lib/index.css +1 -1
  54. package/dist/lib/index.js +5 -5
  55. package/dist/src/ConnectToNetwork_bac/index.d.ts +13 -0
  56. package/dist/src/Dialog/AgentChat/HistoryItem/FileItem/index.d.ts +11 -0
  57. package/dist/src/Dialog/AgentChat/HistoryItem/InputProgress/index.d.ts +7 -0
  58. package/dist/src/Dialog/AgentChat/HistoryItem/SearchReference/index.d.ts +10 -0
  59. package/dist/src/Dialog/AgentChat/HistoryItem/SessionAction/index.d.ts +13 -0
  60. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
  61. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +8 -0
  62. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRelated/index.d.ts +9 -0
  63. package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +18 -0
  64. package/dist/src/Dialog/AgentChat/PromptSetting/index.d.ts +15 -0
  65. package/dist/src/Dialog/AgentChat/Tools/ConnectToNetwork/index.d.ts +14 -0
  66. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
  67. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
  68. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
  69. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
  70. package/dist/src/Dialog/AgentChat/Tools/PromptManager/index.d.ts +13 -0
  71. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
  72. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
  73. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
  74. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/index.d.ts +9 -0
  75. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
  76. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
  77. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
  78. package/dist/src/Dialog/AgentChat/index.d.ts +1 -1
  79. package/dist/src/Dialog/FileItem/index.d.ts +11 -0
  80. package/dist/src/Dialog/HistoryItem/FileItem/index.d.ts +11 -0
  81. package/dist/src/Dialog/HistoryItem/InputProgress/index.d.ts +7 -0
  82. package/dist/src/Dialog/HistoryItem/ReferCollapse/index.d.ts +8 -0
  83. package/dist/src/Dialog/HistoryItem/ReferCollapsea/index.d.ts +8 -0
  84. package/dist/src/Dialog/HistoryItem/SearchReference/index.d.ts +10 -0
  85. package/dist/src/Dialog/HistoryItem/SessionAction/index.d.ts +13 -0
  86. package/dist/src/Dialog/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
  87. package/dist/src/Dialog/HistoryItem/SessionRefer/index.d.ts +8 -0
  88. package/dist/src/Dialog/HistoryItem/SessionRelated/index.d.ts +9 -0
  89. package/dist/src/Dialog/InputProgress/index.d.ts +7 -0
  90. package/dist/src/Dialog/SessionList/index.d.ts +1 -1
  91. package/dist/src/Dialog/Tools/ConnectToNetwork/index.d.ts +14 -0
  92. package/dist/src/Dialog/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
  93. package/dist/src/Dialog/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
  94. package/dist/src/Dialog/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
  95. package/dist/src/Dialog/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
  96. package/dist/src/Dialog/Tools/PromptManager/index.d.ts +13 -0
  97. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
  98. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
  99. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
  100. package/dist/src/Dialog/Tools/SessionListDrawer/index.d.ts +9 -0
  101. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
  102. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
  103. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
  104. package/dist/src/Dialog/UploadFilesa/ClearModal/index.d.ts +7 -0
  105. package/dist/src/Dialog/UploadFilesa/index.d.ts +21 -0
  106. package/dist/src/FileCard-bac/index.d.ts +21 -0
  107. package/dist/src/Footer/FooterWarning.d.ts +2 -2
  108. package/dist/src/Greeting-bac/index.d.ts +7 -0
  109. package/dist/src/components/FilePreview/index.d.ts +20 -0
  110. package/dist/src/components/Greeting/index.d.ts +7 -0
  111. package/dist/src/components/Iconfont/font_4108228_z72fskklg2.d.ts +0 -0
  112. package/dist/src/components/Iconfont/font_4439177_7rytwlvbmjj.d.ts +0 -0
  113. package/dist/src/components/Iconfont/index.d.ts +2 -0
  114. package/dist/src/components/KnowledgeDoc/index.d.ts +9 -0
  115. package/dist/src/components/KnowledgeList/KnowledgeSelect/index.d.ts +12 -0
  116. package/dist/src/components/KnowledgeList/index.d.ts +10 -0
  117. package/dist/src/components/Recommend/RecommendItem.d.ts +12 -0
  118. package/dist/src/components/Recommend/index.d.ts +14 -0
  119. package/dist/src/constant.d.ts +7 -1
  120. package/dist/src/index.d.ts +3 -3
  121. package/dist/src/types.d.ts +4 -4
  122. package/dist/src/utils/index.d.ts +0 -6
  123. package/package.json +3 -3
  124. package/dist/es/Dialog/FileCard/index.mjs +0 -134
  125. package/dist/es/Dialog/HistoryContent/index.mjs +0 -13
  126. package/dist/es/Dialog/KnowledgeDoc/index.mjs +0 -45
  127. package/dist/es/Dialog/ReferCollapse/index.mjs +0 -64
  128. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/doc.svg.mjs +0 -4
  129. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/docx.svg.mjs +0 -4
  130. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/pdf.svg.mjs +0 -4
  131. package/dist/es/FileCard/doc-icons/doc.svg.mjs +0 -4
  132. package/dist/es/FileCard/doc-icons/docx.svg.mjs +0 -4
  133. package/dist/es/FileCard/doc-icons/pdf.svg.mjs +0 -4
  134. package/dist/es/src/style32.css +0 -1
  135. package/dist/es/src/style33.css +0 -1
  136. /package/dist/es/{InputProgress → Dialog/AgentChat/HistoryItem/InputProgress}/index.mjs +0 -0
  137. /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PublicPromptList.mjs +0 -0
  138. /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/access/empty.svg.mjs +0 -0
  139. /package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/NameEditPanel.mjs +0 -0
  140. /package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/ClearModal/index.mjs +0 -0
  141. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/doc.svg.mjs +0 -0
  142. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/docx.svg.mjs +0 -0
  143. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/pdf.svg.mjs +0 -0
  144. /package/dist/es/{Dialog → components}/Greeting/index.mjs +0 -0
  145. /package/dist/es/{Iconfont → components/Iconfont}/index.mjs +0 -0
  146. /package/dist/es/{Dialog → components}/Recommend/tip.svg.mjs +0 -0
@@ -1,25 +1,23 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { memo as d, useContext as re, useState as ae } from "react";
3
- import c from "../../InputProgress/index.mjs";
4
- import oe from "../SessionRefer/index.mjs";
5
- import de from "../SessionAction/index.mjs";
6
- import { IHistoryRole as q, IThinkingStatus as D } from "@glodon-aiot/apis";
7
- import ce from "../../FileItem/index.mjs";
2
+ import { memo as u, useContext as re, useState as ae } from "react";
3
+ import d from "./InputProgress/index.mjs";
4
+ import oe from "./SessionRefer/index.mjs";
5
+ import de from "./SessionAction/index.mjs";
6
+ import { IHistoryRole as H, IThinkingStatus as D } from "@glodon-aiot/apis";
7
+ import ce from "./FileItem/index.mjs";
8
8
  import { Popover as pe, Space as V, Button as W, Row as me, Col as ue, Collapse as G, Divider as he, message as y } from "antd";
9
- import ge from "../SearchReference/index.mjs";
10
- /* empty css */import Ne from "../HistoryContent/index.mjs";
11
- import fe from "../../components/Markdown/index.mjs";
12
- import Ce from "classnames";
13
- import p from "../../Iconfont/index.mjs";
14
- import { CheckOutlined as K, CloseOutlined as X, LoadingOutlined as ye } from "@ant-design/icons";
15
- import m from "../../components/JsonDisplay/index.mjs";
16
- import Le from "../../context.mjs";
17
- import ve from "../SessionRelated/index.mjs";
18
- import Re from "../ReferCollapse/index.mjs";
19
- import Se from "copy-to-clipboard";
20
- import be from "../../assets/think.svg.mjs";
21
- import { escapeSlash as Ee } from "../../utils/index.mjs";
22
- const ke = (o) => {
9
+ import ge from "./SearchReference/index.mjs";
10
+ /* empty css */import Ne from "../../../components/Markdown/index.mjs";
11
+ import fe from "classnames";
12
+ import c from "../../../components/Iconfont/index.mjs";
13
+ import { CheckOutlined as K, CloseOutlined as X, LoadingOutlined as Le } from "@ant-design/icons";
14
+ import p from "../../../components/JsonDisplay/index.mjs";
15
+ import ye from "../../../context.mjs";
16
+ import Ce from "./SessionRelated/index.mjs";
17
+ import ve from "copy-to-clipboard";
18
+ import { escapeSlash as Re } from "../../../utils/index.mjs";
19
+ import Se from "../../../assets/think.svg.mjs";
20
+ const be = (o) => {
23
21
  if (!o)
24
22
  return o;
25
23
  try {
@@ -27,11 +25,7 @@ const ke = (o) => {
27
25
  } catch (l) {
28
26
  return o;
29
27
  }
30
- }, Te = d(ge), Y = d(oe), L = d(fe);
31
- d(Ne);
32
- const Ae = d(ce);
33
- d(Re);
34
- const u = (o) => {
28
+ }, Ee = u(ge), Y = u(oe), C = u(Ne), ke = u(ce), m = (o) => {
35
29
  if (!o)
36
30
  return !1;
37
31
  try {
@@ -44,7 +38,7 @@ const u = (o) => {
44
38
  var n;
45
39
  const l = JSON.parse(JSON.stringify(o)) || [], a = (n = l == null ? void 0 : l.pop()) == null ? void 0 : n.pop();
46
40
  return a ? (a == null ? void 0 : a.type) === "BEFORE_CALL" || (a == null ? void 0 : a.type) === "FUNCTION_CALL" : !1;
47
- }, Ze = (o) => {
41
+ }, Ge = (o) => {
48
42
  var b, E, k, T, A, O, x, F, _, I;
49
43
  const {
50
44
  application: l,
@@ -53,7 +47,7 @@ const u = (o) => {
53
47
  isLastHistory: h,
54
48
  onRelatedClick: $,
55
49
  onAgainClick: ee,
56
- isLoading: Oe,
50
+ isLoading: Te,
57
51
  docViewerUrl: g,
58
52
  onEditClick: N,
59
53
  actions: ne = !0
@@ -61,17 +55,17 @@ const u = (o) => {
61
55
  debug: v,
62
56
  transform: i,
63
57
  popupContainer: f
64
- } = re(Le), R = n.role === q.User, S = n.role === q.Robot, {
58
+ } = re(ye), R = n.role === H.User, S = n.role === H.Robot, {
65
59
  Panel: te
66
- } = G, [C, ie] = ae(!0), le = () => {
60
+ } = G, [L, ie] = ae(!0), le = () => {
67
61
  y.config({
68
62
  getContainer: () => (f == null ? void 0 : f.current) || document.body
69
- }), Se(n.content), y.success("复制成功"), y.config({
63
+ }), ve(n.content), y.success("复制成功"), y.config({
70
64
  getContainer: void 0
71
65
  });
72
66
  };
73
67
  return /* @__PURE__ */ r("div", {
74
- className: Ce({
68
+ className: fe({
75
69
  "history-item": !0,
76
70
  "history-item__user": R,
77
71
  "history-item__bot": S
@@ -96,7 +90,7 @@ const u = (o) => {
96
90
  children: /* @__PURE__ */ e(W, {
97
91
  type: "link",
98
92
  size: "small",
99
- icon: /* @__PURE__ */ e(p, {
93
+ icon: /* @__PURE__ */ e(c, {
100
94
  type: "icon-bianji2"
101
95
  })
102
96
  })
@@ -106,7 +100,7 @@ const u = (o) => {
106
100
  children: /* @__PURE__ */ e(W, {
107
101
  type: "link",
108
102
  size: "small",
109
- icon: /* @__PURE__ */ e(p, {
103
+ icon: /* @__PURE__ */ e(c, {
110
104
  type: "icon-fuzhi",
111
105
  style: {
112
106
  fontSize: "16px"
@@ -119,9 +113,9 @@ const u = (o) => {
119
113
  className: "user-panel-main",
120
114
  children: /* @__PURE__ */ e("span", {
121
115
  className: "item-user-content",
122
- children: /* @__PURE__ */ e(L, {
116
+ children: /* @__PURE__ */ e(C, {
123
117
  showLatex: !1,
124
- children: Ee(n.content)
118
+ children: Re(n.content)
125
119
  })
126
120
  })
127
121
  })
@@ -134,7 +128,7 @@ const u = (o) => {
134
128
  wrap: !0,
135
129
  children: (b = n.files) == null ? void 0 : b.map((t) => /* @__PURE__ */ e(ue, {
136
130
  className: "user-file-col",
137
- children: /* @__PURE__ */ e(Ae, {
131
+ children: /* @__PURE__ */ e(ke, {
138
132
  docViewerUrl: g,
139
133
  currentSession: a,
140
134
  file: t
@@ -152,7 +146,7 @@ const u = (o) => {
152
146
  ghost: !0,
153
147
  expandIconPosition: "right",
154
148
  children: (E = n.actions) == null ? void 0 : E.map((t, se) => {
155
- var U, z, j, B, w, M, J, P, Q, H;
149
+ var U, z, j, B, w, M, J, P, Q, q;
156
150
  return /* @__PURE__ */ r(te, {
157
151
  collapsible: v ? "header" : "icon",
158
152
  showArrow: v,
@@ -163,18 +157,18 @@ const u = (o) => {
163
157
  },
164
158
  children: [/* @__PURE__ */ r("span", {
165
159
  className: "bot-plugin-status",
166
- children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && u((U = t.find((s) => s.type === "RESULT")) == null ? void 0 : U.data.result) && /* @__PURE__ */ e("span", {
160
+ children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && m((U = t.find((s) => s.type === "RESULT")) == null ? void 0 : U.data.result) && /* @__PURE__ */ e("span", {
167
161
  className: "plugin-status-success",
168
162
  children: /* @__PURE__ */ e(K, {})
169
163
  }), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
170
164
  className: "plugin-status-error",
171
165
  children: /* @__PURE__ */ e(X, {})
172
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !u((z = t.find((s) => s.type === "RESULT")) == null ? void 0 : z.data.result) && /* @__PURE__ */ e("span", {
166
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !m((z = t.find((s) => s.type === "RESULT")) == null ? void 0 : z.data.result) && /* @__PURE__ */ e("span", {
173
167
  className: "plugin-status-error",
174
168
  children: /* @__PURE__ */ e(X, {})
175
169
  }), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
176
170
  className: "plugin-status-loading",
177
- children: /* @__PURE__ */ e(ye, {})
171
+ children: /* @__PURE__ */ e(Le, {})
178
172
  })]
179
173
  }), /* @__PURE__ */ e("span", {
180
174
  className: "bot-plugin-title",
@@ -185,10 +179,10 @@ const u = (o) => {
185
179
  }), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
186
180
  className: "bot-plugin-result",
187
181
  children: "执行中"
188
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && u((w = t.find((s) => s.type === "RESULT")) == null ? void 0 : w.data.result) && /* @__PURE__ */ e("span", {
182
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && m((w = t.find((s) => s.type === "RESULT")) == null ? void 0 : w.data.result) && /* @__PURE__ */ e("span", {
189
183
  className: "bot-plugin-result",
190
184
  children: "执行成功"
191
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !u((M = t.find((s) => s.type === "RESULT")) == null ? void 0 : M.data.result) && /* @__PURE__ */ e("span", {
185
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !m((M = t.find((s) => s.type === "RESULT")) == null ? void 0 : M.data.result) && /* @__PURE__ */ e("span", {
192
186
  className: "bot-plugin-result",
193
187
  children: "执行失败"
194
188
  }), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
@@ -201,7 +195,7 @@ const u = (o) => {
201
195
  children: "thought"
202
196
  }), /* @__PURE__ */ e("div", {
203
197
  className: "bot-plugin-json",
204
- children: /* @__PURE__ */ e(m, {
198
+ children: /* @__PURE__ */ e(p, {
205
199
  josn: (J = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : J.data.thought
206
200
  })
207
201
  }), /* @__PURE__ */ e("div", {
@@ -209,7 +203,7 @@ const u = (o) => {
209
203
  children: "parameters"
210
204
  }), /* @__PURE__ */ e("div", {
211
205
  className: "bot-plugin-json",
212
- children: /* @__PURE__ */ e(m, {
206
+ children: /* @__PURE__ */ e(p, {
213
207
  josn: (P = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : P.data.parameters
214
208
  })
215
209
  }), /* @__PURE__ */ e("div", {
@@ -217,7 +211,7 @@ const u = (o) => {
217
211
  children: "requestBody"
218
212
  }), /* @__PURE__ */ e("div", {
219
213
  className: "bot-plugin-json",
220
- children: /* @__PURE__ */ e(m, {
214
+ children: /* @__PURE__ */ e(p, {
221
215
  josn: (Q = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : Q.data.requestBody
222
216
  })
223
217
  }), /* @__PURE__ */ e("div", {
@@ -225,8 +219,8 @@ const u = (o) => {
225
219
  children: "Response"
226
220
  }), /* @__PURE__ */ e("div", {
227
221
  className: "bot-plugin-json",
228
- children: /* @__PURE__ */ e(m, {
229
- josn: ke((H = t.find((s) => s.type === "RESULT")) == null ? void 0 : H.data.result)
222
+ children: /* @__PURE__ */ e(p, {
223
+ josn: be((q = t.find((s) => s.type === "RESULT")) == null ? void 0 : q.data.result)
230
224
  })
231
225
  })]
232
226
  }, se);
@@ -236,14 +230,14 @@ const u = (o) => {
236
230
  style: {
237
231
  padding: "4px 0"
238
232
  },
239
- children: Z(n.actions) ? null : /* @__PURE__ */ e(c, {
233
+ children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
240
234
  size: 4,
241
235
  text: "思考中"
242
236
  })
243
237
  })]
244
238
  }), !!((k = n.searchReference) != null && k.length) && /* @__PURE__ */ e("div", {
245
239
  className: "item-bot-net",
246
- children: /* @__PURE__ */ e(Te, {
240
+ children: /* @__PURE__ */ e(Ee, {
247
241
  history: n
248
242
  })
249
243
  }), (T = n == null ? void 0 : n.reference) != null && T.length && ((A = i == null ? void 0 : i.reference) != null && A.referenceFirst) ? /* @__PURE__ */ e(Y, {
@@ -256,10 +250,10 @@ const u = (o) => {
256
250
  children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ r("div", {
257
251
  className: "think-top",
258
252
  onClick: () => {
259
- ie(!C);
253
+ ie(!L);
260
254
  },
261
255
  children: [/* @__PURE__ */ e("img", {
262
- src: be,
256
+ src: Se,
263
257
  alt: ""
264
258
  }), (n == null ? void 0 : n.reasoningContent) && !(n != null && n.content) && /* @__PURE__ */ e("span", {
265
259
  children: "我正在推理思考…"
@@ -267,19 +261,19 @@ const u = (o) => {
267
261
  children: ["已完成推理(用时 ", (n == null ? void 0 : n.thinkingSecs) || 0, " 秒)"]
268
262
  }), /* @__PURE__ */ e("span", {
269
263
  className: "think-action",
270
- children: C ? /* @__PURE__ */ e(p, {
264
+ children: L ? /* @__PURE__ */ e(c, {
271
265
  type: "icon-zhankai",
272
266
  style: {
273
267
  fontSize: 16
274
268
  }
275
- }) : /* @__PURE__ */ e(p, {
269
+ }) : /* @__PURE__ */ e(c, {
276
270
  type: "icon-shouqi",
277
271
  style: {
278
272
  fontSize: 16
279
273
  }
280
274
  })
281
275
  })]
282
- }), !!((O = n == null ? void 0 : n.reasoningContent) != null && O.trim()) && C && /* @__PURE__ */ r("div", {
276
+ }), !!((O = n == null ? void 0 : n.reasoningContent) != null && O.trim()) && L && /* @__PURE__ */ r("div", {
283
277
  className: "think-bottom",
284
278
  children: [/* @__PURE__ */ r("div", {
285
279
  className: "bottom-left",
@@ -291,12 +285,12 @@ const u = (o) => {
291
285
  })]
292
286
  }), /* @__PURE__ */ e("div", {
293
287
  className: "bottom-right",
294
- children: /* @__PURE__ */ e(L, {
288
+ children: /* @__PURE__ */ e(C, {
295
289
  children: (n == null ? void 0 : n.reasoningContent) || ""
296
290
  })
297
291
  })]
298
292
  })]
299
- }), /* @__PURE__ */ e(L, {
293
+ }), /* @__PURE__ */ e(C, {
300
294
  children: n.content
301
295
  })]
302
296
  }), (x = n == null ? void 0 : n.reference) != null && x.length && !((F = i == null ? void 0 : i.reference) != null && F.referenceFirst) ? /* @__PURE__ */ e(Y, {
@@ -306,7 +300,7 @@ const u = (o) => {
306
300
  style: {
307
301
  paddingBottom: 12
308
302
  },
309
- children: /* @__PURE__ */ e(c, {
303
+ children: /* @__PURE__ */ e(d, {
310
304
  size: 4
311
305
  })
312
306
  }) : null, n.isRelateLoading && /* @__PURE__ */ e("div", {
@@ -314,11 +308,11 @@ const u = (o) => {
314
308
  style: {
315
309
  padding: "4px 0"
316
310
  },
317
- children: Z(n.actions) ? null : /* @__PURE__ */ e(c, {
311
+ children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
318
312
  size: 4,
319
313
  text: "思考中"
320
314
  })
321
- }), l.arrange[0].recommendQuestionOpen && (i == null ? void 0 : i.relate) && h && !!((_ = n.relatedQuesion) != null && _.length) && /* @__PURE__ */ e(ve, {
315
+ }), l.arrange[0].recommendQuestionOpen && (i == null ? void 0 : i.relate) && h && !!((_ = n.relatedQuesion) != null && _.length) && /* @__PURE__ */ e(Ce, {
322
316
  relatedQuesion: n.relatedQuesion,
323
317
  onRelatedClick: $
324
318
  }), ne && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(de, {
@@ -340,7 +334,7 @@ const u = (o) => {
340
334
  }), " "]
341
335
  }), n.isWaiting && /* @__PURE__ */ e("div", {
342
336
  className: "history-input-progress",
343
- children: /* @__PURE__ */ e(c, {
337
+ children: /* @__PURE__ */ e(d, {
344
338
  size: 4,
345
339
  text: "思考中"
346
340
  })
@@ -348,6 +342,6 @@ const u = (o) => {
348
342
  });
349
343
  };
350
344
  export {
351
- Ze as default,
352
- u as isResultExec
345
+ Ge as default,
346
+ m as isResultExec
353
347
  };
@@ -12,8 +12,8 @@ var y = (n, t, e) => t in n ? I(n, t, { enumerable: !0, configurable: !0, writab
12
12
  import { jsx as r, jsxs as d } from "react/jsx-runtime";
13
13
  import { forwardRef as B, useState as S, useContext as b, useImperativeHandle as w, useEffect as g } from "react";
14
14
  /* empty css */import { Form as p, Space as k, Button as E, Popover as L, Input as j } from "antd";
15
- import A from "../../context.mjs";
16
- import u from "../../Iconfont/index.mjs";
15
+ import A from "../../../context.mjs";
16
+ import u from "../../../components/Iconfont/index.mjs";
17
17
  const z = B((n, t) => {
18
18
  const {
19
19
  promptVariables: e,
@@ -2,7 +2,7 @@ import { jsx as e, Fragment as g, jsxs as c } from "react/jsx-runtime";
2
2
  import { useState as l, useEffect as d } from "react";
3
3
  /* empty css */import { Button as k } from "antd";
4
4
  import { CloseOutlined as v } from "@ant-design/icons";
5
- import f from "../../Iconfont/index.mjs";
5
+ import f from "../../../../components/Iconfont/index.mjs";
6
6
  const F = (p) => {
7
7
  const {
8
8
  sessionId: u,
@@ -2,8 +2,8 @@ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
2
  import { Button as y, Typography as P, Space as j, Spin as E } from "antd";
3
3
  import { useContext as I, useState as m, useEffect as l } from "react";
4
4
  import { LoadingOutlined as L } from "@ant-design/icons";
5
- import N from "../../../Iconfont/index.mjs";
6
- import R from "../../../context.mjs";
5
+ import R from "../../../../../context.mjs";
6
+ import N from "../../../../../components/Iconfont/index.mjs";
7
7
  const {
8
8
  Text: w
9
9
  } = P, z = () => /* @__PURE__ */ r(j, {
@@ -4,8 +4,8 @@ import { useState as m, useContext as E, useEffect as a } from "react";
4
4
  /* empty css */import M from "classnames";
5
5
  import { PROMPT_TITLE_MAX_LENGTH as I } from "@glodon-aiot/apis";
6
6
  import _ from "./PromptList/PublicPromptList.mjs";
7
- import z from "../../Iconfont/index.mjs";
8
- import X from "../../context.mjs";
7
+ import z from "../../../../context.mjs";
8
+ import X from "../../../../components/Iconfont/index.mjs";
9
9
  const $ = (S) => {
10
10
  var x;
11
11
  const {
@@ -20,7 +20,7 @@ const $ = (S) => {
20
20
  service: i,
21
21
  popupContainer: o,
22
22
  mode: F
23
- } = E(X), [G, d] = m((s == null ? void 0 : s.filter((t) => t.type === "me")) || []), [k, h] = m((s == null ? void 0 : s.filter((t) => t.type === "system")) || []), [b, v] = m((s == null ? void 0 : s.filter((t) => t.type === "system")) || []), [w, N] = m("system"), [H, O] = m(!1);
23
+ } = E(z), [G, d] = m((s == null ? void 0 : s.filter((t) => t.type === "me")) || []), [k, h] = m((s == null ? void 0 : s.filter((t) => t.type === "system")) || []), [b, v] = m((s == null ? void 0 : s.filter((t) => t.type === "system")) || []), [w, N] = m("system"), [H, O] = m(!1);
24
24
  a(() => {
25
25
  f && i && (e && e.length > I ? (d([]), h([])) : (i.listPrompt(c, {
26
26
  type: "system"
@@ -105,7 +105,7 @@ const $ = (S) => {
105
105
  active: f
106
106
  }),
107
107
  type: "text",
108
- icon: /* @__PURE__ */ r(z, {
108
+ icon: /* @__PURE__ */ r(X, {
109
109
  type: "icon-tishiyu1",
110
110
  style: {
111
111
  fontSize: 24
@@ -1,30 +1,24 @@
1
1
  import { jsx as e, jsxs as t, Fragment as q } from "react/jsx-runtime";
2
2
  import { useState as M, useEffect as D } from "react";
3
- import { Space as P, Tag as j, Button as o, Spin as $ } from "antd";
4
- import A from "./doc-icons/pdf.svg.mjs";
5
- import G from "./doc-icons/doc.svg.mjs";
6
- import H from "./doc-icons/docx.svg.mjs";
7
- /* empty css */import { CheckCircleFilled as J, CloseCircleFilled as K, LoadingOutlined as Q } from "@ant-design/icons";
8
- import U from "./NameEditPanel.mjs";
9
- import n from "../../../Iconfont/index.mjs";
10
- const V = {
11
- doc: G,
12
- docx: H,
13
- pdf: A
14
- }, ni = (b) => {
15
- var h, N, C, S, g, y, k, x, v, F, E, I;
3
+ import { Space as P, Tag as j, Button as o, Spin as _ } from "antd";
4
+ /* empty css */import { CheckCircleFilled as $, CloseCircleFilled as A, LoadingOutlined as G } from "@ant-design/icons";
5
+ import H from "./NameEditPanel.mjs";
6
+ import n from "../../../../../components/Iconfont/index.mjs";
7
+ import { FILE_ICONS as J } from "../../../../../constant.mjs";
8
+ const ii = (L) => {
9
+ var h, N, C, S, g, y, k, v, F, x, E, I;
16
10
  const {
17
11
  session: i,
18
12
  index: l,
19
13
  currentSessionId: c,
20
- onChangeSession: z,
21
- onDelSession: L,
14
+ onChangeSession: O,
15
+ onDelSession: b,
22
16
  onTopSession: d,
23
- onEditNameConfirm: O,
17
+ onEditNameConfirm: z,
24
18
  editSessionId: R,
25
19
  isEdit: r,
26
20
  onChangeEditStatus: m
27
- } = b, [p, f] = M(-1), [u, T] = M("");
21
+ } = L, [p, f] = M(-1), [u, T] = M("");
28
22
  return D(() => {
29
23
  var a, s, w;
30
24
  if ((a = i.data) != null && a.lastFileName) {
@@ -36,7 +30,7 @@ const V = {
36
30
  className: `session-item-panel ${((N = i.data) == null ? void 0 : N.id) === c ? "current-item" : ""}`,
37
31
  onMouseEnter: () => f(l),
38
32
  onMouseLeave: () => f(-1),
39
- onClick: () => !r && z(i),
33
+ onClick: () => !r && O(i),
40
34
  children: /* @__PURE__ */ t(P, {
41
35
  direction: "vertical",
42
36
  size: 12,
@@ -45,10 +39,10 @@ const V = {
45
39
  className: "item-question",
46
40
  children: [((C = i.data) == null ? void 0 : C.id) === c && /* @__PURE__ */ e(j, {
47
41
  children: "当前的"
48
- }), r && R === ((S = i.data) == null ? void 0 : S.id) ? /* @__PURE__ */ e(U, {
42
+ }), r && R === ((S = i.data) == null ? void 0 : S.id) ? /* @__PURE__ */ e(H, {
49
43
  session: i,
50
44
  onChangeEditStatus: m,
51
- onEditNameConfirm: O
45
+ onEditNameConfirm: z
52
46
  }) : /* @__PURE__ */ t(q, {
53
47
  children: [/* @__PURE__ */ e("div", {
54
48
  className: "session-item-name",
@@ -94,18 +88,18 @@ const V = {
94
88
  icon: /* @__PURE__ */ e(n, {
95
89
  type: "icon-shanchu1"
96
90
  }),
97
- onClick: (a) => L(i, a)
91
+ onClick: (a) => b(i, a)
98
92
  })]
99
93
  })]
100
94
  })]
101
- }), (x = i.data) != null && x.finialMessage ? /* @__PURE__ */ e("div", {
95
+ }), (v = i.data) != null && v.finialMessage ? /* @__PURE__ */ e("div", {
102
96
  className: "item-answer",
103
97
  children: i.data.finialMessage
104
98
  }) : /* @__PURE__ */ e("div", {
105
99
  style: {
106
100
  height: "22px"
107
101
  }
108
- }), !!((v = i.data) != null && v.fileCount) && /* @__PURE__ */ e("div", {
102
+ }), !!((F = i.data) != null && F.fileCount) && /* @__PURE__ */ e("div", {
109
103
  className: "item-file",
110
104
  children: /* @__PURE__ */ t(P, {
111
105
  children: [u && /* @__PURE__ */ t("div", {
@@ -114,20 +108,20 @@ const V = {
114
108
  },
115
109
  children: [/* @__PURE__ */ e("img", {
116
110
  className: "file-icon",
117
- src: V[u]
118
- }), i.data.fileStatus === 10 ? /* @__PURE__ */ e(J, {
111
+ src: J[u]
112
+ }), i.data.fileStatus === 10 ? /* @__PURE__ */ e($, {
119
113
  className: "file-status-icon success-file-icon"
120
- }) : i.data.fileStatus === 20 ? /* @__PURE__ */ e(K, {
114
+ }) : i.data.fileStatus === 20 ? /* @__PURE__ */ e(A, {
121
115
  className: "file-status-icon failed-file-icon"
122
- }) : i.data.fileStatus === 30 ? /* @__PURE__ */ e($, {
123
- indicator: /* @__PURE__ */ e(Q, {
116
+ }) : i.data.fileStatus === 30 ? /* @__PURE__ */ e(_, {
117
+ indicator: /* @__PURE__ */ e(G, {
124
118
  className: "file-status-icon loading-file-icon",
125
119
  spin: !0
126
120
  })
127
121
  }) : /* @__PURE__ */ e(q, {})]
128
122
  }), /* @__PURE__ */ e("span", {
129
123
  className: "file-name",
130
- children: (F = i.data) == null ? void 0 : F.lastFileName
124
+ children: (x = i.data) == null ? void 0 : x.lastFileName
131
125
  }), /* @__PURE__ */ t(j, {
132
126
  children: ["共 ", (E = i.data) == null ? void 0 : E.fileCount, " 个"]
133
127
  })]
@@ -137,5 +131,5 @@ const V = {
137
131
  }, (I = i.data) == null ? void 0 : I.id);
138
132
  };
139
133
  export {
140
- ni as default
134
+ ii as default
141
135
  };
@@ -19,7 +19,7 @@ import { useContext as D, useState as b, useRef as N, useEffect as w } from "rea
19
19
  import { Drawer as O, Spin as R, message as d } from "antd";
20
20
  /* empty css */import { LoadingOutlined as j } from "@ant-design/icons";
21
21
  import B from "./SessionItem.mjs";
22
- import H from "../../../context.mjs";
22
+ import H from "../../../../../context.mjs";
23
23
  const K = (v) => {
24
24
  const {
25
25
  currentSessionId: a,
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as s } from "react/jsx-runtime";
2
2
  import { Popover as p, Button as c } from "antd";
3
3
  import { useState as m } from "react";
4
4
  import f from "./HistorySessionList/index.mjs";
5
- /* empty css */import d from "../../Iconfont/index.mjs";
5
+ /* empty css */import d from "../../../../components/Iconfont/index.mjs";
6
6
  const C = (o) => {
7
7
  const {
8
8
  currentSessionId: t,
@@ -0,0 +1,128 @@
1
+ import { jsxs as c, jsx as i, Fragment as z } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as n } from "react";
3
+ /* empty css */import { Typography as I, Spin as O } from "antd";
4
+ import { LoadingOutlined as j, CloseCircleFilled as L, CloseOutlined as F } from "@ant-design/icons";
5
+ import { KnowledgeFileStatus as x } from "@glodon-aiot/apis";
6
+ import P from "../../../../../components/Iconfont/index.mjs";
7
+ import { getFileExtension as T } from "../../../../../utils/index.mjs";
8
+ import { FILE_ICONS as K } from "../../../../../constant.mjs";
9
+ const M = (a) => {
10
+ const {
11
+ className: S,
12
+ style: k,
13
+ id: l,
14
+ file: e,
15
+ actions: {
16
+ upload: m,
17
+ remove: s,
18
+ download: g,
19
+ checkStatus: f,
20
+ preview: u
21
+ } = {},
22
+ onUrlChange: p,
23
+ onStatusChange: v
24
+ } = a, y = T((e == null ? void 0 : e.name) || ""), [_, o] = d(a.uploading), [$, E] = d(!1);
25
+ n(() => {
26
+ o(a.uploading);
27
+ }, [a.uploading]);
28
+ const [C, N] = d(a.url);
29
+ n(() => {
30
+ N(a.url);
31
+ }, [a.url]), n(() => {
32
+ m && e instanceof File && (C || (o(!0), setTimeout(() => {
33
+ o(!1);
34
+ }, 2e3), m(e).then((t) => {
35
+ N(t), p && p(t);
36
+ }).catch((t) => E(t)).finally(() => {
37
+ o(!1);
38
+ })));
39
+ }, [m, C, e]);
40
+ const [r, h] = d(e instanceof File || e == null ? void 0 : e.status);
41
+ n(() => {
42
+ h(e instanceof File || e == null ? void 0 : e.status);
43
+ }, [e]);
44
+ const U = () => {
45
+ l && f && r === x.Processing && f(l).then((t) => {
46
+ t !== r && (r !== void 0 && v && v(t), h(t));
47
+ }).catch((t) => h(x.Failed));
48
+ };
49
+ return n(() => {
50
+ U();
51
+ }, [l, f, r]), e ? /* @__PURE__ */ c("div", {
52
+ className: `file-card ${S}`,
53
+ style: k,
54
+ children: [y && /* @__PURE__ */ i("img", {
55
+ className: "file-icon",
56
+ src: K[y]
57
+ }), /* @__PURE__ */ i("div", {
58
+ className: "file-desc",
59
+ children: /* @__PURE__ */ i("div", {
60
+ className: "file-desc-name",
61
+ onClick: () => u == null ? void 0 : u(e),
62
+ children: /* @__PURE__ */ i(I.Paragraph, {
63
+ style: {
64
+ margin: 0
65
+ },
66
+ ellipsis: {
67
+ rows: 1,
68
+ tooltip: e.name
69
+ },
70
+ children: e.name
71
+ })
72
+ })
73
+ }), (e == null ? void 0 : e.status) === 1 ? /* @__PURE__ */ c("div", {
74
+ className: "analysis",
75
+ children: [/* @__PURE__ */ i(O, {
76
+ indicator: /* @__PURE__ */ i(j, {
77
+ style: {
78
+ fontSize: 16
79
+ },
80
+ spin: !0
81
+ })
82
+ }), /* @__PURE__ */ i("span", {
83
+ children: "解析中"
84
+ })]
85
+ }) : (e == null ? void 0 : e.status) === 3 ? s && /* @__PURE__ */ c("div", {
86
+ style: {
87
+ display: "flex",
88
+ gap: 6
89
+ },
90
+ children: [/* @__PURE__ */ i("div", {
91
+ className: "file-action file-failed",
92
+ children: /* @__PURE__ */ i(L, {})
93
+ }), /* @__PURE__ */ i("div", {
94
+ className: "file-action file-remove",
95
+ onClick: () => {
96
+ s(e, l);
97
+ },
98
+ children: /* @__PURE__ */ i(F, {})
99
+ })]
100
+ }) : s && g && /* @__PURE__ */ c("div", {
101
+ style: {
102
+ display: "flex",
103
+ gap: 6
104
+ },
105
+ children: [/* @__PURE__ */ i("div", {
106
+ className: "file-action file-remove",
107
+ onClick: () => {
108
+ g(e, l);
109
+ },
110
+ children: /* @__PURE__ */ i(P, {
111
+ type: "icon-xiazai",
112
+ style: {
113
+ fontSize: 16
114
+ }
115
+ })
116
+ }), /* @__PURE__ */ i("div", {
117
+ className: "file-action file-remove",
118
+ onClick: () => {
119
+ s(e, l);
120
+ },
121
+ children: /* @__PURE__ */ i(F, {})
122
+ })]
123
+ })]
124
+ }) : /* @__PURE__ */ i(z, {});
125
+ };
126
+ export {
127
+ M as default
128
+ };