st-comp 0.0.266 → 0.0.267

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";
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 U, openBlock as l, createElementBlock as u, normalizeClass as ae, unref as _, normalizeStyle as Q, createBlock as $, withCtx as g, resolveDynamicComponent as he, renderSlot as ke, inject as be, reactive as ye, nextTick as R, Fragment as H, createVNode as m, createElementVNode as s, renderList as X, toDisplayString as J, createCommentVNode as w, createTextVNode as K, pushScopeId as Te, popScopeId as we } from "vue";
7
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";
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 I } 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: O }) {
60
+ const M = d, k = ue("avatar"), C = v(!1), P = x(() => {
61
+ const { size: i, icon: p, shape: S } = M, b = [k.b()];
62
+ return de(i) && b.push(k.m(i)), p && b.push(k.m("icon")), S && b.push(k.m(S)), b;
63
+ }), z = x(() => {
64
+ const { size: i } = M;
65
+ return te(i) ? k.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
+ U(() => M.src, () => C.value = !1);
72
+ function y(i) {
73
+ C.value = !0, O("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(_(P)),
77
+ style: Q(_(z))
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: g(() => [
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 h = (d) => (Te("data-v-c6a98338"), d = d(), we(), d), Ie = { class: "ai-dialog-body" }, $e = { class: "avatar" }, Oe = { 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
+ }, Ke = { class: "node-status-icon" }, Ue = /* @__PURE__ */ h(() => /* @__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__ */ h(() => /* @__PURE__ */ s("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), Xe = { class: "feedback-buttons" }, Ze = ["onClick"], et = /* @__PURE__ */ h(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👍", -1)), tt = /* @__PURE__ */ h(() => /* @__PURE__ */ s("span", { class: "btn-text" }, "满意", -1)), st = [
107
+ et,
108
+ tt
109
+ ], at = ["onClick"], nt = /* @__PURE__ */ h(() => /* @__PURE__ */ s("span", { class: "btn-emoji" }, "👎", -1)), ot = /* @__PURE__ */ h(() => /* @__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__ */ h(() => /* @__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__ */ h(() => /* @__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__ */ h(() => /* @__PURE__ */ s("div", { class: "feedback-emoji" }, "😟", -1)), _t = /* @__PURE__ */ h(() => /* @__PURE__ */ s("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), gt = { class: "dialog-footer" }, ht = {
127
127
  __name: "index",
128
128
  props: {
129
129
  defaultMessage: {
@@ -135,11 +135,11 @@ 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: O, emit: M }) {
139
+ const k = be("stConfig"), C = ye(Ce()), P = v(!1), z = 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,
@@ -147,37 +147,37 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
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), N = 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];
180
- await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
179
+ const t = o.value[e];
180
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
181
181
  userName: C.username,
182
182
  userContent: t.userContent,
183
183
  aiContent: t.content,
@@ -187,19 +187,19 @@ 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
+ }), I.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];
199
- await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
198
+ const t = o.value[e];
199
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
200
200
  userName: C.username,
201
201
  userContent: t.userContent,
202
- userSuggestion: A.value,
202
+ userSuggestion: N.value,
203
203
  aiContent: t.content,
204
204
  type: 2,
205
205
  resTime: t.resTime,
@@ -207,15 +207,15 @@ 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
+ }), I.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, o.value[e].hasFeedback = !0;
211
211
  break;
212
212
  }
213
213
  case "default": {
214
- const t = n.value[e];
215
- await g.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
214
+ const t = o.value[e];
215
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
216
216
  userName: C.username,
217
217
  userContent: t.userContent,
218
- userSuggestion: A.value,
218
+ userSuggestion: N.value,
219
219
  aiContent: t.content,
220
220
  type: null,
221
221
  resTime: t.resTime,
@@ -226,146 +226,126 @@ 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 I.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,
237
+ content: n,
238
238
  createTime: L().format("YYYY-MM-DD HH:mm:ss")
239
- }), E.value = "", await w(), n.value.push({
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
245
  createTime: L().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({
251
+ await Ee({
252
+ mode: "build:split",
252
253
  appId: "1977602b357e4dab9d0b74899d5323b3",
253
254
  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({
255
+ token: Se(),
256
+ value: n,
257
+ callback: (V, r) => {
258
+ if (V === "error") {
259
+ i.value = !1, y.value = !1, o.value.pop(), o.value.push({
259
260
  role: "assistant",
260
- userContent: a,
261
- content: `❌ ${c}`,
261
+ userContent: n,
262
+ content: `❌ ${r}`,
262
263
  showFeedback: !1,
263
264
  hasFeedback: !1,
264
265
  createTime: L().format("YYYY-MM-DD HH:mm:ss"),
265
266
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
266
267
  firstPackageTime: 0
267
- }), F("default", n.value.length - 1), w();
268
+ }), F("default", o.value.length - 1), T();
268
269
  return;
269
270
  }
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);
271
+ if (V === "node") {
272
+ if (!f) {
273
+ f = !0;
274
+ const c = o.value[o.value.length - 1];
275
+ c && c.role === "assistant" && c.firstPackageTime === 0 && (c.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - t);
275
276
  }
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();
277
+ const a = p.value.find((c) => c.name === r.name);
278
+ a ? a.status = r.status : p.value.push({ name: r.name, status: r.status }), T();
278
279
  return;
279
280
  }
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());
281
+ if (V === "message") {
282
+ e = r;
283
+ const a = o.value[o.value.length - 1];
284
+ a && a.role === "assistant" && (a.content = e, T());
284
285
  }
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));
286
+ if (V === "finish") {
287
+ i.value = !1, y.value = !1, S.value = !0;
288
+ const a = o.value[o.value.length - 1];
289
+ a && a.role === "assistant" && (a.showFeedback = !0, a.resTime = (/* @__PURE__ */ new Date()).getTime() - t, F("default", o.value.length - 1));
289
290
  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);
291
+ const c = JSON.parse(e);
292
+ c.parsedConditions && delete c.parsedConditions, z("callBack", c);
299
293
  } catch {
300
294
  z("callBack", e);
301
295
  }
302
296
  }
303
297
  }
304
298
  });
305
- } catch (M) {
306
- $.error(`AI响应异常: ${M}`), n.value.pop(), n.value.push({
299
+ } catch (A) {
300
+ I.error(`AI响应异常: ${A}`), o.value.pop(), o.value.push({
307
301
  role: "assistant",
308
- userContent: a,
302
+ userContent: n,
309
303
  content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
310
304
  showFeedback: !0,
311
305
  hasFeedback: !1,
312
306
  createTime: L().format("YYYY-MM-DD HH:mm:ss"),
313
307
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
314
308
  firstPackageTime: 0
315
- }), F("default", n.value.length - 1), await w(), o.value = !1, T.value = !1;
309
+ }), F("default", o.value.length - 1), await T(), y.value = !1, i.value = !1;
316
310
  }
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;
311
+ }, le = (n) => {
312
+ if (n.key === "Enter")
313
+ if (n.ctrlKey) {
314
+ n.preventDefault();
315
+ const e = n.target, t = e.selectionStart, f = e.selectionEnd;
322
316
  E.value = E.value.substring(0, t) + `
323
- ` + E.value.substring(m), q(() => {
317
+ ` + E.value.substring(f), R(() => {
324
318
  e.selectionStart = e.selectionEnd = t + 1;
325
319
  });
326
320
  } 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
- }, {});
321
+ n.preventDefault(), G();
322
+ }, T = async () => {
323
+ await R(), b.value && (b.value.scrollTop = b.value.scrollHeight);
342
324
  };
343
- return Ve(() => {
344
- de();
345
- }), U(
346
- () => n.value,
325
+ return U(
326
+ () => o.value,
347
327
  () => {
348
- w();
328
+ T();
349
329
  },
350
330
  { deep: !0 }
351
331
  ), U(
352
332
  () => Y.value,
353
- (a) => {
354
- a || (A.value = "");
333
+ (n) => {
334
+ n || (N.value = "");
355
335
  }
356
- ), j({
336
+ ), O({
357
337
  open: () => {
358
- H.value = !0, q(() => {
359
- w();
338
+ P.value = !0, R(() => {
339
+ T();
360
340
  });
361
341
  }
362
- }), (a, e) => {
363
- const t = Re, m = le, M = we, V = Te, N = be;
364
- return r(), d(P, null, [
365
- f(N, {
342
+ }), (n, e) => {
343
+ const t = Be, f = ne, A = ge, B = _e, V = ve;
344
+ return l(), u(H, null, [
345
+ m(V, {
366
346
  class: "ai-dialog",
367
- modelValue: H.value,
368
- "onUpdate:modelValue": e[1] || (e[1] = (c) => H.value = c),
347
+ modelValue: P.value,
348
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => P.value = r),
369
349
  title: "✨ 品种池参数解析AI助手",
370
350
  width: "500px",
371
351
  center: "",
@@ -374,122 +354,122 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
374
354
  modal: !1,
375
355
  "modal-penetrable": !0
376
356
  }, {
377
- default: k(() => {
378
- var c;
357
+ default: g(() => {
358
+ var r;
379
359
  return [
380
- s("div", qe, [
360
+ s("div", Ie, [
381
361
  s("div", {
382
362
  ref_key: "messageListRef",
383
- ref: I,
363
+ ref: b,
384
364
  class: "message-list"
385
365
  }, [
386
- (r(!0), d(P, null, te(n.value, (l, u) => (r(), d("div", {
387
- key: u,
388
- class: ie([l.role, "message-item"])
366
+ (l(!0), u(H, null, X(o.value, (a, c) => (l(), u("div", {
367
+ key: c,
368
+ class: ae([a.role, "message-item"])
389
369
  }, [
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, {
370
+ a.content || c === o.value.length - 1 && a.role === "assistant" && p.value.length > 0 ? (l(), u(H, { key: 0 }, [
371
+ s("div", $e, [
372
+ m(t, {
393
373
  size: 32,
394
- icon: l.role === "user" ? h(Pe) : h(se)
374
+ icon: a.role === "user" ? _(Ve) : _(Z)
395
375
  }, null, 8, ["icon"])
396
376
  ]),
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,
377
+ s("div", Oe, [
378
+ c === o.value.length - 1 && a.role === "assistant" && p.value.length > 0 && !S.value ? (l(), u("div", je, [
379
+ (l(!0), u(H, null, X(p.value, (D) => (l(), u("div", {
380
+ key: D.name,
401
381
  class: "node-progress-item"
402
382
  }, [
403
- s("span", We, [
404
- i.status === "success" ? (r(), O(m, {
383
+ s("span", xe, [
384
+ D.status === "success" ? (l(), $(f, {
405
385
  key: 0,
406
386
  class: "node-icon done"
407
387
  }, {
408
- default: k(() => [
409
- f(h(He))
388
+ default: g(() => [
389
+ m(_(De))
410
390
  ]),
411
391
  _: 1
412
- })) : (r(), O(m, {
392
+ })) : (l(), $(f, {
413
393
  key: 1,
414
394
  class: "node-icon running"
415
395
  }, {
416
- default: k(() => [
417
- f(h(ae))
396
+ default: g(() => [
397
+ m(_(ee))
418
398
  ]),
419
399
  _: 1
420
400
  }))
421
401
  ]),
422
- s("span", Ge, J(i.name), 1)
402
+ s("span", Re, J(D.name), 1)
423
403
  ]))), 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))
404
+ p.value.length > 0 && p.value.every((D) => D.status === "success") && !S.value ? (l(), u("div", Je, [
405
+ s("span", Ke, [
406
+ m(f, { class: "node-icon waiting" }, {
407
+ default: g(() => [
408
+ m(_(ee))
429
409
  ]),
430
410
  _: 1
431
411
  })
432
412
  ]),
433
- Ze
434
- ])) : S("", !0)
435
- ])) : S("", !0),
436
- G(l.content) ? (r(), d("div", {
413
+ Ue
414
+ ])) : w("", !0)
415
+ ])) : w("", !0),
416
+ W(a.content) ? (l(), u("div", {
437
417
  key: 1,
438
418
  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, [
419
+ innerHTML: ie(oe(a.content))
420
+ }, null, 8, qe)) : a.content ? (l(), u("div", We, J(a.content), 1)) : w("", !0),
421
+ s("div", Ge, J(a.createTime), 1),
422
+ a.role === "assistant" ? (l(), u(H, { key: 3 }, [
423
+ a.showFeedback && !a.hasFeedback ? (l(), u(H, { key: 0 }, [
424
+ Qe,
425
+ s("div", Xe, [
446
426
  s("button", {
447
427
  class: "feedback-btn satisfied-btn",
448
- onClick: (i) => F("satisfied", u)
449
- }, rt, 8, ot),
428
+ onClick: (D) => F("satisfied", c)
429
+ }, st, 8, Ze),
450
430
  s("button", {
451
431
  class: "feedback-btn unsatisfied-btn",
452
- onClick: (i) => F("open", u)
453
- }, mt, 8, ct)
432
+ onClick: (D) => F("open", c)
433
+ }, it, 8, at)
454
434
  ])
455
- ], 64)) : S("", !0),
456
- l.showFeedback && l.hasFeedback ? (r(), d("div", pt, "感谢您进行的评价反馈")) : S("", !0)
457
- ], 64)) : S("", !0)
435
+ ], 64)) : w("", !0),
436
+ a.showFeedback && a.hasFeedback ? (l(), u("div", lt, "感谢您进行的评价反馈")) : w("", !0)
437
+ ], 64)) : w("", !0)
458
438
  ])
459
- ], 64)) : S("", !0)
439
+ ], 64)) : w("", !0)
460
440
  ], 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, {
441
+ i.value && p.value.length === 0 && !((r = o.value[o.value.length - 1]) != null && r.content) ? (l(), u("div", rt, [
442
+ s("div", ct, [
443
+ m(t, {
464
444
  size: 32,
465
- icon: h(se)
445
+ icon: _(Z)
466
446
  }, null, 8, ["icon"])
467
447
  ]),
468
- _t
469
- ])) : S("", !0)
448
+ ut
449
+ ])) : w("", !0)
470
450
  ], 512),
471
- s("div", gt, [
472
- f(M, {
451
+ s("div", dt, [
452
+ m(A, {
473
453
  class: "message-input",
474
454
  modelValue: E.value,
475
- "onUpdate:modelValue": e[0] || (e[0] = (l) => E.value = l),
455
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => E.value = a),
476
456
  type: "textarea",
477
457
  rows: 4,
478
458
  autosize: { minRows: 2, maxRows: 4 },
479
459
  placeholder: "输入您想查询的品种条件...",
480
- onKeydown: ue
460
+ onKeydown: le
481
461
  }, null, 8, ["modelValue"]),
482
- s("div", ht, [
483
- kt,
484
- f(V, {
462
+ s("div", mt, [
463
+ pt,
464
+ m(B, {
485
465
  class: "send-btn",
486
466
  type: "primary",
487
- icon: h(Ae),
488
- loading: o.value,
489
- onClick: Q,
467
+ icon: _(Me),
468
+ loading: y.value,
469
+ onClick: G,
490
470
  round: ""
491
471
  }, {
492
- default: k(() => [
472
+ default: g(() => [
493
473
  K(" 发送 ")
494
474
  ]),
495
475
  _: 1
@@ -501,40 +481,40 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
501
481
  }),
502
482
  _: 1
503
483
  }, 8, ["modelValue"]),
504
- f(N, {
484
+ m(V, {
505
485
  modelValue: Y.value,
506
- "onUpdate:modelValue": e[5] || (e[5] = (c) => Y.value = c),
486
+ "onUpdate:modelValue": e[5] || (e[5] = (r) => Y.value = r),
507
487
  title: "📝 反馈意见",
508
488
  width: "400px"
509
489
  }, {
510
- footer: k(() => [
511
- s("span", wt, [
512
- f(V, {
513
- onClick: e[3] || (e[3] = (c) => Y.value = !1)
490
+ footer: g(() => [
491
+ s("span", gt, [
492
+ m(B, {
493
+ onClick: e[3] || (e[3] = (r) => Y.value = !1)
514
494
  }, {
515
- default: k(() => [
495
+ default: g(() => [
516
496
  K("取消")
517
497
  ]),
518
498
  _: 1
519
499
  }),
520
- f(V, {
500
+ m(B, {
521
501
  type: "primary",
522
- onClick: e[4] || (e[4] = (c) => F("unsatisfied", W.value))
502
+ onClick: e[4] || (e[4] = (r) => F("unsatisfied", q.value))
523
503
  }, {
524
- default: k(() => [
504
+ default: g(() => [
525
505
  K("提交反馈")
526
506
  ]),
527
507
  _: 1
528
508
  })
529
509
  ])
530
510
  ]),
531
- default: k(() => [
532
- s("div", yt, [
533
- bt,
534
- Tt,
535
- f(M, {
536
- modelValue: A.value,
537
- "onUpdate:modelValue": e[2] || (e[2] = (c) => A.value = c),
511
+ default: g(() => [
512
+ s("div", ft, [
513
+ vt,
514
+ _t,
515
+ m(A, {
516
+ modelValue: N.value,
517
+ "onUpdate:modelValue": e[2] || (e[2] = (r) => N.value = r),
538
518
  type: "textarea",
539
519
  rows: 4,
540
520
  placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
@@ -546,11 +526,11 @@ const y = (p) => (Ne("data-v-3015ca89"), p = p(), De(), p), qe = { class: "ai-di
546
526
  ], 64);
547
527
  };
548
528
  }
549
- }, Ct = /* @__PURE__ */ Le(St, [["__scopeId", "data-v-3015ca89"]]), Qt = {
550
- install(p) {
551
- p.component("st-varietyAiHelper", Ct);
529
+ }, kt = /* @__PURE__ */ Ye(ht, [["__scopeId", "data-v-c6a98338"]]), Jt = {
530
+ install(d) {
531
+ d.component("st-varietyAiHelper", kt);
552
532
  }
553
533
  };
554
534
  export {
555
- Qt as default
535
+ Jt as default
556
536
  };