st-comp 0.0.263 → 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.
Files changed (125) hide show
  1. package/es/CustomFunction.cjs +1 -1
  2. package/es/CustomFunction.js +22 -22
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +26 -26
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +11 -11
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +19 -19
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +16 -16
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +10 -10
  13. package/es/KlinePlus.cjs +1 -1
  14. package/es/KlinePlus.js +12 -12
  15. package/es/MonacoEditor.cjs +1 -1
  16. package/es/MonacoEditor.js +18 -18
  17. package/es/Pagination.cjs +1 -1
  18. package/es/Pagination.js +14 -14
  19. package/es/PasswordPrompt.cjs +1 -1
  20. package/es/PasswordPrompt.js +2 -2
  21. package/es/Table.cjs +1 -1
  22. package/es/Table.js +18 -18
  23. package/es/User.cjs +1 -1
  24. package/es/User.js +19 -19
  25. package/es/VarSelectDialog.cjs +1 -1
  26. package/es/VarSelectDialog.js +19 -19
  27. package/es/VarietyAiHelper.cjs +3 -3
  28. package/es/VarietyAiHelper.js +301 -280
  29. package/es/VarietyAutoComplete.cjs +1 -1
  30. package/es/VarietyAutoComplete.js +8 -8
  31. package/es/VarietySearch.cjs +1 -1
  32. package/es/VarietySearch.js +31 -31
  33. package/es/{VarietySelect-9f267958.js → VarietySelect-1ac10ec2.js} +3 -3
  34. package/es/{VarietySelect-5c845562.cjs → VarietySelect-639a8d9a.cjs} +1 -1
  35. package/es/VarietyTextCopy.cjs +1 -1
  36. package/es/VarietyTextCopy.js +10 -10
  37. package/es/VirtualTable.cjs +1 -1
  38. package/es/VirtualTable.js +66 -66
  39. package/es/{_initCloneObject-69c8ae23.js → _initCloneObject-6b8c230e.js} +2 -2
  40. package/es/{_initCloneObject-2b82e9f7.cjs → _initCloneObject-9eddcb0c.cjs} +1 -1
  41. package/es/aiTools-822859d6.cjs +4 -0
  42. package/es/aiTools-9a9c997f.js +149 -0
  43. package/es/aiTools.js +92 -1
  44. package/es/{config-provider-7860903c.js → config-provider-56193d47.js} +3 -3
  45. package/es/{config-provider-2ae47cc8.cjs → config-provider-ea286661.cjs} +1 -1
  46. package/es/{dropdown-497442b7.js → dropdown-4e541d60.js} +3 -3
  47. package/es/{dropdown-eba9eaf5.cjs → dropdown-f30148cc.cjs} +1 -1
  48. package/es/{el-autocomplete-b59eb529.cjs → el-autocomplete-3949e68c.cjs} +1 -1
  49. package/es/{el-autocomplete-27c60cc8.js → el-autocomplete-4b521c83.js} +6 -6
  50. package/es/{el-button-e2c63c08.js → el-button-4f201000.js} +3 -3
  51. package/es/{el-button-974ff9e9.cjs → el-button-dd065de0.cjs} +1 -1
  52. package/es/{el-checkbox-08185353.cjs → el-checkbox-02ce40f0.cjs} +1 -1
  53. package/es/{el-checkbox-71ebd862.js → el-checkbox-33cb73db.js} +3 -3
  54. package/es/{el-dialog-eedcfd3e.js → el-dialog-1939f7c5.js} +4 -4
  55. package/es/{el-dialog-1b185570.cjs → el-dialog-6501a151.cjs} +1 -1
  56. package/es/{el-form-item-c997b4fa.cjs → el-form-item-316b35d8.cjs} +1 -1
  57. package/es/{el-form-item-bdcfd297.js → el-form-item-ea11211d.js} +5 -5
  58. package/es/{el-input-fa18ef84.cjs → el-input-094afbe2.cjs} +1 -1
  59. package/es/{el-input-d47281da.js → el-input-58786d42.js} +32 -32
  60. package/es/{el-input-number-3d94fa58.cjs → el-input-number-a609a5e3.cjs} +1 -1
  61. package/es/{el-input-number-c8018cb1.js → el-input-number-a7971697.js} +14 -14
  62. package/es/{el-loading-969a79ca.cjs → el-loading-d171ce64.cjs} +1 -1
  63. package/es/{el-loading-0cd81d05.js → el-loading-f3815921.js} +1 -1
  64. package/es/{el-menu-item-26071fd6.cjs → el-menu-item-3d1e0aff.cjs} +1 -1
  65. package/es/{el-menu-item-dac65bb3.js → el-menu-item-a166b997.js} +5 -5
  66. package/es/{el-message-box-31e0aa98.cjs → el-message-box-b8ffcf34.cjs} +1 -1
  67. package/es/{el-message-box-fea4fca8.js → el-message-box-f2b667e9.js} +9 -9
  68. package/es/{el-overlay-1ee0338d.js → el-overlay-1dfe3675.js} +3 -3
  69. package/es/{el-overlay-ea65cb05.cjs → el-overlay-a94f8a98.cjs} +1 -1
  70. package/es/{el-popconfirm-9e232436.cjs → el-popconfirm-70e2849c.cjs} +1 -1
  71. package/es/{el-popconfirm-089b8bec.js → el-popconfirm-ca31ceea.js} +5 -5
  72. package/es/{el-popper-2d3914e4.cjs → el-popper-ce575c12.cjs} +1 -1
  73. package/es/{el-popper-c9b3d3cf.js → el-popper-db6c599f.js} +2 -2
  74. package/es/{el-segmented-140ac042.cjs → el-segmented-4d50b63f.cjs} +1 -1
  75. package/es/{el-segmented-9d3a9e11.js → el-segmented-741f2252.js} +2 -2
  76. package/es/{el-select-e51e11c1.js → el-select-086bcb6c.js} +9 -9
  77. package/es/{el-select-a11f33e8.cjs → el-select-2ebc8380.cjs} +1 -1
  78. package/es/{el-table-column-98570a4d.cjs → el-table-column-2f07fbdb.cjs} +1 -1
  79. package/es/{el-table-column-05d292a8.js → el-table-column-8a15378a.js} +10 -10
  80. package/es/{el-tag-17cd04a1.js → el-tag-65a99986.js} +2 -2
  81. package/es/{el-tag-6d8e653e.cjs → el-tag-f48b1190.cjs} +1 -1
  82. package/es/{el-text-a18106cb.cjs → el-text-33359f44.cjs} +1 -1
  83. package/es/{el-text-2710fff3.js → el-text-cbb693f2.js} +1 -1
  84. package/es/{index-f30561d3.js → index-072c4a65.js} +5 -5
  85. package/es/{index-299ee017.cjs → index-0f767104.cjs} +1 -1
  86. package/es/{index-eb99b188.cjs → index-18565979.cjs} +1 -1
  87. package/es/{index-0f79095c.js → index-1955f23d.js} +1 -1
  88. package/es/{index-0ee486ad.js → index-1e91e986.js} +1 -1
  89. package/es/{index-6ca95c8a.cjs → index-21e8d2bc.cjs} +1 -1
  90. package/es/{index-33f80550.cjs → index-3792552a.cjs} +1 -1
  91. package/es/{index-7dce9f59.cjs → index-4f900527.cjs} +1 -1
  92. package/es/{index-1d9b50de.js → index-57d82da0.js} +2 -2
  93. package/es/{index-e8eeea22.cjs → index-5b546f7d.cjs} +1 -1
  94. package/es/{index-c71e37dc.js → index-7db02db7.js} +2 -2
  95. package/es/{index-37b8d3c6.cjs → index-7eb88616.cjs} +1 -1
  96. package/es/{index-6b99def3.cjs → index-8439d2f9.cjs} +1 -1
  97. package/es/{index-40f05e2c.cjs → index-8b055879.cjs} +2 -2
  98. package/es/{index-b0117ba2.js → index-a4e252a0.js} +1 -1
  99. package/es/{index-95e5d454.js → index-b51915a2.js} +2 -2
  100. package/es/{index-28e03bad.cjs → index-bf98dd03.cjs} +1 -1
  101. package/es/{index-c2b9bbfd.js → index-ca91ac68.js} +82 -67
  102. package/es/{index-8a54ceeb.js → index-d857270a.js} +9 -9
  103. package/es/{index-bcd895a0.js → index-ff26b1a6.js} +2 -2
  104. package/es/{python-02c3937a.cjs → python-5b5c9c58.cjs} +1 -1
  105. package/es/{python-99011a53.js → python-ad9239f9.js} +18 -18
  106. package/es/style.css +1 -1
  107. package/es/{use-form-common-props-d3ed62c6.cjs → use-form-common-props-00ec25ac.cjs} +1 -1
  108. package/es/{use-form-common-props-cb0ca65c.js → use-form-common-props-c14990b9.js} +29 -29
  109. package/es/{use-global-config-c80f33a4.cjs → use-global-config-28efb416.cjs} +1 -1
  110. package/es/{use-global-config-cdaeca54.js → use-global-config-a01b5ce1.js} +2 -2
  111. package/es/{validator-07160325.cjs → validator-119fdaf4.cjs} +1 -1
  112. package/es/{validator-4ab9774f.js → validator-65de1caf.js} +1 -1
  113. package/es/{zh-cn-6a0f844c.cjs → zh-cn-9fb29a39.cjs} +1 -1
  114. package/es/{zh-cn-8a6390a4.js → zh-cn-c1c28e70.js} +1 -1
  115. package/lib/aiTools.js +92 -1
  116. package/lib/bundle.js +1 -1
  117. package/lib/bundle.umd.cjs +202 -201
  118. package/lib/{index-0969ca9d.js → index-7279dacd.js} +16066 -15973
  119. package/lib/{python-506107bf.js → python-60bc2922.js} +1 -1
  120. package/lib/style.css +1 -1
  121. package/package.json +1 -1
  122. package/packages/VarietyAiHelper/index.vue +252 -135
  123. package/public/aiTools.js +92 -1
  124. package/es/aiTools-2e1f92d2.cjs +0 -3
  125. package/es/aiTools-faa0a14d.js +0 -90
@@ -1,34 +1,34 @@
1
- import { b as le, p as Z, 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-eedcfd3e.js";
3
- import "./el-overlay-1ee0338d.js";
4
- import { E as ge } from "./el-button-e2c63c08.js";
5
- import { E as _e } from "./el-input-d47281da.js";
6
- import { defineComponent as ee, ref as f, computed as $, watch as x, openBlock as c, createElementBlock as m, normalizeClass as te, unref as b, normalizeStyle as G, createBlock as Q, withCtx as S, resolveDynamicComponent as he, renderSlot as ke, inject as be, reactive as ye, onMounted as Te, nextTick as O, Fragment as F, createVNode as _, createElementVNode as o, renderList as we, toDisplayString as W, createCommentVNode as H, createTextVNode as j, pushScopeId as Ce, popScopeId as Se } from "vue";
7
- import { d as P } from "./dayjs.min-8313b006.js";
8
- import { V as Ee } from "./index-7ed0999e.js";
9
- import { s as Ve } from "./aiTools-faa0a14d.js";
10
- import { E as Me, u as De, s as X, p as Ne } from "./index-c2b9bbfd.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
+ import "./el-overlay-1dfe3675.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 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
+ import { d as L } 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
11
  import { _ as Ye } from "./_plugin-vue_export-helper-dad06003.js";
12
- import { E as B } from "./index-f30561d3.js";
13
- import { k as Fe, i as He } from "./use-form-common-props-cb0ca65c.js";
14
- import "./index-0f79095c.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
+ import "./index-1955f23d.js";
15
15
  import "./index-8391a3df.js";
16
16
  import "./index-de24705f.js";
17
17
  import "./index-2e331d74.js";
18
18
  import "./vnode-a83e6de8.js";
19
19
  import "./scroll-6799bafc.js";
20
- import "./use-global-config-cdaeca54.js";
21
- import "./index-0ee486ad.js";
20
+ import "./use-global-config-a01b5ce1.js";
21
+ import "./index-1e91e986.js";
22
22
  import "./index-657047bb.js";
23
23
  import "./typescript-7ae59c4c.js";
24
- import "./index-c71e37dc.js";
25
- import "./config-provider-7860903c.js";
26
- const Pe = le({
24
+ import "./index-7db02db7.js";
25
+ import "./config-provider-56193d47.js";
26
+ const Pe = re({
27
27
  size: {
28
28
  type: [Number, String],
29
29
  values: Fe,
30
30
  default: "",
31
- validator: (u) => Z(u)
31
+ validator: (d) => te(d)
32
32
  },
33
33
  shape: {
34
34
  type: String,
@@ -48,76 +48,82 @@ const Pe = le({
48
48
  type: ce(String),
49
49
  default: "cover"
50
50
  }
51
- }), Ae = {
52
- error: (u) => u instanceof Event
53
- }, ze = ee({
51
+ }), Ne = {
52
+ error: (d) => d instanceof Event
53
+ }, Ae = se({
54
54
  name: "ElAvatar"
55
- }), Be = /* @__PURE__ */ ee({
56
- ...ze,
55
+ }), Le = /* @__PURE__ */ se({
56
+ ...Ae,
57
57
  props: Pe,
58
- emits: Ae,
59
- setup(u, { emit: L }) {
60
- const E = u, p = ue("avatar"), y = f(!1), N = $(() => {
61
- const { size: n, icon: k, shape: T } = E, a = [p.b()];
62
- return de(n) && a.push(p.m(n)), k && a.push(p.m("icon")), T && a.push(p.m(T)), a;
63
- }), A = $(() => {
64
- const { size: n } = E;
65
- return Z(n) ? p.cssVarBlock({
66
- size: me(n) || ""
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
- }), I = $(() => ({
69
- objectFit: E.fit
68
+ }), j = x(() => ({
69
+ objectFit: M.fit
70
70
  }));
71
- x(() => E.src, () => y.value = !1);
72
- function z(n) {
73
- y.value = !0, L("error", n);
71
+ U(() => M.src, () => C.value = !1);
72
+ function y(i) {
73
+ C.value = !0, O("error", i);
74
74
  }
75
- return (n, k) => (c(), m("span", {
76
- class: te(b(N)),
77
- style: G(b(A))
75
+ return (i, p) => (l(), u("span", {
76
+ class: ae(_(P)),
77
+ style: Q(_(z))
78
78
  }, [
79
- (n.src || n.srcSet) && !y.value ? (c(), m("img", {
79
+ (i.src || i.srcSet) && !C.value ? (l(), u("img", {
80
80
  key: 0,
81
- src: n.src,
82
- alt: n.alt,
83
- srcset: n.srcSet,
84
- style: G(b(I)),
85
- onError: z
86
- }, null, 44, ["src", "alt", "srcset"])) : n.icon ? (c(), Q(b(Me), { key: 1 }, {
87
- default: S(() => [
88
- (c(), Q(he(n.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
- })) : ke(n.$slots, "default", { key: 2 })
91
+ })) : ke(i.$slots, "default", { key: 2 })
92
92
  ], 6));
93
93
  }
94
94
  });
95
- var Le = /* @__PURE__ */ pe(Be, [["__file", "avatar.vue"]]);
96
- const Ie = fe(Le);
97
- const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-dialog-body" }, Oe = { class: "avatar" }, je = { class: "message-content" }, xe = ["innerHTML"], qe = {
98
- key: 1,
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
+ key: 0,
99
+ class: "node-progress"
100
+ }, xe = { class: "node-status-icon" }, Re = { class: "node-name" }, Je = {
101
+ key: 0,
102
+ class: "node-progress-item next-step"
103
+ }, Ke = { class: "node-status-icon" }, Ue = /* @__PURE__ */ h(() => /* @__PURE__ */ s("span", { class: "node-name" }, "正在执行下一步...", -1)), qe = ["innerHTML"], We = {
104
+ key: 2,
99
105
  class: "message-text"
100
- }, Je = { class: "message-createTime" }, Ke = /* @__PURE__ */ h(() => /* @__PURE__ */ o("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), Re = { class: "feedback-buttons" }, Ue = ["onClick"], Ge = /* @__PURE__ */ h(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👍", -1)), Qe = /* @__PURE__ */ h(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "满意", -1)), We = [
101
- Ge,
102
- Qe
103
- ], Xe = ["onClick"], Ze = /* @__PURE__ */ h(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👎", -1)), et = /* @__PURE__ */ h(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "不满意", -1)), tt = [
104
- Ze,
105
- et
106
- ], st = {
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 = {
107
113
  key: 1,
108
114
  class: "message-createTime"
109
- }, at = {
115
+ }, rt = {
110
116
  key: 0,
111
117
  class: "message-item assistant"
112
- }, ot = { class: "avatar" }, nt = /* @__PURE__ */ h(() => /* @__PURE__ */ o("div", { class: "message-content" }, [
113
- /* @__PURE__ */ o("div", { class: "typing-indicator" }, [
114
- /* @__PURE__ */ o("span"),
115
- /* @__PURE__ */ o("span"),
116
- /* @__PURE__ */ o("span")
118
+ }, ct = { class: "avatar" }, ut = /* @__PURE__ */ h(() => /* @__PURE__ */ s("div", { class: "message-content" }, [
119
+ /* @__PURE__ */ s("div", { class: "typing-indicator" }, [
120
+ /* @__PURE__ */ s("span"),
121
+ /* @__PURE__ */ s("span"),
122
+ /* @__PURE__ */ s("span")
117
123
  ])
118
- ], -1)), it = { class: "input-area" }, rt = { class: "input-actions" }, lt = /* @__PURE__ */ h(() => /* @__PURE__ */ o("div", { class: "input-hint" }, [
119
- /* @__PURE__ */ o("span", null, "Enter 发送 | Ctrl + Enter 换行")
120
- ], -1)), ct = { class: "feedback-dialog-content" }, ut = /* @__PURE__ */ h(() => /* @__PURE__ */ o("div", { class: "feedback-emoji" }, "😟", -1)), dt = /* @__PURE__ */ h(() => /* @__PURE__ */ o("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), mt = { class: "dialog-footer" }, pt = {
124
+ ], -1)), dt = { class: "input-area" }, mt = { class: "input-actions" }, pt = /* @__PURE__ */ h(() => /* @__PURE__ */ s("div", { class: "input-hint" }, [
125
+ /* @__PURE__ */ s("span", null, "Enter 发送 | Ctrl + Enter 换行")
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 = {
121
127
  __name: "index",
122
128
  props: {
123
129
  defaultMessage: {
@@ -129,58 +135,50 @@ const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-di
129
135
  }
130
136
  },
131
137
  emits: ["callBack"],
132
- setup(u, { expose: L, emit: E }) {
133
- const p = be("stConfig"), y = ye(Ee()), N = f(!1), A = E, I = u, z = f(), n = f(!1), k = f(!1), T = f(null), a = f([
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([
134
140
  {
135
141
  role: "assistant",
136
- // AI-assistant, 用户-user
137
- content: I.defaultMessage,
142
+ content: j.defaultMessage,
138
143
  userContent: null,
139
144
  showFeedback: !1,
140
- // 是否展示反馈按钮(默认信息不用展示)
141
145
  hasFeedback: !1,
142
- // 是否已进行过反馈
143
- createTime: P().format("YYYY-MM-DD HH:mm:ss"),
144
- // 消息发起时间
146
+ createTime: L().format("YYYY-MM-DD HH:mm:ss"),
145
147
  resTime: 0,
146
- // 响应总耗时
147
148
  firstPackageTime: 0
148
- // 首包响应耗时
149
149
  }
150
- ]), w = f(""), V = f(!1), Y = f(""), q = f({}), J = (s) => {
151
- if (typeof s != "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(s);
154
+ const e = JSON.parse(n);
155
155
  return e !== null && typeof e == "object";
156
156
  } catch {
157
157
  return !1;
158
158
  }
159
- }, se = (s) => {
160
- if (!J(s))
159
+ }, oe = (n) => {
160
+ if (!W(n))
161
161
  return null;
162
162
  try {
163
- const e = JSON.parse(s), { parsedConditions: t, ...i } = e;
164
- return {
165
- parsedConditions: t,
166
- webParams: i
167
- };
163
+ const e = JSON.parse(n), { parsedConditions: t, ...f } = e;
164
+ return { parsedConditions: t, webParams: f };
168
165
  } catch {
169
166
  return null;
170
167
  }
171
- }, ae = (s) => {
168
+ }, ie = (n) => {
172
169
  var t;
173
- if (!s)
170
+ if (!n)
174
171
  return "";
175
172
  let e = "";
176
- return (t = s.parsedConditions) != null && t.length && (e += '<div class="parsed-conditions">', s.parsedConditions.forEach((i) => {
177
- e += `<div class="parsed-conditions-item">${i}</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>`;
178
175
  }), e += "</div>"), e;
179
- }, M = async (s, e) => {
180
- switch (s) {
176
+ }, F = async (n, e) => {
177
+ switch (n) {
181
178
  case "satisfied": {
182
- const t = a.value[e], i = {
183
- userName: y.username,
179
+ const t = o.value[e];
180
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
181
+ userName: C.username,
184
182
  userContent: t.userContent,
185
183
  aiContent: t.content,
186
184
  type: 1,
@@ -188,181 +186,166 @@ const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-di
188
186
  resTime: t.resTime,
189
187
  firstPackageTime: t.firstPackageTime,
190
188
  isSolved: 1,
191
- // 是否解决
192
189
  logOrigin: 1
193
- // 日志来源
194
- };
195
- await p.request.post("/alarm/deliversign/addVarietyAiHelperLog", i), B.success("感谢您的评价!"), a.value[e].hasFeedback = !0;
190
+ }), I.success("感谢您的评价!"), o.value[e].hasFeedback = !0;
196
191
  break;
197
192
  }
198
193
  case "open": {
199
- q.value = e, V.value = !0;
194
+ q.value = e, Y.value = !0;
200
195
  break;
201
196
  }
202
197
  case "unsatisfied": {
203
- const t = a.value[e], i = {
204
- userName: y.username,
198
+ const t = o.value[e];
199
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
200
+ userName: C.username,
205
201
  userContent: t.userContent,
206
- userSuggestion: Y.value,
202
+ userSuggestion: N.value,
207
203
  aiContent: t.content,
208
204
  type: 2,
209
205
  resTime: t.resTime,
210
206
  createTime: t.createTime,
211
207
  firstPackageTime: t.firstPackageTime,
212
208
  isSolved: 0,
213
- // 是否解决
214
209
  logOrigin: 1
215
- // 日志来源
216
- };
217
- await p.request.post("/alarm/deliversign/addVarietyAiHelperLog", i), B.success("感谢您的反馈!我们将持续跟踪并进行优化"), V.value = !1, a.value[e].hasFeedback = !0;
210
+ }), I.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, o.value[e].hasFeedback = !0;
218
211
  break;
219
212
  }
220
213
  case "default": {
221
- const t = a.value[e], i = {
222
- userName: y.username,
214
+ const t = o.value[e];
215
+ await k.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
216
+ userName: C.username,
223
217
  userContent: t.userContent,
224
- userSuggestion: Y.value,
218
+ userSuggestion: N.value,
225
219
  aiContent: t.content,
226
220
  type: null,
227
221
  resTime: t.resTime,
228
222
  createTime: t.createTime,
229
223
  firstPackageTime: t.firstPackageTime,
230
224
  isSolved: 1,
231
- // 是否解决
232
225
  logOrigin: 1
233
- // 日志来源
234
- };
235
- await p.request.post("/alarm/deliversign/addVarietyAiHelperLog", i);
226
+ });
236
227
  }
237
228
  }
238
- }, K = async () => {
239
- const s = w.value.trim();
240
- if (!s)
241
- return B.warning("请输入消息内容");
242
- if (n.value)
229
+ }, G = async () => {
230
+ const n = E.value.trim();
231
+ if (!n)
232
+ return I.warning("请输入消息内容");
233
+ if (y.value)
243
234
  return;
244
- a.value.push({
235
+ p.value = [], S.value = !1, o.value.push({
245
236
  role: "user",
246
- content: s,
247
- createTime: P().format("YYYY-MM-DD HH:mm:ss")
248
- }), w.value = "", await C(), a.value.push({
237
+ content: n,
238
+ createTime: L().format("YYYY-MM-DD HH:mm:ss")
239
+ }), E.value = "", await T(), o.value.push({
249
240
  role: "assistant",
250
241
  content: "",
251
- userContent: s,
242
+ userContent: n,
252
243
  showFeedback: !1,
253
244
  hasFeedback: !1,
254
- createTime: P().format("YYYY-MM-DD HH:mm:ss"),
245
+ createTime: L().format("YYYY-MM-DD HH:mm:ss"),
255
246
  resTime: 0,
256
247
  firstPackageTime: 0
257
- }), await C(), n.value = !0, k.value = !0;
258
- let e = "", t = (/* @__PURE__ */ new Date()).getTime();
248
+ }), await T(), y.value = !0, i.value = !0;
249
+ let e = "", t = (/* @__PURE__ */ new Date()).getTime(), f = !1;
259
250
  try {
260
- await Ve({
261
- appId: "9e54d112acfe4531bd1fc4fee8827fef",
251
+ await Ee({
252
+ mode: "build:split",
253
+ appId: "1977602b357e4dab9d0b74899d5323b3",
262
254
  apiKey: "sk-d995eb26a4334bdeb2ccb4cbfaf51de8",
263
- value: s,
264
- callback: (g, d) => {
265
- var r;
266
- if (g === "error") {
267
- k.value = !1, n.value = !1, a.value.pop(), a.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({
268
260
  role: "assistant",
269
- userContent: s,
270
- content: `❌ ${d}`,
261
+ userContent: n,
262
+ content: `❌ ${r}`,
271
263
  showFeedback: !1,
272
264
  hasFeedback: !1,
273
- createTime: P().format("YYYY-MM-DD HH:mm:ss"),
265
+ createTime: L().format("YYYY-MM-DD HH:mm:ss"),
274
266
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
275
267
  firstPackageTime: 0
276
- }), M("default", a.value.length - 1), C();
268
+ }), F("default", o.value.length - 1), T();
277
269
  return;
278
- } else if (g === "message") {
279
- e += d;
280
- const l = a.value[a.value.length - 1];
281
- l && l.role === "assistant" && (l.content = e, C()), l.firstPackageTime === 0 && (l.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - t);
282
- } else if (g === "finish") {
283
- k.value = !1, n.value = !1;
284
- const l = a.value[a.value.length - 1];
285
- l && l.role === "assistant" && (l.showFeedback = !0, l.resTime = (/* @__PURE__ */ new Date()).getTime() - t, M("default", a.value.length - 1)), console.log(e);
270
+ }
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);
276
+ }
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();
279
+ return;
280
+ }
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());
285
+ }
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));
286
290
  try {
287
- const v = JSON.parse(e);
288
- if (v.parsedConditions && delete v.parsedConditions, (r = v.customTagNames) != null && r.length) {
289
- const ie = v.customTagNames.reduce((R, re) => {
290
- const U = z.value[re];
291
- return U && R.push(U), R;
292
- }, []);
293
- delete v.customTagNames, v.customTag = ie;
294
- }
295
- A("callBack", v);
291
+ const c = JSON.parse(e);
292
+ c.parsedConditions && delete c.parsedConditions, z("callBack", c);
296
293
  } catch {
297
- A("callBack", e);
294
+ z("callBack", e);
298
295
  }
299
296
  }
300
297
  }
301
298
  });
302
- } catch (i) {
303
- B.error(`AI响应异常: ${i}`), a.value.pop(), a.value.push({
299
+ } catch (A) {
300
+ I.error(`AI响应异常: ${A}`), o.value.pop(), o.value.push({
304
301
  role: "assistant",
305
- userContent: s,
302
+ userContent: n,
306
303
  content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
307
304
  showFeedback: !0,
308
305
  hasFeedback: !1,
309
- createTime: P().format("YYYY-MM-DD HH:mm:ss"),
306
+ createTime: L().format("YYYY-MM-DD HH:mm:ss"),
310
307
  resTime: (/* @__PURE__ */ new Date()).getTime() - t,
311
308
  firstPackageTime: 0
312
- }), M("default", a.value.length - 1), await C(), n.value = !1, k.value = !1;
309
+ }), F("default", o.value.length - 1), await T(), y.value = !1, i.value = !1;
313
310
  }
314
- }, oe = (s) => {
315
- if (s.key === "Enter")
316
- if (s.ctrlKey) {
317
- s.preventDefault();
318
- const e = s.target, t = e.selectionStart, i = e.selectionEnd;
319
- w.value = w.value.substring(0, t) + `
320
- ` + w.value.substring(i), O(() => {
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;
316
+ E.value = E.value.substring(0, t) + `
317
+ ` + E.value.substring(f), R(() => {
321
318
  e.selectionStart = e.selectionEnd = t + 1;
322
319
  });
323
320
  } else
324
- s.preventDefault(), K();
325
- }, C = async () => {
326
- await O(), T.value && (T.value.scrollTop = T.value.scrollHeight);
327
- }, ne = async () => {
328
- const s = await Promise.all([p.request.post("/alarm/deliversign/findTagsByUserId"), p.request.post("/alarm/deliversign/findSystemTagsByTagName")]);
329
- z.value = s.reduce((e, t) => {
330
- var i;
331
- return {
332
- ...e,
333
- ...(i = t.body) == null ? void 0 : i.reduce((D, g) => ({
334
- ...D,
335
- [g.tagName]: g.id
336
- }), {})
337
- };
338
- }, {});
321
+ n.preventDefault(), G();
322
+ }, T = async () => {
323
+ await R(), b.value && (b.value.scrollTop = b.value.scrollHeight);
339
324
  };
340
- return Te(() => {
341
- ne();
342
- }), x(
343
- () => a.value,
325
+ return U(
326
+ () => o.value,
344
327
  () => {
345
- C();
328
+ T();
346
329
  },
347
330
  { deep: !0 }
348
- ), x(
349
- () => V.value,
350
- (s) => {
351
- s || (Y.value = "");
331
+ ), U(
332
+ () => Y.value,
333
+ (n) => {
334
+ n || (N.value = "");
352
335
  }
353
- ), L({
336
+ ), O({
354
337
  open: () => {
355
- N.value = !0, O(() => {
356
- C();
338
+ P.value = !0, R(() => {
339
+ T();
357
340
  });
358
341
  }
359
- }), (s, e) => {
360
- const t = Ie, i = _e, D = ge, g = ve;
361
- return c(), m(F, null, [
362
- _(g, {
342
+ }), (n, e) => {
343
+ const t = Be, f = ne, A = ge, B = _e, V = ve;
344
+ return l(), u(H, null, [
345
+ m(V, {
363
346
  class: "ai-dialog",
364
- modelValue: N.value,
365
- "onUpdate:modelValue": e[1] || (e[1] = (d) => N.value = d),
347
+ modelValue: P.value,
348
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => P.value = r),
366
349
  title: "✨ 品种池参数解析AI助手",
367
350
  width: "500px",
368
351
  center: "",
@@ -371,85 +354,123 @@ const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-di
371
354
  modal: !1,
372
355
  "modal-penetrable": !0
373
356
  }, {
374
- default: S(() => {
375
- var d;
357
+ default: g(() => {
358
+ var r;
376
359
  return [
377
- o("div", $e, [
378
- o("div", {
360
+ s("div", Ie, [
361
+ s("div", {
379
362
  ref_key: "messageListRef",
380
- ref: T,
363
+ ref: b,
381
364
  class: "message-list"
382
365
  }, [
383
- (c(!0), m(F, null, we(a.value, (r, l) => (c(), m("div", {
384
- key: l,
385
- class: te([r.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"])
386
369
  }, [
387
- r.content ? (c(), m(F, { key: 0 }, [
388
- o("div", Oe, [
389
- _(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, {
390
373
  size: 32,
391
- icon: r.role === "user" ? b(De) : b(X)
374
+ icon: a.role === "user" ? _(Ve) : _(Z)
392
375
  }, null, 8, ["icon"])
393
376
  ]),
394
- o("div", je, [
395
- J(r.content) ? (c(), m("div", {
396
- key: 0,
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,
381
+ class: "node-progress-item"
382
+ }, [
383
+ s("span", xe, [
384
+ D.status === "success" ? (l(), $(f, {
385
+ key: 0,
386
+ class: "node-icon done"
387
+ }, {
388
+ default: g(() => [
389
+ m(_(De))
390
+ ]),
391
+ _: 1
392
+ })) : (l(), $(f, {
393
+ key: 1,
394
+ class: "node-icon running"
395
+ }, {
396
+ default: g(() => [
397
+ m(_(ee))
398
+ ]),
399
+ _: 1
400
+ }))
401
+ ]),
402
+ s("span", Re, J(D.name), 1)
403
+ ]))), 128)),
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))
409
+ ]),
410
+ _: 1
411
+ })
412
+ ]),
413
+ Ue
414
+ ])) : w("", !0)
415
+ ])) : w("", !0),
416
+ W(a.content) ? (l(), u("div", {
417
+ key: 1,
397
418
  class: "message-json",
398
- innerHTML: ae(se(r.content))
399
- }, null, 8, xe)) : (c(), m("div", qe, W(r.content), 1)),
400
- o("div", Je, W(r.createTime), 1),
401
- r.role === "assistant" ? (c(), m(F, { key: 2 }, [
402
- r.showFeedback && !r.hasFeedback ? (c(), m(F, { key: 0 }, [
403
- Ke,
404
- o("div", Re, [
405
- o("button", {
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, [
426
+ s("button", {
406
427
  class: "feedback-btn satisfied-btn",
407
- onClick: (v) => M("satisfied", l)
408
- }, We, 8, Ue),
409
- o("button", {
428
+ onClick: (D) => F("satisfied", c)
429
+ }, st, 8, Ze),
430
+ s("button", {
410
431
  class: "feedback-btn unsatisfied-btn",
411
- onClick: (v) => M("open", l)
412
- }, tt, 8, Xe)
432
+ onClick: (D) => F("open", c)
433
+ }, it, 8, at)
413
434
  ])
414
- ], 64)) : H("", !0),
415
- r.showFeedback && r.hasFeedback ? (c(), m("div", st, "感谢您进行的评价反馈")) : H("", !0)
416
- ], 64)) : H("", !0)
435
+ ], 64)) : w("", !0),
436
+ a.showFeedback && a.hasFeedback ? (l(), u("div", lt, "感谢您进行的评价反馈")) : w("", !0)
437
+ ], 64)) : w("", !0)
417
438
  ])
418
- ], 64)) : H("", !0)
439
+ ], 64)) : w("", !0)
419
440
  ], 2))), 128)),
420
- k.value && !((d = a.value[a.value.length - 1]) != null && d.content) ? (c(), m("div", at, [
421
- o("div", ot, [
422
- _(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, {
423
444
  size: 32,
424
- icon: b(X)
445
+ icon: _(Z)
425
446
  }, null, 8, ["icon"])
426
447
  ]),
427
- nt
428
- ])) : H("", !0)
448
+ ut
449
+ ])) : w("", !0)
429
450
  ], 512),
430
- o("div", it, [
431
- _(i, {
451
+ s("div", dt, [
452
+ m(A, {
432
453
  class: "message-input",
433
- modelValue: w.value,
434
- "onUpdate:modelValue": e[0] || (e[0] = (r) => w.value = r),
454
+ modelValue: E.value,
455
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => E.value = a),
435
456
  type: "textarea",
436
457
  rows: 4,
437
458
  autosize: { minRows: 2, maxRows: 4 },
438
459
  placeholder: "输入您想查询的品种条件...",
439
- onKeydown: oe
460
+ onKeydown: le
440
461
  }, null, 8, ["modelValue"]),
441
- o("div", rt, [
442
- lt,
443
- _(D, {
462
+ s("div", mt, [
463
+ pt,
464
+ m(B, {
444
465
  class: "send-btn",
445
466
  type: "primary",
446
- icon: b(Ne),
447
- loading: n.value,
448
- onClick: K,
467
+ icon: _(Me),
468
+ loading: y.value,
469
+ onClick: G,
449
470
  round: ""
450
471
  }, {
451
- default: S(() => [
452
- j(" 发送 ")
472
+ default: g(() => [
473
+ K(" 发送 ")
453
474
  ]),
454
475
  _: 1
455
476
  }, 8, ["icon", "loading"])
@@ -460,40 +481,40 @@ const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-di
460
481
  }),
461
482
  _: 1
462
483
  }, 8, ["modelValue"]),
463
- _(g, {
464
- modelValue: V.value,
465
- "onUpdate:modelValue": e[5] || (e[5] = (d) => V.value = d),
484
+ m(V, {
485
+ modelValue: Y.value,
486
+ "onUpdate:modelValue": e[5] || (e[5] = (r) => Y.value = r),
466
487
  title: "📝 反馈意见",
467
488
  width: "400px"
468
489
  }, {
469
- footer: S(() => [
470
- o("span", mt, [
471
- _(D, {
472
- onClick: e[3] || (e[3] = (d) => V.value = !1)
490
+ footer: g(() => [
491
+ s("span", gt, [
492
+ m(B, {
493
+ onClick: e[3] || (e[3] = (r) => Y.value = !1)
473
494
  }, {
474
- default: S(() => [
475
- j("取消")
495
+ default: g(() => [
496
+ K("取消")
476
497
  ]),
477
498
  _: 1
478
499
  }),
479
- _(D, {
500
+ m(B, {
480
501
  type: "primary",
481
- onClick: e[4] || (e[4] = (d) => M("unsatisfied", q.value))
502
+ onClick: e[4] || (e[4] = (r) => F("unsatisfied", q.value))
482
503
  }, {
483
- default: S(() => [
484
- j("提交反馈")
504
+ default: g(() => [
505
+ K("提交反馈")
485
506
  ]),
486
507
  _: 1
487
508
  })
488
509
  ])
489
510
  ]),
490
- default: S(() => [
491
- o("div", ct, [
492
- ut,
493
- dt,
494
- _(i, {
495
- modelValue: Y.value,
496
- "onUpdate:modelValue": e[2] || (e[2] = (d) => Y.value = d),
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),
497
518
  type: "textarea",
498
519
  rows: 4,
499
520
  placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
@@ -505,11 +526,11 @@ const h = (u) => (Ce("data-v-536916ba"), u = u(), Se(), u), $e = { class: "ai-di
505
526
  ], 64);
506
527
  };
507
528
  }
508
- }, ft = /* @__PURE__ */ Ye(pt, [["__scopeId", "data-v-536916ba"]]), $t = {
509
- install(u) {
510
- u.component("st-varietyAiHelper", ft);
529
+ }, kt = /* @__PURE__ */ Ye(ht, [["__scopeId", "data-v-c6a98338"]]), Jt = {
530
+ install(d) {
531
+ d.component("st-varietyAiHelper", kt);
511
532
  }
512
533
  };
513
534
  export {
514
- $t as default
535
+ Jt as default
515
536
  };