wi-chat 0.3.0 → 0.5.0
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 +101 -68
- package/dist/mobile-ui/chat/ChatContainer.vue.d.ts +8 -3
- package/dist/mobile-ui/chat/ChatMessagesView.vue.d.ts +5 -0
- package/dist/mobile-ui/index.cjs +1 -1
- package/dist/mobile-ui/index.d.ts +2 -2
- package/dist/mobile-ui/index.js +79 -71
- 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/answerCom/outputFile/parseOutputFile.d.ts +43 -0
- package/dist/parser/answerCom/outputFile/types.d.ts +17 -0
- package/dist/parser/index.cjs +2 -2
- package/dist/parser/index.d.ts +12 -0
- package/dist/parser/index.js +537 -211
- 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 +4 -0
- package/dist/renderers/index.js +796 -143
- package/dist/renderers/outputFile/OutputFile.vue.d.ts +19 -0
- package/dist/renderers/outputFile/useOutputFile.d.ts +85 -0
- 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 +182 -162
- package/dist/tools/markdown/index.d.ts +1 -1
- package/dist/tools/markdown/renderMarkdown.d.ts +25 -0
- package/dist/web-ui/attach/AttachmentList.vue.d.ts +1 -1
- package/dist/web-ui/chat/ChatContainer.vue.d.ts +8 -3
- package/dist/web-ui/chat/ChatMessagesView.vue.d.ts +5 -0
- 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 +2 -2
- package/dist/web-ui/index.js +428 -408
- 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
|
-
import { createAnswerContentMap as re,
|
|
2
|
-
import { AiAnswerBubble as
|
|
3
|
-
import { defineComponent as D, computed as $, openBlock as
|
|
4
|
-
import { ElImage as
|
|
5
|
-
import { isImageAttachment as
|
|
1
|
+
import { createAnswerContentMap as re, provideOutputFileConfig as de, DeepThinkingSteps as ce, AiAnswerBubble as ue } from "wi-chat/renderers";
|
|
2
|
+
import { AiAnswerBubble as xo, ClarificationCard as Oo, DeepThinkingSteps as Do, IframePage as Qo, KnowledgeStreamResult as No, OutputFile as jo, createAnswerContentMap as Ho, injectIframeResizerChild as Wo, provideIframePageConfig as qo, provideOutputFileConfig as Ko, resolveIframePlaceholders as Yo, useIframePage as Xo } from "wi-chat/renderers";
|
|
3
|
+
import { defineComponent as D, computed as $, openBlock as s, createElementBlock as l, normalizeClass as z, createElementVNode as t, renderSlot as S, createBlock as V, unref as I, withModifiers as te, withCtx as C, 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 le, 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
|
+
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 = (c) => (q("data-v-dc2d5f2b"), c = c(), K(), c), 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 = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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 = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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 = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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 = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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,8 +60,8 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
60
60
|
fill: "none",
|
|
61
61
|
stroke: "currentColor",
|
|
62
62
|
"stroke-width": "2"
|
|
63
|
-
},
|
|
64
|
-
|
|
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
|
+
Ve
|
|
65
65
|
], Te = {
|
|
66
66
|
key: 2,
|
|
67
67
|
viewBox: "0 0 24 24",
|
|
@@ -70,11 +70,11 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
70
70
|
fill: "none",
|
|
71
71
|
stroke: "currentColor",
|
|
72
72
|
"stroke-width": "2"
|
|
73
|
-
},
|
|
74
|
-
Le,
|
|
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 = [
|
|
75
74
|
Me,
|
|
76
|
-
ze
|
|
77
|
-
|
|
75
|
+
ze,
|
|
76
|
+
Pe
|
|
77
|
+
], xe = {
|
|
78
78
|
key: 3,
|
|
79
79
|
viewBox: "0 0 24 24",
|
|
80
80
|
width: "20",
|
|
@@ -82,12 +82,12 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
82
82
|
fill: "none",
|
|
83
83
|
stroke: "currentColor",
|
|
84
84
|
"stroke-width": "2"
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
],
|
|
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
|
+
Oe
|
|
87
|
+
], Qe = { class: "wi-web-attach-card__info" }, Ne = ["title"], je = {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "wi-web-attach-card__size"
|
|
90
|
-
},
|
|
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,17 +95,17 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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",
|
|
104
104
|
y2: "3"
|
|
105
105
|
})
|
|
106
|
-
], -1)),
|
|
107
|
-
|
|
108
|
-
],
|
|
106
|
+
], -1)), qe = [
|
|
107
|
+
We
|
|
108
|
+
], Ke = /* @__PURE__ */ D({
|
|
109
109
|
__name: "AttachmentCard",
|
|
110
110
|
props: {
|
|
111
111
|
item: {},
|
|
@@ -116,36 +116,36 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
116
116
|
getFileUrl: { type: Function, default: void 0 }
|
|
117
117
|
},
|
|
118
118
|
emits: ["click", "remove", "download"],
|
|
119
|
-
setup(
|
|
120
|
-
const
|
|
121
|
-
var
|
|
122
|
-
return ((
|
|
123
|
-
}), b = $(() =>
|
|
124
|
-
if (
|
|
119
|
+
setup(c, { emit: U }) {
|
|
120
|
+
const n = c, i = U, h = $(() => {
|
|
121
|
+
var o;
|
|
122
|
+
return ((o = n.item) == null ? void 0 : o.attachContent) || {};
|
|
123
|
+
}), b = $(() => ye(n.item)), f = $(() => ke(n.item, n.baseURL, n.getFileUrl)), a = $(() => {
|
|
124
|
+
if (n.removable)
|
|
125
125
|
return !1;
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
128
|
-
if (
|
|
126
|
+
if (n.downloadable !== void 0)
|
|
127
|
+
return n.downloadable;
|
|
128
|
+
if (n.item.type && n.item.type !== "file")
|
|
129
129
|
return !1;
|
|
130
|
-
const
|
|
131
|
-
return !!(
|
|
132
|
-
}),
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
baseURL:
|
|
139
|
-
getFileUrl:
|
|
130
|
+
const o = h.value;
|
|
131
|
+
return !!(o.fileId || o.raw);
|
|
132
|
+
}), d = () => {
|
|
133
|
+
i("click", n.item);
|
|
134
|
+
}, r = () => {
|
|
135
|
+
i("remove", n.item);
|
|
136
|
+
}, u = async () => {
|
|
137
|
+
i("download", n.item), await Ae(n.item, {
|
|
138
|
+
baseURL: n.baseURL,
|
|
139
|
+
getFileUrl: n.getFileUrl
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
return (
|
|
143
|
-
class: z(["wi-web-attach-card", { "is-clickable":
|
|
144
|
-
onClick:
|
|
142
|
+
return (o, p) => (s(), l("div", {
|
|
143
|
+
class: z(["wi-web-attach-card", { "is-clickable": o.clickable || !!o.$attrs.onClick }]),
|
|
144
|
+
onClick: d
|
|
145
145
|
}, [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
b.value && f.value ? (
|
|
146
|
+
t("div", Ie, [
|
|
147
|
+
S(o.$slots, "icon", { item: o.item }, () => [
|
|
148
|
+
b.value && f.value ? (s(), V(I(me), {
|
|
149
149
|
key: 0,
|
|
150
150
|
src: f.value,
|
|
151
151
|
"preview-src-list": [f.value],
|
|
@@ -157,59 +157,59 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
157
157
|
}, ["stop"]))
|
|
158
158
|
}, {
|
|
159
159
|
placeholder: C(() => [
|
|
160
|
-
|
|
160
|
+
Fe
|
|
161
161
|
]),
|
|
162
162
|
error: C(() => [
|
|
163
163
|
Re
|
|
164
164
|
]),
|
|
165
165
|
_: 1
|
|
166
|
-
}, 8, ["src", "preview-src-list"])) :
|
|
166
|
+
}, 8, ["src", "preview-src-list"])) : o.item.type === "table" ? (s(), l("svg", Se, Le)) : o.item.type === "metric" ? (s(), l("svg", Te, Ee)) : (s(), l("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
|
-
title:
|
|
172
|
+
title: o.item.name
|
|
173
173
|
}, [
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
S(o.$slots, "title", { item: o.item }, () => [
|
|
175
|
+
O(A(o.item.name), 1)
|
|
176
176
|
], !0)
|
|
177
|
-
], 8,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
], 8, Ne),
|
|
178
|
+
o.item.description || o.$slots.description ? (s(), l("div", je, [
|
|
179
|
+
S(o.$slots, "description", { item: o.item }, () => [
|
|
180
|
+
O(A(o.item.description), 1)
|
|
181
181
|
], !0)
|
|
182
182
|
])) : g("", !0)
|
|
183
183
|
]),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
a.value ? (
|
|
184
|
+
t("div", He, [
|
|
185
|
+
S(o.$slots, "actions", { item: o.item }, () => [
|
|
186
|
+
a.value ? (s(), l("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(
|
|
192
|
-
},
|
|
193
|
-
|
|
191
|
+
onClick: te(u, ["stop"])
|
|
192
|
+
}, qe)) : g("", !0),
|
|
193
|
+
o.removable ? (s(), l("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(r, ["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
|
-
},
|
|
204
|
+
}), Q = (c, U) => {
|
|
205
|
+
const n = c.__vccOpts || c;
|
|
206
|
+
for (const [i, h] of U)
|
|
207
|
+
n[i] = h;
|
|
208
|
+
return n;
|
|
209
|
+
}, Ye = /* @__PURE__ */ Q(Ke, [["__scopeId", "data-v-dc2d5f2b"]]), Xe = {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "wi-web-attachment-list"
|
|
212
|
-
},
|
|
212
|
+
}, Ze = /* @__PURE__ */ D({
|
|
213
213
|
__name: "AttachmentList",
|
|
214
214
|
props: {
|
|
215
215
|
items: { default: () => [] },
|
|
@@ -220,117 +220,117 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
220
220
|
getFileUrl: { type: Function, default: void 0 }
|
|
221
221
|
},
|
|
222
222
|
emits: ["remove", "click", "download"],
|
|
223
|
-
setup(
|
|
224
|
-
const
|
|
223
|
+
setup(c, { emit: U }) {
|
|
224
|
+
const n = c, i = U, h = $(() => (n.items || []).map((r, u) => {
|
|
225
225
|
var _, y;
|
|
226
|
-
const
|
|
226
|
+
const o = $e(r), p = (_ = o.attachContent) == null ? void 0 : _.raw, m = ((y = o.attachContent) == null ? void 0 : y.fileId) || (p ? `${p.name}_${p.size}_${u}` : `${o.name}_${u}`);
|
|
227
227
|
return {
|
|
228
|
-
...
|
|
228
|
+
...o,
|
|
229
229
|
key: m
|
|
230
230
|
};
|
|
231
|
-
})), b = (
|
|
232
|
-
|
|
233
|
-
}, f = (
|
|
234
|
-
|
|
235
|
-
}, a = (
|
|
236
|
-
|
|
231
|
+
})), b = (d, r) => {
|
|
232
|
+
i("remove", d, r);
|
|
233
|
+
}, f = (d, r) => {
|
|
234
|
+
i("click", d, r);
|
|
235
|
+
}, a = (d, r) => {
|
|
236
|
+
i("download", d, r);
|
|
237
237
|
};
|
|
238
|
-
return (
|
|
239
|
-
(
|
|
240
|
-
key:
|
|
241
|
-
item:
|
|
242
|
-
removable:
|
|
243
|
-
downloadable:
|
|
244
|
-
clickable:
|
|
245
|
-
"base-u-r-l":
|
|
246
|
-
"get-file-url":
|
|
247
|
-
onClick: (p) => f(
|
|
248
|
-
onRemove: (p) => b(
|
|
249
|
-
onDownload: (p) => a(
|
|
238
|
+
return (d, r) => h.value.length > 0 ? (s(), l("div", Xe, [
|
|
239
|
+
(s(!0), l(P, null, j(h.value, (u, o) => (s(), V(Ye, {
|
|
240
|
+
key: u.key || o,
|
|
241
|
+
item: u,
|
|
242
|
+
removable: d.removable,
|
|
243
|
+
downloadable: d.downloadable,
|
|
244
|
+
clickable: d.clickable || !!d.$attrs.onClick,
|
|
245
|
+
"base-u-r-l": d.baseURL,
|
|
246
|
+
"get-file-url": d.getFileUrl,
|
|
247
|
+
onClick: (p) => f(u, o),
|
|
248
|
+
onRemove: (p) => b(o, u),
|
|
249
|
+
onDownload: (p) => a(u, o)
|
|
250
250
|
}, {
|
|
251
251
|
icon: C((p) => [
|
|
252
|
-
|
|
252
|
+
S(d.$slots, "icon", Z(G(p)), void 0, !0)
|
|
253
253
|
]),
|
|
254
254
|
title: C((p) => [
|
|
255
|
-
|
|
255
|
+
S(d.$slots, "title", Z(G(p)), void 0, !0)
|
|
256
256
|
]),
|
|
257
257
|
description: C((p) => [
|
|
258
|
-
|
|
258
|
+
S(d.$slots, "description", Z(G(p)), void 0, !0)
|
|
259
259
|
]),
|
|
260
260
|
actions: C((p) => [
|
|
261
|
-
|
|
261
|
+
S(d.$slots, "actions", Z(G(p)), 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 = (c) => (q("data-v-c6f1253a"), c = c(), K(), c), 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
|
-
},
|
|
273
|
+
}, tt = { class: "wi-web-inputbox__agent-icon-wrapper" }, ot = ["src"], st = {
|
|
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
|
-
},
|
|
280
|
+
}, at = /* @__PURE__ */ T(() => /* @__PURE__ */ t("circle", {
|
|
281
281
|
cx: "12",
|
|
282
282
|
cy: "8",
|
|
283
283
|
r: "4"
|
|
284
|
-
}, null, -1)),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
],
|
|
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
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
|
-
}, null, -1)),
|
|
291
|
-
|
|
292
|
-
],
|
|
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 = {
|
|
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
|
-
|
|
312
|
-
],
|
|
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 = {
|
|
313
313
|
key: 0,
|
|
314
314
|
class: "wi-web-agent-item__check"
|
|
315
|
-
},
|
|
315
|
+
}, yt = {
|
|
316
316
|
key: 1,
|
|
317
317
|
class: "wi-web-inputbox__options"
|
|
318
|
-
},
|
|
318
|
+
}, kt = { class: "wi-web-inputbox__main" }, $t = {
|
|
319
319
|
key: 0,
|
|
320
320
|
class: "wi-web-inputbox__attachments"
|
|
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
|
-
},
|
|
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__ */
|
|
331
|
-
], -1)),
|
|
332
|
-
|
|
333
|
-
], Rt = ["disabled"], St = /* @__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
|
+
], -1)), Ft = [
|
|
332
|
+
It
|
|
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,41 +338,41 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
338
338
|
stroke: "currentColor",
|
|
339
339
|
"stroke-width": "2"
|
|
340
340
|
}, [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
], -1)),
|
|
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
343
|
St
|
|
344
|
-
],
|
|
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",
|
|
354
354
|
height: "12",
|
|
355
355
|
rx: "2"
|
|
356
356
|
})
|
|
357
|
-
], -1)),
|
|
358
|
-
|
|
359
|
-
],
|
|
357
|
+
], -1)), zt = [
|
|
358
|
+
Mt
|
|
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__ */
|
|
366
|
-
], -1)),
|
|
367
|
-
|
|
368
|
-
],
|
|
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({
|
|
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 = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { 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
|
-
h("selectAgent",
|
|
393
|
-
}, m = (
|
|
394
|
-
h("update:incPrevQuestion",
|
|
390
|
+
setup(c, { expose: U, emit: n }) {
|
|
391
|
+
const i = c, h = n, b = x(null), f = x(null), a = x(!1), d = (e) => Ue(e), r = x([]), u = $(() => !!!(i.modelValue && i.modelValue.trim())), o = (e) => e ? i.getFileUrl ? i.getFileUrl(e) : Ce(e, i.baseURL, "/algorithm/get_file_data") : "", p = (e) => {
|
|
392
|
+
h("selectAgent", e), a.value = !1;
|
|
393
|
+
}, m = (e) => {
|
|
394
|
+
h("update:incPrevQuestion", e ? "N" : "Y");
|
|
395
395
|
}, _ = () => {
|
|
396
396
|
h("update:modelValue", "");
|
|
397
397
|
}, y = () => {
|
|
398
398
|
f.value && (f.value.value = "", f.value.click());
|
|
399
|
-
},
|
|
400
|
-
const w =
|
|
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
403
|
for (const k of v)
|
|
404
|
-
|
|
405
|
-
var
|
|
406
|
-
const X = ((
|
|
404
|
+
r.value.some((W) => {
|
|
405
|
+
var se;
|
|
406
|
+
const X = ((se = W.attachContent) == null ? void 0 : se.raw) || W.raw;
|
|
407
407
|
return X && X.name === k.name && X.size === k.size && X.lastModified === k.lastModified;
|
|
408
|
-
}) ||
|
|
409
|
-
const
|
|
410
|
-
var
|
|
411
|
-
return ((
|
|
408
|
+
}) || r.value.push(d(k));
|
|
409
|
+
const R = r.value.map((k) => {
|
|
410
|
+
var E;
|
|
411
|
+
return ((E = k.attachContent) == null ? void 0 : E.raw) || k.raw;
|
|
412
412
|
}).filter(Boolean);
|
|
413
|
-
h("update:files",
|
|
413
|
+
h("update:files", R), h("update:attachments", [...r.value]);
|
|
414
414
|
}
|
|
415
|
-
}, M = (
|
|
415
|
+
}, M = (e) => {
|
|
416
416
|
var k;
|
|
417
|
-
const w =
|
|
417
|
+
const w = r.value.splice(e, 1)[0], v = ((k = w == null ? void 0 : w.attachContent) == null ? void 0 : k.url) || (w == null ? void 0 : w.url);
|
|
418
418
|
v && v.startsWith("blob:") && URL.revokeObjectURL(v);
|
|
419
|
-
const
|
|
420
|
-
var
|
|
421
|
-
return ((
|
|
419
|
+
const R = r.value.map((E) => {
|
|
420
|
+
var W;
|
|
421
|
+
return ((W = E.attachContent) == null ? void 0 : W.raw) || E.raw;
|
|
422
422
|
}).filter(Boolean);
|
|
423
|
-
h("update:files",
|
|
424
|
-
},
|
|
425
|
-
|
|
423
|
+
h("update:files", R), h("update:attachments", [...r.value]);
|
|
424
|
+
}, N = () => {
|
|
425
|
+
r.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
|
+
}), r.value = [], h("update:files", []), h("update:attachments", []);
|
|
430
430
|
}, Y = () => {
|
|
431
|
-
if (
|
|
431
|
+
if (i.disabled || u.value)
|
|
432
432
|
return;
|
|
433
|
-
const
|
|
433
|
+
const e = i.modelValue || "", w = r.value.map((R) => {
|
|
434
434
|
var k;
|
|
435
|
-
return ((k =
|
|
436
|
-
}).filter(Boolean), v = [...
|
|
437
|
-
h("submit", { text:
|
|
438
|
-
},
|
|
439
|
-
|
|
435
|
+
return ((k = R.attachContent) == null ? void 0 : k.raw) || R.raw;
|
|
436
|
+
}).filter(Boolean), v = [...r.value];
|
|
437
|
+
h("submit", { text: e, files: w, attachments: v, agent: i.currentAgent }), r.value = [], h("update:files", []), h("update:attachments", []);
|
|
438
|
+
}, F = (e) => {
|
|
439
|
+
e.isComposing || e.keyCode === 229 || (e.preventDefault(), Y());
|
|
440
440
|
};
|
|
441
|
-
return
|
|
442
|
-
|
|
443
|
-
}),
|
|
441
|
+
return pe(() => {
|
|
442
|
+
N();
|
|
443
|
+
}), U({
|
|
444
444
|
/** 手动清空所有附件 */
|
|
445
|
-
clearFiles:
|
|
445
|
+
clearFiles: N,
|
|
446
446
|
/** 获取当前附件原生 File 列表 */
|
|
447
|
-
getFiles: () =>
|
|
447
|
+
getFiles: () => r.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: () => r.value,
|
|
453
453
|
/** 聚焦输入框 */
|
|
454
454
|
focus: () => {
|
|
455
|
-
var
|
|
456
|
-
(
|
|
455
|
+
var e;
|
|
456
|
+
(e = b.value) == null || e.focus();
|
|
457
457
|
}
|
|
458
|
-
}), (
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
}), (e, w) => (s(), l("div", Ge, [
|
|
459
|
+
e.showAgentBar || e.showIncPrevQuestion ? (s(), l("div", Je, [
|
|
460
|
+
e.showAgentBar ? (s(), l("div", et, [
|
|
461
|
+
L(I(be), {
|
|
462
462
|
visible: a.value,
|
|
463
463
|
"onUpdate:visible": w[0] || (w[0] = (v) => a.value = v),
|
|
464
464
|
placement: "top-start",
|
|
@@ -467,159 +467,164 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
467
467
|
"popper-class": "wi-web-agent-popover"
|
|
468
468
|
}, {
|
|
469
469
|
reference: C(() => {
|
|
470
|
-
var v,
|
|
470
|
+
var v, R, k;
|
|
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(), l("img", {
|
|
477
477
|
key: 0,
|
|
478
|
-
src:
|
|
478
|
+
src: o(e.currentAgent.image_id),
|
|
479
479
|
class: "wi-web-inputbox__agent-avatar"
|
|
480
|
-
}, null, 8,
|
|
480
|
+
}, null, 8, ot)) : (s(), l("svg", st, nt))
|
|
481
481
|
]),
|
|
482
|
-
|
|
483
|
-
(
|
|
482
|
+
t("span", it, " @" + A(((R = e.currentAgent) == null ? void 0 : R.entry_title) || ((k = e.currentAgent) == null ? void 0 : k.entry_id) || e.defaultAgentTitle), 1),
|
|
483
|
+
(s(), l("svg", {
|
|
484
484
|
class: z(["wi-web-inputbox__agent-arrow", { "is-active": a.value }]),
|
|
485
485
|
viewBox: "0 0 1024 1024",
|
|
486
486
|
width: "12",
|
|
487
487
|
height: "12"
|
|
488
|
-
},
|
|
488
|
+
}, dt, 2))
|
|
489
489
|
], 2)
|
|
490
490
|
];
|
|
491
491
|
}),
|
|
492
492
|
default: C(() => [
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
!
|
|
496
|
-
(
|
|
497
|
-
var
|
|
498
|
-
return
|
|
493
|
+
t("div", ct, [
|
|
494
|
+
ut,
|
|
495
|
+
!e.agentList || e.agentList.length === 0 ? (s(), l("div", pt, " 暂无可选智能体 ")) : g("", !0),
|
|
496
|
+
(s(!0), l(P, null, j(e.agentList, (v) => {
|
|
497
|
+
var R, k;
|
|
498
|
+
return s(), l("div", {
|
|
499
499
|
key: v.entry_id,
|
|
500
|
-
class: z(["wi-web-agent-item", { "is-active": v.entry_id === ((
|
|
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) => p(v)
|
|
502
502
|
}, [
|
|
503
|
-
|
|
504
|
-
v.image_id &&
|
|
503
|
+
t("div", _t, [
|
|
504
|
+
v.image_id && o(v.image_id) ? (s(), l("img", {
|
|
505
505
|
key: 0,
|
|
506
|
-
src:
|
|
506
|
+
src: o(v.image_id),
|
|
507
507
|
class: "wi-web-agent-item__avatar"
|
|
508
|
-
}, null, 8,
|
|
509
|
-
|
|
508
|
+
}, null, 8, vt)) : (s(), l("div", wt, bt)),
|
|
509
|
+
t("span", ft, A(v.entry_title || v.entry_id), 1)
|
|
510
510
|
]),
|
|
511
|
-
v.entry_id === ((k =
|
|
512
|
-
], 10,
|
|
511
|
+
v.entry_id === ((k = e.currentAgent) == null ? void 0 : k.entry_id) ? (s(), l("span", gt, "✓")) : g("", !0)
|
|
512
|
+
], 10, ht);
|
|
513
513
|
}), 128))
|
|
514
514
|
])
|
|
515
515
|
]),
|
|
516
516
|
_: 1
|
|
517
517
|
}, 8, ["visible"])
|
|
518
518
|
])) : g("", !0),
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
e.showIncPrevQuestion ? (s(), l("div", yt, [
|
|
520
|
+
L(I(fe), {
|
|
521
521
|
class: "wi-web-inputbox__ignore-prev",
|
|
522
|
-
"model-value":
|
|
522
|
+
"model-value": e.incPrevQuestion === "N",
|
|
523
523
|
"onUpdate:modelValue": m
|
|
524
524
|
}, {
|
|
525
525
|
default: C(() => [
|
|
526
|
-
|
|
526
|
+
O(" 忽略之前对话 ")
|
|
527
527
|
]),
|
|
528
528
|
_: 1
|
|
529
529
|
}, 8, ["model-value"])
|
|
530
530
|
])) : g("", !0)
|
|
531
531
|
])) : g("", !0),
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
items:
|
|
536
|
-
"base-u-r-l":
|
|
537
|
-
"get-file-url":
|
|
532
|
+
t("div", kt, [
|
|
533
|
+
r.value.length > 0 ? (s(), l("div", $t, [
|
|
534
|
+
L(ne, {
|
|
535
|
+
items: r.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"])
|
|
541
541
|
])) : g("", !0),
|
|
542
|
-
|
|
542
|
+
L(I(ge), {
|
|
543
543
|
ref_key: "textareaRef",
|
|
544
544
|
ref: b,
|
|
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
553
|
"onUpdate:modelValue": w[1] || (w[1] = (v) => h("update:modelValue", v)),
|
|
554
|
-
onKeydown:
|
|
554
|
+
onKeydown: he(te(F, ["exact"]), ["enter"])
|
|
555
555
|
}, null, 8, ["model-value", "maxlength", "autosize", "placeholder", "disabled", "onKeydown"]),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
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(), l("div", Bt, [
|
|
562
|
+
O(A((e.modelValue || "").length), 1),
|
|
563
|
+
e.maxlength ? (s(), l(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
572
|
default: C(() => [
|
|
568
|
-
|
|
573
|
+
t("button", {
|
|
569
574
|
type: "button",
|
|
570
575
|
class: "wi-web-inputbox__icon-btn",
|
|
571
576
|
onClick: _
|
|
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
586
|
default: C(() => [
|
|
582
|
-
|
|
587
|
+
t("button", {
|
|
583
588
|
type: "button",
|
|
584
589
|
class: "wi-web-inputbox__icon-btn",
|
|
585
|
-
disabled:
|
|
590
|
+
disabled: e.disabled || e.talking,
|
|
586
591
|
onClick: y
|
|
587
|
-
},
|
|
592
|
+
}, Vt, 8, Rt)
|
|
588
593
|
]),
|
|
589
594
|
_: 1
|
|
590
595
|
})) : g("", !0),
|
|
591
|
-
|
|
596
|
+
t("input", {
|
|
592
597
|
ref_key: "fileInputRef",
|
|
593
598
|
ref: f,
|
|
594
599
|
type: "file",
|
|
595
600
|
multiple: "",
|
|
596
|
-
accept:
|
|
601
|
+
accept: e.accept,
|
|
597
602
|
class: "wi-web-inputbox__hidden-file",
|
|
598
|
-
onChange:
|
|
599
|
-
}, null, 40,
|
|
603
|
+
onChange: B
|
|
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
611
|
default: C(() => [
|
|
607
|
-
|
|
612
|
+
t("div", {
|
|
608
613
|
class: "wi-web-inputbox__action-btn wi-web-inputbox__action-btn--stop",
|
|
609
614
|
onClick: w[2] || (w[2] = (v) => h("stop"))
|
|
610
|
-
},
|
|
615
|
+
}, zt)
|
|
611
616
|
]),
|
|
612
617
|
_: 1
|
|
613
|
-
})) : (
|
|
618
|
+
})) : (s(), V(I(ee), {
|
|
614
619
|
key: 4,
|
|
615
620
|
content: "发送",
|
|
616
621
|
placement: "top"
|
|
617
622
|
}, {
|
|
618
623
|
default: C(() => [
|
|
619
|
-
|
|
620
|
-
class: z(["wi-web-inputbox__action-btn wi-web-inputbox__action-btn--send", { "is-disabled":
|
|
624
|
+
t("div", {
|
|
625
|
+
class: z(["wi-web-inputbox__action-btn wi-web-inputbox__action-btn--send", { "is-disabled": e.disabled || !e.talking && u.value }]),
|
|
621
626
|
onClick: Y
|
|
622
|
-
},
|
|
627
|
+
}, Et, 2)
|
|
623
628
|
]),
|
|
624
629
|
_: 1
|
|
625
630
|
}))
|
|
@@ -628,86 +633,96 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
628
633
|
])
|
|
629
634
|
]));
|
|
630
635
|
}
|
|
631
|
-
}),
|
|
632
|
-
{ id: "recordset", answerType: "recordset", component:
|
|
633
|
-
],
|
|
636
|
+
}), Ot = /* @__PURE__ */ Q(xt, [["__scopeId", "data-v-c6f1253a"]]), Dt = [
|
|
637
|
+
{ id: "recordset", answerType: "recordset", component: _e(() => Promise.resolve().then(() => ho)) }
|
|
638
|
+
], Qt = (c) => re([...Dt, ...c ?? []]), Nt = (c) => (q("data-v-bcad9562"), c = c(), K(), c), 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
|
-
},
|
|
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
|
-
},
|
|
650
|
+
}, Jt = /* @__PURE__ */ D({
|
|
646
651
|
__name: "ChatMessagesView",
|
|
647
652
|
props: {
|
|
648
653
|
messages: {},
|
|
649
654
|
parsers: { default: () => [] },
|
|
650
655
|
baseURL: { default: "" },
|
|
651
656
|
getFileUrl: { type: Function, default: void 0 },
|
|
657
|
+
outputFileConfig: {},
|
|
652
658
|
loading: { type: Boolean, default: !1 },
|
|
653
659
|
emptyTitle: { default: "输入问题,开始与 AI 对话" },
|
|
654
660
|
emptyDescription: { default: "回答内容由共享渲染层统一分发" }
|
|
655
661
|
},
|
|
656
662
|
emits: ["loadOlder", "updateThinkingExpanded"],
|
|
657
|
-
setup(
|
|
658
|
-
const
|
|
663
|
+
setup(c, { expose: U, emit: n }) {
|
|
664
|
+
const i = c, h = n;
|
|
665
|
+
de(
|
|
666
|
+
i.outputFileConfig ?? {
|
|
667
|
+
getFileUrl: (o) => {
|
|
668
|
+
var p;
|
|
669
|
+
return ((p = i.getFileUrl) == null ? void 0 : p.call(i, o)) ?? (i.baseURL ? `${i.baseURL.replace(/\/$/, "")}/algorithm/get_file_data?file_id=${encodeURIComponent(o)}` : "");
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
const b = x(), { showScrollToBottom: f, forceScrollToBottom: a, requestScrollToBottom: d, onReachTop: r } = Be(b), u = $(() => Qt(i.parsers));
|
|
659
674
|
return le(
|
|
660
|
-
() =>
|
|
675
|
+
() => i.messages[i.messages.length - 1],
|
|
661
676
|
() => {
|
|
662
|
-
|
|
677
|
+
d();
|
|
663
678
|
},
|
|
664
679
|
{ deep: !0 }
|
|
665
|
-
),
|
|
680
|
+
), r(() => h("loadOlder")), U({
|
|
666
681
|
/** 强制滚动到底部 */
|
|
667
682
|
forceScrollToBottom: a,
|
|
668
683
|
/** 自动滚动开启时请求滚动到底部 */
|
|
669
|
-
requestScrollToBottom:
|
|
670
|
-
}), (
|
|
684
|
+
requestScrollToBottom: d
|
|
685
|
+
}), (o, p) => (s(), l("div", {
|
|
671
686
|
ref_key: "scrollEl",
|
|
672
687
|
ref: b,
|
|
673
688
|
class: "wi-web-chat-messages"
|
|
674
689
|
}, [
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
690
|
+
o.loading ? (s(), l("div", jt, "历史加载中...")) : o.messages.length === 0 ? (s(), l("div", Ht, [
|
|
691
|
+
Wt,
|
|
692
|
+
t("div", qt, A(o.emptyTitle), 1),
|
|
693
|
+
t("div", Kt, A(o.emptyDescription), 1)
|
|
679
694
|
])) : g("", !0),
|
|
680
|
-
(
|
|
695
|
+
(s(!0), l(P, null, j(o.messages, (m) => (s(), l(P, {
|
|
681
696
|
key: m.id
|
|
682
697
|
}, [
|
|
683
|
-
m.role === "user" ? (
|
|
684
|
-
|
|
685
|
-
m.attachments && m.attachments.length > 0 ? (
|
|
698
|
+
m.role === "user" ? (s(), l("div", Yt, [
|
|
699
|
+
t("div", Xt, [
|
|
700
|
+
m.attachments && m.attachments.length > 0 ? (s(), V(ne, {
|
|
686
701
|
key: 0,
|
|
687
702
|
class: "wi-web-chat-messages__attachments",
|
|
688
703
|
items: m.attachments,
|
|
689
|
-
"base-u-r-l":
|
|
690
|
-
"get-file-url":
|
|
704
|
+
"base-u-r-l": o.baseURL,
|
|
705
|
+
"get-file-url": o.getFileUrl
|
|
691
706
|
}, null, 8, ["items", "base-u-r-l", "get-file-url"])) : g("", !0),
|
|
692
|
-
|
|
707
|
+
t("div", Zt, A(m.content), 1)
|
|
693
708
|
])
|
|
694
|
-
])) : (
|
|
695
|
-
|
|
709
|
+
])) : (s(), l("div", Gt, [
|
|
710
|
+
L(I(ce), {
|
|
696
711
|
steps: m.thinking.steps,
|
|
697
712
|
expanded: m.thinking.expanded,
|
|
698
713
|
"onUpdate:expanded": (_) => h("updateThinkingExpanded", m, _)
|
|
699
714
|
}, null, 8, ["steps", "expanded", "onUpdate:expanded"]),
|
|
700
|
-
|
|
715
|
+
L(I(ue), {
|
|
701
716
|
answer: m.answer,
|
|
702
717
|
error: m.error,
|
|
703
718
|
stopped: m.stopped,
|
|
704
|
-
"content-map":
|
|
719
|
+
"content-map": u.value
|
|
705
720
|
}, null, 8, ["answer", "error", "stopped", "content-map"])
|
|
706
721
|
]))
|
|
707
722
|
], 64))), 128)),
|
|
708
|
-
|
|
723
|
+
L(ve, { name: "wi-web-chat-messages-fade" }, {
|
|
709
724
|
default: C(() => [
|
|
710
|
-
I(f) ? (
|
|
725
|
+
I(f) ? (s(), l("button", {
|
|
711
726
|
key: 0,
|
|
712
727
|
type: "button",
|
|
713
728
|
class: "wi-web-chat-messages__bottom",
|
|
@@ -719,13 +734,14 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
719
734
|
})
|
|
720
735
|
], 512));
|
|
721
736
|
}
|
|
722
|
-
}),
|
|
737
|
+
}), eo = /* @__PURE__ */ Q(Jt, [["__scopeId", "data-v-bcad9562"]]), to = { class: "wi-web-chat-container" }, oo = { class: "wi-web-chat-container__footer" }, so = /* @__PURE__ */ D({
|
|
723
738
|
__name: "ChatContainer",
|
|
724
739
|
props: {
|
|
725
740
|
messages: {},
|
|
726
741
|
parsers: { default: () => [] },
|
|
727
742
|
baseURL: { default: "" },
|
|
728
743
|
getFileUrl: { type: Function, default: void 0 },
|
|
744
|
+
outputFileConfig: {},
|
|
729
745
|
loading: { type: Boolean, default: !1 },
|
|
730
746
|
talking: { type: Boolean, default: !1 },
|
|
731
747
|
session: { default: "" },
|
|
@@ -740,35 +756,36 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
740
756
|
disabled: { type: Boolean, default: !1 }
|
|
741
757
|
},
|
|
742
758
|
emits: ["update:question", "update:incPrevQuestion", "submit", "stop", "selectAgent", "loadOlder", "updateThinkingExpanded"],
|
|
743
|
-
setup(
|
|
744
|
-
const
|
|
745
|
-
|
|
759
|
+
setup(c, { emit: U }) {
|
|
760
|
+
const n = c, i = U, h = (a) => {
|
|
761
|
+
i("submit", a);
|
|
746
762
|
}, b = () => {
|
|
747
|
-
|
|
763
|
+
n.hasMore && i("loadOlder");
|
|
748
764
|
}, f = (a) => {
|
|
749
|
-
|
|
765
|
+
i("selectAgent", a);
|
|
750
766
|
};
|
|
751
|
-
return (a,
|
|
752
|
-
|
|
753
|
-
|
|
767
|
+
return (a, d) => (s(), l("section", to, [
|
|
768
|
+
S(a.$slots, "messages", {}, () => [
|
|
769
|
+
L(eo, {
|
|
754
770
|
messages: a.messages,
|
|
755
771
|
parsers: a.parsers,
|
|
756
772
|
"base-u-r-l": a.baseURL,
|
|
757
773
|
"get-file-url": a.getFileUrl,
|
|
774
|
+
"output-file-config": a.outputFileConfig,
|
|
758
775
|
loading: a.loading,
|
|
759
776
|
"empty-title": a.emptyTitle,
|
|
760
777
|
"empty-description": a.emptyDescription,
|
|
761
778
|
onLoadOlder: b,
|
|
762
|
-
onUpdateThinkingExpanded:
|
|
763
|
-
}, null, 8, ["messages", "parsers", "base-u-r-l", "get-file-url", "loading", "empty-title", "empty-description"])
|
|
779
|
+
onUpdateThinkingExpanded: d[0] || (d[0] = (r, u) => i("updateThinkingExpanded", r, u))
|
|
780
|
+
}, null, 8, ["messages", "parsers", "base-u-r-l", "get-file-url", "output-file-config", "loading", "empty-title", "empty-description"])
|
|
764
781
|
], !0),
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
782
|
+
S(a.$slots, "above-input", {}, void 0, !0),
|
|
783
|
+
t("footer", oo, [
|
|
784
|
+
L(Ot, {
|
|
768
785
|
"model-value": a.question,
|
|
769
|
-
"onUpdate:modelValue":
|
|
786
|
+
"onUpdate:modelValue": d[1] || (d[1] = (r) => i("update:question", r)),
|
|
770
787
|
"inc-prev-question": a.incPrevQuestion,
|
|
771
|
-
"onUpdate:incPrevQuestion":
|
|
788
|
+
"onUpdate:incPrevQuestion": d[2] || (d[2] = (r) => i("update:incPrevQuestion", r)),
|
|
772
789
|
"base-u-r-l": a.baseURL,
|
|
773
790
|
disabled: a.disabled || !a.session,
|
|
774
791
|
talking: a.talking,
|
|
@@ -778,97 +795,97 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
778
795
|
"get-file-url": a.getFileUrl,
|
|
779
796
|
onSelectAgent: f,
|
|
780
797
|
onSubmit: h,
|
|
781
|
-
onStop:
|
|
798
|
+
onStop: d[3] || (d[3] = (r) => i("stop"))
|
|
782
799
|
}, null, 8, ["model-value", "inc-prev-question", "base-u-r-l", "disabled", "talking", "agent-list", "current-agent", "placeholder", "get-file-url"])
|
|
783
800
|
])
|
|
784
801
|
]));
|
|
785
802
|
}
|
|
786
|
-
}),
|
|
803
|
+
}), Mo = /* @__PURE__ */ Q(so, [["__scopeId", "data-v-8663b501"]]), ie = (c) => (q("data-v-96941d57"), c = c(), K(), c), ao = {
|
|
787
804
|
key: 0,
|
|
788
805
|
class: "wi-web-recordset"
|
|
789
|
-
},
|
|
806
|
+
}, lo = { class: "wi-web-recordset__header" }, no = { class: "wi-web-recordset__title" }, io = /* @__PURE__ */ ie(() => /* @__PURE__ */ t("button", {
|
|
790
807
|
type: "button",
|
|
791
808
|
class: "wi-web-recordset__columns-btn",
|
|
792
809
|
title: "选择展示列"
|
|
793
810
|
}, [
|
|
794
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ t("svg", {
|
|
795
812
|
class: "wi-web-recordset__columns-icon",
|
|
796
813
|
viewBox: "0 0 24 24",
|
|
797
814
|
fill: "none",
|
|
798
815
|
stroke: "currentColor",
|
|
799
816
|
"stroke-width": "2"
|
|
800
817
|
}, [
|
|
801
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ t("rect", {
|
|
802
819
|
x: "3",
|
|
803
820
|
y: "4",
|
|
804
821
|
width: "18",
|
|
805
822
|
height: "16",
|
|
806
823
|
rx: "2"
|
|
807
824
|
}),
|
|
808
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ t("path", { d: "M9 4v16M15 4v16" })
|
|
809
826
|
]),
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
], -1)),
|
|
827
|
+
/* @__PURE__ */ t("span", null, "列")
|
|
828
|
+
], -1)), ro = { class: "wi-web-recordset__columns-panel" }, co = /* @__PURE__ */ ie(() => /* @__PURE__ */ t("div", { class: "wi-web-recordset__columns-panel-title" }, "选择展示列", -1)), uo = /* @__PURE__ */ D({
|
|
812
829
|
__name: "RecordsetTable",
|
|
813
830
|
props: {
|
|
814
831
|
report: {},
|
|
815
832
|
maxHeight: { default: 420 }
|
|
816
833
|
},
|
|
817
|
-
setup(
|
|
818
|
-
const
|
|
834
|
+
setup(c) {
|
|
835
|
+
const U = c, n = $(() => {
|
|
819
836
|
var _;
|
|
820
|
-
return ((_ =
|
|
821
|
-
}),
|
|
822
|
-
key: `c${
|
|
823
|
-
title: (y == null ? void 0 : y.title) || (y == null ? void 0 : y.name) || `列${
|
|
837
|
+
return ((_ = U.report) == null ? void 0 : _.values) ?? {};
|
|
838
|
+
}), i = $(() => n.value.chart === "table"), h = $(() => n.value.title ?? ""), b = $(() => (Array.isArray(n.value.cols) ? n.value.cols : []).map((y, B) => ({
|
|
839
|
+
key: `c${B}`,
|
|
840
|
+
title: (y == null ? void 0 : y.title) || (y == null ? void 0 : y.name) || `列${B + 1}`
|
|
824
841
|
}))), f = $(() => {
|
|
825
|
-
const _ = Number(
|
|
842
|
+
const _ = Number(n.value.max_cols);
|
|
826
843
|
return Number.isFinite(_) && _ > 0 ? _ : 1 / 0;
|
|
827
|
-
}), a = $(() => b.value.length > f.value),
|
|
844
|
+
}), a = $(() => b.value.length > f.value), d = x([]), r = $(() => new Set(d.value)), u = $(() => b.value.filter((_) => r.value.has(_.key)));
|
|
828
845
|
le(
|
|
829
846
|
() => b.value.map((_) => _.key).join("|"),
|
|
830
847
|
() => {
|
|
831
|
-
|
|
848
|
+
d.value = b.value.slice(0, f.value).map((_) => _.key);
|
|
832
849
|
},
|
|
833
850
|
{ immediate: !0 }
|
|
834
851
|
);
|
|
835
|
-
const
|
|
836
|
-
const
|
|
837
|
-
return b.value.forEach((M,
|
|
838
|
-
|
|
839
|
-
}),
|
|
840
|
-
})), p =
|
|
841
|
-
const
|
|
842
|
-
y ?
|
|
852
|
+
const o = $(() => (Array.isArray(n.value.values) ? n.value.values : []).map((y) => {
|
|
853
|
+
const B = {};
|
|
854
|
+
return b.value.forEach((M, N) => {
|
|
855
|
+
B[M.key] = Array.isArray(y) ? y[N] : void 0;
|
|
856
|
+
}), B;
|
|
857
|
+
})), p = x(!1), m = (_, y) => {
|
|
858
|
+
const B = new Set(d.value);
|
|
859
|
+
y ? B.add(_) : B.delete(_), d.value = b.value.filter((M) => B.has(M.key)).map((M) => M.key);
|
|
843
860
|
};
|
|
844
861
|
return (_, y) => {
|
|
845
|
-
const
|
|
846
|
-
return
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
a.value ? (
|
|
862
|
+
const B = J("el-checkbox"), M = J("el-popover"), N = J("el-table-column"), Y = J("el-table");
|
|
863
|
+
return i.value ? (s(), l("div", ao, [
|
|
864
|
+
t("div", lo, [
|
|
865
|
+
t("div", no, A(h.value), 1),
|
|
866
|
+
a.value ? (s(), V(M, {
|
|
850
867
|
key: 0,
|
|
851
868
|
visible: p.value,
|
|
852
|
-
"onUpdate:visible": y[0] || (y[0] = (
|
|
869
|
+
"onUpdate:visible": y[0] || (y[0] = (F) => p.value = F),
|
|
853
870
|
placement: "bottom-end",
|
|
854
871
|
width: 220,
|
|
855
872
|
trigger: "click",
|
|
856
873
|
"popper-class": "wi-web-recordset-columns-popper"
|
|
857
874
|
}, {
|
|
858
875
|
reference: C(() => [
|
|
859
|
-
|
|
876
|
+
io
|
|
860
877
|
]),
|
|
861
878
|
default: C(() => [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
(
|
|
865
|
-
key:
|
|
879
|
+
t("div", ro, [
|
|
880
|
+
co,
|
|
881
|
+
(s(!0), l(P, null, j(b.value, (F) => (s(), V(B, {
|
|
882
|
+
key: F.key,
|
|
866
883
|
class: "wi-web-recordset__column-item",
|
|
867
|
-
"model-value":
|
|
868
|
-
"onUpdate:modelValue": (
|
|
884
|
+
"model-value": r.value.has(F.key),
|
|
885
|
+
"onUpdate:modelValue": (e) => m(F.key, !!e)
|
|
869
886
|
}, {
|
|
870
887
|
default: C(() => [
|
|
871
|
-
|
|
888
|
+
O(A(F.title), 1)
|
|
872
889
|
]),
|
|
873
890
|
_: 2
|
|
874
891
|
}, 1032, ["model-value", "onUpdate:modelValue"]))), 128))
|
|
@@ -877,18 +894,18 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
877
894
|
_: 1
|
|
878
895
|
}, 8, ["visible"])) : g("", !0)
|
|
879
896
|
]),
|
|
880
|
-
|
|
881
|
-
data:
|
|
897
|
+
L(Y, {
|
|
898
|
+
data: o.value,
|
|
882
899
|
border: "",
|
|
883
900
|
size: "small",
|
|
884
901
|
class: "wi-web-recordset__table",
|
|
885
902
|
"max-height": _.maxHeight
|
|
886
903
|
}, {
|
|
887
904
|
default: C(() => [
|
|
888
|
-
(
|
|
889
|
-
key:
|
|
890
|
-
prop:
|
|
891
|
-
label:
|
|
905
|
+
(s(!0), l(P, null, j(u.value, (F) => (s(), V(N, {
|
|
906
|
+
key: F.key,
|
|
907
|
+
prop: F.key,
|
|
908
|
+
label: F.title,
|
|
892
909
|
"min-width": "120",
|
|
893
910
|
"show-overflow-tooltip": ""
|
|
894
911
|
}, null, 8, ["prop", "label"]))), 128))
|
|
@@ -898,10 +915,10 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
898
915
|
])) : g("", !0);
|
|
899
916
|
};
|
|
900
917
|
}
|
|
901
|
-
}),
|
|
918
|
+
}), po = /* @__PURE__ */ Q(uo, [["__scopeId", "data-v-96941d57"]]), ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
902
919
|
__proto__: null,
|
|
903
|
-
default:
|
|
904
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
920
|
+
default: po
|
|
921
|
+
}, Symbol.toStringTag, { value: "Module" })), oe = (c) => (q("data-v-94659445"), c = c(), K(), c), _o = { class: "wi-web-env-switch__track" }, vo = { class: "wi-web-env-switch__items" }, wo = ["disabled", "onClick"], mo = { class: "wi-web-env-switch__icon" }, bo = {
|
|
905
922
|
key: 0,
|
|
906
923
|
viewBox: "0 0 24 24",
|
|
907
924
|
fill: "none",
|
|
@@ -909,32 +926,32 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
909
926
|
"stroke-width": "1.8",
|
|
910
927
|
"stroke-linecap": "round",
|
|
911
928
|
"stroke-linejoin": "round"
|
|
912
|
-
},
|
|
913
|
-
|
|
914
|
-
],
|
|
929
|
+
}, fo = /* @__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)), go = [
|
|
930
|
+
fo
|
|
931
|
+
], yo = {
|
|
915
932
|
key: 1,
|
|
916
933
|
viewBox: "0 0 24 24",
|
|
917
934
|
fill: "none",
|
|
918
935
|
stroke: "currentColor",
|
|
919
936
|
"stroke-width": "1.8",
|
|
920
937
|
"stroke-linecap": "round"
|
|
921
|
-
},
|
|
938
|
+
}, ko = /* @__PURE__ */ oe(() => /* @__PURE__ */ t("rect", {
|
|
922
939
|
x: "2.5",
|
|
923
940
|
y: "4",
|
|
924
941
|
width: "19",
|
|
925
942
|
height: "12",
|
|
926
943
|
rx: "2",
|
|
927
944
|
"stroke-linejoin": "round"
|
|
928
|
-
}, null, -1)),
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
],
|
|
945
|
+
}, null, -1)), $o = /* @__PURE__ */ oe(() => /* @__PURE__ */ t("path", { d: "M8.5 20h7M12 16v4" }, null, -1)), Co = [
|
|
946
|
+
ko,
|
|
947
|
+
$o
|
|
948
|
+
], Uo = { class: "wi-web-env-switch__label" }, Ao = {
|
|
932
949
|
key: 0,
|
|
933
950
|
class: "wi-web-env-switch__hint"
|
|
934
|
-
},
|
|
951
|
+
}, Bo = { class: "wi-web-env-switch__hint-text" }, Io = {
|
|
935
952
|
key: 0,
|
|
936
953
|
class: "wi-web-env-switch__hint-status"
|
|
937
|
-
},
|
|
954
|
+
}, Fo = /* @__PURE__ */ D({
|
|
938
955
|
__name: "EnvSwitch",
|
|
939
956
|
props: {
|
|
940
957
|
modelValue: { default: "local" },
|
|
@@ -944,8 +961,8 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
944
961
|
showHint: { type: Boolean, default: !0 }
|
|
945
962
|
},
|
|
946
963
|
emits: ["update:modelValue", "change"],
|
|
947
|
-
setup(
|
|
948
|
-
const
|
|
964
|
+
setup(c, { emit: U }) {
|
|
965
|
+
const n = c, i = U, h = [
|
|
949
966
|
{
|
|
950
967
|
value: "local",
|
|
951
968
|
label: "本地电脑",
|
|
@@ -961,74 +978,77 @@ const j = (d) => (q("data-v-dc2d5f2b"), d = d(), K(), d), Ue = { class: "wi-web-
|
|
|
961
978
|
online: !1
|
|
962
979
|
}
|
|
963
980
|
], b = { default: 3, small: 2 }, f = $(() => {
|
|
964
|
-
const
|
|
965
|
-
return
|
|
981
|
+
const u = n.options ?? [];
|
|
982
|
+
return u.length > 0 ? u : h;
|
|
966
983
|
}), a = $(() => {
|
|
967
|
-
if (!
|
|
984
|
+
if (!n.showHint)
|
|
968
985
|
return null;
|
|
969
|
-
const
|
|
970
|
-
return
|
|
971
|
-
}),
|
|
972
|
-
const
|
|
986
|
+
const u = f.value;
|
|
987
|
+
return u.find((o) => o.value === n.modelValue) ?? u[0] ?? null;
|
|
988
|
+
}), d = $(() => {
|
|
989
|
+
const u = f.value, o = u.length || 1, p = Math.max(u.findIndex((_) => _.value === n.modelValue), 0), m = b[n.size] ?? b.default;
|
|
973
990
|
return {
|
|
974
|
-
width: `calc(${100 /
|
|
991
|
+
width: `calc(${100 / o}% - ${2 * m / o}px)`,
|
|
975
992
|
transform: `translateX(${p * 100}%)`
|
|
976
993
|
};
|
|
977
|
-
}),
|
|
978
|
-
|
|
994
|
+
}), r = (u) => {
|
|
995
|
+
n.disabled || u.disabled || u.value !== n.modelValue && (i("update:modelValue", u.value), i("change", u));
|
|
979
996
|
};
|
|
980
|
-
return (
|
|
981
|
-
class: z(["wi-web-env-switch", [`is-${
|
|
997
|
+
return (u, o) => (s(), l("div", {
|
|
998
|
+
class: z(["wi-web-env-switch", [`is-${u.size}`, { "is-disabled": u.disabled }]])
|
|
982
999
|
}, [
|
|
983
|
-
|
|
984
|
-
|
|
1000
|
+
t("div", _o, [
|
|
1001
|
+
t("span", {
|
|
985
1002
|
class: "wi-web-env-switch__thumb",
|
|
986
|
-
style:
|
|
1003
|
+
style: we(d.value)
|
|
987
1004
|
}, null, 4),
|
|
988
|
-
|
|
989
|
-
(
|
|
1005
|
+
t("div", vo, [
|
|
1006
|
+
(s(!0), l(P, null, j(f.value, (p) => (s(), l("button", {
|
|
990
1007
|
key: p.value,
|
|
991
1008
|
type: "button",
|
|
992
|
-
class: z(["wi-web-env-switch__item", { "is-active": p.value ===
|
|
993
|
-
disabled:
|
|
994
|
-
onClick: (m) =>
|
|
1009
|
+
class: z(["wi-web-env-switch__item", { "is-active": p.value === u.modelValue, "is-disabled": p.disabled }]),
|
|
1010
|
+
disabled: u.disabled || p.disabled,
|
|
1011
|
+
onClick: (m) => r(p)
|
|
995
1012
|
}, [
|
|
996
|
-
|
|
997
|
-
p.value === "cloud" ? (
|
|
1013
|
+
t("span", mo, [
|
|
1014
|
+
p.value === "cloud" ? (s(), l("svg", bo, go)) : (s(), l("svg", yo, Co))
|
|
998
1015
|
]),
|
|
999
|
-
|
|
1000
|
-
], 10,
|
|
1016
|
+
t("span", Uo, A(p.label), 1)
|
|
1017
|
+
], 10, wo))), 128))
|
|
1001
1018
|
])
|
|
1002
1019
|
]),
|
|
1003
|
-
a.value ? (
|
|
1004
|
-
|
|
1005
|
-
a.value.status ? (
|
|
1006
|
-
|
|
1020
|
+
a.value ? (s(), l("div", Ao, [
|
|
1021
|
+
t("span", Bo, A(a.value.description), 1),
|
|
1022
|
+
a.value.status ? (s(), l("span", Io, [
|
|
1023
|
+
t("i", {
|
|
1007
1024
|
class: z(["wi-web-env-switch__dot", { "is-online": a.value.online }])
|
|
1008
1025
|
}, null, 2),
|
|
1009
|
-
|
|
1026
|
+
O(" " + A(a.value.status), 1)
|
|
1010
1027
|
])) : g("", !0)
|
|
1011
1028
|
])) : g("", !0)
|
|
1012
1029
|
], 2));
|
|
1013
1030
|
}
|
|
1014
|
-
}),
|
|
1031
|
+
}), zo = /* @__PURE__ */ Q(Fo, [["__scopeId", "data-v-94659445"]]);
|
|
1015
1032
|
export {
|
|
1016
|
-
|
|
1017
|
-
|
|
1033
|
+
xo as AiAnswerBubble,
|
|
1034
|
+
Ye as AttachmentCard,
|
|
1018
1035
|
ne as AttachmentList,
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1036
|
+
Mo as ChatContainer,
|
|
1037
|
+
eo as ChatMessagesView,
|
|
1038
|
+
Oo as ClarificationCard,
|
|
1039
|
+
Do as DeepThinkingSteps,
|
|
1040
|
+
zo as EnvSwitch,
|
|
1041
|
+
Qo as IframePage,
|
|
1042
|
+
Ot as Inputbox,
|
|
1043
|
+
No as KnowledgeStreamResult,
|
|
1044
|
+
jo as OutputFile,
|
|
1045
|
+
po as RecordsetTable,
|
|
1046
|
+
Ho as createAnswerContentMap,
|
|
1047
|
+
Qt as createWebAnswerContentMap,
|
|
1048
|
+
Wo as injectIframeResizerChild,
|
|
1049
|
+
qo as provideIframePageConfig,
|
|
1050
|
+
Ko as provideOutputFileConfig,
|
|
1051
|
+
Yo as resolveIframePlaceholders,
|
|
1052
|
+
Xo as useIframePage
|
|
1033
1053
|
};
|
|
1034
1054
|
//# sourceMappingURL=index.js.map
|