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