@duxi999/usdp-eacp-conversation 0.0.1 → 0.0.2

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/index.js CHANGED
@@ -1,42 +1,58 @@
1
- import { defineComponent as Xe, computed as G, ref as s, watch as J, onMounted as We, onUnmounted as Ye, resolveComponent as I, resolveDirective as je, openBlock as w, createElementBlock as L, createVNode as i, withCtx as l, createTextVNode as C, unref as _e, createElementVNode as z, toDisplayString as H, createCommentVNode as Fe, withDirectives as Ge, createBlock as Je } from "vue";
2
- import { Loading as he } from "@element-plus/icons-vue";
3
- import { ElMessage as K } from "element-plus";
4
- const Ke = { class: "conversation-session" }, Qe = {
1
+ import { defineComponent as Xe, computed as j, ref as s, watch as K, onMounted as We, onUnmounted as Ye, resolveComponent as I, resolveDirective as Fe, openBlock as w, createElementBlock as L, createVNode as i, withCtx as r, createTextVNode as C, unref as he, createElementVNode as z, toDisplayString as H, createCommentVNode as Ge, withDirectives as Je, createBlock as Ke } from "vue";
2
+ import { Loading as we } from "@element-plus/icons-vue";
3
+ import { ElMessage as Q } from "element-plus";
4
+ const Qe = { class: "conversation-session" }, Ze = {
5
5
  key: 0,
6
6
  class: "status-placeholder"
7
- }, Ze = {
7
+ }, et = {
8
8
  key: 1,
9
9
  class: "status-placeholder"
10
- }, et = {
10
+ }, tt = {
11
11
  key: 2,
12
12
  class: "status-placeholder"
13
- }, tt = {
13
+ }, nt = {
14
14
  key: 3,
15
15
  class: "iframe-container"
16
- }, nt = ["src"], at = {
16
+ }, at = ["src"], ot = {
17
17
  key: 4,
18
18
  class: "status-placeholder"
19
- }, ot = {
19
+ }, it = {
20
20
  key: 5,
21
21
  class: "status-placeholder"
22
- }, it = { class: "env-limit-dialog" }, we = 30, st = 2e3, lt = 45, rt = 300 * 1e3, ut = /* @__PURE__ */ Xe({
22
+ }, st = { class: "env-limit-dialog" }, Ce = 30, rt = 2e3, lt = 45, ut = 300 * 1e3, ct = /* @__PURE__ */ Xe({
23
23
  name: "UsdpXjgzConversation",
24
24
  __name: "UsdpEacpConversation",
25
25
  props: {
26
26
  appCode: {},
27
- request: {}
27
+ request: {},
28
+ appConfig: {}
28
29
  },
29
30
  emits: ["state-change"],
30
- setup(b, { expose: Q, emit: X }) {
31
- const o = b, Z = X, ee = G(
31
+ setup(b, { expose: Z, emit: X }) {
32
+ const o = b, ee = X, te = j(
32
33
  () => o.appCode !== void 0 && o.appCode !== null && o.appCode !== "" ? String(o.appCode) : void 0
33
- ), n = s("not_exist"), te = s(""), u = s(""), r = s(""), m = s(""), k = s(""), g = s(!1), y = G(() => n.value);
34
- G(() => r.value || "智能助手");
35
- const be = G(() => k.value || ee.value || null);
36
- J(
37
- [y, () => r.value, be],
34
+ ), W = j(() => {
35
+ const e = o.appConfig;
36
+ if (e == null) return;
37
+ let t = null;
38
+ if (typeof e == "string")
39
+ try {
40
+ t = JSON.parse(e);
41
+ } catch {
42
+ return;
43
+ }
44
+ else typeof e == "object" && (t = e);
45
+ const a = t == null ? void 0 : t.projectId;
46
+ if (a == null) return;
47
+ const l = String(a).trim();
48
+ return l === "" ? void 0 : l;
49
+ }), n = s("not_exist"), ne = s(""), c = s(""), u = s(""), m = s(""), k = s(""), g = s(!1), y = j(() => n.value);
50
+ j(() => u.value || "智能助手");
51
+ const Te = j(() => k.value || te.value || null);
52
+ K(
53
+ [y, () => u.value, Te],
38
54
  ([e, t, a]) => {
39
- Z("state-change", {
55
+ ee("state-change", {
40
56
  status: e,
41
57
  nickname: t,
42
58
  appCode: a
@@ -44,15 +60,15 @@ const Ke = { class: "conversation-session" }, Qe = {
44
60
  },
45
61
  { immediate: !0 }
46
62
  );
47
- const x = s(!1), Te = {
63
+ const x = s(!1), Se = {
48
64
  workspace: "工作区",
49
65
  knowledge_base: "知识库",
50
66
  agent: "智能体",
51
67
  skill: "技能构建",
52
68
  personal_assistant: "个人助手",
53
69
  bid: "智能投标"
54
- }, ne = s(!1), ae = s(!1), oe = s([]), D = s([]), Ee = s();
55
- function Se(e) {
70
+ }, ae = s(!1), oe = s(!1), ie = s([]), D = s([]), Ee = s();
71
+ function Ie(e) {
56
72
  if (!e) return "-";
57
73
  try {
58
74
  return new Date(e).toLocaleString("zh-CN", {
@@ -66,40 +82,42 @@ const Ke = { class: "conversation-session" }, Qe = {
66
82
  return e;
67
83
  }
68
84
  }
69
- async function Ie() {
70
- ne.value = !0, D.value = [];
85
+ async function Le() {
86
+ ae.value = !0, D.value = [];
71
87
  try {
72
- oe.value = await o.request.get("/app-conversation/my-running-environments");
88
+ ie.value = await o.request.get("/app-conversation/my-running-environments");
73
89
  } catch {
74
- K.error("获取运行中环境列表失败"), oe.value = [];
90
+ Q.error("获取运行中环境列表失败"), ie.value = [];
75
91
  } finally {
76
- ne.value = !1;
92
+ ae.value = !1;
77
93
  }
78
94
  }
79
- J(x, (e) => {
80
- e && Ie();
95
+ K(x, (e) => {
96
+ e && Le();
81
97
  });
82
- function Le(e) {
98
+ function ke(e) {
83
99
  D.value = e;
84
100
  }
85
- async function ke() {
101
+ async function xe() {
86
102
  if (D.value.length !== 0) {
87
- ae.value = !0;
103
+ oe.value = !0;
88
104
  try {
89
105
  const e = D.value.map((a) => ({
90
- appCode: a.appCode
106
+ appCode: a.appCode,
107
+ // appConfig 配置了 projectId 时携带(与 start-environment 对齐)
108
+ ...W.value ? { projectId: W.value } : {}
91
109
  })), t = await o.request.post("/app-conversation/batch-stop-environments", { environments: e });
92
- t.allSuccess || K.warning(`关闭完成:成功 ${t.successCount} 个,失败 ${t.failedCount} 个`), x.value = !1, await Ue();
110
+ t.allSuccess || Q.warning(`关闭完成:成功 ${t.successCount} 个,失败 ${t.failedCount} 个`), x.value = !1, await Ae();
93
111
  } catch {
94
- K.error("关闭环境失败,请重试");
112
+ Q.error("关闭环境失败,请重试");
95
113
  } finally {
96
- ae.value = !1;
114
+ oe.value = !1;
97
115
  }
98
116
  }
99
117
  }
100
- const _ = s(""), ce = s(null), h = s("");
101
- let U = 0, q = null, M = null, P = null, T = null, V = !1, W = null, Y = 0, j = null;
102
- function F(e) {
118
+ const _ = s(""), ve = s(null), h = s("");
119
+ let U = 0, P = null, q = null, M = null, T = null, O = !1, Y = null, F = 0, G = null;
120
+ function J(e) {
103
121
  if (!e) return "";
104
122
  try {
105
123
  const t = new URL(e);
@@ -108,13 +126,15 @@ const Ke = { class: "conversation-session" }, Qe = {
108
126
  return e;
109
127
  }
110
128
  }
111
- async function ie() {
129
+ async function se() {
112
130
  g.value = !0;
113
131
  try {
114
132
  const e = await o.request.post("/app-conversation/start-environment", {
115
- appCode: o.appCode
133
+ appCode: o.appCode,
134
+ // appConfig 配置了 projectId 时携带(dynamic_project 模式后端必需)
135
+ ...W.value ? { projectId: W.value } : {}
116
136
  });
117
- return e.status !== n.value && (n.value = e.status), e.environmentId && e.environmentId !== m.value && (m.value = e.environmentId), e.proxyUrl && e.proxyUrl !== u.value && (u.value = e.proxyUrl), e;
137
+ return e.status !== n.value && (n.value = e.status), e.environmentId && e.environmentId !== m.value && (m.value = e.environmentId), e.proxyUrl && e.proxyUrl !== c.value && (c.value = e.proxyUrl), e;
118
138
  } finally {
119
139
  g.value = !1;
120
140
  }
@@ -124,11 +144,11 @@ const Ke = { class: "conversation-session" }, Qe = {
124
144
  const e = await o.request.get("/app-conversation/environment-status", {
125
145
  appCode: o.appCode
126
146
  }, { silent: !0 });
127
- e.status !== n.value && (n.value = e.status), e.environmentId && e.environmentId !== m.value && (m.value = e.environmentId), e.proxyUrl && e.proxyUrl !== u.value && (u.value = e.proxyUrl);
147
+ e.status !== n.value && (n.value = e.status), e.environmentId && e.environmentId !== m.value && (m.value = e.environmentId), e.proxyUrl && e.proxyUrl !== c.value && (c.value = e.proxyUrl);
128
148
  } catch {
129
149
  }
130
150
  }
131
- async function ve() {
151
+ async function de() {
132
152
  g.value = !0;
133
153
  try {
134
154
  await o.request.post("/app-conversation/stop-environment", {
@@ -138,70 +158,70 @@ const Ke = { class: "conversation-session" }, Qe = {
138
158
  g.value = !1;
139
159
  }
140
160
  }
141
- async function xe() {
161
+ async function Ue() {
142
162
  g.value = !0;
143
163
  try {
144
164
  await o.request.post("/app-conversation/destroy-environment", {
145
165
  appCode: o.appCode
146
- }), n.value = "not_exist", u.value = "", m.value = "";
166
+ }), n.value = "not_exist", c.value = "", m.value = "";
147
167
  } finally {
148
168
  g.value = !1;
149
169
  }
150
170
  }
151
- async function E() {
171
+ async function S() {
152
172
  try {
153
173
  const e = await o.request.get("/app-conversation/session-info", {
154
174
  appCode: o.appCode
155
175
  }, { silent: !0 });
156
- return e.sessionId !== te.value && (te.value = e.sessionId), e.proxyUrl !== u.value && (u.value = e.proxyUrl), e.agentNickname !== r.value && (r.value = e.agentNickname), e.environmentId !== m.value && (m.value = e.environmentId), e.appCode && e.appCode !== k.value && (k.value = e.appCode), e.environmentStatus !== n.value && (n.value = e.environmentStatus), e;
176
+ return e.sessionId !== ne.value && (ne.value = e.sessionId), e.proxyUrl !== c.value && (c.value = e.proxyUrl), e.agentNickname !== u.value && (u.value = e.agentNickname), e.environmentId !== m.value && (m.value = e.environmentId), e.appCode && e.appCode !== k.value && (k.value = e.appCode), e.environmentStatus !== n.value && (n.value = e.environmentStatus), e;
157
177
  } catch {
158
178
  return;
159
179
  }
160
180
  }
161
- function O() {
162
- c(), Y = 0, W = setInterval(async () => {
163
- if (Y++, Y > lt) {
181
+ function V() {
182
+ v(), F = 0, Y = setInterval(async () => {
183
+ if (F++, F > lt) {
164
184
  if (await A(), n.value === "running") {
165
- c(), S(), r.value || E();
185
+ v(), E(), u.value || S();
166
186
  return;
167
187
  }
168
- c(), n.value = "start_failed";
188
+ v(), n.value = "start_failed";
169
189
  return;
170
190
  }
171
- await A(), n.value === "running" ? (c(), S(), r.value || E()) : n.value === "start_failed" && c();
172
- }, st);
191
+ await A(), n.value === "running" ? (v(), E(), u.value || S()) : n.value === "start_failed" && v();
192
+ }, rt);
173
193
  }
174
- function c() {
175
- W !== null && (clearInterval(W), W = null), Y = 0;
194
+ function v() {
195
+ Y !== null && (clearInterval(Y), Y = null), F = 0;
176
196
  }
177
- function S() {
178
- N(), j = setInterval(async () => {
197
+ function E() {
198
+ N(), G = setInterval(async () => {
179
199
  document.visibilityState === "visible" && await A();
180
- }, rt);
200
+ }, ut);
181
201
  }
182
202
  function N() {
183
- j !== null && (clearInterval(j), j = null);
203
+ G !== null && (clearInterval(G), G = null);
184
204
  }
185
- function se() {
186
- c(), N(), n.value = "not_exist", te.value = "", u.value = "", r.value = "", m.value = "", k.value = "", g.value = !1;
205
+ function re() {
206
+ v(), N(), n.value = "not_exist", ne.value = "", c.value = "", u.value = "", m.value = "", k.value = "", g.value = !1;
187
207
  }
188
- J(
189
- [() => n.value, () => u.value],
190
- ([e, t], [a, d]) => {
208
+ K(
209
+ [() => n.value, () => c.value],
210
+ ([e, t], [a, l]) => {
191
211
  if (!t || e !== "running") {
192
- _.value = "", h.value = "", v(), $();
212
+ _.value = "", h.value = "", d(), $();
193
213
  return;
194
214
  }
195
- F(t) !== F(d || "") && pe(t, a === "starting");
215
+ J(t) !== J(l || "") && me(t, a === "starting");
196
216
  },
197
217
  { immediate: !0 }
198
- ), J(
218
+ ), K(
199
219
  () => n.value,
200
220
  (e, t) => {
201
221
  if (e === "running" && t === "starting") {
202
- const a = u.value;
222
+ const a = c.value;
203
223
  if (!a) return;
204
- (!_.value || F(a) === F(_.value)) && pe(a, !0);
224
+ (!_.value || J(a) === J(_.value)) && me(a, !0);
205
225
  }
206
226
  }
207
227
  );
@@ -213,16 +233,16 @@ const Ke = { class: "conversation-session" }, Qe = {
213
233
  await A();
214
234
  const t = n.value;
215
235
  if (t === "running") {
216
- S();
236
+ E();
217
237
  return;
218
238
  }
219
239
  if (t === "starting") {
220
- O();
240
+ V();
221
241
  return;
222
242
  }
223
243
  }
224
244
  try {
225
- await ie(), r.value || E(), n.value === "starting" ? O() : n.value === "running" && S();
245
+ await se(), u.value || S(), n.value === "starting" ? V() : n.value === "running" && E();
226
246
  } catch (t) {
227
247
  if ((t == null ? void 0 : t.code) === 23010) {
228
248
  x.value = !0;
@@ -231,36 +251,36 @@ const Ke = { class: "conversation-session" }, Qe = {
231
251
  }
232
252
  }
233
253
  }
234
- async function Ue() {
254
+ async function Ae() {
235
255
  await new Promise((e) => setTimeout(e, 500)), await R();
236
256
  }
237
- async function Ae() {
238
- n.value = "stopping", c(), N(), v(), $();
257
+ async function Ne() {
258
+ n.value = "stopping", v(), N(), d(), $();
239
259
  try {
240
- return await ve(), !0;
260
+ return await de(), !0;
241
261
  } catch {
242
262
  return n.value = "running", !1;
243
263
  }
244
264
  }
245
- async function Ne() {
246
- let e = k.value || ee.value;
247
- return e || (await E(), e = k.value || ee.value), e || void 0;
265
+ async function Re() {
266
+ let e = k.value || te.value;
267
+ return e || (await S(), e = k.value || te.value), e || void 0;
248
268
  }
249
- function Re() {
269
+ function $e() {
250
270
  const e = _.value;
251
271
  if (!e) return;
252
- v(), U = 0;
272
+ d(), U = 0;
253
273
  const t = e.includes("?") ? "&" : "?";
254
- h.value = `${e}${t}_refresh=${Date.now()}`, re(h.value);
255
- }
256
- function $e() {
257
- de();
274
+ h.value = `${e}${t}_refresh=${Date.now()}`, ue(h.value);
258
275
  }
259
276
  function De() {
260
- ue("network");
277
+ fe();
278
+ }
279
+ function Pe() {
280
+ ce("network");
261
281
  }
262
- function de() {
263
- V && (v(), U = 0);
282
+ function fe() {
283
+ O && (d(), U = 0);
264
284
  }
265
285
  function qe(e) {
266
286
  try {
@@ -272,133 +292,133 @@ const Ke = { class: "conversation-session" }, Qe = {
272
292
  }
273
293
  async function Me(e) {
274
294
  try {
275
- const t = qe(e), a = new AbortController(), d = setTimeout(() => a.abort(), 5e3), f = await fetch(t, {
295
+ const t = qe(e), a = new AbortController(), l = setTimeout(() => a.abort(), 5e3), f = await fetch(t, {
276
296
  method: "HEAD",
277
297
  mode: "cors",
278
298
  cache: "no-cache",
279
299
  signal: a.signal
280
300
  });
281
- return clearTimeout(d), f.status === 200;
301
+ return clearTimeout(l), f.status === 200;
282
302
  } catch {
283
303
  return !1;
284
304
  }
285
305
  }
286
306
  async function le(e, t = 0) {
287
307
  if (await Me(e)) {
288
- fe(e);
308
+ pe(e);
289
309
  return;
290
310
  }
291
- t < we ? q = setTimeout(() => {
311
+ t < Ce ? P = setTimeout(() => {
292
312
  le(e, t + 1);
293
- }, 100) : fe(e);
313
+ }, 100) : pe(e);
294
314
  }
295
- function fe(e) {
296
- _.value = e, h.value = e, re(e);
315
+ function pe(e) {
316
+ _.value = e, h.value = e, ue(e);
297
317
  }
298
- function pe(e, t) {
299
- v(), $(), U = 0, t ? M = setTimeout(() => {
300
- le(e), M = null;
318
+ function me(e, t) {
319
+ d(), $(), U = 0, t ? q = setTimeout(() => {
320
+ le(e), q = null;
301
321
  }, 1500) : le(e);
302
322
  }
303
323
  function $() {
304
- q && (clearTimeout(q), q = null), M && (clearTimeout(M), M = null), T && (clearTimeout(T), T = null);
324
+ P && (clearTimeout(P), P = null), q && (clearTimeout(q), q = null), T && (clearTimeout(T), T = null);
305
325
  }
306
- function re(e) {
307
- if (v(), !window.PerformanceObserver) {
308
- me();
326
+ function ue(e) {
327
+ if (d(), !window.PerformanceObserver) {
328
+ ge();
309
329
  return;
310
330
  }
311
- V = !0;
331
+ O = !0;
312
332
  try {
313
- P = new PerformanceObserver((t) => {
333
+ M = new PerformanceObserver((t) => {
314
334
  for (const a of t.getEntries()) {
315
- const d = a;
335
+ const l = a;
316
336
  if (a.name !== e && a.name !== h.value) continue;
317
- const f = d.responseStatus;
337
+ const f = l.responseStatus;
318
338
  if (f === 502) {
319
- ue("502");
339
+ ce("502");
320
340
  return;
321
341
  }
322
- f >= 200 && f < 400 && de();
342
+ f >= 200 && f < 400 && fe();
323
343
  }
324
- }), P.observe({ type: "resource", buffered: !0 });
344
+ }), M.observe({ type: "resource", buffered: !0 });
325
345
  } catch {
326
346
  }
327
- me();
347
+ ge();
328
348
  }
329
- function v() {
330
- P && (P.disconnect(), P = null), T && (clearTimeout(T), T = null), V = !1;
349
+ function d() {
350
+ M && (M.disconnect(), M = null), T && (clearTimeout(T), T = null), O = !1;
331
351
  }
332
- function me(e) {
352
+ function ge(e) {
333
353
  T = setTimeout(() => {
334
- V && ue("timeout");
354
+ O && ce("timeout");
335
355
  }, 15e3);
336
356
  }
337
- function ue(e) {
338
- if (!V) return;
339
- if (v(), U++, U > we) {
340
- K.error("应用加载失败,请刷新页面重试");
357
+ function ce(e) {
358
+ if (!O) return;
359
+ if (d(), U++, U > Ce) {
360
+ Q.error("应用加载失败,请刷新页面重试");
341
361
  return;
342
362
  }
343
- console.warn(`[ConversationSession] 加载失败: ${e === "network" ? "网络错误" : e === "timeout" ? "加载超时" : "应用暂不可用"}, 第 ${U} 次重试`), q = setTimeout(() => {
363
+ console.warn(`[ConversationSession] 加载失败: ${e === "network" ? "网络错误" : e === "timeout" ? "加载超时" : "应用暂不可用"}, 第 ${U} 次重试`), P = setTimeout(() => {
344
364
  if (!_.value) return;
345
365
  const a = _.value.includes("?") ? "&" : "?";
346
- h.value = `${_.value}${a}_retry=${Date.now()}`, re(h.value);
366
+ h.value = `${_.value}${a}_retry=${Date.now()}`, ue(h.value);
347
367
  }, 1e3);
348
368
  }
349
- function ge() {
369
+ function ye() {
350
370
  document.visibilityState === "visible" && y.value === "running" && A();
351
371
  }
352
372
  We(async () => {
353
- document.addEventListener("visibilitychange", ge), await A();
373
+ document.addEventListener("visibilitychange", ye), await A();
354
374
  const e = n.value;
355
- e === "not_exist" || e === "stopped" ? R() : (await E(), e === "starting" ? O() : e === "running" && S());
375
+ e === "not_exist" || e === "stopped" ? R() : (await S(), e === "starting" ? V() : e === "running" && E());
356
376
  });
357
- async function Pe() {
377
+ async function Oe() {
358
378
  const e = n.value;
359
- if (n.value = "stopping", c(), N(), v(), $(), e === "running" || e === "starting")
379
+ if (n.value = "stopping", v(), N(), d(), $(), e === "running" || e === "starting")
360
380
  try {
361
- await ve();
381
+ await de();
362
382
  } catch {
363
383
  }
364
- se(), n.value = "starting";
384
+ re(), n.value = "starting";
365
385
  try {
366
- await ie(), E(), n.value === "starting" ? O() : n.value === "running" && S();
386
+ await se(), S(), n.value === "starting" ? V() : n.value === "running" && E();
367
387
  } catch {
368
388
  }
369
389
  }
370
390
  async function Ve() {
371
- n.value = "stopping", c(), N(), v(), $();
391
+ n.value = "stopping", v(), N(), d(), $();
372
392
  try {
373
- await xe();
393
+ await Ue();
374
394
  } catch {
375
395
  }
376
- se(), n.value = "starting";
396
+ re(), n.value = "starting";
377
397
  try {
378
- await ie(), E(), n.value === "starting" ? O() : n.value === "running" && S();
398
+ await se(), S(), n.value === "starting" ? V() : n.value === "running" && E();
379
399
  } catch {
380
400
  }
381
401
  }
382
- function Oe(e, t) {
383
- var d;
384
- const a = (d = ce.value) == null ? void 0 : d.contentWindow;
402
+ function Be(e, t) {
403
+ var l;
404
+ const a = (l = ve.value) == null ? void 0 : l.contentWindow;
385
405
  a && a.postMessage({ target: "dsh", type: e, payload: t }, "*");
386
406
  }
387
- return Q({ start: R, stop: Ae, restart: Pe, rebuild: Ve, refresh: Re, resolveAgentId: Ne, postDshEvent: Oe }), Ye(() => {
388
- c(), N(), document.removeEventListener("visibilitychange", ge), v(), $(), se();
407
+ return Z({ start: R, stop: Ne, restart: Oe, rebuild: Ve, refresh: $e, resolveAgentId: Re, postDshEvent: Be }), Ye(() => {
408
+ v(), N(), document.removeEventListener("visibilitychange", ye), d(), $(), re();
389
409
  }), (e, t) => {
390
- const a = I("el-button"), d = I("el-empty"), f = I("el-icon"), ye = I("el-result"), B = I("el-table-column"), Be = I("el-table"), ze = I("el-dialog"), He = je("loading");
391
- return w(), L("div", Ke, [
392
- y.value === "not_exist" ? (w(), L("div", Qe, [
393
- i(d, {
394
- description: `${r.value} 环境未启动`
410
+ const a = I("el-button"), l = I("el-empty"), f = I("el-icon"), _e = I("el-result"), B = I("el-table-column"), je = I("el-table"), ze = I("el-dialog"), He = Fe("loading");
411
+ return w(), L("div", Qe, [
412
+ y.value === "not_exist" ? (w(), L("div", Ze, [
413
+ i(l, {
414
+ description: `${u.value} 环境未启动`
395
415
  }, {
396
- default: l(() => [
416
+ default: r(() => [
397
417
  i(a, {
398
418
  type: "primary",
399
419
  onClick: R
400
420
  }, {
401
- default: l(() => [...t[2] || (t[2] = [
421
+ default: r(() => [...t[2] || (t[2] = [
402
422
  C("启动环境", -1)
403
423
  ])]),
404
424
  _: 1
@@ -406,48 +426,48 @@ const Ke = { class: "conversation-session" }, Qe = {
406
426
  ]),
407
427
  _: 1
408
428
  }, 8, ["description"])
409
- ])) : y.value === "starting" ? (w(), L("div", Ze, [
429
+ ])) : y.value === "starting" ? (w(), L("div", et, [
410
430
  i(f, {
411
431
  class: "is-loading",
412
432
  size: 48
413
433
  }, {
414
- default: l(() => [
415
- i(_e(he))
434
+ default: r(() => [
435
+ i(he(we))
416
436
  ]),
417
437
  _: 1
418
438
  }),
419
- z("p", null, H(r.value) + " 环境启动中...", 1)
420
- ])) : y.value === "stopping" ? (w(), L("div", et, [
439
+ z("p", null, H(u.value) + " 环境启动中...", 1)
440
+ ])) : y.value === "stopping" ? (w(), L("div", tt, [
421
441
  i(f, {
422
442
  class: "is-loading",
423
443
  size: 48
424
444
  }, {
425
- default: l(() => [
426
- i(_e(he))
445
+ default: r(() => [
446
+ i(he(we))
427
447
  ]),
428
448
  _: 1
429
449
  }),
430
- z("p", null, "正在停止 " + H(r.value) + "...", 1)
431
- ])) : y.value === "running" ? (w(), L("div", tt, [
450
+ z("p", null, "正在停止 " + H(u.value) + "...", 1)
451
+ ])) : y.value === "running" ? (w(), L("div", nt, [
432
452
  z("iframe", {
433
453
  ref_key: "iframeRef",
434
- ref: ce,
454
+ ref: ve,
435
455
  src: h.value,
436
456
  class: "conversation-iframe",
437
- onLoad: $e,
438
- onError: De
439
- }, null, 40, nt)
440
- ])) : y.value === "start_failed" ? (w(), L("div", at, [
441
- i(ye, {
457
+ onLoad: De,
458
+ onError: Pe
459
+ }, null, 40, at)
460
+ ])) : y.value === "start_failed" ? (w(), L("div", ot, [
461
+ i(_e, {
442
462
  icon: "error",
443
463
  title: "环境启动失败"
444
464
  }, {
445
- extra: l(() => [
465
+ extra: r(() => [
446
466
  i(a, {
447
467
  type: "primary",
448
468
  onClick: R
449
469
  }, {
450
- default: l(() => [...t[3] || (t[3] = [
470
+ default: r(() => [...t[3] || (t[3] = [
451
471
  C("重新启动", -1)
452
472
  ])]),
453
473
  _: 1
@@ -455,17 +475,17 @@ const Ke = { class: "conversation-session" }, Qe = {
455
475
  ]),
456
476
  _: 1
457
477
  })
458
- ])) : y.value === "stopped" ? (w(), L("div", ot, [
459
- i(ye, {
478
+ ])) : y.value === "stopped" ? (w(), L("div", it, [
479
+ i(_e, {
460
480
  icon: "info",
461
481
  title: "环境已停止"
462
482
  }, {
463
- extra: l(() => [
483
+ extra: r(() => [
464
484
  i(a, {
465
485
  type: "primary",
466
486
  onClick: R
467
487
  }, {
468
- default: l(() => [...t[4] || (t[4] = [
488
+ default: r(() => [...t[4] || (t[4] = [
469
489
  C("重新启动", -1)
470
490
  ])]),
471
491
  _: 1
@@ -473,7 +493,7 @@ const Ke = { class: "conversation-session" }, Qe = {
473
493
  ]),
474
494
  _: 1
475
495
  })
476
- ])) : Fe("", !0),
496
+ ])) : Ge("", !0),
477
497
  i(ze, {
478
498
  "model-value": x.value,
479
499
  title: "运行中环境数量已达上限",
@@ -481,39 +501,39 @@ const Ke = { class: "conversation-session" }, Qe = {
481
501
  "close-on-click-modal": !1,
482
502
  "onUpdate:modelValue": t[1] || (t[1] = (p) => x.value = p)
483
503
  }, {
484
- footer: l(() => [
504
+ footer: r(() => [
485
505
  i(a, {
486
506
  onClick: t[0] || (t[0] = (p) => x.value = !1)
487
507
  }, {
488
- default: l(() => [...t[6] || (t[6] = [
508
+ default: r(() => [...t[6] || (t[6] = [
489
509
  C("暂不关闭", -1)
490
510
  ])]),
491
511
  _: 1
492
512
  }),
493
513
  i(a, {
494
514
  type: "primary",
495
- loading: ae.value,
515
+ loading: oe.value,
496
516
  disabled: D.value.length === 0,
497
- onClick: ke
517
+ onClick: xe
498
518
  }, {
499
- default: l(() => [...t[7] || (t[7] = [
519
+ default: r(() => [...t[7] || (t[7] = [
500
520
  C(" 关闭已选环境 ", -1)
501
521
  ])]),
502
522
  _: 1
503
523
  }, 8, ["loading", "disabled"])
504
524
  ]),
505
- default: l(() => [
506
- z("div", it, [
525
+ default: r(() => [
526
+ z("div", st, [
507
527
  t[5] || (t[5] = z("p", { class: "env-limit-dialog__tip" }, " 您的运行中智能会话数量已达上限,请选择需要关闭的会话后重试。 ", -1)),
508
- Ge((w(), Je(Be, {
528
+ Je((w(), Ke(je, {
509
529
  ref_key: "envLimitTableRef",
510
530
  ref: Ee,
511
- data: oe.value,
531
+ data: ie.value,
512
532
  "max-height": "520",
513
533
  "header-cell-style": { textAlign: "center" },
514
- onSelectionChange: Le
534
+ onSelectionChange: ke
515
535
  }, {
516
- default: l(() => [
536
+ default: r(() => [
517
537
  i(B, {
518
538
  type: "selection",
519
539
  width: "42"
@@ -522,8 +542,8 @@ const Ke = { class: "conversation-session" }, Qe = {
522
542
  label: "场景类型",
523
543
  "min-width": "100"
524
544
  }, {
525
- default: l(({ row: p }) => [
526
- C(H(Te[p.sceneType] || p.sceneType), 1)
545
+ default: r(({ row: p }) => [
546
+ C(H(Se[p.sceneType] || p.sceneType), 1)
527
547
  ]),
528
548
  _: 1
529
549
  }),
@@ -538,7 +558,7 @@ const Ke = { class: "conversation-session" }, Qe = {
538
558
  "min-width": "130",
539
559
  "show-overflow-tooltip": ""
540
560
  }, {
541
- default: l(({ row: p }) => [
561
+ default: r(({ row: p }) => [
542
562
  C(H(p.agentNickname || "-"), 1)
543
563
  ]),
544
564
  _: 1
@@ -547,15 +567,15 @@ const Ke = { class: "conversation-session" }, Qe = {
547
567
  label: "创建时间",
548
568
  "min-width": "170"
549
569
  }, {
550
- default: l(({ row: p }) => [
551
- C(H(Se(p.createdAt)), 1)
570
+ default: r(({ row: p }) => [
571
+ C(H(Ie(p.createdAt)), 1)
552
572
  ]),
553
573
  _: 1
554
574
  })
555
575
  ]),
556
576
  _: 1
557
577
  }, 8, ["data"])), [
558
- [He, ne.value]
578
+ [He, ae.value]
559
579
  ])
560
580
  ])
561
581
  ]),
@@ -564,18 +584,18 @@ const Ke = { class: "conversation-session" }, Qe = {
564
584
  ]);
565
585
  };
566
586
  }
567
- }), ct = (b, Q) => {
587
+ }), vt = (b, Z) => {
568
588
  const X = b.__vccOpts || b;
569
- for (const [o, Z] of Q)
570
- X[o] = Z;
589
+ for (const [o, ee] of Z)
590
+ X[o] = ee;
571
591
  return X;
572
- }, Ce = /* @__PURE__ */ ct(ut, [["__scopeId", "data-v-e1586830"]]), vt = "usdp-eacp-conversation", mt = {
592
+ }, be = /* @__PURE__ */ vt(ct, [["__scopeId", "data-v-f0ca27ea"]]), dt = "usdp-eacp-conversation", gt = {
573
593
  install(b) {
574
- b.component(vt, Ce), b.component("UsdpEacpConversation", Ce);
594
+ b.component(dt, be), b.component("UsdpEacpConversation", be);
575
595
  }
576
596
  };
577
597
  export {
578
- Ce as ConversationSession,
579
- mt as default
598
+ be as ConversationSession,
599
+ gt as default
580
600
  };
581
601
  //# sourceMappingURL=index.js.map