st-comp 0.0.266 → 0.0.268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- import { b as fe, p as ne, e as ve, u as _e, c as ge, n as he, _ as ke, w as ye } from "./base-29f73b05.js";
2
- import { E as be } from "./el-dialog-1939f7c5.js";
1
+ import { b as re, p as te, e as ce, u as ue, c as de, n as me, _ as pe, w as fe } from "./base-29f73b05.js";
2
+ import { E as ve } from "./el-dialog-1939f7c5.js";
3
3
  import "./el-overlay-1dfe3675.js";
4
- import { E as Te } from "./el-button-4f201000.js";
5
- import { E as we } from "./el-input-58786d42.js";
6
- import { defineComponent as oe, ref as v, computed as R, watch as U, openBlock as r, createElementBlock as d, normalizeClass as ie, unref as h, normalizeStyle as ee, createBlock as O, withCtx as k, resolveDynamicComponent as Se, renderSlot as Ce, inject as Ee, reactive as Me, onMounted as Ve, nextTick as q, Fragment as P, createVNode as f, createElementVNode as s, renderList as te, toDisplayString as J, createCommentVNode as S, createTextVNode as K, pushScopeId as Ne, popScopeId as De } from "vue";
7
- import { d as L } from "./dayjs.min-8313b006.js";
8
- import { V as Ye } from "./index-7ed0999e.js";
9
- import { s as Fe } from "./aiTools-ab67ffa0.js";
10
- import { E as le, u as Pe, s as se, p as He, t as ae, v as Ae } from "./index-ca91ac68.js";
11
- import { _ as Le } from "./_plugin-vue_export-helper-dad06003.js";
12
- import { E as $ } from "./index-072c4a65.js";
13
- import { k as ze, i as Be } from "./use-form-common-props-c14990b9.js";
4
+ import { E as _e } from "./el-button-4f201000.js";
5
+ import { E as ge } from "./el-input-58786d42.js";
6
+ import { defineComponent as se, ref as v, computed as x, watch as K, openBlock as l, createElementBlock as u, normalizeClass as ae, unref as _, normalizeStyle as Q, createBlock as $, withCtx as h, resolveDynamicComponent as he, renderSlot as ke, inject as be, reactive as ye, nextTick as R, Fragment as P, createVNode as m, createElementVNode as s, renderList as X, toDisplayString as J, createCommentVNode as w, createTextVNode as U, pushScopeId as Te, popScopeId as we } from "vue";
7
+ import { d as z } from "./dayjs.min-8313b006.js";
8
+ import { V as Ce, U as Se } from "./index-7ed0999e.js";
9
+ import { s as Ee } from "./aiTools-9a9c997f.js";
10
+ import { E as ne, u as Ve, s as Z, p as De, t as ee, v as Me } from "./index-ca91ac68.js";
11
+ import { _ as Ye } from "./_plugin-vue_export-helper-dad06003.js";
12
+ import { E as O } from "./index-072c4a65.js";
13
+ import { k as Fe, i as He } from "./use-form-common-props-c14990b9.js";
14
14
  import "./index-1955f23d.js";
15
15
  import "./index-8391a3df.js";
16
16
  import "./index-de24705f.js";
@@ -23,12 +23,12 @@ import "./index-657047bb.js";
23
23
  import "./typescript-7ae59c4c.js";
24
24
  import "./index-7db02db7.js";
25
25
  import "./config-provider-56193d47.js";
26
- const Ie = fe({
26
+ const Pe = re({
27
27
  size: {
28
28
  type: [Number, String],
29
- values: ze,
29
+ values: Fe,
30
30
  default: "",
31
- validator: (p) => ne(p)
31
+ validator: (d) => te(d)
32
32
  },
33
33
  shape: {
34
34
  type: String,
@@ -36,7 +36,7 @@ const Ie = fe({
36
36
  default: "circle"
37
37
  },
38
38
  icon: {
39
- type: Be
39
+ type: He
40
40
  },
41
41
  src: {
42
42
  type: String,
@@ -45,85 +45,85 @@ const Ie = fe({
45
45
  alt: String,
46
46
  srcSet: String,
47
47
  fit: {
48
- type: ve(String),
48
+ type: ce(String),
49
49
  default: "cover"
50
50
  }
51
- }), $e = {
52
- error: (p) => p instanceof Event
53
- }, Oe = oe({
51
+ }), Ne = {
52
+ error: (d) => d instanceof Event
53
+ }, Ae = se({
54
54
  name: "ElAvatar"
55
- }), je = /* @__PURE__ */ oe({
56
- ...Oe,
57
- props: Ie,
58
- emits: $e,
59
- setup(p, { emit: j }) {
60
- const D = p, g = _e("avatar"), C = v(!1), H = R(() => {
61
- const { size: o, icon: T, shape: _ } = D, b = [g.b()];
62
- return ge(o) && b.push(g.m(o)), T && b.push(g.m("icon")), _ && b.push(g.m(_)), b;
63
- }), z = R(() => {
64
- const { size: o } = D;
65
- return ne(o) ? g.cssVarBlock({
66
- size: he(o) || ""
55
+ }), Le = /* @__PURE__ */ se({
56
+ ...Ae,
57
+ props: Pe,
58
+ emits: Ne,
59
+ setup(d, { emit: I }) {
60
+ const M = d, g = ue("avatar"), C = v(!1), N = x(() => {
61
+ const { size: i, icon: p, shape: S } = M, b = [g.b()];
62
+ return de(i) && b.push(g.m(i)), p && b.push(g.m("icon")), S && b.push(g.m(S)), b;
63
+ }), B = x(() => {
64
+ const { size: i } = M;
65
+ return te(i) ? g.cssVarBlock({
66
+ size: me(i) || ""
67
67
  }) : void 0;
68
- }), x = R(() => ({
69
- objectFit: D.fit
68
+ }), j = x(() => ({
69
+ objectFit: M.fit
70
70
  }));
71
- U(() => D.src, () => C.value = !1);
72
- function B(o) {
73
- C.value = !0, j("error", o);
71
+ K(() => M.src, () => C.value = !1);
72
+ function y(i) {
73
+ C.value = !0, I("error", i);
74
74
  }
75
- return (o, T) => (r(), d("span", {
76
- class: ie(h(H)),
77
- style: ee(h(z))
75
+ return (i, p) => (l(), u("span", {
76
+ class: ae(_(N)),
77
+ style: Q(_(B))
78
78
  }, [
79
- (o.src || o.srcSet) && !C.value ? (r(), d("img", {
79
+ (i.src || i.srcSet) && !C.value ? (l(), u("img", {
80
80
  key: 0,
81
- src: o.src,
82
- alt: o.alt,
83
- srcset: o.srcSet,
84
- style: ee(h(x)),
85
- onError: B
86
- }, null, 44, ["src", "alt", "srcset"])) : o.icon ? (r(), O(h(le), { key: 1 }, {
87
- default: k(() => [
88
- (r(), O(Se(o.icon)))
81
+ src: i.src,
82
+ alt: i.alt,
83
+ srcset: i.srcSet,
84
+ style: Q(_(j)),
85
+ onError: y
86
+ }, null, 44, ["src", "alt", "srcset"])) : i.icon ? (l(), $(_(ne), { key: 1 }, {
87
+ default: h(() => [
88
+ (l(), $(he(i.icon)))
89
89
  ]),
90
90
  _: 1
91
- })) : Ce(o.$slots, "default", { key: 2 })
91
+ })) : ke(i.$slots, "default", { key: 2 })
92
92
  ], 6));
93
93
  }
94
94
  });
95
- var xe = /* @__PURE__ */ ke(je, [["__file", "avatar.vue"]]);
96
- const Re = ye(xe);
97
- const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-dialog-body" }, Je = { class: "avatar" }, Ke = { class: "message-content" }, Ue = {
95
+ var ze = /* @__PURE__ */ pe(Le, [["__file", "avatar.vue"]]);
96
+ const Be = fe(ze);
97
+ const k = (d) => (Te("data-v-b6460ca4"), d = d(), we(), d), Oe = { class: "ai-dialog-body" }, $e = { class: "avatar" }, Ie = { class: "message-content" }, je = {
98
98
  key: 0,
99
99
  class: "node-progress"
100
- }, We = { class: "node-status-icon" }, Ge = { class: "node-name" }, Qe = {
100
+ }, xe = { class: "node-status-icon" }, Re = { class: "node-name" }, Je = {
101
101
  key: 0,
102
102
  class: "node-progress-item next-step"
103
- }, Xe = { class: "node-status-icon" }, Ze = /* @__PURE__ */ y(() => /* @__PURE__ */ s("span", { class: "node-name" }, "正在执行下一步...", -1)), et = ["innerHTML"], tt = {
103
+ }, Ue = { class: "node-status-icon" }, Ke = /* @__PURE__ */ k(() => /* @__PURE__ */ s("span", { class: "node-name" }, "正在执行下一步...", -1)), qe = ["innerHTML"], We = {
104
104
  key: 2,
105
105
  class: "message-text"
106
- }, st = { class: "message-createTime" }, at = /* @__PURE__ */ y(() => /* @__PURE__ */ s("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), nt = { class: "feedback-buttons" }, ot = ["onClick"], it = /* @__PURE__ */ y(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👍", -1)), lt = /* @__PURE__ */ y(() => /* @__PURE__ */ s("span", { class: "btn-text" }, "满意", -1)), rt = [
107
- it,
108
- lt
109
- ], ct = ["onClick"], ut = /* @__PURE__ */ y(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👎", -1)), dt = /* @__PURE__ */ y(() => /* @__PURE__ */ s("span", { class: "btn-text" }, "不满意", -1)), mt = [
110
- ut,
111
- dt
112
- ], pt = {
106
+ }, Ge = { class: "message-createTime" }, Qe = /* @__PURE__ */ k(() => /* @__PURE__ */ s("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), Xe = { class: "feedback-buttons" }, Ze = ["onClick"], et = /* @__PURE__ */ k(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👍", -1)), tt = /* @__PURE__ */ k(() => /* @__PURE__ */ s("span", { class: "btn-text" }, "满意", -1)), st = [
107
+ et,
108
+ tt
109
+ ], at = ["onClick"], nt = /* @__PURE__ */ k(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👎", -1)), ot = /* @__PURE__ */ k(() => /* @__PURE__ */ s("span", { class: "btn-text" }, "不满意", -1)), it = [
110
+ nt,
111
+ ot
112
+ ], lt = {
113
113
  key: 1,
114
114
  class: "message-createTime"
115
- }, ft = {
115
+ }, rt = {
116
116
  key: 0,
117
117
  class: "message-item assistant"
118
- }, vt = { class: "avatar" }, _t = /* @__PURE__ */ y(() => /* @__PURE__ */ s("div", { class: "message-content" }, [
118
+ }, ct = { class: "avatar" }, ut = /* @__PURE__ */ k(() => /* @__PURE__ */ s("div", { class: "message-content" }, [
119
119
  /* @__PURE__ */ s("div", { class: "typing-indicator" }, [
120
120
  /* @__PURE__ */ s("span"),
121
121
  /* @__PURE__ */ s("span"),
122
122
  /* @__PURE__ */ s("span")
123
123
  ])
124
- ], -1)), gt = { class: "input-area" }, ht = { class: "input-actions" }, kt = /* @__PURE__ */ y(() => /* @__PURE__ */ s("div", { class: "input-hint" }, [
124
+ ], -1)), dt = { class: "input-area" }, mt = { class: "input-actions" }, pt = /* @__PURE__ */ k(() => /* @__PURE__ */ s("div", { class: "input-hint" }, [
125
125
  /* @__PURE__ */ s("span", null, "Enter 发送 | Ctrl + Enter 换行")
126
- ], -1)), yt = { class: "feedback-dialog-content" }, bt = /* @__PURE__ */ y(() => /* @__PURE__ */ s("div", { class: "feedback-emoji" }, "😟", -1)), Tt = /* @__PURE__ */ y(() => /* @__PURE__ */ s("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), wt = { class: "dialog-footer" }, St = {
126
+ ], -1)), ft = { class: "feedback-dialog-content" }, vt = /* @__PURE__ */ k(() => /* @__PURE__ */ s("div", { class: "feedback-emoji" }, "😟", -1)), _t = /* @__PURE__ */ k(() => /* @__PURE__ */ s("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), gt = { class: "dialog-footer" }, ht = {
127
127
  __name: "index",
128
128
  props: {
129
129
  defaultMessage: {
@@ -135,48 +135,48 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
135
135
  }
136
136
  },
137
137
  emits: ["callBack"],
138
- setup(p, { expose: j, emit: D }) {
139
- const g = Ee("stConfig"), C = Me(Ye()), H = v(!1), z = D, x = p, B = v(), o = v(!1), T = v(!1), _ = v([]), b = v(!1), I = v(null), n = v([
138
+ setup(d, { expose: I, emit: M }) {
139
+ const g = be("stConfig"), C = ye(Ce()), N = v(!1), B = M, j = d, y = v(!1), i = v(!1), p = v([]), S = v(!1), b = v(null), o = v([
140
140
  {
141
141
  role: "assistant",
142
- content: x.defaultMessage,
142
+ content: j.defaultMessage,
143
143
  userContent: null,
144
144
  showFeedback: !1,
145
145
  hasFeedback: !1,
146
- createTime: L().format("YYYY-MM-DD HH:mm:ss"),
146
+ createTime: z().format("YYYY-MM-DD HH:mm:ss"),
147
147
  resTime: 0,
148
148
  firstPackageTime: 0
149
149
  }
150
- ]), E = v(""), Y = v(!1), A = v(""), W = v({}), G = (a) => {
151
- if (typeof a != "string")
150
+ ]), E = v(""), Y = v(!1), A = v(""), q = v({}), W = (n) => {
151
+ if (typeof n != "string")
152
152
  return !1;
153
153
  try {
154
- const e = JSON.parse(a);
154
+ const e = JSON.parse(n);
155
155
  return e !== null && typeof e == "object";
156
156
  } catch {
157
157
  return !1;
158
158
  }
159
- }, re = (a) => {
160
- if (!G(a))
159
+ }, oe = (n) => {
160
+ if (!W(n))
161
161
  return null;
162
162
  try {
163
- const e = JSON.parse(a), { parsedConditions: t, ...m } = e;
164
- return { parsedConditions: t, webParams: m };
163
+ const e = JSON.parse(n), { parsedConditions: t, ...f } = e;
164
+ return { parsedConditions: t, webParams: f };
165
165
  } catch {
166
166
  return null;
167
167
  }
168
- }, ce = (a) => {
168
+ }, ie = (n) => {
169
169
  var t;
170
- if (!a)
170
+ if (!n)
171
171
  return "";
172
172
  let e = "";
173
- return (t = a.parsedConditions) != null && t.length && (e += '<div class="parsed-conditions">', a.parsedConditions.forEach((m) => {
174
- e += `<div class="parsed-conditions-item">${m}</div>`;
173
+ return (t = n.parsedConditions) != null && t.length && (e += '<div class="parsed-conditions">', n.parsedConditions.forEach((f) => {
174
+ e += `<div class="parsed-conditions-item">${f}</div>`;
175
175
  }), e += "</div>"), e;
176
- }, F = async (a, e) => {
177
- switch (a) {
176
+ }, F = async (n, e) => {
177
+ switch (n) {
178
178
  case "satisfied": {
179
- const t = n.value[e];
179
+ const t = o.value[e];
180
180
  await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
181
181
  userName: C.username,
182
182
  userContent: t.userContent,
@@ -187,15 +187,15 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
187
187
  firstPackageTime: t.firstPackageTime,
188
188
  isSolved: 1,
189
189
  logOrigin: 1
190
- }), $.success("感谢您的评价!"), n.value[e].hasFeedback = !0;
190
+ }), O.success("感谢您的评价!"), o.value[e].hasFeedback = !0;
191
191
  break;
192
192
  }
193
193
  case "open": {
194
- W.value = e, Y.value = !0;
194
+ q.value = e, Y.value = !0;
195
195
  break;
196
196
  }
197
197
  case "unsatisfied": {
198
- const t = n.value[e];
198
+ const t = o.value[e];
199
199
  await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
200
200
  userName: C.username,
201
201
  userContent: t.userContent,
@@ -207,11 +207,11 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
207
207
  firstPackageTime: t.firstPackageTime,
208
208
  isSolved: 0,
209
209
  logOrigin: 1
210
- }), $.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, n.value[e].hasFeedback = !0;
210
+ }), O.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, o.value[e].hasFeedback = !0;
211
211
  break;
212
212
  }
213
213
  case "default": {
214
- const t = n.value[e];
214
+ const t = o.value[e];
215
215
  await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
216
216
  userName: C.username,
217
217
  userContent: t.userContent,
@@ -226,146 +226,127 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
226
226
  });
227
227
  }
228
228
  }
229
- }, Q = async () => {
230
- const a = E.value.trim();
231
- if (!a)
232
- return $.warning("请输入消息内容");
233
- if (o.value)
229
+ }, G = async () => {
230
+ const n = E.value.trim();
231
+ if (!n)
232
+ return O.warning("请输入消息内容");
233
+ if (y.value)
234
234
  return;
235
- _.value = [], b.value = !1, n.value.push({
235
+ p.value = [], S.value = !1, o.value.push({
236
236
  role: "user",
237
- content: a,
238
- createTime: L().format("YYYY-MM-DD HH:mm:ss")
239
- }), E.value = "", await w(), n.value.push({
237
+ content: n,
238
+ createTime: z().format("YYYY-MM-DD HH:mm:ss")
239
+ }), E.value = "", await T(), o.value.push({
240
240
  role: "assistant",
241
241
  content: "",
242
- userContent: a,
242
+ userContent: n,
243
243
  showFeedback: !1,
244
244
  hasFeedback: !1,
245
- createTime: L().format("YYYY-MM-DD HH:mm:ss"),
245
+ createTime: z().format("YYYY-MM-DD HH:mm:ss"),
246
246
  resTime: 0,
247
247
  firstPackageTime: 0
248
- }), await w(), o.value = !0, T.value = !0;
249
- let e = "", t = (/* @__PURE__ */ new Date()).getTime(), m = !1;
248
+ }), await T(), y.value = !0, i.value = !0;
249
+ let e = "", t = (/* @__PURE__ */ new Date()).getTime(), f = !1;
250
250
  try {
251
- await Fe({
252
- appId: "1977602b357e4dab9d0b74899d5323b3",
253
- apiKey: "sk-d995eb26a4334bdeb2ccb4cbfaf51de8",
254
- value: a,
255
- callback: (N, c) => {
256
- var l;
257
- if (N === "error") {
258
- T.value = !1, o.value = !1, n.value.pop(), n.value.push({
251
+ const H = "1977602b357e4dab9d0b74899d5323b3", L = "sk-d995eb26a4334bdeb2ccb4cbfaf51de8";
252
+ await Ee({
253
+ mode: g.env.MODE,
254
+ appId: H,
255
+ apiKey: L,
256
+ token: Se(),
257
+ value: n,
258
+ callback: (V, r) => {
259
+ if (V === "error") {
260
+ i.value = !1, y.value = !1, o.value.pop(), o.value.push({
259
261
  role: "assistant",
260
- userContent: a,
261
- content: `❌ ${c}`,
262
+ userContent: n,
263
+ content: `❌ ${r}`,
262
264
  showFeedback: !1,
263
265
  hasFeedback: !1,
264
- createTime: L().format("YYYY-MM-DD HH:mm:ss"),
266
+ createTime: z().format("YYYY-MM-DD HH:mm:ss"),
265
267
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
266
268
  firstPackageTime: 0
267
- }), F("default", n.value.length - 1), w();
269
+ }), F("default", o.value.length - 1), T();
268
270
  return;
269
271
  }
270
- if (N === "node") {
271
- if (!m) {
272
- m = !0;
273
- const i = n.value[n.value.length - 1];
274
- i && i.role === "assistant" && i.firstPackageTime === 0 && (i.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - t);
272
+ if (V === "node") {
273
+ if (!f) {
274
+ f = !0;
275
+ const c = o.value[o.value.length - 1];
276
+ c && c.role === "assistant" && c.firstPackageTime === 0 && (c.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - t);
275
277
  }
276
- const u = _.value.find((i) => i.name === c.name);
277
- u ? u.status = c.status : _.value.push({ name: c.name, status: c.status }), w();
278
+ const a = p.value.find((c) => c.name === r.name);
279
+ a ? a.status = r.status : p.value.push({ name: r.name, status: r.status }), T();
278
280
  return;
279
281
  }
280
- if (N === "message") {
281
- e = c;
282
- const u = n.value[n.value.length - 1];
283
- u && u.role === "assistant" && (u.content = e, w());
282
+ if (V === "message") {
283
+ e = r;
284
+ const a = o.value[o.value.length - 1];
285
+ a && a.role === "assistant" && (a.content = e, T());
284
286
  }
285
- if (N === "finish") {
286
- T.value = !1, o.value = !1, b.value = !0;
287
- const u = n.value[n.value.length - 1];
288
- u && u.role === "assistant" && (u.showFeedback = !0, u.resTime = (/* @__PURE__ */ new Date()).getTime() - t, F("default", n.value.length - 1));
287
+ if (V === "finish") {
288
+ i.value = !1, y.value = !1, S.value = !0;
289
+ const a = o.value[o.value.length - 1];
290
+ a && a.role === "assistant" && (a.showFeedback = !0, a.resTime = (/* @__PURE__ */ new Date()).getTime() - t, F("default", o.value.length - 1));
289
291
  try {
290
- const i = JSON.parse(e);
291
- if (i.parsedConditions && delete i.parsedConditions, (l = i.customTagNames) != null && l.length) {
292
- const me = i.customTagNames.reduce((X, pe) => {
293
- const Z = B.value[pe];
294
- return Z && X.push(Z), X;
295
- }, []);
296
- delete i.customTagNames, i.customTag = me;
297
- }
298
- z("callBack", i);
292
+ const c = JSON.parse(e);
293
+ c.parsedConditions && delete c.parsedConditions, B("callBack", c);
299
294
  } catch {
300
- z("callBack", e);
295
+ B("callBack", e);
301
296
  }
302
297
  }
303
298
  }
304
299
  });
305
- } catch (M) {
306
- $.error(`AI响应异常: ${M}`), n.value.pop(), n.value.push({
300
+ } catch (H) {
301
+ O.error(`AI响应异常: ${H}`), o.value.pop(), o.value.push({
307
302
  role: "assistant",
308
- userContent: a,
303
+ userContent: n,
309
304
  content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
310
305
  showFeedback: !0,
311
306
  hasFeedback: !1,
312
- createTime: L().format("YYYY-MM-DD HH:mm:ss"),
307
+ createTime: z().format("YYYY-MM-DD HH:mm:ss"),
313
308
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
314
309
  firstPackageTime: 0
315
- }), F("default", n.value.length - 1), await w(), o.value = !1, T.value = !1;
310
+ }), F("default", o.value.length - 1), await T(), y.value = !1, i.value = !1;
316
311
  }
317
- }, ue = (a) => {
318
- if (a.key === "Enter")
319
- if (a.ctrlKey) {
320
- a.preventDefault();
321
- const e = a.target, t = e.selectionStart, m = e.selectionEnd;
312
+ }, le = (n) => {
313
+ if (n.key === "Enter")
314
+ if (n.ctrlKey) {
315
+ n.preventDefault();
316
+ const e = n.target, t = e.selectionStart, f = e.selectionEnd;
322
317
  E.value = E.value.substring(0, t) + `
323
- ` + E.value.substring(m), q(() => {
318
+ ` + E.value.substring(f), R(() => {
324
319
  e.selectionStart = e.selectionEnd = t + 1;
325
320
  });
326
321
  } else
327
- a.preventDefault(), Q();
328
- }, w = async () => {
329
- await q(), I.value && (I.value.scrollTop = I.value.scrollHeight);
330
- }, de = async () => {
331
- const a = await Promise.all([
332
- g.request.post("/alarm/deliversign/findTagsByUserId"),
333
- g.request.post("/alarm/deliversign/findSystemTagsByTagName")
334
- ]);
335
- B.value = a.reduce((e, t) => {
336
- var m;
337
- return {
338
- ...e,
339
- ...(m = t.body) == null ? void 0 : m.reduce((M, V) => ({ ...M, [V.tagName]: V.id }), {})
340
- };
341
- }, {});
322
+ n.preventDefault(), G();
323
+ }, T = async () => {
324
+ await R(), b.value && (b.value.scrollTop = b.value.scrollHeight);
342
325
  };
343
- return Ve(() => {
344
- de();
345
- }), U(
346
- () => n.value,
326
+ return K(
327
+ () => o.value,
347
328
  () => {
348
- w();
329
+ T();
349
330
  },
350
331
  { deep: !0 }
351
- ), U(
332
+ ), K(
352
333
  () => Y.value,
353
- (a) => {
354
- a || (A.value = "");
334
+ (n) => {
335
+ n || (A.value = "");
355
336
  }
356
- ), j({
337
+ ), I({
357
338
  open: () => {
358
- H.value = !0, q(() => {
359
- w();
339
+ N.value = !0, R(() => {
340
+ T();
360
341
  });
361
342
  }
362
- }), (a, e) => {
363
- const t = Re, m = le, M = we, V = Te, N = be;
364
- return r(), d(P, null, [
365
- f(N, {
343
+ }), (n, e) => {
344
+ const t = Be, f = ne, H = ge, L = _e, V = ve;
345
+ return l(), u(P, null, [
346
+ m(V, {
366
347
  class: "ai-dialog",
367
- modelValue: H.value,
368
- "onUpdate:modelValue": e[1] || (e[1] = (c) => H.value = c),
348
+ modelValue: N.value,
349
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => N.value = r),
369
350
  title: "✨ 品种池参数解析AI助手",
370
351
  width: "500px",
371
352
  center: "",
@@ -374,123 +355,123 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
374
355
  modal: !1,
375
356
  "modal-penetrable": !0
376
357
  }, {
377
- default: k(() => {
378
- var c;
358
+ default: h(() => {
359
+ var r;
379
360
  return [
380
- s("div", qe, [
361
+ s("div", Oe, [
381
362
  s("div", {
382
363
  ref_key: "messageListRef",
383
- ref: I,
364
+ ref: b,
384
365
  class: "message-list"
385
366
  }, [
386
- (r(!0), d(P, null, te(n.value, (l, u) => (r(), d("div", {
387
- key: u,
388
- class: ie([l.role, "message-item"])
367
+ (l(!0), u(P, null, X(o.value, (a, c) => (l(), u("div", {
368
+ key: c,
369
+ class: ae([a.role, "message-item"])
389
370
  }, [
390
- l.content || u === n.value.length - 1 && l.role === "assistant" && _.value.length > 0 ? (r(), d(P, { key: 0 }, [
391
- s("div", Je, [
392
- f(t, {
371
+ a.content || c === o.value.length - 1 && a.role === "assistant" && p.value.length > 0 ? (l(), u(P, { key: 0 }, [
372
+ s("div", $e, [
373
+ m(t, {
393
374
  size: 32,
394
- icon: l.role === "user" ? h(Pe) : h(se)
375
+ icon: a.role === "user" ? _(Ve) : _(Z)
395
376
  }, null, 8, ["icon"])
396
377
  ]),
397
- s("div", Ke, [
398
- u === n.value.length - 1 && l.role === "assistant" && _.value.length > 0 && !b.value ? (r(), d("div", Ue, [
399
- (r(!0), d(P, null, te(_.value, (i) => (r(), d("div", {
400
- key: i.name,
378
+ s("div", Ie, [
379
+ c === o.value.length - 1 && a.role === "assistant" && p.value.length > 0 && !S.value ? (l(), u("div", je, [
380
+ (l(!0), u(P, null, X(p.value, (D) => (l(), u("div", {
381
+ key: D.name,
401
382
  class: "node-progress-item"
402
383
  }, [
403
- s("span", We, [
404
- i.status === "success" ? (r(), O(m, {
384
+ s("span", xe, [
385
+ D.status === "success" ? (l(), $(f, {
405
386
  key: 0,
406
387
  class: "node-icon done"
407
388
  }, {
408
- default: k(() => [
409
- f(h(He))
389
+ default: h(() => [
390
+ m(_(De))
410
391
  ]),
411
392
  _: 1
412
- })) : (r(), O(m, {
393
+ })) : (l(), $(f, {
413
394
  key: 1,
414
395
  class: "node-icon running"
415
396
  }, {
416
- default: k(() => [
417
- f(h(ae))
397
+ default: h(() => [
398
+ m(_(ee))
418
399
  ]),
419
400
  _: 1
420
401
  }))
421
402
  ]),
422
- s("span", Ge, J(i.name), 1)
403
+ s("span", Re, J(D.name), 1)
423
404
  ]))), 128)),
424
- _.value.length > 0 && _.value.every((i) => i.status === "success") && !b.value ? (r(), d("div", Qe, [
425
- s("span", Xe, [
426
- f(m, { class: "node-icon waiting" }, {
427
- default: k(() => [
428
- f(h(ae))
405
+ p.value.length > 0 && p.value.every((D) => D.status === "success") && !S.value ? (l(), u("div", Je, [
406
+ s("span", Ue, [
407
+ m(f, { class: "node-icon waiting" }, {
408
+ default: h(() => [
409
+ m(_(ee))
429
410
  ]),
430
411
  _: 1
431
412
  })
432
413
  ]),
433
- Ze
434
- ])) : S("", !0)
435
- ])) : S("", !0),
436
- G(l.content) ? (r(), d("div", {
414
+ Ke
415
+ ])) : w("", !0)
416
+ ])) : w("", !0),
417
+ W(a.content) ? (l(), u("div", {
437
418
  key: 1,
438
419
  class: "message-json",
439
- innerHTML: ce(re(l.content))
440
- }, null, 8, et)) : l.content ? (r(), d("div", tt, J(l.content), 1)) : S("", !0),
441
- s("div", st, J(l.createTime), 1),
442
- l.role === "assistant" ? (r(), d(P, { key: 3 }, [
443
- l.showFeedback && !l.hasFeedback ? (r(), d(P, { key: 0 }, [
444
- at,
445
- s("div", nt, [
420
+ innerHTML: ie(oe(a.content))
421
+ }, null, 8, qe)) : a.content ? (l(), u("div", We, J(a.content), 1)) : w("", !0),
422
+ s("div", Ge, J(a.createTime), 1),
423
+ a.role === "assistant" ? (l(), u(P, { key: 3 }, [
424
+ a.showFeedback && !a.hasFeedback ? (l(), u(P, { key: 0 }, [
425
+ Qe,
426
+ s("div", Xe, [
446
427
  s("button", {
447
428
  class: "feedback-btn satisfied-btn",
448
- onClick: (i) => F("satisfied", u)
449
- }, rt, 8, ot),
429
+ onClick: (D) => F("satisfied", c)
430
+ }, st, 8, Ze),
450
431
  s("button", {
451
432
  class: "feedback-btn unsatisfied-btn",
452
- onClick: (i) => F("open", u)
453
- }, mt, 8, ct)
433
+ onClick: (D) => F("open", c)
434
+ }, it, 8, at)
454
435
  ])
455
- ], 64)) : S("", !0),
456
- l.showFeedback && l.hasFeedback ? (r(), d("div", pt, "感谢您进行的评价反馈")) : S("", !0)
457
- ], 64)) : S("", !0)
436
+ ], 64)) : w("", !0),
437
+ a.showFeedback && a.hasFeedback ? (l(), u("div", lt, "感谢您进行的评价反馈")) : w("", !0)
438
+ ], 64)) : w("", !0)
458
439
  ])
459
- ], 64)) : S("", !0)
440
+ ], 64)) : w("", !0)
460
441
  ], 2))), 128)),
461
- T.value && _.value.length === 0 && !((c = n.value[n.value.length - 1]) != null && c.content) ? (r(), d("div", ft, [
462
- s("div", vt, [
463
- f(t, {
442
+ i.value && p.value.length === 0 && !((r = o.value[o.value.length - 1]) != null && r.content) ? (l(), u("div", rt, [
443
+ s("div", ct, [
444
+ m(t, {
464
445
  size: 32,
465
- icon: h(se)
446
+ icon: _(Z)
466
447
  }, null, 8, ["icon"])
467
448
  ]),
468
- _t
469
- ])) : S("", !0)
449
+ ut
450
+ ])) : w("", !0)
470
451
  ], 512),
471
- s("div", gt, [
472
- f(M, {
452
+ s("div", dt, [
453
+ m(H, {
473
454
  class: "message-input",
474
455
  modelValue: E.value,
475
- "onUpdate:modelValue": e[0] || (e[0] = (l) => E.value = l),
456
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => E.value = a),
476
457
  type: "textarea",
477
458
  rows: 4,
478
459
  autosize: { minRows: 2, maxRows: 4 },
479
460
  placeholder: "输入您想查询的品种条件...",
480
- onKeydown: ue
461
+ onKeydown: le
481
462
  }, null, 8, ["modelValue"]),
482
- s("div", ht, [
483
- kt,
484
- f(V, {
463
+ s("div", mt, [
464
+ pt,
465
+ m(L, {
485
466
  class: "send-btn",
486
467
  type: "primary",
487
- icon: h(Ae),
488
- loading: o.value,
489
- onClick: Q,
468
+ icon: _(Me),
469
+ loading: y.value,
470
+ onClick: G,
490
471
  round: ""
491
472
  }, {
492
- default: k(() => [
493
- K(" 发送 ")
473
+ default: h(() => [
474
+ U(" 发送 ")
494
475
  ]),
495
476
  _: 1
496
477
  }, 8, ["icon", "loading"])
@@ -501,40 +482,40 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
501
482
  }),
502
483
  _: 1
503
484
  }, 8, ["modelValue"]),
504
- f(N, {
485
+ m(V, {
505
486
  modelValue: Y.value,
506
- "onUpdate:modelValue": e[5] || (e[5] = (c) => Y.value = c),
487
+ "onUpdate:modelValue": e[5] || (e[5] = (r) => Y.value = r),
507
488
  title: "📝 反馈意见",
508
489
  width: "400px"
509
490
  }, {
510
- footer: k(() => [
511
- s("span", wt, [
512
- f(V, {
513
- onClick: e[3] || (e[3] = (c) => Y.value = !1)
491
+ footer: h(() => [
492
+ s("span", gt, [
493
+ m(L, {
494
+ onClick: e[3] || (e[3] = (r) => Y.value = !1)
514
495
  }, {
515
- default: k(() => [
516
- K("取消")
496
+ default: h(() => [
497
+ U("取消")
517
498
  ]),
518
499
  _: 1
519
500
  }),
520
- f(V, {
501
+ m(L, {
521
502
  type: "primary",
522
- onClick: e[4] || (e[4] = (c) => F("unsatisfied", W.value))
503
+ onClick: e[4] || (e[4] = (r) => F("unsatisfied", q.value))
523
504
  }, {
524
- default: k(() => [
525
- K("提交反馈")
505
+ default: h(() => [
506
+ U("提交反馈")
526
507
  ]),
527
508
  _: 1
528
509
  })
529
510
  ])
530
511
  ]),
531
- default: k(() => [
532
- s("div", yt, [
533
- bt,
534
- Tt,
535
- f(M, {
512
+ default: h(() => [
513
+ s("div", ft, [
514
+ vt,
515
+ _t,
516
+ m(H, {
536
517
  modelValue: A.value,
537
- "onUpdate:modelValue": e[2] || (e[2] = (c) => A.value = c),
518
+ "onUpdate:modelValue": e[2] || (e[2] = (r) => A.value = r),
538
519
  type: "textarea",
539
520
  rows: 4,
540
521
  placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
@@ -546,11 +527,11 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
546
527
  ], 64);
547
528
  };
548
529
  }
549
- }, Ct = /* @__PURE__ */ Le(St, [["__scopeId", "data-v-3015ca89"]]), Qt = {
550
- install(p) {
551
- p.component("st-varietyAiHelper", Ct);
530
+ }, kt = /* @__PURE__ */ Ye(ht, [["__scopeId", "data-v-b6460ca4"]]), Jt = {
531
+ install(d) {
532
+ d.component("st-varietyAiHelper", kt);
552
533
  }
553
534
  };
554
535
  export {
555
- Qt as default
536
+ Jt as default
556
537
  };