st-comp 0.0.249 → 0.0.250
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/VarietyAiHelper.cjs +2 -2
- package/es/VarietyAiHelper.js +130 -124
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +2 -2
- package/lib/{index-6ac0579e.js → index-b51777a3.js} +208 -202
- package/lib/{python-0432340a.js → python-ac4949ec.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/index.vue +16 -8
- package/src/pages/VarietySearch/index.vue +1 -0
package/es/VarietyAiHelper.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./base-ef747d02.cjs"),
|
|
1
|
+
"use strict";const l=require("./base-ef747d02.cjs"),b=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const x=require("./el-button-974ff9e9.cjs"),T=require("./el-input-fa18ef84.cjs"),e=require("vue"),E=require("./dayjs.min-2c20abe6.cjs"),g=require("./index-33f80550.cjs"),z=require("./_plugin-vue_export-helper-f246444f.cjs"),V=require("./index-6ca95c8a.cjs"),N=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const C=l.buildProps({size:{type:[Number,String],values:N.componentSizes,default:"",validator:s=>l.isNumber(s)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:N.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:l.definePropType(String),default:"cover"}}),I={error:s=>s instanceof Event},A=e.defineComponent({name:"ElAvatar"}),H=e.defineComponent({...A,props:C,emits:I,setup(s,{emit:v}){const i=s,a=l.useNamespace("avatar"),o=e.ref(!1),n=e.computed(()=>{const{size:t,icon:p,shape:y}=i,r=[a.b()];return l.isString(t)&&r.push(a.m(t)),p&&r.push(a.m("icon")),y&&r.push(a.m(y)),r}),d=e.computed(()=>{const{size:t}=i;return l.isNumber(t)?a.cssVarBlock({size:l.addUnit(t)||""}):void 0}),_=e.computed(()=>({objectFit:i.fit}));e.watch(()=>i.src,()=>o.value=!1);function m(t){o.value=!0,v("error",t)}return(t,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(n)),style:e.normalizeStyle(e.unref(d))},[(t.src||t.srcSet)&&!o.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:e.normalizeStyle(e.unref(_)),onError:m},null,44,["src","alt","srcset"])):t.icon?(e.openBlock(),e.createBlock(e.unref(g.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))]),_:1})):e.renderSlot(t.$slots,"default",{key:2})],6))}});var $=l._export_sfc(H,[["__file","avatar.vue"]]);const M=l.withInstall($);const j=async({appId:s,apiKey:v,value:i})=>{var a;try{const o=await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${s}/completion`,{method:"POST",headers:{Authorization:`Bearer ${v}`,"Content-Type":"application/json"},body:JSON.stringify({input:{prompt:i},parameters:{incremental_output:!1}})});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);const n=await o.json();return(a=n==null?void 0:n.output)==null?void 0:a.text}catch(o){throw o.name==="AbortError"?new Error("请求超时"):o}};const w=s=>(e.pushScopeId("data-v-e461ef4d"),s=s(),e.popScopeId(),s),P={class:"chat-container"},L={class:"avatar"},D={class:"message-content"},K={class:"message-text"},R={class:"message-time"},F={key:0,class:"message-item assistant"},O={class:"avatar"},U=w(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),J={class:"input-area"},W={class:"input-actions"},G=w(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Ctrl + Enter 发送")],-1)),Q={__name:"index",props:{defaultMessage:{type:String,default:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
|
|
2
2
|
|
|
3
3
|
示例:
|
|
4
|
-
|
|
4
|
+
科创板里总市值大于1000W的, 帮我按照总市值升序进行排序`}},emits:["callBack"],setup(s,{expose:v,emit:i}){const a=i,o=s,n=e.ref(!1),d=e.ref(!1),_=e.ref(!1),m=e.ref(null),t=e.ref([]),p=e.ref(""),y=async()=>{const h=p.value.trim();if(!h)return V.ElMessage.warning("请输入消息内容");if(d.value)return;t.value.push({role:"user",time:E.dayjs().format("HH:mm"),content:h}),p.value="",await r(),d.value=!0,_.value=!0;let c="{}";try{c=await j({appId:"9e54d112acfe4531bd1fc4fee8827fef",apiKey:"sk-d995eb26a4334bdeb2ccb4cbfaf51de8",value:h}),t.value.push({role:"assistant",time:E.dayjs().format("HH:mm"),content:c}),await r()}catch(f){V.ElMessage.error(`AI响应异常: ${f}`),console.error("AI响应异常:",f)}finally{d.value=!1,_.value=!1}a("callBack",JSON.parse(c))},r=async()=>{await e.nextTick(),m.value&&(m.value.scrollTop=m.value.scrollHeight)};return e.onMounted(()=>{t.value.push({role:"assistant",time:E.dayjs().format("HH:mm"),content:o.defaultMessage})}),e.watch(()=>t.value,()=>{r()},{deep:!0}),v({open:h=>{n.value=!0,e.nextTick(()=>{r()})}}),(h,c)=>{const f=M,k=T.ElInput,S=x.ElButton,q=b.ElDialog;return e.openBlock(),e.createBlock(q,{class:"ai-dialog",modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=u=>n.value=u),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>[e.createElementVNode("div",P,[e.createElementVNode("div",{ref_key:"messageListRef",ref:m,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(u,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:e.normalizeClass(["message-item",u.role])},[e.createElementVNode("div",L,[e.createVNode(f,{size:32,icon:u.role==="user"?e.unref(g.user_filled_default):e.unref(g.service_default)},null,8,["icon"])]),e.createElementVNode("div",D,[e.createElementVNode("div",K,e.toDisplayString(u.content),1),e.createElementVNode("div",R,e.toDisplayString(u.time),1)])],2))),128)),_.value?(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",O,[e.createVNode(f,{size:32,icon:e.unref(g.service_default)},null,8,["icon"])]),U])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",J,[e.createVNode(k,{class:"message-input",modelValue:p.value,"onUpdate:modelValue":c[0]||(c[0]=u=>p.value=u),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:e.withKeys(e.withModifiers(y,["ctrl"]),["enter"])},null,8,["modelValue","onKeydown"]),e.createElementVNode("div",W,[G,e.createVNode(S,{class:"send-btn",type:"primary",icon:e.unref(g.promotion_default),loading:d.value,onClick:y,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]),_:1},8,["modelValue"])}}},X=z._export_sfc(Q,[["__scopeId","data-v-e461ef4d"]]),Y={install(s){s.component("st-varietyAiHelper",X)}};module.exports=Y;
|
package/es/VarietyAiHelper.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { b as j, p as
|
|
2
|
-
import { E as
|
|
1
|
+
import { b as j, p as N, e as D, u as O, c as U, n as F, _ as J, w as q } from "./base-29f73b05.js";
|
|
2
|
+
import { E as W } from "./el-dialog-eedcfd3e.js";
|
|
3
3
|
import "./el-overlay-1ee0338d.js";
|
|
4
4
|
import { E as G } from "./el-button-e2c63c08.js";
|
|
5
5
|
import { E as Q } from "./el-input-d47281da.js";
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import { d as
|
|
8
|
-
import { E as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { E as
|
|
11
|
-
import { k as
|
|
6
|
+
import { defineComponent as C, ref as f, computed as b, watch as $, openBlock as p, createElementBlock as S, normalizeClass as M, unref as u, normalizeStyle as I, createBlock as T, withCtx as x, resolveDynamicComponent as X, renderSlot as Y, onMounted as Z, nextTick as z, createElementVNode as t, Fragment as ee, renderList as te, createVNode as E, toDisplayString as V, createCommentVNode as se, withKeys as ae, withModifiers as oe, createTextVNode as ne, pushScopeId as re, popScopeId as ie } from "vue";
|
|
7
|
+
import { d as k } from "./dayjs.min-8313b006.js";
|
|
8
|
+
import { E as le, u as ce, s as B, p as pe } from "./index-c2b9bbfd.js";
|
|
9
|
+
import { _ as ue } from "./_plugin-vue_export-helper-dad06003.js";
|
|
10
|
+
import { E as H } from "./index-f30561d3.js";
|
|
11
|
+
import { k as de, i as me } from "./use-form-common-props-cb0ca65c.js";
|
|
12
12
|
import "./index-0f79095c.js";
|
|
13
13
|
import "./index-8391a3df.js";
|
|
14
14
|
import "./index-de24705f.js";
|
|
@@ -21,12 +21,12 @@ import "./index-657047bb.js";
|
|
|
21
21
|
import "./typescript-7ae59c4c.js";
|
|
22
22
|
import "./index-c71e37dc.js";
|
|
23
23
|
import "./config-provider-7860903c.js";
|
|
24
|
-
const
|
|
24
|
+
const fe = j({
|
|
25
25
|
size: {
|
|
26
26
|
type: [Number, String],
|
|
27
|
-
values:
|
|
27
|
+
values: de,
|
|
28
28
|
default: "",
|
|
29
|
-
validator: (
|
|
29
|
+
validator: (s) => N(s)
|
|
30
30
|
},
|
|
31
31
|
shape: {
|
|
32
32
|
type: String,
|
|
@@ -34,7 +34,7 @@ const me = j({
|
|
|
34
34
|
default: "circle"
|
|
35
35
|
},
|
|
36
36
|
icon: {
|
|
37
|
-
type:
|
|
37
|
+
type: me
|
|
38
38
|
},
|
|
39
39
|
src: {
|
|
40
40
|
type: String,
|
|
@@ -43,62 +43,62 @@ const me = j({
|
|
|
43
43
|
alt: String,
|
|
44
44
|
srcSet: String,
|
|
45
45
|
fit: {
|
|
46
|
-
type:
|
|
46
|
+
type: D(String),
|
|
47
47
|
default: "cover"
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
50
|
-
error: (
|
|
51
|
-
},
|
|
49
|
+
}), ve = {
|
|
50
|
+
error: (s) => s instanceof Event
|
|
51
|
+
}, _e = C({
|
|
52
52
|
name: "ElAvatar"
|
|
53
|
-
}),
|
|
54
|
-
...
|
|
55
|
-
props:
|
|
56
|
-
emits:
|
|
57
|
-
setup(
|
|
58
|
-
const i =
|
|
59
|
-
const { size: e, icon:
|
|
60
|
-
return
|
|
61
|
-
}),
|
|
53
|
+
}), ye = /* @__PURE__ */ C({
|
|
54
|
+
..._e,
|
|
55
|
+
props: fe,
|
|
56
|
+
emits: ve,
|
|
57
|
+
setup(s, { emit: y }) {
|
|
58
|
+
const i = s, o = O("avatar"), a = f(!1), n = b(() => {
|
|
59
|
+
const { size: e, icon: m, shape: g } = i, r = [o.b()];
|
|
60
|
+
return U(e) && r.push(o.m(e)), m && r.push(o.m("icon")), g && r.push(o.m(g)), r;
|
|
61
|
+
}), d = b(() => {
|
|
62
62
|
const { size: e } = i;
|
|
63
|
-
return
|
|
64
|
-
size:
|
|
63
|
+
return N(e) ? o.cssVarBlock({
|
|
64
|
+
size: F(e) || ""
|
|
65
65
|
}) : void 0;
|
|
66
|
-
}),
|
|
66
|
+
}), h = b(() => ({
|
|
67
67
|
objectFit: i.fit
|
|
68
68
|
}));
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
|
|
69
|
+
$(() => i.src, () => a.value = !1);
|
|
70
|
+
function v(e) {
|
|
71
|
+
a.value = !0, y("error", e);
|
|
72
72
|
}
|
|
73
|
-
return (e,
|
|
74
|
-
class:
|
|
75
|
-
style:
|
|
73
|
+
return (e, m) => (p(), S("span", {
|
|
74
|
+
class: M(u(n)),
|
|
75
|
+
style: I(u(d))
|
|
76
76
|
}, [
|
|
77
|
-
(e.src || e.srcSet) && !
|
|
77
|
+
(e.src || e.srcSet) && !a.value ? (p(), S("img", {
|
|
78
78
|
key: 0,
|
|
79
79
|
src: e.src,
|
|
80
80
|
alt: e.alt,
|
|
81
81
|
srcset: e.srcSet,
|
|
82
|
-
style:
|
|
83
|
-
onError:
|
|
84
|
-
}, null, 44, ["src", "alt", "srcset"])) : e.icon ? (p(),
|
|
85
|
-
default:
|
|
86
|
-
(p(),
|
|
82
|
+
style: I(u(h)),
|
|
83
|
+
onError: v
|
|
84
|
+
}, null, 44, ["src", "alt", "srcset"])) : e.icon ? (p(), T(u(le), { key: 1 }, {
|
|
85
|
+
default: x(() => [
|
|
86
|
+
(p(), T(X(e.icon)))
|
|
87
87
|
]),
|
|
88
88
|
_: 1
|
|
89
|
-
})) :
|
|
89
|
+
})) : Y(e.$slots, "default", { key: 2 })
|
|
90
90
|
], 6));
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
var
|
|
94
|
-
const
|
|
95
|
-
const
|
|
93
|
+
var he = /* @__PURE__ */ J(ye, [["__file", "avatar.vue"]]);
|
|
94
|
+
const ge = q(he);
|
|
95
|
+
const we = async ({ appId: s, apiKey: y, value: i }) => {
|
|
96
96
|
var o;
|
|
97
97
|
try {
|
|
98
|
-
const
|
|
98
|
+
const a = await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${s}/completion`, {
|
|
99
99
|
method: "POST",
|
|
100
100
|
headers: {
|
|
101
|
-
Authorization: `Bearer ${
|
|
101
|
+
Authorization: `Bearer ${y}`,
|
|
102
102
|
"Content-Type": "application/json"
|
|
103
103
|
},
|
|
104
104
|
body: JSON.stringify({
|
|
@@ -109,83 +109,89 @@ const he = async ({ appId: a, apiKey: h, value: i }) => {
|
|
|
109
109
|
}
|
|
110
110
|
})
|
|
111
111
|
});
|
|
112
|
-
if (!
|
|
113
|
-
throw new Error(`HTTP ${
|
|
114
|
-
const n = await
|
|
112
|
+
if (!a.ok)
|
|
113
|
+
throw new Error(`HTTP ${a.status}: ${a.statusText}`);
|
|
114
|
+
const n = await a.json();
|
|
115
115
|
return (o = n == null ? void 0 : n.output) == null ? void 0 : o.text;
|
|
116
|
-
} catch (
|
|
117
|
-
throw
|
|
116
|
+
} catch (a) {
|
|
117
|
+
throw a.name === "AbortError" ? new Error("请求超时") : a;
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
-
const L = (
|
|
120
|
+
const L = (s) => (re("data-v-e461ef4d"), s = s(), ie(), s), Se = { class: "chat-container" }, Ee = { class: "avatar" }, be = { class: "message-content" }, ke = { class: "message-text" }, Te = { class: "message-time" }, xe = {
|
|
121
121
|
key: 0,
|
|
122
122
|
class: "message-item assistant"
|
|
123
|
-
},
|
|
123
|
+
}, Ae = { class: "avatar" }, Ie = /* @__PURE__ */ L(() => /* @__PURE__ */ t("div", { class: "message-content" }, [
|
|
124
124
|
/* @__PURE__ */ t("div", { class: "typing-indicator" }, [
|
|
125
125
|
/* @__PURE__ */ t("span"),
|
|
126
126
|
/* @__PURE__ */ t("span"),
|
|
127
127
|
/* @__PURE__ */ t("span")
|
|
128
128
|
])
|
|
129
|
-
], -1)),
|
|
129
|
+
], -1)), ze = { class: "input-area" }, Ve = { class: "input-actions" }, Be = /* @__PURE__ */ L(() => /* @__PURE__ */ t("div", { class: "input-hint" }, [
|
|
130
130
|
/* @__PURE__ */ t("span", null, "Ctrl + Enter 发送")
|
|
131
|
-
], -1)),
|
|
131
|
+
], -1)), He = {
|
|
132
132
|
__name: "index",
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
role: "assistant",
|
|
138
|
-
time: E().format("HH:mm"),
|
|
139
|
-
content: `你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
|
|
133
|
+
props: {
|
|
134
|
+
defaultMessage: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: `你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
|
|
140
137
|
|
|
141
138
|
示例:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
科创板里总市值大于1000W的, 帮我按照总市值升序进行排序`
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
emits: ["callBack"],
|
|
143
|
+
setup(s, { expose: y, emit: i }) {
|
|
144
|
+
const o = i, a = s, n = f(!1), d = f(!1), h = f(!1), v = f(null), e = f([]), m = f(""), g = async () => {
|
|
145
|
+
const w = m.value.trim();
|
|
146
|
+
if (!w)
|
|
147
|
+
return H.warning("请输入消息内容");
|
|
148
|
+
if (d.value)
|
|
149
149
|
return;
|
|
150
|
-
|
|
150
|
+
e.value.push({
|
|
151
151
|
role: "user",
|
|
152
|
-
time:
|
|
153
|
-
content:
|
|
154
|
-
}),
|
|
152
|
+
time: k().format("HH:mm"),
|
|
153
|
+
content: w
|
|
154
|
+
}), m.value = "", await r(), d.value = !0, h.value = !0;
|
|
155
155
|
let l = "{}";
|
|
156
156
|
try {
|
|
157
|
-
l = await
|
|
157
|
+
l = await we({ appId: "9e54d112acfe4531bd1fc4fee8827fef", apiKey: "sk-d995eb26a4334bdeb2ccb4cbfaf51de8", value: w }), e.value.push({
|
|
158
158
|
role: "assistant",
|
|
159
|
-
time:
|
|
159
|
+
time: k().format("HH:mm"),
|
|
160
160
|
content: l
|
|
161
|
-
}), await
|
|
162
|
-
} catch (
|
|
163
|
-
|
|
161
|
+
}), await r();
|
|
162
|
+
} catch (_) {
|
|
163
|
+
H.error(`AI响应异常: ${_}`), console.error("AI响应异常:", _);
|
|
164
164
|
} finally {
|
|
165
|
-
|
|
165
|
+
d.value = !1, h.value = !1;
|
|
166
166
|
}
|
|
167
167
|
o("callBack", JSON.parse(l));
|
|
168
|
-
},
|
|
169
|
-
await
|
|
168
|
+
}, r = async () => {
|
|
169
|
+
await z(), v.value && (v.value.scrollTop = v.value.scrollHeight);
|
|
170
170
|
};
|
|
171
|
-
return
|
|
172
|
-
|
|
171
|
+
return Z(() => {
|
|
172
|
+
e.value.push({
|
|
173
|
+
role: "assistant",
|
|
174
|
+
time: k().format("HH:mm"),
|
|
175
|
+
content: a.defaultMessage
|
|
176
|
+
});
|
|
177
|
+
}), $(
|
|
178
|
+
() => e.value,
|
|
173
179
|
() => {
|
|
174
|
-
|
|
180
|
+
r();
|
|
175
181
|
},
|
|
176
182
|
{ deep: !0 }
|
|
177
|
-
),
|
|
178
|
-
open: (
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
), y({
|
|
184
|
+
open: (w) => {
|
|
185
|
+
n.value = !0, z(() => {
|
|
186
|
+
r();
|
|
181
187
|
});
|
|
182
188
|
}
|
|
183
|
-
}), (
|
|
184
|
-
const
|
|
185
|
-
return p(),
|
|
189
|
+
}), (w, l) => {
|
|
190
|
+
const _ = ge, A = Q, P = G, K = W;
|
|
191
|
+
return p(), T(K, {
|
|
186
192
|
class: "ai-dialog",
|
|
187
|
-
modelValue:
|
|
188
|
-
"onUpdate:modelValue": l[1] || (l[1] = (c) =>
|
|
193
|
+
modelValue: n.value,
|
|
194
|
+
"onUpdate:modelValue": l[1] || (l[1] = (c) => n.value = c),
|
|
189
195
|
title: "✨ 品种池参数解析AI助手",
|
|
190
196
|
width: "500px",
|
|
191
197
|
center: "",
|
|
@@ -194,61 +200,61 @@ const L = (a) => (oe("data-v-3b75cb12"), a = a(), ne(), a), ge = { class: "chat-
|
|
|
194
200
|
modal: !1,
|
|
195
201
|
"modal-penetrable": !0
|
|
196
202
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
t("div",
|
|
203
|
+
default: x(() => [
|
|
204
|
+
t("div", Se, [
|
|
199
205
|
t("div", {
|
|
200
206
|
ref_key: "messageListRef",
|
|
201
207
|
ref: v,
|
|
202
208
|
class: "message-list"
|
|
203
209
|
}, [
|
|
204
|
-
(p(!0),
|
|
210
|
+
(p(!0), S(ee, null, te(e.value, (c, R) => (p(), S("div", {
|
|
205
211
|
key: R,
|
|
206
|
-
class:
|
|
212
|
+
class: M(["message-item", c.role])
|
|
207
213
|
}, [
|
|
208
|
-
t("div",
|
|
209
|
-
|
|
214
|
+
t("div", Ee, [
|
|
215
|
+
E(_, {
|
|
210
216
|
size: 32,
|
|
211
|
-
icon: c.role === "user" ? u(
|
|
217
|
+
icon: c.role === "user" ? u(ce) : u(B)
|
|
212
218
|
}, null, 8, ["icon"])
|
|
213
219
|
]),
|
|
214
220
|
t("div", be, [
|
|
215
|
-
t("div",
|
|
216
|
-
t("div",
|
|
221
|
+
t("div", ke, V(c.content), 1),
|
|
222
|
+
t("div", Te, V(c.time), 1)
|
|
217
223
|
])
|
|
218
224
|
], 2))), 128)),
|
|
219
|
-
|
|
220
|
-
t("div",
|
|
221
|
-
|
|
225
|
+
h.value ? (p(), S("div", xe, [
|
|
226
|
+
t("div", Ae, [
|
|
227
|
+
E(_, {
|
|
222
228
|
size: 32,
|
|
223
|
-
icon: u(
|
|
229
|
+
icon: u(B)
|
|
224
230
|
}, null, 8, ["icon"])
|
|
225
231
|
]),
|
|
226
|
-
|
|
227
|
-
])) :
|
|
232
|
+
Ie
|
|
233
|
+
])) : se("", !0)
|
|
228
234
|
], 512),
|
|
229
|
-
t("div",
|
|
230
|
-
|
|
235
|
+
t("div", ze, [
|
|
236
|
+
E(A, {
|
|
231
237
|
class: "message-input",
|
|
232
|
-
modelValue:
|
|
233
|
-
"onUpdate:modelValue": l[0] || (l[0] = (c) =>
|
|
238
|
+
modelValue: m.value,
|
|
239
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => m.value = c),
|
|
234
240
|
type: "textarea",
|
|
235
241
|
rows: 4,
|
|
236
242
|
autosize: { minRows: 2, maxRows: 4 },
|
|
237
243
|
placeholder: "输入您想查询的品种条件...",
|
|
238
|
-
onKeydown:
|
|
244
|
+
onKeydown: ae(oe(g, ["ctrl"]), ["enter"])
|
|
239
245
|
}, null, 8, ["modelValue", "onKeydown"]),
|
|
240
|
-
t("div",
|
|
241
|
-
|
|
242
|
-
|
|
246
|
+
t("div", Ve, [
|
|
247
|
+
Be,
|
|
248
|
+
E(P, {
|
|
243
249
|
class: "send-btn",
|
|
244
250
|
type: "primary",
|
|
245
|
-
icon: u(
|
|
246
|
-
loading:
|
|
251
|
+
icon: u(pe),
|
|
252
|
+
loading: d.value,
|
|
247
253
|
onClick: g,
|
|
248
254
|
round: ""
|
|
249
255
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
|
|
256
|
+
default: x(() => [
|
|
257
|
+
ne(" 发送 ")
|
|
252
258
|
]),
|
|
253
259
|
_: 1
|
|
254
260
|
}, 8, ["icon", "loading"])
|
|
@@ -260,11 +266,11 @@ const L = (a) => (oe("data-v-3b75cb12"), a = a(), ne(), a), ge = { class: "chat-
|
|
|
260
266
|
}, 8, ["modelValue"]);
|
|
261
267
|
};
|
|
262
268
|
}
|
|
263
|
-
},
|
|
264
|
-
install(
|
|
265
|
-
|
|
269
|
+
}, Ne = /* @__PURE__ */ ue(He, [["__scopeId", "data-v-e461ef4d"]]), at = {
|
|
270
|
+
install(s) {
|
|
271
|
+
s.component("st-varietyAiHelper", Ne);
|
|
266
272
|
}
|
|
267
273
|
};
|
|
268
274
|
export {
|
|
269
|
-
|
|
275
|
+
at as default
|
|
270
276
|
};
|