wi-chat 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.js +273 -261
- package/dist/core/useChat.d.ts +61 -12
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +33 -33
- package/dist/mobile-ui/chat/ChatContainer.vue.d.ts +6 -6
- package/dist/mobile-ui/chat/ChatMessagesView.vue.d.ts +6 -6
- package/dist/mobile-ui/index.cjs +1 -1
- package/dist/mobile-ui/index.js +104 -104
- package/dist/mobile-ui/inputbox/Inputbox.vue.d.ts +5 -5
- package/dist/page-context/index.js +2 -4
- package/dist/parser/answerCom/actionExecute/actionProtocol.d.ts +1 -7
- package/dist/parser/answerCom/actionExecute/clarification.d.ts +15 -3
- package/dist/parser/answerCom/actionExecute/constants.d.ts +10 -0
- package/dist/parser/answerCom/actionExecute/parseCollectClarifications.d.ts +3 -2
- package/dist/parser/answerCom/actionExecute/parseHostAction.d.ts +3 -2
- package/dist/parser/answerCom/actionExecute/types.d.ts +3 -3
- package/dist/parser/index.cjs +2 -2
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/index.js +216 -258
- package/dist/parser/registry.d.ts +1 -1
- package/dist/renderers/aiAnswer/AiAnswerBubble.vue.d.ts +4 -4
- package/dist/renderers/clarification/ClarificationCard.vue.d.ts +3 -3
- package/dist/renderers/deepThinking/DeepThinkingSteps.vue.d.ts +4 -4
- package/dist/renderers/hostAction/HostActionStatus.vue.d.ts +3 -3
- package/dist/renderers/iframePage/IframePage.vue.d.ts +3 -3
- package/dist/renderers/index.cjs +1 -1
- package/dist/renderers/index.js +484 -498
- package/dist/renderers/knowledgeStream/KnowledgeStreamResult.vue.d.ts +3 -3
- package/dist/renderers/outputFile/OutputFile.vue.d.ts +3 -3
- package/dist/renderers/style.css +1 -1
- package/dist/request/index.cjs +2 -2
- package/dist/request/index.js +6 -13
- package/dist/request/ws.d.ts +3 -3
- package/dist/right-panel/RightPanel.vue.d.ts +6 -6
- package/dist/right-panel/RightPanelIcon.vue.d.ts +4 -4
- package/dist/right-panel/RightPanelTabs.vue.d.ts +5 -5
- package/dist/right-panel/index.cjs +1 -1
- package/dist/right-panel/index.js +397 -416
- package/dist/right-panel/panels/newtab/NewTabPanel.vue.d.ts +4 -4
- package/dist/right-panel/panels/web/WebPanel.vue.d.ts +3 -3
- package/dist/right-panel/shared/BrowserToolbar.vue.d.ts +3 -3
- package/dist/right-panel/shared/RightPanelToolList.vue.d.ts +5 -5
- package/dist/theme/index.js +2 -4
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.js +10 -19
- package/dist/tools/markdown/MarkdownContent.vue.d.ts +5 -5
- package/dist/tools/useAutoScroll.d.ts +3 -3
- package/dist/web-ui/attach/AttachmentCard.vue.d.ts +6 -6
- package/dist/web-ui/attach/AttachmentList.vue.d.ts +6 -6
- package/dist/web-ui/chat/ChatContainer.vue.d.ts +6 -6
- package/dist/web-ui/chat/ChatMessagesView.vue.d.ts +6 -6
- package/dist/web-ui/envswitch/EnvSwitch.vue.d.ts +5 -5
- package/dist/web-ui/index.cjs +1 -1
- package/dist/web-ui/index.js +630 -635
- package/dist/web-ui/inputbox/Inputbox.vue.d.ts +7 -7
- package/dist/web-ui/recordset/RecordsetTable.vue.d.ts +4 -4
- package/package.json +2 -1
package/dist/web-ui/index.js
CHANGED
|
@@ -1,58 +1,10 @@
|
|
|
1
|
-
import { createAnswerContentMap as
|
|
2
|
-
import { AiAnswerBubble as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { ElImage as
|
|
5
|
-
import { isImageAttachment as
|
|
6
|
-
import { downloadAttachment as
|
|
7
|
-
const
|
|
8
|
-
/* @__PURE__ */ t("svg", {
|
|
9
|
-
viewBox: "0 0 24 24",
|
|
10
|
-
width: "16",
|
|
11
|
-
height: "16",
|
|
12
|
-
fill: "none",
|
|
13
|
-
stroke: "currentColor",
|
|
14
|
-
"stroke-width": "2"
|
|
15
|
-
}, [
|
|
16
|
-
/* @__PURE__ */ t("rect", {
|
|
17
|
-
x: "3",
|
|
18
|
-
y: "3",
|
|
19
|
-
width: "18",
|
|
20
|
-
height: "18",
|
|
21
|
-
rx: "2",
|
|
22
|
-
ry: "2"
|
|
23
|
-
}),
|
|
24
|
-
/* @__PURE__ */ t("circle", {
|
|
25
|
-
cx: "8.5",
|
|
26
|
-
cy: "8.5",
|
|
27
|
-
r: "1.5"
|
|
28
|
-
}),
|
|
29
|
-
/* @__PURE__ */ t("polyline", { points: "21 15 16 10 5 21" })
|
|
30
|
-
])
|
|
31
|
-
], -1)), Re = /* @__PURE__ */ H(() => /* @__PURE__ */ t("div", { class: "wi-web-attach-card__image-fallback" }, [
|
|
32
|
-
/* @__PURE__ */ t("svg", {
|
|
33
|
-
viewBox: "0 0 24 24",
|
|
34
|
-
width: "16",
|
|
35
|
-
height: "16",
|
|
36
|
-
fill: "none",
|
|
37
|
-
stroke: "currentColor",
|
|
38
|
-
"stroke-width": "2"
|
|
39
|
-
}, [
|
|
40
|
-
/* @__PURE__ */ t("rect", {
|
|
41
|
-
x: "3",
|
|
42
|
-
y: "3",
|
|
43
|
-
width: "18",
|
|
44
|
-
height: "18",
|
|
45
|
-
rx: "2",
|
|
46
|
-
ry: "2"
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ t("circle", {
|
|
49
|
-
cx: "8.5",
|
|
50
|
-
cy: "8.5",
|
|
51
|
-
r: "1.5"
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ t("polyline", { points: "21 15 16 10 5 21" })
|
|
54
|
-
])
|
|
55
|
-
], -1)), Se = {
|
|
1
|
+
import { createAnswerContentMap as te, provideOutputFileConfig as le, DeepThinkingSteps as ae, AiAnswerBubble as ne } from "wi-chat/renderers";
|
|
2
|
+
import { AiAnswerBubble as qt, ClarificationCard as Kt, DeepThinkingSteps as Yt, HostActionStatus as Xt, IframePage as Zt, KnowledgeStreamResult as Gt, OutputFile as Jt, createAnswerContentMap as el, injectIframeResizerChild as tl, provideIframePageConfig as ll, provideOutputFileConfig as al, resolveIframePlaceholders as nl, useIframePage as il } from "wi-chat/renderers";
|
|
3
|
+
import { defineComponent as O, computed as _, openBlock as l, createElementBlock as i, normalizeClass as T, createElementVNode as t, renderSlot as I, createBlock as V, unref as B, withModifiers as X, withCtx as x, createStaticVNode as J, createTextVNode as P, toDisplayString as U, createCommentVNode as y, Fragment as M, renderList as N, mergeProps as q, ref as E, onBeforeUnmount as ie, createVNode as L, withKeys as se, defineAsyncComponent as oe, watch as Z, Transition as re, resolveComponent as K, normalizeStyle as de } from "vue";
|
|
4
|
+
import { ElImage as ce, ElPopover as ue, ElCheckbox as ve, ElInput as we, ElTooltip as Y } from "element-plus";
|
|
5
|
+
import { isImageAttachment as me, resolveAttachPreviewUrl as be, normalizeAttachment as he, resolveRemoteFileUrl as fe, parseRealtimeAttachment as ge } from "wi-chat/parser";
|
|
6
|
+
import { downloadAttachment as pe, useAutoScroll as ye } from "wi-chat/tools";
|
|
7
|
+
const ke = { class: "wi-web-attach-card__icon" }, _e = {
|
|
56
8
|
key: 1,
|
|
57
9
|
viewBox: "0 0 24 24",
|
|
58
10
|
width: "20",
|
|
@@ -60,9 +12,7 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
60
12
|
fill: "none",
|
|
61
13
|
stroke: "currentColor",
|
|
62
14
|
"stroke-width": "2"
|
|
63
|
-
},
|
|
64
|
-
Ve
|
|
65
|
-
], Te = {
|
|
15
|
+
}, xe = {
|
|
66
16
|
key: 2,
|
|
67
17
|
viewBox: "0 0 24 24",
|
|
68
18
|
width: "20",
|
|
@@ -70,11 +20,7 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
70
20
|
fill: "none",
|
|
71
21
|
stroke: "currentColor",
|
|
72
22
|
"stroke-width": "2"
|
|
73
|
-
},
|
|
74
|
-
Me,
|
|
75
|
-
ze,
|
|
76
|
-
Pe
|
|
77
|
-
], xe = {
|
|
23
|
+
}, Ce = {
|
|
78
24
|
key: 3,
|
|
79
25
|
viewBox: "0 0 24 24",
|
|
80
26
|
width: "20",
|
|
@@ -82,30 +28,10 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
82
28
|
fill: "none",
|
|
83
29
|
stroke: "currentColor",
|
|
84
30
|
"stroke-width": "2"
|
|
85
|
-
},
|
|
86
|
-
Oe
|
|
87
|
-
], Qe = { class: "wi-web-attach-card__info" }, Ne = ["title"], je = {
|
|
31
|
+
}, $e = { class: "wi-web-attach-card__info" }, Ue = ["title"], Ae = {
|
|
88
32
|
key: 0,
|
|
89
33
|
class: "wi-web-attach-card__size"
|
|
90
|
-
},
|
|
91
|
-
viewBox: "0 0 24 24",
|
|
92
|
-
width: "14",
|
|
93
|
-
height: "14",
|
|
94
|
-
fill: "none",
|
|
95
|
-
stroke: "currentColor",
|
|
96
|
-
"stroke-width": "2"
|
|
97
|
-
}, [
|
|
98
|
-
/* @__PURE__ */ t("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
99
|
-
/* @__PURE__ */ t("polyline", { points: "7 10 12 15 17 10" }),
|
|
100
|
-
/* @__PURE__ */ t("line", {
|
|
101
|
-
x1: "12",
|
|
102
|
-
y1: "15",
|
|
103
|
-
x2: "12",
|
|
104
|
-
y2: "3"
|
|
105
|
-
})
|
|
106
|
-
], -1)), qe = [
|
|
107
|
-
We
|
|
108
|
-
], Ke = /* @__PURE__ */ D({
|
|
34
|
+
}, Be = { class: "wi-web-attach-card__actions" }, Fe = /* @__PURE__ */ O({
|
|
109
35
|
__name: "AttachmentCard",
|
|
110
36
|
props: {
|
|
111
37
|
item: {},
|
|
@@ -116,100 +42,171 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
116
42
|
getFileUrl: { type: Function, default: void 0 }
|
|
117
43
|
},
|
|
118
44
|
emits: ["click", "remove", "download"],
|
|
119
|
-
setup(
|
|
120
|
-
const
|
|
121
|
-
var
|
|
122
|
-
return ((
|
|
123
|
-
}),
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
r("download", i.item), await Ae(i.item, {
|
|
138
|
-
baseURL: i.baseURL,
|
|
139
|
-
getFileUrl: i.getFileUrl
|
|
45
|
+
setup(e, { emit: $ }) {
|
|
46
|
+
const s = e, o = $, m = _(() => {
|
|
47
|
+
var d;
|
|
48
|
+
return ((d = s.item) == null ? void 0 : d.attachContent) || {};
|
|
49
|
+
}), g = _(() => me(s.item)), p = _(() => be(s.item, s.baseURL, s.getFileUrl)), h = _(() => {
|
|
50
|
+
if (s.removable) return !1;
|
|
51
|
+
if (s.downloadable !== void 0) return s.downloadable;
|
|
52
|
+
if (s.item.type && s.item.type !== "file") return !1;
|
|
53
|
+
const d = m.value;
|
|
54
|
+
return !!(d.fileId || d.raw);
|
|
55
|
+
}), v = () => {
|
|
56
|
+
o("click", s.item);
|
|
57
|
+
}, r = () => {
|
|
58
|
+
o("remove", s.item);
|
|
59
|
+
}, w = async () => {
|
|
60
|
+
o("download", s.item), await pe(s.item, {
|
|
61
|
+
baseURL: s.baseURL,
|
|
62
|
+
getFileUrl: s.getFileUrl
|
|
140
63
|
});
|
|
141
64
|
};
|
|
142
|
-
return (
|
|
143
|
-
class:
|
|
144
|
-
onClick:
|
|
65
|
+
return (d, a) => (l(), i("div", {
|
|
66
|
+
class: T(["wi-web-attach-card", { "is-clickable": e.clickable || !!d.$attrs.onClick }]),
|
|
67
|
+
onClick: v
|
|
145
68
|
}, [
|
|
146
|
-
t("div",
|
|
147
|
-
|
|
148
|
-
|
|
69
|
+
t("div", ke, [
|
|
70
|
+
I(d.$slots, "icon", { item: e.item }, () => [
|
|
71
|
+
g.value && p.value ? (l(), V(B(ce), {
|
|
149
72
|
key: 0,
|
|
150
|
-
src:
|
|
151
|
-
"preview-src-list": [
|
|
73
|
+
src: p.value,
|
|
74
|
+
"preview-src-list": [p.value],
|
|
152
75
|
"zoom-rate": 1.2,
|
|
153
76
|
"preview-teleported": "",
|
|
154
77
|
fit: "cover",
|
|
155
78
|
class: "wi-web-attach-card__image",
|
|
156
|
-
onClick:
|
|
79
|
+
onClick: a[0] || (a[0] = X(() => {
|
|
157
80
|
}, ["stop"]))
|
|
158
81
|
}, {
|
|
159
|
-
placeholder:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
82
|
+
placeholder: x(() => [...a[1] || (a[1] = [
|
|
83
|
+
t("div", { class: "wi-web-attach-card__image-fallback" }, [
|
|
84
|
+
t("svg", {
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
width: "16",
|
|
87
|
+
height: "16",
|
|
88
|
+
fill: "none",
|
|
89
|
+
stroke: "currentColor",
|
|
90
|
+
"stroke-width": "2"
|
|
91
|
+
}, [
|
|
92
|
+
t("rect", {
|
|
93
|
+
x: "3",
|
|
94
|
+
y: "3",
|
|
95
|
+
width: "18",
|
|
96
|
+
height: "18",
|
|
97
|
+
rx: "2",
|
|
98
|
+
ry: "2"
|
|
99
|
+
}),
|
|
100
|
+
t("circle", {
|
|
101
|
+
cx: "8.5",
|
|
102
|
+
cy: "8.5",
|
|
103
|
+
r: "1.5"
|
|
104
|
+
}),
|
|
105
|
+
t("polyline", { points: "21 15 16 10 5 21" })
|
|
106
|
+
])
|
|
107
|
+
], -1)
|
|
108
|
+
])]),
|
|
109
|
+
error: x(() => [...a[2] || (a[2] = [
|
|
110
|
+
t("div", { class: "wi-web-attach-card__image-fallback" }, [
|
|
111
|
+
t("svg", {
|
|
112
|
+
viewBox: "0 0 24 24",
|
|
113
|
+
width: "16",
|
|
114
|
+
height: "16",
|
|
115
|
+
fill: "none",
|
|
116
|
+
stroke: "currentColor",
|
|
117
|
+
"stroke-width": "2"
|
|
118
|
+
}, [
|
|
119
|
+
t("rect", {
|
|
120
|
+
x: "3",
|
|
121
|
+
y: "3",
|
|
122
|
+
width: "18",
|
|
123
|
+
height: "18",
|
|
124
|
+
rx: "2",
|
|
125
|
+
ry: "2"
|
|
126
|
+
}),
|
|
127
|
+
t("circle", {
|
|
128
|
+
cx: "8.5",
|
|
129
|
+
cy: "8.5",
|
|
130
|
+
r: "1.5"
|
|
131
|
+
}),
|
|
132
|
+
t("polyline", { points: "21 15 16 10 5 21" })
|
|
133
|
+
])
|
|
134
|
+
], -1)
|
|
135
|
+
])]),
|
|
165
136
|
_: 1
|
|
166
|
-
}, 8, ["src", "preview-src-list"])) :
|
|
137
|
+
}, 8, ["src", "preview-src-list"])) : e.item.type === "table" ? (l(), i("svg", _e, [...a[3] || (a[3] = [
|
|
138
|
+
J('<rect x="3" y="3" width="18" height="18" rx="2" data-v-dc2d5f2b></rect><path d="M3 9h18" data-v-dc2d5f2b></path><path d="M3 15h18" data-v-dc2d5f2b></path><path d="M9 3v18" data-v-dc2d5f2b></path><path d="M15 3v18" data-v-dc2d5f2b></path>', 5)
|
|
139
|
+
])])) : e.item.type === "metric" ? (l(), i("svg", xe, [...a[4] || (a[4] = [
|
|
140
|
+
t("path", { d: "M18 20V10" }, null, -1),
|
|
141
|
+
t("path", { d: "M12 20V4" }, null, -1),
|
|
142
|
+
t("path", { d: "M6 20v-6" }, null, -1)
|
|
143
|
+
])])) : (l(), i("svg", Ce, [...a[5] || (a[5] = [
|
|
144
|
+
J('<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-dc2d5f2b></path><polyline points="14 2 14 8 20 8" data-v-dc2d5f2b></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-dc2d5f2b></line><line x1="16" y1="17" x2="8" y2="17" data-v-dc2d5f2b></line><polyline points="10 9 9 9 8 9" data-v-dc2d5f2b></polyline>', 5)
|
|
145
|
+
])]))
|
|
167
146
|
], !0)
|
|
168
147
|
]),
|
|
169
|
-
t("div",
|
|
148
|
+
t("div", $e, [
|
|
170
149
|
t("div", {
|
|
171
150
|
class: "wi-web-attach-card__name",
|
|
172
|
-
title:
|
|
151
|
+
title: e.item.name
|
|
173
152
|
}, [
|
|
174
|
-
|
|
175
|
-
|
|
153
|
+
I(d.$slots, "title", { item: e.item }, () => [
|
|
154
|
+
P(U(e.item.name), 1)
|
|
176
155
|
], !0)
|
|
177
|
-
], 8,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
156
|
+
], 8, Ue),
|
|
157
|
+
e.item.description || d.$slots.description ? (l(), i("div", Ae, [
|
|
158
|
+
I(d.$slots, "description", { item: e.item }, () => [
|
|
159
|
+
P(U(e.item.description), 1)
|
|
181
160
|
], !0)
|
|
182
|
-
])) :
|
|
161
|
+
])) : y("", !0)
|
|
183
162
|
]),
|
|
184
|
-
t("div",
|
|
185
|
-
|
|
186
|
-
|
|
163
|
+
t("div", Be, [
|
|
164
|
+
I(d.$slots, "actions", { item: e.item }, () => [
|
|
165
|
+
h.value ? (l(), i("button", {
|
|
187
166
|
key: 0,
|
|
188
167
|
type: "button",
|
|
189
168
|
class: "wi-web-attach-card__action-btn wi-web-attach-card__download",
|
|
190
169
|
title: "下载附件",
|
|
191
|
-
onClick:
|
|
192
|
-
},
|
|
193
|
-
|
|
170
|
+
onClick: X(w, ["stop"])
|
|
171
|
+
}, [...a[6] || (a[6] = [
|
|
172
|
+
t("svg", {
|
|
173
|
+
viewBox: "0 0 24 24",
|
|
174
|
+
width: "14",
|
|
175
|
+
height: "14",
|
|
176
|
+
fill: "none",
|
|
177
|
+
stroke: "currentColor",
|
|
178
|
+
"stroke-width": "2"
|
|
179
|
+
}, [
|
|
180
|
+
t("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
181
|
+
t("polyline", { points: "7 10 12 15 17 10" }),
|
|
182
|
+
t("line", {
|
|
183
|
+
x1: "12",
|
|
184
|
+
y1: "15",
|
|
185
|
+
x2: "12",
|
|
186
|
+
y2: "3"
|
|
187
|
+
})
|
|
188
|
+
], -1)
|
|
189
|
+
])])) : y("", !0),
|
|
190
|
+
e.removable ? (l(), i("button", {
|
|
194
191
|
key: 1,
|
|
195
192
|
type: "button",
|
|
196
193
|
class: "wi-web-attach-card__action-btn wi-web-attach-card__delete",
|
|
197
194
|
title: "删除附件",
|
|
198
|
-
onClick:
|
|
199
|
-
}, " × ")) :
|
|
195
|
+
onClick: X(r, ["stop"])
|
|
196
|
+
}, " × ")) : y("", !0)
|
|
200
197
|
], !0)
|
|
201
198
|
])
|
|
202
199
|
], 2));
|
|
203
200
|
}
|
|
204
|
-
}),
|
|
205
|
-
const
|
|
206
|
-
for (const [
|
|
207
|
-
|
|
208
|
-
return
|
|
209
|
-
},
|
|
201
|
+
}), D = (e, $) => {
|
|
202
|
+
const s = e.__vccOpts || e;
|
|
203
|
+
for (const [o, m] of $)
|
|
204
|
+
s[o] = m;
|
|
205
|
+
return s;
|
|
206
|
+
}, Re = /* @__PURE__ */ D(Fe, [["__scopeId", "data-v-dc2d5f2b"]]), Ie = {
|
|
210
207
|
key: 0,
|
|
211
208
|
class: "wi-web-attachment-list"
|
|
212
|
-
},
|
|
209
|
+
}, Ve = /* @__PURE__ */ O({
|
|
213
210
|
__name: "AttachmentList",
|
|
214
211
|
props: {
|
|
215
212
|
items: { default: () => [] },
|
|
@@ -220,152 +217,82 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
220
217
|
getFileUrl: { type: Function, default: void 0 }
|
|
221
218
|
},
|
|
222
219
|
emits: ["remove", "click", "download"],
|
|
223
|
-
setup(
|
|
224
|
-
const
|
|
220
|
+
setup(e, { emit: $ }) {
|
|
221
|
+
const s = e, o = $, m = _(() => (s.items || []).map((r, w) => {
|
|
225
222
|
var c, f;
|
|
226
|
-
const
|
|
223
|
+
const d = he(r), a = (c = d.attachContent) == null ? void 0 : c.raw, C = ((f = d.attachContent) == null ? void 0 : f.fileId) || (a ? `${a.name}_${a.size}_${w}` : `${d.name}_${w}`);
|
|
227
224
|
return {
|
|
228
|
-
...
|
|
229
|
-
key:
|
|
225
|
+
...d,
|
|
226
|
+
key: C
|
|
230
227
|
};
|
|
231
|
-
})),
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
},
|
|
236
|
-
|
|
228
|
+
})), g = (v, r) => {
|
|
229
|
+
o("remove", v, r);
|
|
230
|
+
}, p = (v, r) => {
|
|
231
|
+
o("click", v, r);
|
|
232
|
+
}, h = (v, r) => {
|
|
233
|
+
o("download", v, r);
|
|
237
234
|
};
|
|
238
|
-
return (
|
|
239
|
-
(
|
|
240
|
-
key:
|
|
241
|
-
item:
|
|
242
|
-
removable:
|
|
243
|
-
downloadable:
|
|
244
|
-
clickable:
|
|
245
|
-
"base-u-r-l":
|
|
246
|
-
"get-file-url":
|
|
247
|
-
onClick: (
|
|
248
|
-
onRemove: (
|
|
249
|
-
onDownload: (
|
|
235
|
+
return (v, r) => m.value.length > 0 ? (l(), i("div", Ie, [
|
|
236
|
+
(l(!0), i(M, null, N(m.value, (w, d) => (l(), V(Re, {
|
|
237
|
+
key: w.key || d,
|
|
238
|
+
item: w,
|
|
239
|
+
removable: e.removable,
|
|
240
|
+
downloadable: e.downloadable,
|
|
241
|
+
clickable: e.clickable || !!v.$attrs.onClick,
|
|
242
|
+
"base-u-r-l": e.baseURL,
|
|
243
|
+
"get-file-url": e.getFileUrl,
|
|
244
|
+
onClick: (a) => p(w, d),
|
|
245
|
+
onRemove: (a) => g(d, w),
|
|
246
|
+
onDownload: (a) => h(w, d)
|
|
250
247
|
}, {
|
|
251
|
-
icon:
|
|
252
|
-
|
|
248
|
+
icon: x((a) => [
|
|
249
|
+
I(v.$slots, "icon", q({ ref_for: !0 }, a), void 0, !0)
|
|
253
250
|
]),
|
|
254
|
-
title:
|
|
255
|
-
|
|
251
|
+
title: x((a) => [
|
|
252
|
+
I(v.$slots, "title", q({ ref_for: !0 }, a), void 0, !0)
|
|
256
253
|
]),
|
|
257
|
-
description:
|
|
258
|
-
|
|
254
|
+
description: x((a) => [
|
|
255
|
+
I(v.$slots, "description", q({ ref_for: !0 }, a), void 0, !0)
|
|
259
256
|
]),
|
|
260
|
-
actions:
|
|
261
|
-
|
|
257
|
+
actions: x((a) => [
|
|
258
|
+
I(v.$slots, "actions", q({ ref_for: !0 }, a), void 0, !0)
|
|
262
259
|
]),
|
|
263
|
-
_:
|
|
264
|
-
},
|
|
265
|
-
])) :
|
|
260
|
+
_: 3
|
|
261
|
+
}, 8, ["item", "removable", "downloadable", "clickable", "base-u-r-l", "get-file-url", "onClick", "onRemove", "onDownload"]))), 128))
|
|
262
|
+
])) : y("", !0);
|
|
266
263
|
}
|
|
267
|
-
}),
|
|
264
|
+
}), ee = /* @__PURE__ */ D(Ve, [["__scopeId", "data-v-ff76d134"]]), Le = { class: "wi-web-inputbox" }, Se = {
|
|
268
265
|
key: 0,
|
|
269
266
|
class: "wi-web-inputbox__top-bar"
|
|
270
|
-
},
|
|
267
|
+
}, Te = {
|
|
271
268
|
key: 0,
|
|
272
269
|
class: "wi-web-inputbox__agent-bar"
|
|
273
|
-
},
|
|
270
|
+
}, Me = { class: "wi-web-inputbox__agent-icon-wrapper" }, ze = ["src"], Ee = {
|
|
274
271
|
key: 1,
|
|
275
272
|
class: "wi-web-inputbox__agent-svg",
|
|
276
273
|
viewBox: "0 0 24 24",
|
|
277
274
|
fill: "none",
|
|
278
275
|
stroke: "currentColor",
|
|
279
276
|
"stroke-width": "2"
|
|
280
|
-
},
|
|
281
|
-
cx: "12",
|
|
282
|
-
cy: "8",
|
|
283
|
-
r: "4"
|
|
284
|
-
}, null, -1)), lt = /* @__PURE__ */ T(() => /* @__PURE__ */ t("path", { d: "M4 20c0-4 4-6 8-6s8 2 8 6" }, null, -1)), nt = [
|
|
285
|
-
at,
|
|
286
|
-
lt
|
|
287
|
-
], it = { class: "wi-web-inputbox__agent-title" }, rt = /* @__PURE__ */ T(() => /* @__PURE__ */ t("path", {
|
|
288
|
-
d: "M840.4 300H183.6c-19.7 0-30.7 22.7-18.5 37.1l328.4 388.7c9.5 11.2 27.5 11.2 37 0l328.4-388.7c12.2-14.4 1.2-37.1-18.5-37.1z",
|
|
289
|
-
fill: "currentColor"
|
|
290
|
-
}, null, -1)), dt = [
|
|
291
|
-
rt
|
|
292
|
-
], ct = { class: "wi-web-agent-list" }, ut = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "wi-web-agent-list__header" }, "切换智能体", -1)), pt = {
|
|
277
|
+
}, Pe = { class: "wi-web-inputbox__agent-title" }, Oe = { class: "wi-web-agent-list" }, De = {
|
|
293
278
|
key: 0,
|
|
294
279
|
class: "wi-web-agent-list__empty"
|
|
295
|
-
},
|
|
280
|
+
}, Qe = ["onClick"], Ne = { class: "wi-web-agent-item__left" }, je = ["src"], He = {
|
|
296
281
|
key: 1,
|
|
297
282
|
class: "wi-web-agent-item__avatar-fallback"
|
|
298
|
-
},
|
|
299
|
-
viewBox: "0 0 24 24",
|
|
300
|
-
fill: "none",
|
|
301
|
-
stroke: "currentColor",
|
|
302
|
-
"stroke-width": "2"
|
|
303
|
-
}, [
|
|
304
|
-
/* @__PURE__ */ t("circle", {
|
|
305
|
-
cx: "12",
|
|
306
|
-
cy: "8",
|
|
307
|
-
r: "4"
|
|
308
|
-
}),
|
|
309
|
-
/* @__PURE__ */ t("path", { d: "M4 20c0-4 4-6 8-6s8 2 8 6" })
|
|
310
|
-
], -1)), bt = [
|
|
311
|
-
mt
|
|
312
|
-
], ft = { class: "wi-web-agent-item__title" }, gt = {
|
|
283
|
+
}, We = { class: "wi-web-agent-item__title" }, qe = {
|
|
313
284
|
key: 0,
|
|
314
285
|
class: "wi-web-agent-item__check"
|
|
315
|
-
},
|
|
286
|
+
}, Ke = {
|
|
316
287
|
key: 1,
|
|
317
288
|
class: "wi-web-inputbox__options"
|
|
318
|
-
},
|
|
289
|
+
}, Ye = { class: "wi-web-inputbox__main" }, Xe = {
|
|
319
290
|
key: 0,
|
|
320
291
|
class: "wi-web-inputbox__attachments"
|
|
321
|
-
},
|
|
292
|
+
}, Ze = { class: "wi-web-inputbox__footer" }, Ge = { class: "wi-web-inputbox__footer-left" }, Je = { class: "wi-web-inputbox__footer-right" }, et = {
|
|
322
293
|
key: 0,
|
|
323
294
|
class: "wi-web-inputbox__counter"
|
|
324
|
-
},
|
|
325
|
-
viewBox: "0 0 1024 1024",
|
|
326
|
-
width: "16",
|
|
327
|
-
height: "16",
|
|
328
|
-
fill: "currentColor"
|
|
329
|
-
}, [
|
|
330
|
-
/* @__PURE__ */ t("path", { d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896z m0 85.333333a362.666667 362.666667 0 1 0 0 725.333334 362.666667 362.666667 0 0 0 0-725.333334z m120.746667 181.333334a42.666667 42.666667 0 0 1 54.826666 4.693333l5.546667 6.357334a42.666667 42.666667 0 0 1-4.693333 54.826666l-6.357334 5.546667-114.730666 114.773333 114.730666 114.730667a42.666667 42.666667 0 0 1 5.461334 54.826666l-5.461334 6.357334a42.666667 42.666667 0 0 1-54.826666 5.461333l-6.357334-5.461333-114.730666-114.730667-114.730667 114.730667a42.666667 42.666667 0 0 1-54.826667 5.461333l-6.357333-5.461333a42.666667 42.666667 0 0 1-5.461333-54.826667l5.461333-6.357333 114.730667-114.730667-114.730667-114.773333a42.666667 42.666667 0 0 1-5.461333-54.826667l5.461333-6.357333a42.666667 42.666667 0 0 1 54.826667-5.461334l6.357333 5.461334 114.730667 114.730666 114.730666-114.730666a42.666667 42.666667 0 0 1 24.32-11.434667z" })
|
|
331
|
-
], -1)), Ft = [
|
|
332
|
-
It
|
|
333
|
-
], Rt = ["disabled"], St = /* @__PURE__ */ T(() => /* @__PURE__ */ t("svg", {
|
|
334
|
-
viewBox: "0 0 24 24",
|
|
335
|
-
width: "18",
|
|
336
|
-
height: "18",
|
|
337
|
-
fill: "none",
|
|
338
|
-
stroke: "currentColor",
|
|
339
|
-
"stroke-width": "2"
|
|
340
|
-
}, [
|
|
341
|
-
/* @__PURE__ */ t("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" })
|
|
342
|
-
], -1)), Vt = [
|
|
343
|
-
St
|
|
344
|
-
], Lt = ["accept"], Tt = /* @__PURE__ */ T(() => /* @__PURE__ */ t("div", { class: "wi-web-inputbox__divider" }, null, -1)), Mt = /* @__PURE__ */ T(() => /* @__PURE__ */ t("svg", {
|
|
345
|
-
viewBox: "0 0 24 24",
|
|
346
|
-
width: "16",
|
|
347
|
-
height: "16",
|
|
348
|
-
fill: "currentColor"
|
|
349
|
-
}, [
|
|
350
|
-
/* @__PURE__ */ t("rect", {
|
|
351
|
-
x: "6",
|
|
352
|
-
y: "6",
|
|
353
|
-
width: "12",
|
|
354
|
-
height: "12",
|
|
355
|
-
rx: "2"
|
|
356
|
-
})
|
|
357
|
-
], -1)), zt = [
|
|
358
|
-
Mt
|
|
359
|
-
], Pt = /* @__PURE__ */ T(() => /* @__PURE__ */ t("svg", {
|
|
360
|
-
viewBox: "0 0 24 24",
|
|
361
|
-
width: "18",
|
|
362
|
-
height: "18",
|
|
363
|
-
fill: "currentColor"
|
|
364
|
-
}, [
|
|
365
|
-
/* @__PURE__ */ t("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
|
|
366
|
-
], -1)), Et = [
|
|
367
|
-
Pt
|
|
368
|
-
], xt = /* @__PURE__ */ D({
|
|
295
|
+
}, tt = ["disabled"], lt = ["accept"], at = /* @__PURE__ */ O({
|
|
369
296
|
__name: "Inputbox",
|
|
370
297
|
props: {
|
|
371
298
|
modelValue: { default: "" },
|
|
@@ -387,161 +314,186 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
387
314
|
showIncPrevQuestion: { type: Boolean, default: !0 }
|
|
388
315
|
},
|
|
389
316
|
emits: ["update:modelValue", "submit", "stop", "selectAgent", "update:files", "update:attachments", "update:incPrevQuestion"],
|
|
390
|
-
setup(
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
|
|
317
|
+
setup(e, { expose: $, emit: s }) {
|
|
318
|
+
const o = e, m = s, g = E(null), p = E(null), h = E(!1), v = (u) => ge(u), r = E([]), w = _(() => !!!(o.modelValue && o.modelValue.trim())), d = (u) => u ? o.getFileUrl ? o.getFileUrl(u) : fe(u, o.baseURL, "/algorithm/get_file_data") : "", a = (u) => {
|
|
319
|
+
m("selectAgent", u), h.value = !1;
|
|
320
|
+
}, C = (u) => {
|
|
321
|
+
m("update:incPrevQuestion", u ? "N" : "Y");
|
|
395
322
|
}, c = () => {
|
|
396
|
-
|
|
323
|
+
m("update:modelValue", "");
|
|
397
324
|
}, f = () => {
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
const
|
|
401
|
-
if (
|
|
402
|
-
const
|
|
403
|
-
for (const
|
|
404
|
-
|
|
405
|
-
var
|
|
406
|
-
const
|
|
407
|
-
return
|
|
408
|
-
}) ||
|
|
409
|
-
const R =
|
|
410
|
-
var
|
|
411
|
-
return ((
|
|
325
|
+
p.value && (p.value.value = "", p.value.click());
|
|
326
|
+
}, A = (u) => {
|
|
327
|
+
const n = u.target;
|
|
328
|
+
if (n.files && n.files.length > 0) {
|
|
329
|
+
const b = Array.from(n.files);
|
|
330
|
+
for (const k of b)
|
|
331
|
+
r.value.some((j) => {
|
|
332
|
+
var G;
|
|
333
|
+
const W = ((G = j.attachContent) == null ? void 0 : G.raw) || j.raw;
|
|
334
|
+
return W && W.name === k.name && W.size === k.size && W.lastModified === k.lastModified;
|
|
335
|
+
}) || r.value.push(v(k));
|
|
336
|
+
const R = r.value.map((k) => {
|
|
337
|
+
var z;
|
|
338
|
+
return ((z = k.attachContent) == null ? void 0 : z.raw) || k.raw;
|
|
412
339
|
}).filter(Boolean);
|
|
413
|
-
|
|
340
|
+
m("update:files", R), m("update:attachments", [...r.value]);
|
|
414
341
|
}
|
|
415
|
-
},
|
|
416
|
-
var
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
const R =
|
|
420
|
-
var
|
|
421
|
-
return ((
|
|
342
|
+
}, S = (u) => {
|
|
343
|
+
var k;
|
|
344
|
+
const n = r.value.splice(u, 1)[0], b = ((k = n == null ? void 0 : n.attachContent) == null ? void 0 : k.url) || (n == null ? void 0 : n.url);
|
|
345
|
+
b && b.startsWith("blob:") && URL.revokeObjectURL(b);
|
|
346
|
+
const R = r.value.map((z) => {
|
|
347
|
+
var j;
|
|
348
|
+
return ((j = z.attachContent) == null ? void 0 : j.raw) || z.raw;
|
|
422
349
|
}).filter(Boolean);
|
|
423
|
-
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
var
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
}),
|
|
430
|
-
},
|
|
431
|
-
if (
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}).
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
e.isComposing || e.keyCode === 229 || (e.preventDefault(), Y());
|
|
350
|
+
m("update:files", R), m("update:attachments", [...r.value]);
|
|
351
|
+
}, Q = () => {
|
|
352
|
+
r.value.forEach((u) => {
|
|
353
|
+
var b;
|
|
354
|
+
const n = ((b = u == null ? void 0 : u.attachContent) == null ? void 0 : b.url) || (u == null ? void 0 : u.url);
|
|
355
|
+
n && n.startsWith("blob:") && URL.revokeObjectURL(n);
|
|
356
|
+
}), r.value = [], m("update:files", []), m("update:attachments", []);
|
|
357
|
+
}, H = () => {
|
|
358
|
+
if (o.disabled || w.value) return;
|
|
359
|
+
const u = o.modelValue || "", n = r.value.map((R) => {
|
|
360
|
+
var k;
|
|
361
|
+
return ((k = R.attachContent) == null ? void 0 : k.raw) || R.raw;
|
|
362
|
+
}).filter(Boolean), b = [...r.value];
|
|
363
|
+
m("submit", { text: u, files: n, attachments: b, agent: o.currentAgent }), r.value = [], m("update:files", []), m("update:attachments", []);
|
|
364
|
+
}, F = (u) => {
|
|
365
|
+
u.isComposing || u.keyCode === 229 || (u.preventDefault(), H());
|
|
440
366
|
};
|
|
441
|
-
return
|
|
442
|
-
|
|
443
|
-
}),
|
|
367
|
+
return ie(() => {
|
|
368
|
+
Q();
|
|
369
|
+
}), $({
|
|
444
370
|
/** 手动清空所有附件 */
|
|
445
|
-
clearFiles:
|
|
371
|
+
clearFiles: Q,
|
|
446
372
|
/** 获取当前附件原生 File 列表 */
|
|
447
|
-
getFiles: () =>
|
|
448
|
-
var
|
|
449
|
-
return ((
|
|
373
|
+
getFiles: () => r.value.map((u) => {
|
|
374
|
+
var n;
|
|
375
|
+
return ((n = u.attachContent) == null ? void 0 : n.raw) || u.raw;
|
|
450
376
|
}).filter(Boolean),
|
|
451
377
|
/** 获取当前附件标准化对象列表 */
|
|
452
|
-
getAttachments: () =>
|
|
378
|
+
getAttachments: () => r.value,
|
|
453
379
|
/** 聚焦输入框 */
|
|
454
380
|
focus: () => {
|
|
455
|
-
var
|
|
456
|
-
(
|
|
381
|
+
var u;
|
|
382
|
+
(u = g.value) == null || u.focus();
|
|
457
383
|
}
|
|
458
|
-
}), (
|
|
459
|
-
e.showAgentBar || e.showIncPrevQuestion ? (
|
|
460
|
-
e.showAgentBar ? (
|
|
461
|
-
L(
|
|
462
|
-
visible:
|
|
463
|
-
"onUpdate:visible":
|
|
384
|
+
}), (u, n) => (l(), i("div", Le, [
|
|
385
|
+
e.showAgentBar || e.showIncPrevQuestion ? (l(), i("div", Se, [
|
|
386
|
+
e.showAgentBar ? (l(), i("div", Te, [
|
|
387
|
+
L(B(ue), {
|
|
388
|
+
visible: h.value,
|
|
389
|
+
"onUpdate:visible": n[0] || (n[0] = (b) => h.value = b),
|
|
464
390
|
placement: "top-start",
|
|
465
391
|
width: 260,
|
|
466
392
|
trigger: "click",
|
|
467
393
|
"popper-class": "wi-web-agent-popover"
|
|
468
394
|
}, {
|
|
469
|
-
reference:
|
|
470
|
-
var
|
|
395
|
+
reference: x(() => {
|
|
396
|
+
var b, R, k;
|
|
471
397
|
return [
|
|
472
398
|
t("div", {
|
|
473
|
-
class:
|
|
399
|
+
class: T(["wi-web-inputbox__agent-btn", { "is-disabled": e.disabled || e.talking }])
|
|
474
400
|
}, [
|
|
475
|
-
t("div",
|
|
476
|
-
(
|
|
401
|
+
t("div", Me, [
|
|
402
|
+
(b = e.currentAgent) != null && b.image_id && d(e.currentAgent.image_id) ? (l(), i("img", {
|
|
477
403
|
key: 0,
|
|
478
|
-
src:
|
|
404
|
+
src: d(e.currentAgent.image_id),
|
|
479
405
|
class: "wi-web-inputbox__agent-avatar"
|
|
480
|
-
}, null, 8,
|
|
406
|
+
}, null, 8, ze)) : (l(), i("svg", Ee, [...n[3] || (n[3] = [
|
|
407
|
+
t("circle", {
|
|
408
|
+
cx: "12",
|
|
409
|
+
cy: "8",
|
|
410
|
+
r: "4"
|
|
411
|
+
}, null, -1),
|
|
412
|
+
t("path", { d: "M4 20c0-4 4-6 8-6s8 2 8 6" }, null, -1)
|
|
413
|
+
])]))
|
|
481
414
|
]),
|
|
482
|
-
t("span",
|
|
483
|
-
(
|
|
484
|
-
class:
|
|
415
|
+
t("span", Pe, " @" + U(((R = e.currentAgent) == null ? void 0 : R.entry_title) || ((k = e.currentAgent) == null ? void 0 : k.entry_id) || e.defaultAgentTitle), 1),
|
|
416
|
+
(l(), i("svg", {
|
|
417
|
+
class: T(["wi-web-inputbox__agent-arrow", { "is-active": h.value }]),
|
|
485
418
|
viewBox: "0 0 1024 1024",
|
|
486
419
|
width: "12",
|
|
487
420
|
height: "12"
|
|
488
|
-
},
|
|
421
|
+
}, [...n[4] || (n[4] = [
|
|
422
|
+
t("path", {
|
|
423
|
+
d: "M840.4 300H183.6c-19.7 0-30.7 22.7-18.5 37.1l328.4 388.7c9.5 11.2 27.5 11.2 37 0l328.4-388.7c12.2-14.4 1.2-37.1-18.5-37.1z",
|
|
424
|
+
fill: "currentColor"
|
|
425
|
+
}, null, -1)
|
|
426
|
+
])], 2))
|
|
489
427
|
], 2)
|
|
490
428
|
];
|
|
491
429
|
}),
|
|
492
|
-
default:
|
|
493
|
-
t("div",
|
|
494
|
-
|
|
495
|
-
!e.agentList || e.agentList.length === 0 ? (
|
|
496
|
-
(
|
|
497
|
-
var R,
|
|
498
|
-
return
|
|
499
|
-
key:
|
|
500
|
-
class:
|
|
501
|
-
onClick: (
|
|
430
|
+
default: x(() => [
|
|
431
|
+
t("div", Oe, [
|
|
432
|
+
n[6] || (n[6] = t("div", { class: "wi-web-agent-list__header" }, "切换智能体", -1)),
|
|
433
|
+
!e.agentList || e.agentList.length === 0 ? (l(), i("div", De, " 暂无可选智能体 ")) : y("", !0),
|
|
434
|
+
(l(!0), i(M, null, N(e.agentList, (b) => {
|
|
435
|
+
var R, k;
|
|
436
|
+
return l(), i("div", {
|
|
437
|
+
key: b.entry_id,
|
|
438
|
+
class: T(["wi-web-agent-item", { "is-active": b.entry_id === ((R = e.currentAgent) == null ? void 0 : R.entry_id) }]),
|
|
439
|
+
onClick: (z) => a(b)
|
|
502
440
|
}, [
|
|
503
|
-
t("div",
|
|
504
|
-
|
|
441
|
+
t("div", Ne, [
|
|
442
|
+
b.image_id && d(b.image_id) ? (l(), i("img", {
|
|
505
443
|
key: 0,
|
|
506
|
-
src:
|
|
444
|
+
src: d(b.image_id),
|
|
507
445
|
class: "wi-web-agent-item__avatar"
|
|
508
|
-
}, null, 8,
|
|
509
|
-
|
|
446
|
+
}, null, 8, je)) : (l(), i("div", He, [...n[5] || (n[5] = [
|
|
447
|
+
t("svg", {
|
|
448
|
+
viewBox: "0 0 24 24",
|
|
449
|
+
fill: "none",
|
|
450
|
+
stroke: "currentColor",
|
|
451
|
+
"stroke-width": "2"
|
|
452
|
+
}, [
|
|
453
|
+
t("circle", {
|
|
454
|
+
cx: "12",
|
|
455
|
+
cy: "8",
|
|
456
|
+
r: "4"
|
|
457
|
+
}),
|
|
458
|
+
t("path", { d: "M4 20c0-4 4-6 8-6s8 2 8 6" })
|
|
459
|
+
], -1)
|
|
460
|
+
])])),
|
|
461
|
+
t("span", We, U(b.entry_title || b.entry_id), 1)
|
|
510
462
|
]),
|
|
511
|
-
|
|
512
|
-
], 10,
|
|
463
|
+
b.entry_id === ((k = e.currentAgent) == null ? void 0 : k.entry_id) ? (l(), i("span", qe, "✓")) : y("", !0)
|
|
464
|
+
], 10, Qe);
|
|
513
465
|
}), 128))
|
|
514
466
|
])
|
|
515
467
|
]),
|
|
516
468
|
_: 1
|
|
517
469
|
}, 8, ["visible"])
|
|
518
|
-
])) :
|
|
519
|
-
e.showIncPrevQuestion ? (
|
|
520
|
-
L(
|
|
470
|
+
])) : y("", !0),
|
|
471
|
+
e.showIncPrevQuestion ? (l(), i("div", Ke, [
|
|
472
|
+
L(B(ve), {
|
|
521
473
|
class: "wi-web-inputbox__ignore-prev",
|
|
522
474
|
"model-value": e.incPrevQuestion === "N",
|
|
523
|
-
"onUpdate:modelValue":
|
|
475
|
+
"onUpdate:modelValue": C
|
|
524
476
|
}, {
|
|
525
|
-
default:
|
|
526
|
-
|
|
527
|
-
]),
|
|
477
|
+
default: x(() => [...n[7] || (n[7] = [
|
|
478
|
+
P(" 忽略之前对话 ", -1)
|
|
479
|
+
])]),
|
|
528
480
|
_: 1
|
|
529
481
|
}, 8, ["model-value"])
|
|
530
|
-
])) :
|
|
531
|
-
])) :
|
|
532
|
-
t("div",
|
|
533
|
-
|
|
534
|
-
L(
|
|
535
|
-
items:
|
|
482
|
+
])) : y("", !0)
|
|
483
|
+
])) : y("", !0),
|
|
484
|
+
t("div", Ye, [
|
|
485
|
+
r.value.length > 0 ? (l(), i("div", Xe, [
|
|
486
|
+
L(ee, {
|
|
487
|
+
items: r.value,
|
|
536
488
|
"base-u-r-l": e.baseURL,
|
|
537
489
|
"get-file-url": e.getFileUrl,
|
|
538
490
|
removable: "",
|
|
539
|
-
onRemove:
|
|
491
|
+
onRemove: S
|
|
540
492
|
}, null, 8, ["items", "base-u-r-l", "get-file-url"])
|
|
541
|
-
])) :
|
|
542
|
-
L(
|
|
493
|
+
])) : y("", !0),
|
|
494
|
+
L(B(we), {
|
|
543
495
|
ref_key: "textareaRef",
|
|
544
|
-
ref:
|
|
496
|
+
ref: g,
|
|
545
497
|
"model-value": e.modelValue,
|
|
546
498
|
type: "textarea",
|
|
547
499
|
resize: "none",
|
|
@@ -550,81 +502,125 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
550
502
|
placeholder: e.placeholder,
|
|
551
503
|
disabled: e.disabled || e.talking,
|
|
552
504
|
class: "wi-web-inputbox__textarea",
|
|
553
|
-
"onUpdate:modelValue":
|
|
554
|
-
onKeydown:
|
|
505
|
+
"onUpdate:modelValue": n[1] || (n[1] = (b) => m("update:modelValue", b)),
|
|
506
|
+
onKeydown: se(X(F, ["exact"]), ["enter"])
|
|
555
507
|
}, null, 8, ["model-value", "maxlength", "autosize", "placeholder", "disabled", "onKeydown"]),
|
|
556
|
-
t("div",
|
|
557
|
-
t("div",
|
|
558
|
-
|
|
508
|
+
t("div", Ze, [
|
|
509
|
+
t("div", Ge, [
|
|
510
|
+
I(u.$slots, "footer-left", {}, void 0, !0)
|
|
559
511
|
]),
|
|
560
|
-
t("div",
|
|
561
|
-
e.showWordLimit ? (
|
|
562
|
-
|
|
563
|
-
e.maxlength ? (
|
|
564
|
-
|
|
565
|
-
], 64)) :
|
|
566
|
-
])) :
|
|
567
|
-
e.modelValue && !e.disabled && !e.talking ? (
|
|
512
|
+
t("div", Je, [
|
|
513
|
+
e.showWordLimit ? (l(), i("div", et, [
|
|
514
|
+
P(U((e.modelValue || "").length), 1),
|
|
515
|
+
e.maxlength ? (l(), i(M, { key: 0 }, [
|
|
516
|
+
P("/" + U(e.maxlength), 1)
|
|
517
|
+
], 64)) : y("", !0)
|
|
518
|
+
])) : y("", !0),
|
|
519
|
+
e.modelValue && !e.disabled && !e.talking ? (l(), V(B(Y), {
|
|
568
520
|
key: 1,
|
|
569
521
|
content: "清除",
|
|
570
522
|
placement: "top"
|
|
571
523
|
}, {
|
|
572
|
-
default:
|
|
524
|
+
default: x(() => [
|
|
573
525
|
t("button", {
|
|
574
526
|
type: "button",
|
|
575
527
|
class: "wi-web-inputbox__icon-btn",
|
|
576
528
|
onClick: c
|
|
577
|
-
},
|
|
529
|
+
}, [...n[8] || (n[8] = [
|
|
530
|
+
t("svg", {
|
|
531
|
+
viewBox: "0 0 1024 1024",
|
|
532
|
+
width: "16",
|
|
533
|
+
height: "16",
|
|
534
|
+
fill: "currentColor"
|
|
535
|
+
}, [
|
|
536
|
+
t("path", { d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896z m0 85.333333a362.666667 362.666667 0 1 0 0 725.333334 362.666667 362.666667 0 0 0 0-725.333334z m120.746667 181.333334a42.666667 42.666667 0 0 1 54.826666 4.693333l5.546667 6.357334a42.666667 42.666667 0 0 1-4.693333 54.826666l-6.357334 5.546667-114.730666 114.773333 114.730666 114.730667a42.666667 42.666667 0 0 1 5.461334 54.826666l-5.461334 6.357334a42.666667 42.666667 0 0 1-54.826666 5.461333l-6.357334-5.461333-114.730666-114.730667-114.730667 114.730667a42.666667 42.666667 0 0 1-54.826667 5.461333l-6.357333-5.461333a42.666667 42.666667 0 0 1-5.461333-54.826667l5.461333-6.357333 114.730667-114.730667-114.730667-114.773333a42.666667 42.666667 0 0 1-5.461333-54.826667l5.461333-6.357333a42.666667 42.666667 0 0 1 54.826667-5.461334l6.357333 5.461334 114.730667 114.730666 114.730666-114.730666a42.666667 42.666667 0 0 1 24.32-11.434667z" })
|
|
537
|
+
], -1)
|
|
538
|
+
])])
|
|
578
539
|
]),
|
|
579
540
|
_: 1
|
|
580
|
-
})) :
|
|
581
|
-
e.showUpload ? (
|
|
541
|
+
})) : y("", !0),
|
|
542
|
+
e.showUpload ? (l(), V(B(Y), {
|
|
582
543
|
key: 2,
|
|
583
544
|
content: "上传附件",
|
|
584
545
|
placement: "top"
|
|
585
546
|
}, {
|
|
586
|
-
default:
|
|
547
|
+
default: x(() => [
|
|
587
548
|
t("button", {
|
|
588
549
|
type: "button",
|
|
589
550
|
class: "wi-web-inputbox__icon-btn",
|
|
590
551
|
disabled: e.disabled || e.talking,
|
|
591
552
|
onClick: f
|
|
592
|
-
},
|
|
553
|
+
}, [...n[9] || (n[9] = [
|
|
554
|
+
t("svg", {
|
|
555
|
+
viewBox: "0 0 24 24",
|
|
556
|
+
width: "18",
|
|
557
|
+
height: "18",
|
|
558
|
+
fill: "none",
|
|
559
|
+
stroke: "currentColor",
|
|
560
|
+
"stroke-width": "2"
|
|
561
|
+
}, [
|
|
562
|
+
t("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" })
|
|
563
|
+
], -1)
|
|
564
|
+
])], 8, tt)
|
|
593
565
|
]),
|
|
594
566
|
_: 1
|
|
595
|
-
})) :
|
|
567
|
+
})) : y("", !0),
|
|
596
568
|
t("input", {
|
|
597
569
|
ref_key: "fileInputRef",
|
|
598
|
-
ref:
|
|
570
|
+
ref: p,
|
|
599
571
|
type: "file",
|
|
600
572
|
multiple: "",
|
|
601
573
|
accept: e.accept,
|
|
602
574
|
class: "wi-web-inputbox__hidden-file",
|
|
603
|
-
onChange:
|
|
604
|
-
}, null, 40,
|
|
605
|
-
|
|
606
|
-
e.talking ? (
|
|
575
|
+
onChange: A
|
|
576
|
+
}, null, 40, lt),
|
|
577
|
+
n[12] || (n[12] = t("div", { class: "wi-web-inputbox__divider" }, null, -1)),
|
|
578
|
+
e.talking ? (l(), V(B(Y), {
|
|
607
579
|
key: 3,
|
|
608
580
|
content: "停止生成",
|
|
609
581
|
placement: "top"
|
|
610
582
|
}, {
|
|
611
|
-
default:
|
|
583
|
+
default: x(() => [
|
|
612
584
|
t("div", {
|
|
613
585
|
class: "wi-web-inputbox__action-btn wi-web-inputbox__action-btn--stop",
|
|
614
|
-
onClick:
|
|
615
|
-
},
|
|
586
|
+
onClick: n[2] || (n[2] = (b) => m("stop"))
|
|
587
|
+
}, [...n[10] || (n[10] = [
|
|
588
|
+
t("svg", {
|
|
589
|
+
viewBox: "0 0 24 24",
|
|
590
|
+
width: "16",
|
|
591
|
+
height: "16",
|
|
592
|
+
fill: "currentColor"
|
|
593
|
+
}, [
|
|
594
|
+
t("rect", {
|
|
595
|
+
x: "6",
|
|
596
|
+
y: "6",
|
|
597
|
+
width: "12",
|
|
598
|
+
height: "12",
|
|
599
|
+
rx: "2"
|
|
600
|
+
})
|
|
601
|
+
], -1)
|
|
602
|
+
])])
|
|
616
603
|
]),
|
|
617
604
|
_: 1
|
|
618
|
-
})) : (
|
|
605
|
+
})) : (l(), V(B(Y), {
|
|
619
606
|
key: 4,
|
|
620
607
|
content: "发送",
|
|
621
608
|
placement: "top"
|
|
622
609
|
}, {
|
|
623
|
-
default:
|
|
610
|
+
default: x(() => [
|
|
624
611
|
t("div", {
|
|
625
|
-
class:
|
|
626
|
-
onClick:
|
|
627
|
-
},
|
|
612
|
+
class: T(["wi-web-inputbox__action-btn wi-web-inputbox__action-btn--send", { "is-disabled": e.disabled || !e.talking && w.value }]),
|
|
613
|
+
onClick: H
|
|
614
|
+
}, [...n[11] || (n[11] = [
|
|
615
|
+
t("svg", {
|
|
616
|
+
viewBox: "0 0 24 24",
|
|
617
|
+
width: "18",
|
|
618
|
+
height: "18",
|
|
619
|
+
fill: "currentColor"
|
|
620
|
+
}, [
|
|
621
|
+
t("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
|
|
622
|
+
], -1)
|
|
623
|
+
])], 2)
|
|
628
624
|
]),
|
|
629
625
|
_: 1
|
|
630
626
|
}))
|
|
@@ -633,21 +629,21 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
633
629
|
])
|
|
634
630
|
]));
|
|
635
631
|
}
|
|
636
|
-
}),
|
|
637
|
-
{ id: "recordset", answerType: "recordset", component:
|
|
638
|
-
],
|
|
632
|
+
}), nt = /* @__PURE__ */ D(at, [["__scopeId", "data-v-c6f1253a"]]), it = [
|
|
633
|
+
{ id: "recordset", answerType: "recordset", component: oe(() => Promise.resolve().then(() => Ut)) }
|
|
634
|
+
], st = (e) => te([...it, ...e ?? []]), ot = {
|
|
639
635
|
key: 0,
|
|
640
636
|
class: "wi-web-chat-messages__loading"
|
|
641
|
-
},
|
|
637
|
+
}, rt = {
|
|
642
638
|
key: 1,
|
|
643
639
|
class: "wi-web-chat-messages__empty"
|
|
644
|
-
},
|
|
640
|
+
}, dt = { class: "wi-web-chat-messages__empty-title" }, ct = { class: "wi-web-chat-messages__empty-description" }, ut = {
|
|
645
641
|
key: 0,
|
|
646
642
|
class: "wi-web-chat-messages__user"
|
|
647
|
-
},
|
|
643
|
+
}, vt = { class: "wi-web-chat-messages__user-wrapper" }, wt = { class: "wi-web-chat-messages__user-bubble" }, mt = {
|
|
648
644
|
key: 1,
|
|
649
645
|
class: "wi-web-chat-messages__assistant"
|
|
650
|
-
},
|
|
646
|
+
}, bt = /* @__PURE__ */ O({
|
|
651
647
|
__name: "ChatMessagesView",
|
|
652
648
|
props: {
|
|
653
649
|
messages: {},
|
|
@@ -660,86 +656,86 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
660
656
|
emptyDescription: { default: "回答内容由共享渲染层统一分发" }
|
|
661
657
|
},
|
|
662
658
|
emits: ["loadOlder", "updateThinkingExpanded"],
|
|
663
|
-
setup(
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
getFileUrl: (
|
|
668
|
-
var
|
|
669
|
-
return ((
|
|
659
|
+
setup(e, { expose: $, emit: s }) {
|
|
660
|
+
const o = e, m = s;
|
|
661
|
+
le(
|
|
662
|
+
o.outputFileConfig ?? {
|
|
663
|
+
getFileUrl: (a) => {
|
|
664
|
+
var C;
|
|
665
|
+
return ((C = o.getFileUrl) == null ? void 0 : C.call(o, a)) ?? (o.baseURL ? `${o.baseURL.replace(/\/$/, "")}/algorithm/get_file_data?file_id=${encodeURIComponent(a)}` : "");
|
|
670
666
|
}
|
|
671
667
|
}
|
|
672
668
|
);
|
|
673
|
-
const
|
|
674
|
-
return
|
|
675
|
-
() =>
|
|
676
|
-
(
|
|
677
|
-
|
|
669
|
+
const g = E(), { showScrollToBottom: p, forceScrollToBottom: h, requestScrollToBottom: v, resetScrollState: r, onReachTop: w } = ye(g), d = _(() => st(o.parsers));
|
|
670
|
+
return Z(
|
|
671
|
+
() => o.messages.length === 0,
|
|
672
|
+
(a) => {
|
|
673
|
+
a && r();
|
|
678
674
|
}
|
|
679
|
-
),
|
|
680
|
-
() =>
|
|
675
|
+
), Z(
|
|
676
|
+
() => o.messages[o.messages.length - 1],
|
|
681
677
|
() => {
|
|
682
|
-
|
|
678
|
+
v();
|
|
683
679
|
},
|
|
684
680
|
{ deep: !0 }
|
|
685
|
-
),
|
|
681
|
+
), w(() => m("loadOlder")), $({
|
|
686
682
|
/** 强制滚动到底部 */
|
|
687
|
-
forceScrollToBottom:
|
|
683
|
+
forceScrollToBottom: h,
|
|
688
684
|
/** 自动滚动开启时请求滚动到底部 */
|
|
689
|
-
requestScrollToBottom:
|
|
690
|
-
}), (
|
|
685
|
+
requestScrollToBottom: v
|
|
686
|
+
}), (a, C) => (l(), i("div", {
|
|
691
687
|
ref_key: "scrollEl",
|
|
692
|
-
ref:
|
|
688
|
+
ref: g,
|
|
693
689
|
class: "wi-web-chat-messages"
|
|
694
690
|
}, [
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
t("div",
|
|
698
|
-
t("div",
|
|
699
|
-
])) :
|
|
700
|
-
(
|
|
691
|
+
e.loading ? (l(), i("div", ot, "历史加载中...")) : e.messages.length === 0 ? (l(), i("div", rt, [
|
|
692
|
+
C[1] || (C[1] = t("div", { class: "wi-web-chat-messages__empty-logo" }, "WI", -1)),
|
|
693
|
+
t("div", dt, U(e.emptyTitle), 1),
|
|
694
|
+
t("div", ct, U(e.emptyDescription), 1)
|
|
695
|
+
])) : y("", !0),
|
|
696
|
+
(l(!0), i(M, null, N(e.messages, (c) => (l(), i(M, {
|
|
701
697
|
key: c.id
|
|
702
698
|
}, [
|
|
703
|
-
c.role === "user" ? (
|
|
704
|
-
t("div",
|
|
705
|
-
c.attachments && c.attachments.length > 0 ? (
|
|
699
|
+
c.role === "user" ? (l(), i("div", ut, [
|
|
700
|
+
t("div", vt, [
|
|
701
|
+
c.attachments && c.attachments.length > 0 ? (l(), V(ee, {
|
|
706
702
|
key: 0,
|
|
707
703
|
class: "wi-web-chat-messages__attachments",
|
|
708
704
|
items: c.attachments,
|
|
709
|
-
"base-u-r-l":
|
|
710
|
-
"get-file-url":
|
|
711
|
-
}, null, 8, ["items", "base-u-r-l", "get-file-url"])) :
|
|
712
|
-
t("div",
|
|
705
|
+
"base-u-r-l": e.baseURL,
|
|
706
|
+
"get-file-url": e.getFileUrl
|
|
707
|
+
}, null, 8, ["items", "base-u-r-l", "get-file-url"])) : y("", !0),
|
|
708
|
+
t("div", wt, U(c.content), 1)
|
|
713
709
|
])
|
|
714
|
-
])) : (
|
|
715
|
-
L(
|
|
710
|
+
])) : (l(), i("div", mt, [
|
|
711
|
+
L(B(ae), {
|
|
716
712
|
steps: c.thinking.steps,
|
|
717
713
|
expanded: c.thinking.expanded,
|
|
718
|
-
"onUpdate:expanded": (f) =>
|
|
714
|
+
"onUpdate:expanded": (f) => m("updateThinkingExpanded", c, f)
|
|
719
715
|
}, null, 8, ["steps", "expanded", "onUpdate:expanded"]),
|
|
720
|
-
L(
|
|
716
|
+
L(B(ne), {
|
|
721
717
|
answer: c.answer,
|
|
722
718
|
error: c.error,
|
|
723
719
|
stopped: c.stopped,
|
|
724
|
-
"content-map":
|
|
720
|
+
"content-map": d.value
|
|
725
721
|
}, null, 8, ["answer", "error", "stopped", "content-map"])
|
|
726
722
|
]))
|
|
727
723
|
], 64))), 128)),
|
|
728
|
-
L(
|
|
729
|
-
default:
|
|
730
|
-
|
|
724
|
+
L(re, { name: "wi-web-chat-messages-fade" }, {
|
|
725
|
+
default: x(() => [
|
|
726
|
+
B(p) ? (l(), i("button", {
|
|
731
727
|
key: 0,
|
|
732
728
|
type: "button",
|
|
733
729
|
class: "wi-web-chat-messages__bottom",
|
|
734
|
-
onClick:
|
|
735
|
-
(...c) =>
|
|
736
|
-
}, " 回到底部 ")) :
|
|
730
|
+
onClick: C[0] || (C[0] = //@ts-ignore
|
|
731
|
+
(...c) => B(h) && B(h)(...c))
|
|
732
|
+
}, " 回到底部 ")) : y("", !0)
|
|
737
733
|
]),
|
|
738
734
|
_: 1
|
|
739
735
|
})
|
|
740
736
|
], 512));
|
|
741
737
|
}
|
|
742
|
-
}),
|
|
738
|
+
}), ht = /* @__PURE__ */ D(bt, [["__scopeId", "data-v-c18f2f94"]]), ft = { class: "wi-web-chat-container" }, gt = { class: "wi-web-chat-container__footer" }, pt = /* @__PURE__ */ O({
|
|
743
739
|
__name: "ChatContainer",
|
|
744
740
|
props: {
|
|
745
741
|
messages: {},
|
|
@@ -761,153 +757,153 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
761
757
|
disabled: { type: Boolean, default: !1 }
|
|
762
758
|
},
|
|
763
759
|
emits: ["update:question", "update:incPrevQuestion", "submit", "stop", "selectAgent", "loadOlder", "updateThinkingExpanded"],
|
|
764
|
-
setup(
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
|
|
760
|
+
setup(e, { emit: $ }) {
|
|
761
|
+
const s = e, o = $, m = (h) => {
|
|
762
|
+
o("submit", h);
|
|
763
|
+
}, g = () => {
|
|
764
|
+
s.hasMore && o("loadOlder");
|
|
765
|
+
}, p = (h) => {
|
|
766
|
+
o("selectAgent", h);
|
|
771
767
|
};
|
|
772
|
-
return (
|
|
773
|
-
|
|
774
|
-
L(
|
|
775
|
-
messages:
|
|
776
|
-
parsers:
|
|
777
|
-
"base-u-r-l":
|
|
778
|
-
"get-file-url":
|
|
779
|
-
"output-file-config":
|
|
780
|
-
loading:
|
|
781
|
-
"empty-title":
|
|
782
|
-
"empty-description":
|
|
783
|
-
onLoadOlder:
|
|
784
|
-
onUpdateThinkingExpanded:
|
|
768
|
+
return (h, v) => (l(), i("section", ft, [
|
|
769
|
+
I(h.$slots, "messages", {}, () => [
|
|
770
|
+
L(ht, {
|
|
771
|
+
messages: e.messages,
|
|
772
|
+
parsers: e.parsers,
|
|
773
|
+
"base-u-r-l": e.baseURL,
|
|
774
|
+
"get-file-url": e.getFileUrl,
|
|
775
|
+
"output-file-config": e.outputFileConfig,
|
|
776
|
+
loading: e.loading,
|
|
777
|
+
"empty-title": e.emptyTitle,
|
|
778
|
+
"empty-description": e.emptyDescription,
|
|
779
|
+
onLoadOlder: g,
|
|
780
|
+
onUpdateThinkingExpanded: v[0] || (v[0] = (r, w) => o("updateThinkingExpanded", r, w))
|
|
785
781
|
}, null, 8, ["messages", "parsers", "base-u-r-l", "get-file-url", "output-file-config", "loading", "empty-title", "empty-description"])
|
|
786
782
|
], !0),
|
|
787
|
-
|
|
788
|
-
t("footer",
|
|
789
|
-
L(
|
|
790
|
-
"model-value":
|
|
791
|
-
"onUpdate:modelValue":
|
|
792
|
-
"inc-prev-question":
|
|
793
|
-
"onUpdate:incPrevQuestion":
|
|
794
|
-
"base-u-r-l":
|
|
795
|
-
disabled:
|
|
796
|
-
talking:
|
|
797
|
-
"agent-list":
|
|
798
|
-
"current-agent":
|
|
799
|
-
placeholder:
|
|
800
|
-
"get-file-url":
|
|
801
|
-
onSelectAgent:
|
|
802
|
-
onSubmit:
|
|
803
|
-
onStop:
|
|
783
|
+
I(h.$slots, "above-input", {}, void 0, !0),
|
|
784
|
+
t("footer", gt, [
|
|
785
|
+
L(nt, {
|
|
786
|
+
"model-value": e.question,
|
|
787
|
+
"onUpdate:modelValue": v[1] || (v[1] = (r) => o("update:question", r)),
|
|
788
|
+
"inc-prev-question": e.incPrevQuestion,
|
|
789
|
+
"onUpdate:incPrevQuestion": v[2] || (v[2] = (r) => o("update:incPrevQuestion", r)),
|
|
790
|
+
"base-u-r-l": e.baseURL,
|
|
791
|
+
disabled: e.disabled || !e.session,
|
|
792
|
+
talking: e.talking,
|
|
793
|
+
"agent-list": e.agentList,
|
|
794
|
+
"current-agent": e.currentAgent,
|
|
795
|
+
placeholder: e.placeholder,
|
|
796
|
+
"get-file-url": e.getFileUrl,
|
|
797
|
+
onSelectAgent: p,
|
|
798
|
+
onSubmit: m,
|
|
799
|
+
onStop: v[3] || (v[3] = (r) => o("stop"))
|
|
804
800
|
}, null, 8, ["model-value", "inc-prev-question", "base-u-r-l", "disabled", "talking", "agent-list", "current-agent", "placeholder", "get-file-url"])
|
|
805
801
|
])
|
|
806
802
|
]));
|
|
807
803
|
}
|
|
808
|
-
}),
|
|
804
|
+
}), Nt = /* @__PURE__ */ D(pt, [["__scopeId", "data-v-8663b501"]]), yt = {
|
|
809
805
|
key: 0,
|
|
810
806
|
class: "wi-web-recordset"
|
|
811
|
-
},
|
|
812
|
-
type: "button",
|
|
813
|
-
class: "wi-web-recordset__columns-btn",
|
|
814
|
-
title: "选择展示列"
|
|
815
|
-
}, [
|
|
816
|
-
/* @__PURE__ */ t("svg", {
|
|
817
|
-
class: "wi-web-recordset__columns-icon",
|
|
818
|
-
viewBox: "0 0 24 24",
|
|
819
|
-
fill: "none",
|
|
820
|
-
stroke: "currentColor",
|
|
821
|
-
"stroke-width": "2"
|
|
822
|
-
}, [
|
|
823
|
-
/* @__PURE__ */ t("rect", {
|
|
824
|
-
x: "3",
|
|
825
|
-
y: "4",
|
|
826
|
-
width: "18",
|
|
827
|
-
height: "16",
|
|
828
|
-
rx: "2"
|
|
829
|
-
}),
|
|
830
|
-
/* @__PURE__ */ t("path", { d: "M9 4v16M15 4v16" })
|
|
831
|
-
]),
|
|
832
|
-
/* @__PURE__ */ t("span", null, "列")
|
|
833
|
-
], -1)), rs = { class: "wi-web-recordset__columns-panel" }, ds = /* @__PURE__ */ ie(() => /* @__PURE__ */ t("div", { class: "wi-web-recordset__columns-panel-title" }, "选择展示列", -1)), cs = /* @__PURE__ */ D({
|
|
807
|
+
}, kt = { class: "wi-web-recordset__header" }, _t = { class: "wi-web-recordset__title" }, xt = { class: "wi-web-recordset__columns-panel" }, Ct = /* @__PURE__ */ O({
|
|
834
808
|
__name: "RecordsetTable",
|
|
835
809
|
props: {
|
|
836
810
|
report: {},
|
|
837
811
|
maxHeight: { default: 420 }
|
|
838
812
|
},
|
|
839
|
-
setup(
|
|
840
|
-
const
|
|
813
|
+
setup(e) {
|
|
814
|
+
const $ = e, s = _(() => {
|
|
841
815
|
var c;
|
|
842
|
-
return ((c =
|
|
843
|
-
}),
|
|
844
|
-
key: `c${
|
|
845
|
-
title: (f == null ? void 0 : f.title) || (f == null ? void 0 : f.name) || `列${
|
|
846
|
-
}))),
|
|
847
|
-
const c = Number(
|
|
816
|
+
return ((c = $.report) == null ? void 0 : c.values) ?? {};
|
|
817
|
+
}), o = _(() => s.value.chart === "table"), m = _(() => s.value.title ?? ""), g = _(() => (Array.isArray(s.value.cols) ? s.value.cols : []).map((f, A) => ({
|
|
818
|
+
key: `c${A}`,
|
|
819
|
+
title: (f == null ? void 0 : f.title) || (f == null ? void 0 : f.name) || `列${A + 1}`
|
|
820
|
+
}))), p = _(() => {
|
|
821
|
+
const c = Number(s.value.max_cols);
|
|
848
822
|
return Number.isFinite(c) && c > 0 ? c : 1 / 0;
|
|
849
|
-
}),
|
|
850
|
-
|
|
851
|
-
() =>
|
|
823
|
+
}), h = _(() => g.value.length > p.value), v = E([]), r = _(() => new Set(v.value)), w = _(() => g.value.filter((c) => r.value.has(c.key)));
|
|
824
|
+
Z(
|
|
825
|
+
() => g.value.map((c) => c.key).join("|"),
|
|
852
826
|
() => {
|
|
853
|
-
|
|
827
|
+
v.value = g.value.slice(0, p.value).map((c) => c.key);
|
|
854
828
|
},
|
|
855
829
|
{ immediate: !0 }
|
|
856
830
|
);
|
|
857
|
-
const
|
|
858
|
-
const
|
|
859
|
-
return
|
|
860
|
-
|
|
861
|
-
}),
|
|
862
|
-
})),
|
|
863
|
-
const
|
|
864
|
-
f ?
|
|
831
|
+
const d = _(() => (Array.isArray(s.value.values) ? s.value.values : []).map((f) => {
|
|
832
|
+
const A = {};
|
|
833
|
+
return g.value.forEach((S, Q) => {
|
|
834
|
+
A[S.key] = Array.isArray(f) ? f[Q] : void 0;
|
|
835
|
+
}), A;
|
|
836
|
+
})), a = E(!1), C = (c, f) => {
|
|
837
|
+
const A = new Set(v.value);
|
|
838
|
+
f ? A.add(c) : A.delete(c), v.value = g.value.filter((S) => A.has(S.key)).map((S) => S.key);
|
|
865
839
|
};
|
|
866
840
|
return (c, f) => {
|
|
867
|
-
const
|
|
868
|
-
return
|
|
869
|
-
t("div",
|
|
870
|
-
t("div",
|
|
871
|
-
|
|
841
|
+
const A = K("el-checkbox"), S = K("el-popover"), Q = K("el-table-column"), H = K("el-table");
|
|
842
|
+
return o.value ? (l(), i("div", yt, [
|
|
843
|
+
t("div", kt, [
|
|
844
|
+
t("div", _t, U(m.value), 1),
|
|
845
|
+
h.value ? (l(), V(S, {
|
|
872
846
|
key: 0,
|
|
873
|
-
visible:
|
|
874
|
-
"onUpdate:visible": f[0] || (f[0] = (F) =>
|
|
847
|
+
visible: a.value,
|
|
848
|
+
"onUpdate:visible": f[0] || (f[0] = (F) => a.value = F),
|
|
875
849
|
placement: "bottom-end",
|
|
876
850
|
width: 220,
|
|
877
851
|
trigger: "click",
|
|
878
852
|
"popper-class": "wi-web-recordset-columns-popper"
|
|
879
853
|
}, {
|
|
880
|
-
reference:
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
(
|
|
854
|
+
reference: x(() => [...f[1] || (f[1] = [
|
|
855
|
+
t("button", {
|
|
856
|
+
type: "button",
|
|
857
|
+
class: "wi-web-recordset__columns-btn",
|
|
858
|
+
title: "选择展示列"
|
|
859
|
+
}, [
|
|
860
|
+
t("svg", {
|
|
861
|
+
class: "wi-web-recordset__columns-icon",
|
|
862
|
+
viewBox: "0 0 24 24",
|
|
863
|
+
fill: "none",
|
|
864
|
+
stroke: "currentColor",
|
|
865
|
+
"stroke-width": "2"
|
|
866
|
+
}, [
|
|
867
|
+
t("rect", {
|
|
868
|
+
x: "3",
|
|
869
|
+
y: "4",
|
|
870
|
+
width: "18",
|
|
871
|
+
height: "16",
|
|
872
|
+
rx: "2"
|
|
873
|
+
}),
|
|
874
|
+
t("path", { d: "M9 4v16M15 4v16" })
|
|
875
|
+
]),
|
|
876
|
+
t("span", null, "列")
|
|
877
|
+
], -1)
|
|
878
|
+
])]),
|
|
879
|
+
default: x(() => [
|
|
880
|
+
t("div", xt, [
|
|
881
|
+
f[2] || (f[2] = t("div", { class: "wi-web-recordset__columns-panel-title" }, "选择展示列", -1)),
|
|
882
|
+
(l(!0), i(M, null, N(g.value, (F) => (l(), V(A, {
|
|
887
883
|
key: F.key,
|
|
888
884
|
class: "wi-web-recordset__column-item",
|
|
889
|
-
"model-value":
|
|
890
|
-
"onUpdate:modelValue": (
|
|
885
|
+
"model-value": r.value.has(F.key),
|
|
886
|
+
"onUpdate:modelValue": (u) => C(F.key, !!u)
|
|
891
887
|
}, {
|
|
892
|
-
default:
|
|
893
|
-
|
|
888
|
+
default: x(() => [
|
|
889
|
+
P(U(F.title), 1)
|
|
894
890
|
]),
|
|
895
891
|
_: 2
|
|
896
892
|
}, 1032, ["model-value", "onUpdate:modelValue"]))), 128))
|
|
897
893
|
])
|
|
898
894
|
]),
|
|
899
895
|
_: 1
|
|
900
|
-
}, 8, ["visible"])) :
|
|
896
|
+
}, 8, ["visible"])) : y("", !0)
|
|
901
897
|
]),
|
|
902
|
-
L(
|
|
903
|
-
data:
|
|
898
|
+
L(H, {
|
|
899
|
+
data: d.value,
|
|
904
900
|
border: "",
|
|
905
901
|
size: "small",
|
|
906
902
|
class: "wi-web-recordset__table",
|
|
907
|
-
"max-height":
|
|
903
|
+
"max-height": e.maxHeight
|
|
908
904
|
}, {
|
|
909
|
-
default:
|
|
910
|
-
(
|
|
905
|
+
default: x(() => [
|
|
906
|
+
(l(!0), i(M, null, N(w.value, (F) => (l(), V(Q, {
|
|
911
907
|
key: F.key,
|
|
912
908
|
prop: F.key,
|
|
913
909
|
label: F.title,
|
|
@@ -917,13 +913,13 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
917
913
|
]),
|
|
918
914
|
_: 1
|
|
919
915
|
}, 8, ["data", "max-height"])
|
|
920
|
-
])) :
|
|
916
|
+
])) : y("", !0);
|
|
921
917
|
};
|
|
922
918
|
}
|
|
923
|
-
}),
|
|
919
|
+
}), $t = /* @__PURE__ */ D(Ct, [["__scopeId", "data-v-96941d57"]]), Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
924
920
|
__proto__: null,
|
|
925
|
-
default:
|
|
926
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
921
|
+
default: $t
|
|
922
|
+
}, Symbol.toStringTag, { value: "Module" })), At = { class: "wi-web-env-switch__track" }, Bt = { class: "wi-web-env-switch__items" }, Ft = ["disabled", "onClick"], Rt = { class: "wi-web-env-switch__icon" }, It = {
|
|
927
923
|
key: 0,
|
|
928
924
|
viewBox: "0 0 24 24",
|
|
929
925
|
fill: "none",
|
|
@@ -931,32 +927,20 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
931
927
|
"stroke-width": "1.8",
|
|
932
928
|
"stroke-linecap": "round",
|
|
933
929
|
"stroke-linejoin": "round"
|
|
934
|
-
},
|
|
935
|
-
bs
|
|
936
|
-
], gs = {
|
|
930
|
+
}, Vt = {
|
|
937
931
|
key: 1,
|
|
938
932
|
viewBox: "0 0 24 24",
|
|
939
933
|
fill: "none",
|
|
940
934
|
stroke: "currentColor",
|
|
941
935
|
"stroke-width": "1.8",
|
|
942
936
|
"stroke-linecap": "round"
|
|
943
|
-
},
|
|
944
|
-
x: "2.5",
|
|
945
|
-
y: "4",
|
|
946
|
-
width: "19",
|
|
947
|
-
height: "12",
|
|
948
|
-
rx: "2",
|
|
949
|
-
"stroke-linejoin": "round"
|
|
950
|
-
}, null, -1)), ks = /* @__PURE__ */ oe(() => /* @__PURE__ */ t("path", { d: "M8.5 20h7M12 16v4" }, null, -1)), $s = [
|
|
951
|
-
ys,
|
|
952
|
-
ks
|
|
953
|
-
], Cs = { class: "wi-web-env-switch__label" }, Us = {
|
|
937
|
+
}, Lt = { class: "wi-web-env-switch__label" }, St = {
|
|
954
938
|
key: 0,
|
|
955
939
|
class: "wi-web-env-switch__hint"
|
|
956
|
-
},
|
|
940
|
+
}, Tt = { class: "wi-web-env-switch__hint-text" }, Mt = {
|
|
957
941
|
key: 0,
|
|
958
942
|
class: "wi-web-env-switch__hint-status"
|
|
959
|
-
},
|
|
943
|
+
}, zt = /* @__PURE__ */ O({
|
|
960
944
|
__name: "EnvSwitch",
|
|
961
945
|
props: {
|
|
962
946
|
modelValue: { default: "local" },
|
|
@@ -966,8 +950,8 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
966
950
|
showHint: { type: Boolean, default: !0 }
|
|
967
951
|
},
|
|
968
952
|
emits: ["update:modelValue", "change"],
|
|
969
|
-
setup(
|
|
970
|
-
const
|
|
953
|
+
setup(e, { emit: $ }) {
|
|
954
|
+
const s = e, o = $, m = [
|
|
971
955
|
{
|
|
972
956
|
value: "local",
|
|
973
957
|
label: "本地电脑",
|
|
@@ -982,79 +966,90 @@ const H = (p) => (q("data-v-dc2d5f2b"), p = p(), K(), p), Ie = { class: "wi-web-
|
|
|
982
966
|
status: "未连接",
|
|
983
967
|
online: !1
|
|
984
968
|
}
|
|
985
|
-
],
|
|
986
|
-
const
|
|
987
|
-
return
|
|
988
|
-
}),
|
|
989
|
-
if (!
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
const h = b.value, o = h.length || 1, l = Math.max(h.findIndex((c) => c.value === i.modelValue), 0), U = m[i.size] ?? m.default;
|
|
969
|
+
], g = { default: 3, small: 2 }, p = _(() => {
|
|
970
|
+
const w = s.options ?? [];
|
|
971
|
+
return w.length > 0 ? w : m;
|
|
972
|
+
}), h = _(() => {
|
|
973
|
+
if (!s.showHint) return null;
|
|
974
|
+
const w = p.value;
|
|
975
|
+
return w.find((d) => d.value === s.modelValue) ?? w[0] ?? null;
|
|
976
|
+
}), v = _(() => {
|
|
977
|
+
const w = p.value, d = w.length || 1, a = Math.max(w.findIndex((c) => c.value === s.modelValue), 0), C = g[s.size] ?? g.default;
|
|
995
978
|
return {
|
|
996
|
-
width: `calc(${100 /
|
|
997
|
-
transform: `translateX(${
|
|
979
|
+
width: `calc(${100 / d}% - ${2 * C / d}px)`,
|
|
980
|
+
transform: `translateX(${a * 100}%)`
|
|
998
981
|
};
|
|
999
|
-
}),
|
|
1000
|
-
|
|
982
|
+
}), r = (w) => {
|
|
983
|
+
s.disabled || w.disabled || w.value !== s.modelValue && (o("update:modelValue", w.value), o("change", w));
|
|
1001
984
|
};
|
|
1002
|
-
return (
|
|
1003
|
-
class:
|
|
985
|
+
return (w, d) => (l(), i("div", {
|
|
986
|
+
class: T(["wi-web-env-switch", [`is-${e.size}`, { "is-disabled": e.disabled }]])
|
|
1004
987
|
}, [
|
|
1005
|
-
t("div",
|
|
988
|
+
t("div", At, [
|
|
1006
989
|
t("span", {
|
|
1007
990
|
class: "wi-web-env-switch__thumb",
|
|
1008
|
-
style:
|
|
991
|
+
style: de(v.value)
|
|
1009
992
|
}, null, 4),
|
|
1010
|
-
t("div",
|
|
1011
|
-
(
|
|
1012
|
-
key:
|
|
993
|
+
t("div", Bt, [
|
|
994
|
+
(l(!0), i(M, null, N(p.value, (a) => (l(), i("button", {
|
|
995
|
+
key: a.value,
|
|
1013
996
|
type: "button",
|
|
1014
|
-
class:
|
|
1015
|
-
disabled:
|
|
1016
|
-
onClick: (
|
|
997
|
+
class: T(["wi-web-env-switch__item", { "is-active": a.value === e.modelValue, "is-disabled": a.disabled }]),
|
|
998
|
+
disabled: e.disabled || a.disabled,
|
|
999
|
+
onClick: (C) => r(a)
|
|
1017
1000
|
}, [
|
|
1018
|
-
t("span",
|
|
1019
|
-
|
|
1001
|
+
t("span", Rt, [
|
|
1002
|
+
a.value === "cloud" ? (l(), i("svg", It, [...d[0] || (d[0] = [
|
|
1003
|
+
t("path", { d: "M17.5 19a4.5 4.5 0 0 0 .6-8.96 6 6 0 0 0-11.63 1.4A3.8 3.8 0 0 0 7 19z" }, null, -1)
|
|
1004
|
+
])])) : (l(), i("svg", Vt, [...d[1] || (d[1] = [
|
|
1005
|
+
t("rect", {
|
|
1006
|
+
x: "2.5",
|
|
1007
|
+
y: "4",
|
|
1008
|
+
width: "19",
|
|
1009
|
+
height: "12",
|
|
1010
|
+
rx: "2",
|
|
1011
|
+
"stroke-linejoin": "round"
|
|
1012
|
+
}, null, -1),
|
|
1013
|
+
t("path", { d: "M8.5 20h7M12 16v4" }, null, -1)
|
|
1014
|
+
])]))
|
|
1020
1015
|
]),
|
|
1021
|
-
t("span",
|
|
1022
|
-
], 10,
|
|
1016
|
+
t("span", Lt, U(a.label), 1)
|
|
1017
|
+
], 10, Ft))), 128))
|
|
1023
1018
|
])
|
|
1024
1019
|
]),
|
|
1025
|
-
|
|
1026
|
-
t("span",
|
|
1027
|
-
|
|
1020
|
+
h.value ? (l(), i("div", St, [
|
|
1021
|
+
t("span", Tt, U(h.value.description), 1),
|
|
1022
|
+
h.value.status ? (l(), i("span", Mt, [
|
|
1028
1023
|
t("i", {
|
|
1029
|
-
class:
|
|
1024
|
+
class: T(["wi-web-env-switch__dot", { "is-online": h.value.online }])
|
|
1030
1025
|
}, null, 2),
|
|
1031
|
-
|
|
1032
|
-
])) :
|
|
1033
|
-
])) :
|
|
1026
|
+
P(" " + U(h.value.status), 1)
|
|
1027
|
+
])) : y("", !0)
|
|
1028
|
+
])) : y("", !0)
|
|
1034
1029
|
], 2));
|
|
1035
1030
|
}
|
|
1036
|
-
}),
|
|
1031
|
+
}), jt = /* @__PURE__ */ D(zt, [["__scopeId", "data-v-94659445"]]);
|
|
1037
1032
|
export {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1033
|
+
qt as AiAnswerBubble,
|
|
1034
|
+
Re as AttachmentCard,
|
|
1035
|
+
ee as AttachmentList,
|
|
1036
|
+
Nt as ChatContainer,
|
|
1037
|
+
ht as ChatMessagesView,
|
|
1038
|
+
Kt as ClarificationCard,
|
|
1039
|
+
Yt as DeepThinkingSteps,
|
|
1040
|
+
jt as EnvSwitch,
|
|
1041
|
+
Xt as HostActionStatus,
|
|
1042
|
+
Zt as IframePage,
|
|
1043
|
+
nt as Inputbox,
|
|
1044
|
+
Gt as KnowledgeStreamResult,
|
|
1045
|
+
Jt as OutputFile,
|
|
1046
|
+
$t as RecordsetTable,
|
|
1047
|
+
el as createAnswerContentMap,
|
|
1048
|
+
st as createWebAnswerContentMap,
|
|
1049
|
+
tl as injectIframeResizerChild,
|
|
1050
|
+
ll as provideIframePageConfig,
|
|
1051
|
+
al as provideOutputFileConfig,
|
|
1052
|
+
nl as resolveIframePlaceholders,
|
|
1053
|
+
il as useIframePage
|
|
1059
1054
|
};
|
|
1060
1055
|
//# sourceMappingURL=index.js.map
|