wi-chat 0.6.0 → 0.6.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/useChat.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +51 -51
- package/dist/mobile-ui/index.cjs +1 -1
- package/dist/mobile-ui/index.d.ts +1 -1
- package/dist/mobile-ui/index.js +16 -16
- package/dist/parser/answerCom/actionExecute/{parseAgentAction.d.ts → parseHostAction.d.ts} +8 -8
- package/dist/parser/answerCom/actionExecute/types.d.ts +9 -10
- package/dist/parser/index.cjs +2 -2
- package/dist/parser/index.d.ts +3 -3
- package/dist/parser/index.js +16 -16
- package/dist/parser/registry.d.ts +3 -3
- package/dist/renderers/{agentAction/AgentActionStatus.vue.d.ts → hostAction/HostActionStatus.vue.d.ts} +3 -3
- package/dist/renderers/index.cjs +1 -1
- package/dist/renderers/index.d.ts +1 -1
- package/dist/renderers/index.js +194 -194
- package/dist/renderers/style.css +1 -1
- package/dist/web-ui/index.cjs +1 -1
- package/dist/web-ui/index.d.ts +1 -1
- package/dist/web-ui/index.js +5 -5
- package/package.json +1 -1
package/dist/renderers/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import "wi-chat/style.css";
|
|
2
|
-
import { defineAsyncComponent as
|
|
3
|
-
import { knowledgeStreamParser as Ue, iframePageParser as Me, outputFileParser as Le, collectClarificationsParser as je,
|
|
2
|
+
import { defineAsyncComponent as H, defineComponent as j, computed as I, openBlock as l, createElementBlock as c, createElementVNode as e, Fragment as M, renderList as B, createBlock as ee, resolveDynamicComponent as ke, createCommentVNode as V, createTextVNode as Se, pushScopeId as K, popScopeId as X, unref as i, toDisplayString as v, withDirectives as $e, vShow as xe, getCurrentInstance as ce, inject as ue, toValue as z, ref as U, watch as de, onBeforeUnmount as Ie, provide as _e, withKeys as re, withModifiers as te, normalizeClass as D, Teleport as Ce, createVNode as Ee, Transition as Oe, withCtx as Te, reactive as Ve, normalizeStyle as Pe } from "vue";
|
|
3
|
+
import { knowledgeStreamParser as Ue, iframePageParser as Me, outputFileParser as Le, collectClarificationsParser as je, hostActionParser as Ne, formatFileSize as Re, IFRAME_RESIZER_CHILD_SCRIPT as Ae, submitClarification as Fe, cancelClarification as De } from "wi-chat/parser";
|
|
4
4
|
import { createStyleScope as pe, renderMarkdown as fe, downloadTableAsExcel as Be } from "wi-chat/tools";
|
|
5
5
|
import ie from "@iframe-resizer/vue/iframe-resizer.vue";
|
|
6
6
|
const ze = [
|
|
7
|
-
{ ...Ue, component:
|
|
8
|
-
{ ...Me, component:
|
|
9
|
-
{ ...Le, component:
|
|
10
|
-
// 确认卡片(front_reply + action_execute + executor=
|
|
7
|
+
{ ...Ue, component: H(() => Promise.resolve().then(() => ft)) },
|
|
8
|
+
{ ...Me, component: H(() => Promise.resolve().then(() => fs)) },
|
|
9
|
+
{ ...Le, component: H(() => Promise.resolve().then(() => os)) },
|
|
10
|
+
// 确认卡片(front_reply + action_execute + executor=agent + collect_clarifications):
|
|
11
11
|
// 解析由内置 collectClarificationsParser 完成,提交/取消经 wi-chat/parser 回传 wait_reply
|
|
12
|
-
{ ...je, component:
|
|
13
|
-
//
|
|
14
|
-
{ ...
|
|
12
|
+
{ ...je, component: H(() => Promise.resolve().then(() => tn)) },
|
|
13
|
+
// 宿主执行过程(front_reply + action_execute + executor=host):宿主执行、进度卡片
|
|
14
|
+
{ ...Ne, component: H(() => Promise.resolve().then(() => fn)) }
|
|
15
15
|
], qe = (n) => {
|
|
16
|
-
const a = (
|
|
16
|
+
const a = (u) => {
|
|
17
17
|
const t = {};
|
|
18
|
-
for (const o of
|
|
18
|
+
for (const o of u)
|
|
19
19
|
!o.answerType || !o.component || (t[o.answerType] = o.component);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
return { ...a(ze), ...a(n ?? []) };
|
|
23
|
-
},
|
|
23
|
+
}, He = (n) => (K("data-v-efad55c8"), n = n(), X(), n), Ke = { class: "flex justify-start" }, Xe = { class: "ai-answer-bubble" }, Ge = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "ai-answer-bubble__error"
|
|
26
26
|
}, We = { class: "ai-answer-bubble__body" }, Ye = {
|
|
@@ -32,7 +32,7 @@ const ze = [
|
|
|
32
32
|
}, Ze = {
|
|
33
33
|
key: 3,
|
|
34
34
|
class: "ai-answer-bubble__loading"
|
|
35
|
-
}, Qe = /* @__PURE__ */
|
|
35
|
+
}, Qe = /* @__PURE__ */ He(() => /* @__PURE__ */ e("span", { class: "ai-answer-bubble__pulse" }, null, -1)), et = /* @__PURE__ */ j({
|
|
36
36
|
__name: "AiAnswerBubble",
|
|
37
37
|
props: {
|
|
38
38
|
answer: {},
|
|
@@ -41,33 +41,33 @@ const ze = [
|
|
|
41
41
|
contentMap: { default: () => qe() }
|
|
42
42
|
},
|
|
43
43
|
setup(n) {
|
|
44
|
-
const a = n,
|
|
44
|
+
const a = n, u = I(() => {
|
|
45
45
|
var o, d;
|
|
46
46
|
return ((d = (o = a.answer) == null ? void 0 : o.answer) == null ? void 0 : d.reports) ?? [];
|
|
47
|
-
}), t = I(() =>
|
|
48
|
-
return (o, d) => (l(),
|
|
47
|
+
}), t = I(() => u.value.filter((o) => a.contentMap[o.answer_type]));
|
|
48
|
+
return (o, d) => (l(), c("div", Ke, [
|
|
49
49
|
e("div", Xe, [
|
|
50
|
-
o.error ? (l(),
|
|
50
|
+
o.error ? (l(), c("div", Ge, "回答加载失败")) : t.value.length ? (l(), c(M, { key: 1 }, [
|
|
51
51
|
e("div", We, [
|
|
52
|
-
(l(!0),
|
|
52
|
+
(l(!0), c(M, null, B(t.value, (w, $) => (l(), ee(ke(o.contentMap[w.answer_type]), {
|
|
53
53
|
key: $,
|
|
54
54
|
report: w
|
|
55
55
|
}, null, 8, ["report"]))), 128))
|
|
56
56
|
]),
|
|
57
|
-
o.stopped ? (l(),
|
|
58
|
-
], 64)) : o.stopped ? (l(),
|
|
57
|
+
o.stopped ? (l(), c("div", Ye, "回答已停止")) : V("", !0)
|
|
58
|
+
], 64)) : o.stopped ? (l(), c("div", Je, "回答已停止")) : u.value.length ? V("", !0) : (l(), c("div", Ze, [
|
|
59
59
|
Qe,
|
|
60
60
|
Se("正在思考...")
|
|
61
61
|
]))
|
|
62
62
|
])
|
|
63
63
|
]));
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
66
|
-
const
|
|
65
|
+
}), N = (n, a) => {
|
|
66
|
+
const u = n.__vccOpts || n;
|
|
67
67
|
for (const [t, o] of a)
|
|
68
|
-
|
|
69
|
-
return
|
|
70
|
-
}, bn = /* @__PURE__ */
|
|
68
|
+
u[t] = o;
|
|
69
|
+
return u;
|
|
70
|
+
}, bn = /* @__PURE__ */ N(et, [["__scopeId", "data-v-efad55c8"]]), tt = (n) => (K("data-v-de333356"), n = n(), X(), n), st = ["data-wi-md-scope"], nt = ["aria-expanded"], ot = /* @__PURE__ */ tt(() => /* @__PURE__ */ e("span", { class: "deep-thinking__title" }, "深度思考", -1)), at = { class: "deep-thinking__count" }, rt = { class: "deep-thinking__list" }, it = { class: "deep-thinking__index" }, lt = ["innerHTML"], ct = /* @__PURE__ */ j({
|
|
71
71
|
__name: "DeepThinkingSteps",
|
|
72
72
|
props: {
|
|
73
73
|
steps: {},
|
|
@@ -75,11 +75,11 @@ const ze = [
|
|
|
75
75
|
},
|
|
76
76
|
emits: ["update:expanded"],
|
|
77
77
|
setup(n, { emit: a }) {
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
return
|
|
81
|
-
}, g = I(() =>
|
|
82
|
-
return (p,
|
|
78
|
+
const u = n, t = a, o = { imageDownload: !1, tableDownload: !1 }, d = pe(), w = { ...o, styleScope: d.selector }, $ = /* @__PURE__ */ new Map(), b = (p) => {
|
|
79
|
+
let y = $.get(p);
|
|
80
|
+
return y === void 0 && ($.size > 500 && $.clear(), y = fe(p, w), $.set(p, y)), y;
|
|
81
|
+
}, g = I(() => u.steps.map(b));
|
|
82
|
+
return (p, y) => g.value.length ? (l(), c("div", {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "deep-thinking",
|
|
85
85
|
"data-wi-md-scope": i(d).id
|
|
@@ -88,14 +88,14 @@ const ze = [
|
|
|
88
88
|
type: "button",
|
|
89
89
|
class: "deep-thinking__header",
|
|
90
90
|
"aria-expanded": p.expanded,
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: y[0] || (y[0] = (k) => t("update:expanded", !p.expanded))
|
|
92
92
|
}, [
|
|
93
93
|
ot,
|
|
94
94
|
e("span", at, v(g.value.length), 1),
|
|
95
95
|
e("span", null, v(p.expanded ? "收起" : "展开"), 1)
|
|
96
96
|
], 8, nt),
|
|
97
97
|
$e(e("div", rt, [
|
|
98
|
-
(l(!0),
|
|
98
|
+
(l(!0), c(M, null, B(g.value, (k, O) => (l(), c("div", {
|
|
99
99
|
key: O,
|
|
100
100
|
class: "deep-thinking__item"
|
|
101
101
|
}, [
|
|
@@ -110,42 +110,42 @@ const ze = [
|
|
|
110
110
|
])
|
|
111
111
|
], 8, st)) : V("", !0);
|
|
112
112
|
}
|
|
113
|
-
}), gn = /* @__PURE__ */
|
|
113
|
+
}), gn = /* @__PURE__ */ N(ct, [["__scopeId", "data-v-de333356"]]), ut = ["data-wi-md-scope"], dt = ["innerHTML"], _t = /* @__PURE__ */ j({
|
|
114
114
|
__name: "KnowledgeStreamResult",
|
|
115
115
|
props: {
|
|
116
116
|
report: {}
|
|
117
117
|
},
|
|
118
118
|
setup(n) {
|
|
119
|
-
const a = n,
|
|
119
|
+
const a = n, u = { imageDownload: !1, tableDownload: !0 }, t = pe(), o = { ...u, styleScope: t.selector }, d = (g) => {
|
|
120
120
|
var O;
|
|
121
|
-
const
|
|
122
|
-
if (!
|
|
121
|
+
const y = g.target.closest(".wi-md-table-download");
|
|
122
|
+
if (!y)
|
|
123
123
|
return;
|
|
124
124
|
g.preventDefault(), g.stopPropagation();
|
|
125
|
-
const k = (O =
|
|
125
|
+
const k = (O = y.closest(".wi-md-table-wrap")) == null ? void 0 : O.querySelector("table");
|
|
126
126
|
k && Be(k);
|
|
127
127
|
}, w = /* @__PURE__ */ new Map(), $ = (g) => {
|
|
128
128
|
let p = w.get(g);
|
|
129
129
|
return p === void 0 && (w.size > 300 && w.clear(), p = fe(g, o), w.set(g, p)), p;
|
|
130
130
|
}, b = I(() => (a.report.values || []).map((g) => $(g.answer || "")));
|
|
131
|
-
return (g, p) => (l(),
|
|
131
|
+
return (g, p) => (l(), c("div", {
|
|
132
132
|
class: "knowledge-result",
|
|
133
133
|
"data-wi-md-scope": i(t).id,
|
|
134
134
|
onClick: d
|
|
135
135
|
}, [
|
|
136
|
-
(l(!0),
|
|
136
|
+
(l(!0), c(M, null, B(b.value, (y, k) => (l(), c("div", {
|
|
137
137
|
key: k,
|
|
138
138
|
class: "markdown-it",
|
|
139
|
-
innerHTML:
|
|
139
|
+
innerHTML: y
|
|
140
140
|
}, null, 8, dt))), 128))
|
|
141
|
-
], 8,
|
|
141
|
+
], 8, ut));
|
|
142
142
|
}
|
|
143
|
-
}), pt = /* @__PURE__ */
|
|
143
|
+
}), pt = /* @__PURE__ */ N(_t, [["__scopeId", "data-v-857bc0d2"]]), ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
144
144
|
__proto__: null,
|
|
145
145
|
default: pt
|
|
146
146
|
}, Symbol.toStringTag, { value: "Module" })), ve = Symbol("wi-chat-output-file-config"), kn = (n) => {
|
|
147
147
|
_e(ve, n);
|
|
148
|
-
}, vt = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico"]), wt = /* @__PURE__ */ new Set(["mp3", "wav", "ogg", "m4a", "aac", "flac"]),
|
|
148
|
+
}, vt = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico"]), wt = /* @__PURE__ */ new Set(["mp3", "wav", "ogg", "m4a", "aac", "flac"]), ht = /* @__PURE__ */ new Set(["mp4", "webm", "mov", "avi", "mkv"]), yt = /* @__PURE__ */ new Set(["doc", "docx", "xls", "xlsx", "ppt", "pptx"]), mt = /* @__PURE__ */ new Set(["html", "htm"]), bt = /* @__PURE__ */ new Set([
|
|
149
149
|
"js",
|
|
150
150
|
"mjs",
|
|
151
151
|
"cjs",
|
|
@@ -189,15 +189,15 @@ const ze = [
|
|
|
189
189
|
"sql"
|
|
190
190
|
]), kt = 20, F = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), St = (n, a) => {
|
|
191
191
|
if (!F.has(n) && F.size >= kt) {
|
|
192
|
-
const
|
|
193
|
-
|
|
192
|
+
const u = F.keys().next().value;
|
|
193
|
+
u !== void 0 && F.delete(u);
|
|
194
194
|
}
|
|
195
195
|
F.set(n, a);
|
|
196
196
|
}, $t = (n) => {
|
|
197
197
|
const a = n.lastIndexOf(".");
|
|
198
198
|
return a >= 0 ? n.slice(a + 1).toLowerCase() : "";
|
|
199
|
-
}, xt = (n) => vt.has(n) ? "image" : n === "pdf" ? "pdf" : mt.has(n) ? "html" : wt.has(n) ? "audio" :
|
|
200
|
-
const a =
|
|
199
|
+
}, xt = (n) => vt.has(n) ? "image" : n === "pdf" ? "pdf" : mt.has(n) ? "html" : wt.has(n) ? "audio" : ht.has(n) ? "video" : yt.has(n) ? "office" : bt.has(n) ? "code" : gt.has(n) ? "text" : "unknown", It = (n) => {
|
|
200
|
+
const a = ce() ? ue(ve, {}) : {}, u = I(() => {
|
|
201
201
|
var C;
|
|
202
202
|
const _ = z(n);
|
|
203
203
|
return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_id) ?? (_ == null ? void 0 : _.file_id) ?? "";
|
|
@@ -205,32 +205,32 @@ const ze = [
|
|
|
205
205
|
var C;
|
|
206
206
|
const _ = z(n);
|
|
207
207
|
return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_name) ?? (_ == null ? void 0 : _.file_name) ?? "未命名文件";
|
|
208
|
-
}), o = I(() => $t(t.value)), d = I(() => xt(o.value)), w = U(!1), $ = U(!1), b = U(""), g = U(!1), p = U(""),
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
const _ =
|
|
208
|
+
}), o = I(() => $t(t.value)), d = I(() => xt(o.value)), w = U(!1), $ = U(!1), b = U(""), g = U(!1), p = U(""), y = U(""), k = U(null), O = I(() => k.value ? Re(k.value.size) : ""), T = () => {
|
|
209
|
+
y.value && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(y.value), y.value = "";
|
|
210
|
+
}, R = async () => {
|
|
211
|
+
const _ = u.value, C = t.value;
|
|
212
212
|
if (!_)
|
|
213
213
|
throw new Error("缺少文件 id,无法加载文件");
|
|
214
214
|
const E = _ || C, Y = F.get(E);
|
|
215
215
|
if (Y)
|
|
216
216
|
return Y;
|
|
217
|
-
let
|
|
218
|
-
return
|
|
217
|
+
let A = se.get(E);
|
|
218
|
+
return A || (A = (async () => {
|
|
219
219
|
var J, Z;
|
|
220
220
|
if (a.loadFile)
|
|
221
221
|
return a.loadFile(_);
|
|
222
222
|
const L = (J = a.getFileUrl) == null ? void 0 : J.call(a, _);
|
|
223
223
|
if (!L)
|
|
224
224
|
throw new Error("未配置文件加载方式(请提供 loadFile 或 getFileUrl)");
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
throw new Error(`文件加载失败(HTTP ${
|
|
228
|
-
return
|
|
229
|
-
})().then((L) => (St(E, L), L)).finally(() => se.delete(E)), se.set(E,
|
|
225
|
+
const h = await fetch(L, { headers: (Z = a.getHeaders) == null ? void 0 : Z.call(a) });
|
|
226
|
+
if (!h.ok)
|
|
227
|
+
throw new Error(`文件加载失败(HTTP ${h.status})`);
|
|
228
|
+
return h.blob();
|
|
229
|
+
})().then((L) => (St(E, L), L)).finally(() => se.delete(E)), se.set(E, A)), A;
|
|
230
230
|
}, S = async () => {
|
|
231
231
|
$.value = !0, b.value = "", g.value = !1, p.value = "", T();
|
|
232
232
|
try {
|
|
233
|
-
const _ = await
|
|
233
|
+
const _ = await R();
|
|
234
234
|
k.value = _;
|
|
235
235
|
const C = d.value;
|
|
236
236
|
if (C === "office") {
|
|
@@ -238,7 +238,7 @@ const ze = [
|
|
|
238
238
|
return;
|
|
239
239
|
}
|
|
240
240
|
if (C === "image" || C === "pdf" || C === "audio" || C === "video") {
|
|
241
|
-
typeof URL < "u" && typeof URL.createObjectURL == "function" && (
|
|
241
|
+
typeof URL < "u" && typeof URL.createObjectURL == "function" && (y.value = URL.createObjectURL(_));
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
const E = await _.text();
|
|
@@ -255,9 +255,9 @@ const ze = [
|
|
|
255
255
|
}, x = async () => {
|
|
256
256
|
if (a.openPreview) {
|
|
257
257
|
a.openPreview({
|
|
258
|
-
fileId:
|
|
258
|
+
fileId: u.value,
|
|
259
259
|
fileName: t.value,
|
|
260
|
-
loadFile:
|
|
260
|
+
loadFile: R,
|
|
261
261
|
download: W
|
|
262
262
|
});
|
|
263
263
|
return;
|
|
@@ -267,9 +267,9 @@ const ze = [
|
|
|
267
267
|
w.value = !1, $.value = !1, b.value = "", g.value = !1, p.value = "", T();
|
|
268
268
|
}, W = async () => {
|
|
269
269
|
try {
|
|
270
|
-
const _ = k.value ?? await
|
|
270
|
+
const _ = k.value ?? await R();
|
|
271
271
|
if (k.value = _, a.downloadFile) {
|
|
272
|
-
a.downloadFile({ fileId:
|
|
272
|
+
a.downloadFile({ fileId: u.value, fileName: t.value, blob: _ });
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
275
|
if (typeof document > "u" || typeof URL > "u")
|
|
@@ -287,7 +287,7 @@ const ze = [
|
|
|
287
287
|
}), Ie(() => {
|
|
288
288
|
typeof window < "u" && window.removeEventListener("keydown", q), T();
|
|
289
289
|
}), {
|
|
290
|
-
fileId:
|
|
290
|
+
fileId: u,
|
|
291
291
|
fileName: t,
|
|
292
292
|
extension: o,
|
|
293
293
|
previewKind: d,
|
|
@@ -297,12 +297,12 @@ const ze = [
|
|
|
297
297
|
error: b,
|
|
298
298
|
unsupported: g,
|
|
299
299
|
textContent: p,
|
|
300
|
-
objectUrl:
|
|
300
|
+
objectUrl: y,
|
|
301
301
|
open: x,
|
|
302
302
|
close: G,
|
|
303
303
|
download: W
|
|
304
304
|
};
|
|
305
|
-
}, oe = (n) => (
|
|
305
|
+
}, oe = (n) => (K("data-v-f61a91b5"), n = n(), X(), n), Ct = { class: "wi-output-file" }, Et = ["aria-label"], Ot = /* @__PURE__ */ oe(() => /* @__PURE__ */ e("svg", {
|
|
306
306
|
viewBox: "0 0 24 24",
|
|
307
307
|
fill: "none",
|
|
308
308
|
stroke: "currentColor",
|
|
@@ -328,12 +328,12 @@ const ze = [
|
|
|
328
328
|
/* @__PURE__ */ e("path", { d: "M12 3v12" }),
|
|
329
329
|
/* @__PURE__ */ e("path", { d: "m7 10 5 5 5-5" }),
|
|
330
330
|
/* @__PURE__ */ e("path", { d: "M5 21h14" })
|
|
331
|
-
], -1)),
|
|
331
|
+
], -1)), Nt = [
|
|
332
332
|
jt
|
|
333
|
-
],
|
|
333
|
+
], Rt = ["aria-label"], At = { class: "wi-output-file-drawer__head" }, Ft = { class: "wi-output-file-drawer__title" }, Dt = { class: "wi-output-file-drawer__ext" }, Bt = ["title"], zt = {
|
|
334
334
|
key: 0,
|
|
335
335
|
class: "wi-output-file-drawer__size"
|
|
336
|
-
}, qt = { class: "wi-output-file-drawer__actions" },
|
|
336
|
+
}, qt = { class: "wi-output-file-drawer__actions" }, Ht = { class: "wi-output-file-drawer__body" }, Kt = {
|
|
337
337
|
key: 0,
|
|
338
338
|
class: "wi-output-file-drawer__state"
|
|
339
339
|
}, Xt = {
|
|
@@ -352,7 +352,7 @@ const ze = [
|
|
|
352
352
|
},
|
|
353
353
|
setup(n) {
|
|
354
354
|
const a = n, {
|
|
355
|
-
fileName:
|
|
355
|
+
fileName: u,
|
|
356
356
|
extension: t,
|
|
357
357
|
previewKind: o,
|
|
358
358
|
fileSize: d,
|
|
@@ -361,17 +361,17 @@ const ze = [
|
|
|
361
361
|
error: b,
|
|
362
362
|
unsupported: g,
|
|
363
363
|
textContent: p,
|
|
364
|
-
objectUrl:
|
|
364
|
+
objectUrl: y,
|
|
365
365
|
open: k,
|
|
366
366
|
close: O,
|
|
367
367
|
download: T
|
|
368
368
|
} = It(() => a.report);
|
|
369
|
-
return (
|
|
369
|
+
return (R, S) => (l(), c("div", Ct, [
|
|
370
370
|
e("div", {
|
|
371
371
|
class: "wi-output-file__card",
|
|
372
372
|
role: "button",
|
|
373
373
|
tabindex: "0",
|
|
374
|
-
"aria-label": `预览文件 ${i(
|
|
374
|
+
"aria-label": `预览文件 ${i(u)}`,
|
|
375
375
|
onClick: S[1] || (S[1] = //@ts-ignore
|
|
376
376
|
(...x) => i(k) && i(k)(...x)),
|
|
377
377
|
onKeydown: [
|
|
@@ -393,11 +393,11 @@ const ze = [
|
|
|
393
393
|
e("div", Vt, [
|
|
394
394
|
e("div", {
|
|
395
395
|
class: "wi-output-file__name",
|
|
396
|
-
title: i(
|
|
397
|
-
}, v(i(
|
|
396
|
+
title: i(u)
|
|
397
|
+
}, v(i(u)), 9, Pt),
|
|
398
398
|
e("div", Ut, [
|
|
399
399
|
e("span", Mt, v(i(t).toUpperCase() || "FILE"), 1),
|
|
400
|
-
i(d) ? (l(),
|
|
400
|
+
i(d) ? (l(), c("span", Lt, v(i(d)), 1)) : V("", !0)
|
|
401
401
|
])
|
|
402
402
|
]),
|
|
403
403
|
e("button", {
|
|
@@ -410,12 +410,12 @@ const ze = [
|
|
|
410
410
|
(...x) => i(T) && i(T)(...x),
|
|
411
411
|
["stop"]
|
|
412
412
|
))
|
|
413
|
-
},
|
|
413
|
+
}, Nt)
|
|
414
414
|
], 40, Et),
|
|
415
415
|
(l(), ee(Ce, { to: "body" }, [
|
|
416
416
|
Ee(Oe, { name: "wi-output-file-fade" }, {
|
|
417
417
|
default: Te(() => [
|
|
418
|
-
i(w) ? (l(),
|
|
418
|
+
i(w) ? (l(), c("div", {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "wi-output-file-mask",
|
|
421
421
|
onClick: S[8] || (S[8] = te(
|
|
@@ -428,16 +428,16 @@ const ze = [
|
|
|
428
428
|
class: "wi-output-file-drawer",
|
|
429
429
|
role: "dialog",
|
|
430
430
|
"aria-modal": "true",
|
|
431
|
-
"aria-label": `预览文件 ${i(
|
|
431
|
+
"aria-label": `预览文件 ${i(u)}`
|
|
432
432
|
}, [
|
|
433
|
-
e("header",
|
|
433
|
+
e("header", At, [
|
|
434
434
|
e("div", Ft, [
|
|
435
435
|
e("span", Dt, v(i(t).toUpperCase() || "FILE"), 1),
|
|
436
436
|
e("div", {
|
|
437
437
|
class: "wi-output-file-drawer__name",
|
|
438
|
-
title: i(
|
|
439
|
-
}, v(i(
|
|
440
|
-
i(d) ? (l(),
|
|
438
|
+
title: i(u)
|
|
439
|
+
}, v(i(u)), 9, Bt),
|
|
440
|
+
i(d) ? (l(), c("div", zt, v(i(d)), 1)) : V("", !0)
|
|
441
441
|
]),
|
|
442
442
|
e("div", qt, [
|
|
443
443
|
e("button", {
|
|
@@ -456,8 +456,8 @@ const ze = [
|
|
|
456
456
|
}, " × ")
|
|
457
457
|
])
|
|
458
458
|
]),
|
|
459
|
-
e("div",
|
|
460
|
-
i($) ? (l(),
|
|
459
|
+
e("div", Ht, [
|
|
460
|
+
i($) ? (l(), c("div", Kt, "文件加载中…")) : i(b) ? (l(), c("div", Xt, [
|
|
461
461
|
e("p", null, v(i(b)), 1),
|
|
462
462
|
e("button", {
|
|
463
463
|
type: "button",
|
|
@@ -465,7 +465,7 @@ const ze = [
|
|
|
465
465
|
onClick: S[6] || (S[6] = //@ts-ignore
|
|
466
466
|
(...x) => i(T) && i(T)(...x))
|
|
467
467
|
}, "下载文件")
|
|
468
|
-
])) : i(g) ? (l(),
|
|
468
|
+
])) : i(g) ? (l(), c("div", Gt, [
|
|
469
469
|
Wt,
|
|
470
470
|
e("button", {
|
|
471
471
|
type: "button",
|
|
@@ -473,35 +473,35 @@ const ze = [
|
|
|
473
473
|
onClick: S[7] || (S[7] = //@ts-ignore
|
|
474
474
|
(...x) => i(T) && i(T)(...x))
|
|
475
475
|
}, "下载文件")
|
|
476
|
-
])) : i(o) === "image" && i(
|
|
476
|
+
])) : i(o) === "image" && i(y) ? (l(), c("img", {
|
|
477
477
|
key: 3,
|
|
478
478
|
class: "wi-output-file-drawer__image",
|
|
479
|
-
src: i(
|
|
480
|
-
alt: i(
|
|
481
|
-
}, null, 8, Yt)) : i(o) === "pdf" && i(
|
|
479
|
+
src: i(y),
|
|
480
|
+
alt: i(u)
|
|
481
|
+
}, null, 8, Yt)) : i(o) === "pdf" && i(y) ? (l(), c("iframe", {
|
|
482
482
|
key: 4,
|
|
483
483
|
class: "wi-output-file-drawer__frame",
|
|
484
|
-
src: i(
|
|
485
|
-
title: i(
|
|
486
|
-
}, null, 8, Jt)) : i(o) === "html" ? (l(),
|
|
484
|
+
src: i(y),
|
|
485
|
+
title: i(u)
|
|
486
|
+
}, null, 8, Jt)) : i(o) === "html" ? (l(), c("iframe", {
|
|
487
487
|
key: 5,
|
|
488
488
|
class: "wi-output-file-drawer__frame",
|
|
489
489
|
srcdoc: i(p),
|
|
490
490
|
sandbox: "allow-scripts allow-forms allow-modals",
|
|
491
|
-
title: i(
|
|
492
|
-
}, null, 8, Zt)) : i(o) === "audio" && i(
|
|
491
|
+
title: i(u)
|
|
492
|
+
}, null, 8, Zt)) : i(o) === "audio" && i(y) ? (l(), c("audio", {
|
|
493
493
|
key: 6,
|
|
494
494
|
class: "wi-output-file-drawer__media",
|
|
495
|
-
src: i(
|
|
495
|
+
src: i(y),
|
|
496
496
|
controls: ""
|
|
497
|
-
}, null, 8, Qt)) : i(o) === "video" && i(
|
|
497
|
+
}, null, 8, Qt)) : i(o) === "video" && i(y) ? (l(), c("video", {
|
|
498
498
|
key: 7,
|
|
499
499
|
class: "wi-output-file-drawer__media",
|
|
500
|
-
src: i(
|
|
500
|
+
src: i(y),
|
|
501
501
|
controls: ""
|
|
502
|
-
}, null, 8, es)) : (l(),
|
|
502
|
+
}, null, 8, es)) : (l(), c("pre", ts, v(i(p)), 1))
|
|
503
503
|
])
|
|
504
|
-
], 8,
|
|
504
|
+
], 8, Rt)
|
|
505
505
|
])) : V("", !0)
|
|
506
506
|
]),
|
|
507
507
|
_: 1
|
|
@@ -509,12 +509,12 @@ const ze = [
|
|
|
509
509
|
]))
|
|
510
510
|
]));
|
|
511
511
|
}
|
|
512
|
-
}), ns = /* @__PURE__ */
|
|
512
|
+
}), ns = /* @__PURE__ */ N(ss, [["__scopeId", "data-v-f61a91b5"]]), os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
513
513
|
__proto__: null,
|
|
514
514
|
default: ns
|
|
515
515
|
}, Symbol.toStringTag, { value: "Module" })), as = () => {
|
|
516
|
-
var a,
|
|
517
|
-
const n = (
|
|
516
|
+
var a, u;
|
|
517
|
+
const n = (u = (a = window == null ? void 0 : window.globalConfig) == null ? void 0 : a.WebApiUrl) == null ? void 0 : u.MainUrl;
|
|
518
518
|
return typeof n == "string" ? n : "";
|
|
519
519
|
}, rs = () => window.location.origin + window.location.pathname, ne = "access-session", is = () => {
|
|
520
520
|
const n = window.location.pathname.split("/").filter((a) => !!a).join("-");
|
|
@@ -525,11 +525,11 @@ const ze = [
|
|
|
525
525
|
const o = localStorage.key(t);
|
|
526
526
|
!o || !o.endsWith(ne) || o.slice(0, o.lastIndexOf(":")) !== "wi admin" && (o.endsWith(`x-${ne}`) || a.push(o));
|
|
527
527
|
}
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
528
|
+
const u = a.find((t) => t.endsWith(n)) ?? a[0];
|
|
529
|
+
if (!u)
|
|
530
530
|
return "";
|
|
531
531
|
try {
|
|
532
|
-
const t = localStorage.getItem(
|
|
532
|
+
const t = localStorage.getItem(u);
|
|
533
533
|
if (!t || t === "undefined")
|
|
534
534
|
return "";
|
|
535
535
|
const o = JSON.parse(t);
|
|
@@ -539,20 +539,20 @@ const ze = [
|
|
|
539
539
|
}
|
|
540
540
|
}, we = Symbol("wi-chat-iframe-page-config"), Sn = (n) => {
|
|
541
541
|
_e(we, n);
|
|
542
|
-
},
|
|
543
|
-
const
|
|
544
|
-
return n.replace(/\{\{\s*MAIN_URL\s*\}\}/g,
|
|
545
|
-
},
|
|
546
|
-
const a =
|
|
542
|
+
}, cs = (n, a) => {
|
|
543
|
+
const u = (a == null ? void 0 : a.mainUrl) !== void 0 ? String(z(a.mainUrl)) : as(), t = (a == null ? void 0 : a.token) !== void 0 ? String(z(a.token)) : ls();
|
|
544
|
+
return n.replace(/\{\{\s*MAIN_URL\s*\}\}/g, u).replace(/\{\{\s*SERVE_URL\s*\}\}/g, rs()).replace(/\{\{\s*token\s*\}\}/g, t);
|
|
545
|
+
}, us = (n) => {
|
|
546
|
+
const a = ce() ? ue(we, {}) : {}, u = I(() => {
|
|
547
547
|
var w;
|
|
548
548
|
const o = z(n), d = ((w = o == null ? void 0 : o.values) == null ? void 0 : w.url) ?? (o == null ? void 0 : o.url) ?? "";
|
|
549
|
-
return d ? a.resolveUrl ? a.resolveUrl(d) :
|
|
549
|
+
return d ? a.resolveUrl ? a.resolveUrl(d) : cs(d, a) : "";
|
|
550
550
|
}), t = I(() => {
|
|
551
551
|
var d;
|
|
552
552
|
const o = z(n);
|
|
553
553
|
return ((d = o == null ? void 0 : o.values) == null ? void 0 : d.srcdoc) ?? (o == null ? void 0 : o.srcdoc) ?? "";
|
|
554
554
|
});
|
|
555
|
-
return { url:
|
|
555
|
+
return { url: u, srcdoc: t };
|
|
556
556
|
}, le = "data-wi-iframe-resizer-child", ds = (n) => {
|
|
557
557
|
if (!n)
|
|
558
558
|
return !1;
|
|
@@ -564,28 +564,28 @@ const ze = [
|
|
|
564
564
|
}
|
|
565
565
|
if (!a)
|
|
566
566
|
return !1;
|
|
567
|
-
const
|
|
568
|
-
if (!
|
|
567
|
+
const u = a.head || a.documentElement;
|
|
568
|
+
if (!u)
|
|
569
569
|
return !1;
|
|
570
570
|
const t = a.defaultView;
|
|
571
571
|
if (t != null && t.parentIframe || t != null && t.parentIFrame || a.querySelector(`script[${le}]`))
|
|
572
572
|
return !1;
|
|
573
573
|
const o = a.createElement("script");
|
|
574
|
-
return o.textContent =
|
|
574
|
+
return o.textContent = Ae, o.setAttribute(le, ""), u.appendChild(o), !0;
|
|
575
575
|
}, _s = /* @__PURE__ */ j({
|
|
576
576
|
__name: "IframePage",
|
|
577
577
|
props: {
|
|
578
578
|
report: {}
|
|
579
579
|
},
|
|
580
580
|
setup(n) {
|
|
581
|
-
const a = n, { url:
|
|
581
|
+
const a = n, { url: u, srcdoc: t } = us(() => a.report), o = (d) => {
|
|
582
582
|
ds(d.target);
|
|
583
583
|
};
|
|
584
|
-
return (d, w) => i(
|
|
584
|
+
return (d, w) => i(u) ? (l(), ee(ie, {
|
|
585
585
|
key: 0,
|
|
586
586
|
class: "iframe-page__frame iframe-page__frame--url",
|
|
587
587
|
license: "GPLv3",
|
|
588
|
-
src: i(
|
|
588
|
+
src: i(u),
|
|
589
589
|
width: "100%",
|
|
590
590
|
"warning-timeout": 0,
|
|
591
591
|
onLoad: o
|
|
@@ -602,10 +602,10 @@ const ze = [
|
|
|
602
602
|
scrolling: "no"
|
|
603
603
|
}, null, 8, ["srcdoc"])) : V("", !0);
|
|
604
604
|
}
|
|
605
|
-
}), ps = /* @__PURE__ */
|
|
605
|
+
}), ps = /* @__PURE__ */ N(_s, [["__scopeId", "data-v-f4c94a4e"]]), fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
606
606
|
__proto__: null,
|
|
607
607
|
default: ps
|
|
608
|
-
}, Symbol.toStringTag, { value: "Module" })), ae = (n) => (
|
|
608
|
+
}, Symbol.toStringTag, { value: "Module" })), ae = (n) => (K("data-v-74053305"), n = n(), X(), n), vs = { class: "wi-clarify__header" }, ws = { class: "wi-clarify__heading" }, hs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "wi-clarify__eyebrow" }, "需要补充信息", -1)), ys = { class: "wi-clarify__title" }, ms = {
|
|
609
609
|
key: 0,
|
|
610
610
|
class: "wi-clarify__desc"
|
|
611
611
|
}, bs = { class: "wi-clarify__status" }, gs = { class: "wi-clarify__progress" }, ks = { class: "wi-clarify__progress-track" }, Ss = {
|
|
@@ -628,10 +628,10 @@ const ze = [
|
|
|
628
628
|
class: "wi-clarify__or"
|
|
629
629
|
}, Ls = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("span", null, "或者,用自己的话说明", -1)), js = [
|
|
630
630
|
Ls
|
|
631
|
-
],
|
|
631
|
+
], Ns = ["for"], Rs = ["id", "value", "placeholder"], As = {
|
|
632
632
|
class: "wi-clarify__dots",
|
|
633
633
|
"aria-label": "确认问题导航"
|
|
634
|
-
}, Fs = ["aria-label", "onClick"], Ds = { class: "wi-clarify__footer" }, Bs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("span", { class: "wi-clarify__confirm-text" }, "取消后本次操作将停止等待这些回答", -1)), zs = { class: "wi-clarify__actions" }, qs = { class: "wi-clarify__actions" },
|
|
634
|
+
}, Fs = ["aria-label", "onClick"], Ds = { class: "wi-clarify__footer" }, Bs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("span", { class: "wi-clarify__confirm-text" }, "取消后本次操作将停止等待这些回答", -1)), zs = { class: "wi-clarify__actions" }, qs = { class: "wi-clarify__actions" }, Hs = ["disabled"], Ks = {
|
|
635
635
|
key: 1,
|
|
636
636
|
class: "wi-clarify__result"
|
|
637
637
|
}, Xs = { class: "wi-clarify__result-icon" }, Gs = { class: "wi-clarify__result-body" }, Ws = {
|
|
@@ -646,14 +646,14 @@ const ze = [
|
|
|
646
646
|
report: {}
|
|
647
647
|
},
|
|
648
648
|
setup(n) {
|
|
649
|
-
const a = n,
|
|
649
|
+
const a = n, u = {
|
|
650
650
|
requestId: "",
|
|
651
651
|
title: "需要补充信息",
|
|
652
652
|
description: "",
|
|
653
653
|
items: [],
|
|
654
654
|
status: "expired",
|
|
655
655
|
resultMessage: "本次补充信息已失效(回答已结束)"
|
|
656
|
-
}, t = I(() => a.report.values ??
|
|
656
|
+
}, t = I(() => a.report.values ?? u), o = I(() => t.value.items ?? []), d = U(0), w = Ve({}), $ = U(!1), b = U("");
|
|
657
657
|
de(() => {
|
|
658
658
|
var s;
|
|
659
659
|
return (s = t.value) == null ? void 0 : s.requestId;
|
|
@@ -663,7 +663,7 @@ const ze = [
|
|
|
663
663
|
s.default !== void 0 && (s.input.type === "multi_select" ? r.structuredValues = Array.isArray(s.default) ? [...s.default] : [] : s.input.type === "text" ? r.textValue = String(s.default) : r.structuredValue = s.default), w[s.id] = r;
|
|
664
664
|
}), d.value = 0;
|
|
665
665
|
}, { immediate: !0 });
|
|
666
|
-
const p = (s) => (w[s] || (w[s] = { structuredValue: void 0, structuredValues: [], textValue: "" }), w[s]),
|
|
666
|
+
const p = (s) => (w[s] || (w[s] = { structuredValue: void 0, structuredValues: [], textValue: "" }), w[s]), y = I(() => {
|
|
667
667
|
var s, r, f;
|
|
668
668
|
return ((s = t.value) == null ? void 0 : s.status) === "submitted" ? "已提交" : ((r = t.value) == null ? void 0 : r.status) === "cancelled" ? "已取消" : ((f = t.value) == null ? void 0 : f.status) === "expired" ? "已失效" : "等待回答";
|
|
669
669
|
}), k = (s) => {
|
|
@@ -676,7 +676,7 @@ const ze = [
|
|
|
676
676
|
}, O = (s, r) => k(s) === k(r), T = (s, r) => {
|
|
677
677
|
const f = p(s.id);
|
|
678
678
|
return s.input.type === "multi_select" ? f.structuredValues.some((m) => O(m, r)) : O(f.structuredValue, r);
|
|
679
|
-
},
|
|
679
|
+
}, R = (s, r) => {
|
|
680
680
|
const f = p(s.id);
|
|
681
681
|
if (f.textValue = "", s.input.type === "multi_select") {
|
|
682
682
|
const m = f.structuredValues.findIndex((P) => O(P, r));
|
|
@@ -708,11 +708,11 @@ const ze = [
|
|
|
708
708
|
}, C = (s) => {
|
|
709
709
|
const r = p(s.id);
|
|
710
710
|
return s.input.type === "multi_select" ? r.structuredValues.length > 0 : s.input.type === "single_select" ? r.structuredValue !== void 0 : s.input.type === "date" ? !!r.structuredValue : !1;
|
|
711
|
-
}, E = (s) => !!p(s.id).textValue.trim() || C(s), Y = (s) => !s.required || E(s) ? !0 : (b.value = `请回答“${s.question}”`, !1),
|
|
711
|
+
}, E = (s) => !!p(s.id).textValue.trim() || C(s), Y = (s) => !s.required || E(s) ? !0 : (b.value = `请回答“${s.question}”`, !1), A = () => {
|
|
712
712
|
b.value = "", d.value = Math.max(0, d.value - 1);
|
|
713
713
|
}, L = () => {
|
|
714
|
-
!
|
|
715
|
-
},
|
|
714
|
+
!h.value || !Y(h.value) || (b.value = "", d.value = Math.min(o.value.length - 1, d.value + 1));
|
|
715
|
+
}, h = I(() => o.value[d.value]), J = (s, r) => s.input.type === "date" ? String(r ?? "") : (Array.isArray(r) ? r : [r]).map((m) => {
|
|
716
716
|
var Q;
|
|
717
717
|
const P = (Q = s.input.options) == null ? void 0 : Q.find((ge) => O(ge.value, m));
|
|
718
718
|
return (P == null ? void 0 : P.label) ?? String(m ?? "");
|
|
@@ -727,7 +727,7 @@ const ze = [
|
|
|
727
727
|
value: m,
|
|
728
728
|
displayText: J(s, m)
|
|
729
729
|
};
|
|
730
|
-
},
|
|
730
|
+
}, ye = () => {
|
|
731
731
|
const s = o.value.findIndex((f) => f.required && !E(f));
|
|
732
732
|
if (s >= 0) {
|
|
733
733
|
d.value = s, b.value = `请回答“${o.value[s].question}”`;
|
|
@@ -744,18 +744,18 @@ const ze = [
|
|
|
744
744
|
};
|
|
745
745
|
return (s, r) => {
|
|
746
746
|
var f;
|
|
747
|
-
return l(),
|
|
747
|
+
return l(), c("section", {
|
|
748
748
|
class: D(["wi-clarify", `is-${t.value.status}`])
|
|
749
749
|
}, [
|
|
750
750
|
e("header", vs, [
|
|
751
751
|
e("div", ws, [
|
|
752
|
-
|
|
753
|
-
e("h3",
|
|
754
|
-
t.value.description ? (l(),
|
|
752
|
+
hs,
|
|
753
|
+
e("h3", ys, v(t.value.title), 1),
|
|
754
|
+
t.value.description ? (l(), c("p", ms, v(t.value.description), 1)) : V("", !0)
|
|
755
755
|
]),
|
|
756
|
-
e("span", bs, v(
|
|
756
|
+
e("span", bs, v(y.value), 1)
|
|
757
757
|
]),
|
|
758
|
-
t.value.status === "pending" ? (l(),
|
|
758
|
+
t.value.status === "pending" ? (l(), c(M, { key: 0 }, [
|
|
759
759
|
e("div", gs, [
|
|
760
760
|
e("span", null, "问题 " + v(d.value + 1) + " / " + v(o.value.length), 1),
|
|
761
761
|
e("div", ks, [
|
|
@@ -764,52 +764,52 @@ const ze = [
|
|
|
764
764
|
}, null, 4)
|
|
765
765
|
])
|
|
766
766
|
]),
|
|
767
|
-
|
|
767
|
+
h.value ? (l(), c("div", Ss, [
|
|
768
768
|
e("div", $s, [
|
|
769
769
|
e("span", {
|
|
770
|
-
class: D(
|
|
771
|
-
}, v(
|
|
772
|
-
e("h4", null, v(
|
|
770
|
+
class: D(h.value.required ? "wi-clarify__required" : "wi-clarify__optional")
|
|
771
|
+
}, v(h.value.required ? "必填" : "选填"), 3),
|
|
772
|
+
e("h4", null, v(h.value.question), 1)
|
|
773
773
|
]),
|
|
774
|
-
|
|
775
|
-
_(
|
|
776
|
-
|
|
777
|
-
(l(!0),
|
|
774
|
+
h.value.description ? (l(), c("p", xs, v(h.value.description), 1)) : V("", !0),
|
|
775
|
+
_(h.value) ? (l(), c("div", Is, v(_(h.value)), 1)) : V("", !0),
|
|
776
|
+
h.value.input.type === "single_select" || h.value.input.type === "multi_select" ? (l(), c("div", Cs, [
|
|
777
|
+
(l(!0), c(M, null, B(h.value.input.options, (m, P) => (l(), c("button", {
|
|
778
778
|
key: P,
|
|
779
779
|
type: "button",
|
|
780
|
-
class: D(["wi-clarify__option", { "is-selected": T(
|
|
781
|
-
onClick: (Q) =>
|
|
780
|
+
class: D(["wi-clarify__option", { "is-selected": T(h.value, m.value) }]),
|
|
781
|
+
onClick: (Q) => R(h.value, m.value)
|
|
782
782
|
}, [
|
|
783
|
-
e("span", Os, v(T(
|
|
783
|
+
e("span", Os, v(T(h.value, m.value) ? "✓" : ""), 1),
|
|
784
784
|
e("span", null, v(m.label), 1)
|
|
785
785
|
], 10, Es))), 128))
|
|
786
|
-
])) :
|
|
786
|
+
])) : h.value.input.type === "date" ? (l(), c("div", Ts, [
|
|
787
787
|
e("label", {
|
|
788
|
-
for: `wi-clarify-date-${
|
|
788
|
+
for: `wi-clarify-date-${h.value.id}`
|
|
789
789
|
}, "选择日期", 8, Vs),
|
|
790
790
|
e("input", {
|
|
791
|
-
id: `wi-clarify-date-${
|
|
791
|
+
id: `wi-clarify-date-${h.value.id}`,
|
|
792
792
|
type: "date",
|
|
793
|
-
value: W(
|
|
794
|
-
onInput: r[0] || (r[0] = (m) => G(
|
|
793
|
+
value: W(h.value),
|
|
794
|
+
onInput: r[0] || (r[0] = (m) => G(h.value, m))
|
|
795
795
|
}, null, 40, Ps)
|
|
796
796
|
])) : V("", !0),
|
|
797
797
|
e("div", Us, [
|
|
798
|
-
|
|
798
|
+
h.value.input.type !== "text" ? (l(), c("div", Ms, js)) : V("", !0),
|
|
799
799
|
e("label", {
|
|
800
|
-
for: `wi-clarify-text-${
|
|
801
|
-
}, v(
|
|
800
|
+
for: `wi-clarify-text-${h.value.id}`
|
|
801
|
+
}, v(h.value.input.type === "text" ? "你的回答" : "自然语言回答"), 9, Ns),
|
|
802
802
|
e("textarea", {
|
|
803
|
-
id: `wi-clarify-text-${
|
|
804
|
-
value: p(
|
|
805
|
-
placeholder: q(
|
|
803
|
+
id: `wi-clarify-text-${h.value.id}`,
|
|
804
|
+
value: p(h.value.id).textValue,
|
|
805
|
+
placeholder: q(h.value),
|
|
806
806
|
rows: "3",
|
|
807
|
-
onInput: r[1] || (r[1] = (m) => x(
|
|
808
|
-
}, null, 40,
|
|
807
|
+
onInput: r[1] || (r[1] = (m) => x(h.value, m))
|
|
808
|
+
}, null, 40, Rs)
|
|
809
809
|
])
|
|
810
810
|
])) : V("", !0),
|
|
811
|
-
e("div",
|
|
812
|
-
(l(!0),
|
|
811
|
+
e("div", As, [
|
|
812
|
+
(l(!0), c(M, null, B(o.value, (m, P) => (l(), c("button", {
|
|
813
813
|
key: m.id,
|
|
814
814
|
type: "button",
|
|
815
815
|
"aria-label": `查看第 ${P + 1} 个问题`,
|
|
@@ -818,7 +818,7 @@ const ze = [
|
|
|
818
818
|
}, null, 10, Fs))), 128))
|
|
819
819
|
]),
|
|
820
820
|
e("footer", Ds, [
|
|
821
|
-
$.value ? (l(),
|
|
821
|
+
$.value ? (l(), c(M, { key: 0 }, [
|
|
822
822
|
Bs,
|
|
823
823
|
e("div", zs, [
|
|
824
824
|
e("button", {
|
|
@@ -832,7 +832,7 @@ const ze = [
|
|
|
832
832
|
onClick: me
|
|
833
833
|
}, "确认取消")
|
|
834
834
|
])
|
|
835
|
-
], 64)) : (l(),
|
|
835
|
+
], 64)) : (l(), c(M, { key: 1 }, [
|
|
836
836
|
e("button", {
|
|
837
837
|
type: "button",
|
|
838
838
|
class: "wi-clarify__cancel",
|
|
@@ -843,67 +843,67 @@ const ze = [
|
|
|
843
843
|
type: "button",
|
|
844
844
|
class: "wi-clarify__btn wi-clarify__btn--secondary",
|
|
845
845
|
disabled: d.value === 0,
|
|
846
|
-
onClick:
|
|
847
|
-
}, " 上一项 ", 8,
|
|
848
|
-
d.value < o.value.length - 1 ? (l(),
|
|
846
|
+
onClick: A
|
|
847
|
+
}, " 上一项 ", 8, Hs),
|
|
848
|
+
d.value < o.value.length - 1 ? (l(), c("button", {
|
|
849
849
|
key: 0,
|
|
850
850
|
type: "button",
|
|
851
851
|
class: "wi-clarify__btn wi-clarify__btn--primary",
|
|
852
852
|
onClick: L
|
|
853
|
-
}, " 下一项 ")) : (l(),
|
|
853
|
+
}, " 下一项 ")) : (l(), c("button", {
|
|
854
854
|
key: 1,
|
|
855
855
|
type: "button",
|
|
856
856
|
class: "wi-clarify__btn wi-clarify__btn--primary",
|
|
857
|
-
onClick:
|
|
857
|
+
onClick: ye
|
|
858
858
|
}, "提交全部"))
|
|
859
859
|
])
|
|
860
860
|
], 64))
|
|
861
861
|
])
|
|
862
|
-
], 64)) : (l(),
|
|
862
|
+
], 64)) : (l(), c("div", Ks, [
|
|
863
863
|
e("div", Xs, v(t.value.status === "submitted" ? "✓" : t.value.status === "cancelled" ? "—" : "!"), 1),
|
|
864
864
|
e("div", Gs, [
|
|
865
|
-
e("h4", null, v(t.value.resultMessage ||
|
|
866
|
-
t.value.status === "submitted" && ((f = t.value.answers) != null && f.length) ? (l(),
|
|
867
|
-
(l(!0),
|
|
865
|
+
e("h4", null, v(t.value.resultMessage || y.value), 1),
|
|
866
|
+
t.value.status === "submitted" && ((f = t.value.answers) != null && f.length) ? (l(), c("div", Ws, [
|
|
867
|
+
(l(!0), c(M, null, B(t.value.answers, (m) => (l(), c("div", {
|
|
868
868
|
key: m.id
|
|
869
869
|
}, [
|
|
870
870
|
e("span", null, v(be(m.id)), 1),
|
|
871
871
|
e("strong", null, v(m.displayText || "未填写"), 1)
|
|
872
872
|
]))), 128))
|
|
873
|
-
])) : t.value.status === "cancelled" ? (l(),
|
|
873
|
+
])) : t.value.status === "cancelled" ? (l(), c("p", Ys, "本次确认未提交,工作流将收到取消结果。")) : (l(), c("p", Js, "该确认项已失效,无法再提交。"))
|
|
874
874
|
])
|
|
875
875
|
])),
|
|
876
|
-
b.value ? (l(),
|
|
876
|
+
b.value ? (l(), c("div", Zs, v(b.value), 1)) : V("", !0)
|
|
877
877
|
], 2);
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
|
-
}), en = /* @__PURE__ */
|
|
880
|
+
}), en = /* @__PURE__ */ N(Qs, [["__scopeId", "data-v-74053305"]]), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
881
881
|
__proto__: null,
|
|
882
882
|
default: en
|
|
883
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
884
|
-
class: "wi-
|
|
883
|
+
}, Symbol.toStringTag, { value: "Module" })), he = (n) => (K("data-v-bb5c9850"), n = n(), X(), n), sn = { class: "wi-host-action__head" }, nn = {
|
|
884
|
+
class: "wi-host-action__icon",
|
|
885
885
|
"aria-hidden": "true"
|
|
886
|
-
}, on = { class: "wi-
|
|
886
|
+
}, on = { class: "wi-host-action__title" }, an = /* @__PURE__ */ he(() => /* @__PURE__ */ e("span", { class: "wi-host-action__label" }, "执行操作", -1)), rn = { class: "wi-host-action__name" }, ln = { class: "wi-host-action__chip" }, cn = { class: "wi-host-action__message" }, un = {
|
|
887
887
|
key: 0,
|
|
888
|
-
class: "wi-
|
|
889
|
-
}, dn = /* @__PURE__ */
|
|
890
|
-
__name: "
|
|
888
|
+
class: "wi-host-action__args"
|
|
889
|
+
}, dn = /* @__PURE__ */ he(() => /* @__PURE__ */ e("summary", null, "查看参数", -1)), _n = /* @__PURE__ */ j({
|
|
890
|
+
__name: "HostActionStatus",
|
|
891
891
|
props: {
|
|
892
892
|
report: {}
|
|
893
893
|
},
|
|
894
894
|
setup(n) {
|
|
895
|
-
const a = n,
|
|
895
|
+
const a = n, u = {
|
|
896
896
|
id: "",
|
|
897
897
|
name: "",
|
|
898
898
|
arguments: {},
|
|
899
899
|
status: "unknown",
|
|
900
900
|
message: "执行状态未知(回答已结束)"
|
|
901
|
-
}, t = I(() => a.report.values ??
|
|
901
|
+
}, t = I(() => a.report.values ?? u), o = I(() => t.value.status === "running" ? "●" : t.value.status === "success" ? "✓" : t.value.status === "error" ? "!" : "?"), d = I(() => t.value.status === "running" ? "执行中" : t.value.status === "success" ? "已完成" : t.value.status === "error" ? "执行失败" : "状态未知"), w = I(() => {
|
|
902
902
|
const b = t.value.arguments;
|
|
903
903
|
return !!b && typeof b == "object" && Object.keys(b).length > 0;
|
|
904
904
|
}), $ = I(() => JSON.stringify(t.value.arguments ?? {}, null, 2));
|
|
905
|
-
return (b, g) => (l(),
|
|
906
|
-
class: D(["wi-
|
|
905
|
+
return (b, g) => (l(), c("section", {
|
|
906
|
+
class: D(["wi-host-action", `is-${t.value.status}`])
|
|
907
907
|
}, [
|
|
908
908
|
e("header", sn, [
|
|
909
909
|
e("span", nn, v(o.value), 1),
|
|
@@ -913,22 +913,22 @@ const ze = [
|
|
|
913
913
|
]),
|
|
914
914
|
e("span", ln, v(d.value), 1)
|
|
915
915
|
]),
|
|
916
|
-
e("p",
|
|
917
|
-
w.value ? (l(),
|
|
916
|
+
e("p", cn, v(t.value.message || d.value), 1),
|
|
917
|
+
w.value ? (l(), c("details", un, [
|
|
918
918
|
dn,
|
|
919
919
|
e("pre", null, v($.value), 1)
|
|
920
920
|
])) : V("", !0)
|
|
921
921
|
], 2));
|
|
922
922
|
}
|
|
923
|
-
}), pn = /* @__PURE__ */
|
|
923
|
+
}), pn = /* @__PURE__ */ N(_n, [["__scopeId", "data-v-bb5c9850"]]), fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
924
924
|
__proto__: null,
|
|
925
925
|
default: pn
|
|
926
926
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
927
927
|
export {
|
|
928
|
-
pn as AgentActionStatus,
|
|
929
928
|
bn as AiAnswerBubble,
|
|
930
929
|
en as ClarificationCard,
|
|
931
930
|
gn as DeepThinkingSteps,
|
|
931
|
+
pn as HostActionStatus,
|
|
932
932
|
ps as IframePage,
|
|
933
933
|
pt as KnowledgeStreamResult,
|
|
934
934
|
ns as OutputFile,
|
|
@@ -936,7 +936,7 @@ export {
|
|
|
936
936
|
ds as injectIframeResizerChild,
|
|
937
937
|
Sn as provideIframePageConfig,
|
|
938
938
|
kn as provideOutputFileConfig,
|
|
939
|
-
|
|
940
|
-
|
|
939
|
+
cs as resolveIframePlaceholders,
|
|
940
|
+
us as useIframePage
|
|
941
941
|
};
|
|
942
942
|
//# sourceMappingURL=index.js.map
|