@blueking/chat-x 0.0.49-beta.1 → 0.0.49-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ag-ui/types/constants.d.ts +1 -0
- package/dist/ag-ui/types/file.d.ts +1 -1
- package/dist/components/chat-message/assistant-message/assistant-message.vue.d.ts +12 -1
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-file-card.vue.d.ts +0 -2
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/artifact-preview-host.vue.d.ts +1 -2
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/use-artifact-preview-loader.d.ts +4 -2
- package/dist/components/chat-message/assistant-message/message-artifacts/message-artifacts.vue.d.ts +0 -1
- package/dist/components/chat-message/interrupt-message/user-question/use-user-question.d.ts +7 -2
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +14 -2
- package/dist/composables/use-artifact-preview.d.ts +17 -20
- package/dist/composables/use-custom-tab.d.ts +2 -0
- package/dist/composables/use-message-group.d.ts +1 -2
- package/dist/index.css +1 -1
- package/dist/index.js +514 -469
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +3 -1
- package/dist/mcp/generated/docs/assistant-message.md +1 -1
- package/dist/mcp/generated/docs/chat-container.md +7 -6
- package/dist/mcp/generated/docs/chat-input.md +2 -10
- package/dist/mcp/generated/docs/constants.md +3 -1
- package/dist/mcp/generated/docs/content-render.md +2 -10
- package/dist/mcp/generated/docs/file-artifact-panel.md +32 -36
- package/dist/mcp/generated/docs/info-message.md +6 -5
- package/dist/mcp/generated/docs/interrupt.md +1 -0
- package/dist/mcp/generated/docs/message-container.md +4 -21
- package/dist/mcp/generated/docs/message-render.md +4 -27
- package/dist/mcp/generated/docs/messages.md +5 -0
- package/dist/mcp/generated/docs/reasoning-message.md +2 -9
- package/dist/mcp/generated/docs/toolcall-render.md +8 -8
- package/dist/mcp/generated/docs/use-artifact-preview.md +45 -50
- package/dist/mcp/generated/docs/use-custom-tab.md +18 -5
- package/dist/mcp/generated/docs/use-message-group.md +13 -8
- package/dist/mcp/generated/docs/user-question-card.md +6 -3
- package/dist/mcp/generated/index.json +7 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -657,6 +657,8 @@ var ut = (e) => {
|
|
|
657
657
|
单选: "Single",
|
|
658
658
|
多选: "Multiple",
|
|
659
659
|
其他: "Others",
|
|
660
|
+
已完成: "Completed",
|
|
661
|
+
题: "question(s)",
|
|
660
662
|
回答内容: "Answers",
|
|
661
663
|
已回复: "Replied",
|
|
662
664
|
"请输入...": "Please enter...",
|
|
@@ -674,7 +676,7 @@ var ut = (e) => {
|
|
|
674
676
|
}({}), q = /* @__PURE__ */ function(e) {
|
|
675
677
|
return e.Activity = "activity", e.Assistant = "assistant", e.Developer = "developer", e.Guide = "guide", e.Hidden = "hidden", e.HiddenAssistant = "hidden-assistant", e.HiddenGuide = "hidden-guide", e.HiddenSystem = "hidden-system", e.HiddenUser = "hidden-user", e.Info = "info", e.Interrupt = "interrupt", e.Loading = "loading", e.Pause = "pause", e.Placeholder = "placeholder", e.Reasoning = "reasoning", e.System = "system", e.TemplateAssistant = "template-assistant", e.TemplateGuide = "template-guide", e.TemplateHidden = "template-hidden", e.TemplateSystem = "template-system", e.TemplateUser = "template-user", e.Tool = "tool", e.User = "user", e;
|
|
676
678
|
}({}), J = /* @__PURE__ */ function(e) {
|
|
677
|
-
return e.Complete = "complete", e.Disabled = "disabled", e.Error = "error", e.Fetching = "fetching", e.Pending = "pending", e.Stop = "stop", e.StopLoading = "stop-loading", e.Streaming = "streaming", e.Success = "success", e;
|
|
679
|
+
return e.Complete = "complete", e.Completed = "completed", e.Disabled = "disabled", e.Error = "error", e.Fetching = "fetching", e.Pending = "pending", e.Stop = "stop", e.StopLoading = "stop-loading", e.Streaming = "streaming", e.Success = "success", e;
|
|
678
680
|
}({}), vt = {
|
|
679
681
|
[K.ABANDONED]: G("已废弃"),
|
|
680
682
|
[K.APPROVED]: G("已通过"),
|
|
@@ -685,7 +687,7 @@ var ut = (e) => {
|
|
|
685
687
|
[K.REVOKED]: G("已撤销"),
|
|
686
688
|
[K.DRAFT]: G("待审批")
|
|
687
689
|
}, yt = /* @__PURE__ */ function(e) {
|
|
688
|
-
return e.Html = "html", e.Jpg = "jpg", e.Json = "json", e.
|
|
690
|
+
return e.Html = "html", e.Jpg = "jpg", e.Json = "json", e.Markdown = "markdown", e.Md = "md", e.Pdf = "pdf", e.Txt = "txt", e;
|
|
689
691
|
}({}), bt = /* @__PURE__ */ function(e) {
|
|
690
692
|
return e.ApprovalCancel = "approval_cancel", e.ApprovalRefresh = "approval_refresh", e.FlowNodeRetry = "flow_node_retry", e.FlowNodeSkip = "flow_node_skip", e;
|
|
691
693
|
}({}), xt = {
|
|
@@ -2188,7 +2190,7 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2188
2190
|
color: "inherit"
|
|
2189
2191
|
}))
|
|
2190
2192
|
};
|
|
2191
|
-
}, Hr = Symbol("ARTIFACT_PREVIEW_TOKEN"), Ur = "file-artifact", Wr =
|
|
2193
|
+
}, Hr = Symbol("ARTIFACT_PREVIEW_TOKEN"), Ur = "file-artifact", Wr = 480 * 1e3, Gr = (e, t) => {
|
|
2192
2194
|
let n = document.createElement("a");
|
|
2193
2195
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
2194
2196
|
}, Kr = (e) => {
|
|
@@ -2198,23 +2200,33 @@ var Mr = ["options"], Nr = ["options"], Pr = { class: "ai-shortcut-render" }, Fr
|
|
|
2198
2200
|
}), o = (e) => {
|
|
2199
2201
|
t.value = e;
|
|
2200
2202
|
}, s = (n) => {
|
|
2201
|
-
let r =
|
|
2203
|
+
let r = n.file.outputId;
|
|
2202
2204
|
t.value = r, e.onOpen(r);
|
|
2203
2205
|
}, c = function() {
|
|
2204
|
-
var t = Z(function* (t) {
|
|
2205
|
-
var
|
|
2206
|
-
let
|
|
2207
|
-
if (
|
|
2208
|
-
|
|
2206
|
+
var t = Z(function* (t, i) {
|
|
2207
|
+
var a;
|
|
2208
|
+
let o = t.outputId;
|
|
2209
|
+
if (i != null && i.force) n.delete(o);
|
|
2210
|
+
else {
|
|
2211
|
+
let e = n.get(o);
|
|
2212
|
+
if (e && e.expiresAt > Date.now()) return e.urls;
|
|
2213
|
+
}
|
|
2214
|
+
let s = r.get(o);
|
|
2209
2215
|
if (s) return s;
|
|
2210
|
-
let c = (
|
|
2216
|
+
let c = (a = e.getOnArtifactClick) == null ? void 0 : a.call(e);
|
|
2211
2217
|
if (!c) return {};
|
|
2212
|
-
let l = c(t).then((e) =>
|
|
2213
|
-
|
|
2218
|
+
let l = c(t).then((e) => {
|
|
2219
|
+
let t = e == null ? {} : e;
|
|
2220
|
+
return n.set(o, {
|
|
2221
|
+
expiresAt: Date.now() + Wr,
|
|
2222
|
+
urls: t
|
|
2223
|
+
}), r.delete(o), t;
|
|
2224
|
+
}).catch((e) => {
|
|
2225
|
+
throw r.delete(o), e;
|
|
2214
2226
|
});
|
|
2215
|
-
return r.set(
|
|
2227
|
+
return r.set(o, l), l;
|
|
2216
2228
|
});
|
|
2217
|
-
return function(e) {
|
|
2229
|
+
return function(e, n) {
|
|
2218
2230
|
return t.apply(this, arguments);
|
|
2219
2231
|
};
|
|
2220
2232
|
}();
|
|
@@ -2359,41 +2371,47 @@ function ai(e) {
|
|
|
2359
2371
|
return ((n = e.order) == null ? 100 : n) - ((r = t.order) == null ? 100 : r);
|
|
2360
2372
|
})), l = (e) => {
|
|
2361
2373
|
let t = n.value.findIndex((t) => t.name === e.name);
|
|
2362
|
-
if (t === -1)
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
r[t] = X(X({}, r[t]), e), n.value = r;
|
|
2374
|
+
if (t === -1) {
|
|
2375
|
+
n.value = [...n.value, e];
|
|
2376
|
+
return;
|
|
2366
2377
|
}
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
});
|
|
2378
|
+
let r = n.value.slice();
|
|
2379
|
+
r[t] = X(X({}, r[t]), e), n.value = r;
|
|
2370
2380
|
}, u = (e) => {
|
|
2381
|
+
l(e);
|
|
2382
|
+
}, d = (e) => {
|
|
2383
|
+
l(e), i.value = !1, x(() => {
|
|
2384
|
+
p(n.value.find((t) => t.name === e.name));
|
|
2385
|
+
});
|
|
2386
|
+
}, f = (e) => {
|
|
2371
2387
|
n.value = n.value.filter((t) => t.name !== e), c.value.length === 0 && (i.value = !0);
|
|
2372
|
-
},
|
|
2388
|
+
}, p = (n) => {
|
|
2373
2389
|
var i;
|
|
2374
2390
|
r.value = n == null ? t : n, (i = e.onTabChange) == null || i.call(e, n);
|
|
2375
|
-
},
|
|
2391
|
+
}, m = () => {
|
|
2376
2392
|
n.value = [t], r.value = t, i.value = !0;
|
|
2377
2393
|
};
|
|
2378
2394
|
return V(c, (e) => {
|
|
2379
|
-
s(r.value) || e.length &&
|
|
2395
|
+
s(r.value) || e.length && p(e[0]);
|
|
2380
2396
|
}), A(ni, {
|
|
2381
2397
|
tabs: n,
|
|
2382
2398
|
displayTabs: c,
|
|
2383
2399
|
selectedTab: r,
|
|
2384
|
-
addCustomTab:
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2400
|
+
addCustomTab: d,
|
|
2401
|
+
ensureCustomTab: u,
|
|
2402
|
+
removeCustomTab: f,
|
|
2403
|
+
selectCustomTab: p,
|
|
2404
|
+
resetCustomTab: m
|
|
2388
2405
|
}), {
|
|
2389
2406
|
tabs: n,
|
|
2390
2407
|
displayTabs: c,
|
|
2391
2408
|
selectedTab: r,
|
|
2392
2409
|
isCollapse: i,
|
|
2393
|
-
addCustomTab:
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2410
|
+
addCustomTab: d,
|
|
2411
|
+
ensureCustomTab: u,
|
|
2412
|
+
removeCustomTab: f,
|
|
2413
|
+
selectCustomTab: p,
|
|
2414
|
+
resetCustomTab: m
|
|
2397
2415
|
};
|
|
2398
2416
|
}
|
|
2399
2417
|
var oi = () => _(ni), si = (() => {
|
|
@@ -2638,21 +2656,14 @@ var oi = () => _(ni), si = (() => {
|
|
|
2638
2656
|
messages: e.messages.filter(i)
|
|
2639
2657
|
}));
|
|
2640
2658
|
}), i = a(() => {
|
|
2641
|
-
let t =
|
|
2642
|
-
for (let
|
|
2643
|
-
var n
|
|
2644
|
-
if (
|
|
2645
|
-
let e = (n =
|
|
2646
|
-
if (
|
|
2647
|
-
let a = (r = i.uid) == null ? String(i.id) : r;
|
|
2648
|
-
e.forEach((e, n) => {
|
|
2649
|
-
t.push(X(X({}, e), {}, {
|
|
2650
|
-
artifactId: Wr(a, n, e.outputId),
|
|
2651
|
-
messageUid: a
|
|
2652
|
-
}));
|
|
2653
|
-
});
|
|
2659
|
+
let t = /* @__PURE__ */ new Map();
|
|
2660
|
+
for (let r of e.messages.value) {
|
|
2661
|
+
var n;
|
|
2662
|
+
if (r.role !== q.Assistant) continue;
|
|
2663
|
+
let e = (n = r.property) == null ? void 0 : n.artifacts;
|
|
2664
|
+
if (e != null && e.length) for (let n of e) t.has(n.outputId) && t.delete(n.outputId), t.set(n.outputId, n);
|
|
2654
2665
|
}
|
|
2655
|
-
return t;
|
|
2666
|
+
return Array.from(t.values());
|
|
2656
2667
|
}), o = a(() => vi(e.messages.value)), s = a(() => yi(e.messages.value)), c = a(() => s.value ? G("当前会话有 {count} 个待审批单,如需继续,请先取消审批").replace("{count}", String(s.value)) : ""), l = a(() => {
|
|
2657
2668
|
var e;
|
|
2658
2669
|
return (e = t.value) == null ? void 0 : e.filter((e) => e.type === q.User).every((e) => e.checked);
|
|
@@ -8289,8 +8300,6 @@ var $d = ["src"], ef = {
|
|
|
8289
8300
|
props: {
|
|
8290
8301
|
active: { type: Boolean },
|
|
8291
8302
|
file: {},
|
|
8292
|
-
index: {},
|
|
8293
|
-
messageUid: {},
|
|
8294
8303
|
onDownload: { type: Function },
|
|
8295
8304
|
onPreview: { type: Function },
|
|
8296
8305
|
variant: {}
|
|
@@ -8301,16 +8310,11 @@ var $d = ["src"], ef = {
|
|
|
8301
8310
|
theme: "ai-chat-box",
|
|
8302
8311
|
placement: "top"
|
|
8303
8312
|
})), g = () => {
|
|
8304
|
-
var e, r;
|
|
8305
8313
|
if (t.onPreview) {
|
|
8306
8314
|
t.onPreview(t.file);
|
|
8307
8315
|
return;
|
|
8308
8316
|
}
|
|
8309
|
-
n == null || n.openPreview({
|
|
8310
|
-
file: t.file,
|
|
8311
|
-
index: (e = t.index) == null ? 0 : e,
|
|
8312
|
-
messageUid: (r = t.messageUid) == null ? "" : r
|
|
8313
|
-
});
|
|
8317
|
+
n == null || n.openPreview({ file: t.file });
|
|
8314
8318
|
}, _ = function() {
|
|
8315
8319
|
var e = Z(function* () {
|
|
8316
8320
|
if (!m.value) {
|
|
@@ -8453,21 +8457,21 @@ var $d = ["src"], ef = {
|
|
|
8453
8457
|
let t = F("idle"), n = F(""), r = F(""), i = F("urlIframe"), a, o = 0, s = () => {
|
|
8454
8458
|
n.value = "", r.value = "";
|
|
8455
8459
|
}, c = function() {
|
|
8456
|
-
var c = Z(function* () {
|
|
8457
|
-
let
|
|
8460
|
+
var c = Z(function* (c) {
|
|
8461
|
+
let l = ++o;
|
|
8458
8462
|
a == null || a.abort(), a = void 0;
|
|
8459
|
-
let
|
|
8460
|
-
if (!
|
|
8463
|
+
let u = e.getFile();
|
|
8464
|
+
if (!u || !e.canResolve()) {
|
|
8461
8465
|
t.value = "empty", s();
|
|
8462
8466
|
return;
|
|
8463
8467
|
}
|
|
8464
8468
|
t.value = "loading", s();
|
|
8465
|
-
let
|
|
8466
|
-
i.value =
|
|
8469
|
+
let d = Pp(u.type);
|
|
8470
|
+
i.value = d.renderer;
|
|
8467
8471
|
try {
|
|
8468
|
-
let i = yield e.resolveUrls(
|
|
8469
|
-
if (
|
|
8470
|
-
if (
|
|
8472
|
+
let i = c != null && c.force ? yield e.resolveUrls(u, { force: !0 }) : yield e.resolveUrls(u);
|
|
8473
|
+
if (l !== o) return;
|
|
8474
|
+
if (d.load === "text_from_download") {
|
|
8471
8475
|
if (!i.download_url) {
|
|
8472
8476
|
t.value = "empty";
|
|
8473
8477
|
return;
|
|
@@ -8477,7 +8481,7 @@ var $d = ["src"], ef = {
|
|
|
8477
8481
|
let r = yield fetch(i.download_url, { signal: e.signal });
|
|
8478
8482
|
if (!r.ok) throw Error(`HTTP ${r.status}`);
|
|
8479
8483
|
let s = yield r.text();
|
|
8480
|
-
if (e.signal.aborted ||
|
|
8484
|
+
if (e.signal.aborted || l !== o) return;
|
|
8481
8485
|
n.value = s, t.value = "ready";
|
|
8482
8486
|
return;
|
|
8483
8487
|
}
|
|
@@ -8487,11 +8491,11 @@ var $d = ["src"], ef = {
|
|
|
8487
8491
|
}
|
|
8488
8492
|
r.value = i.preview_url, t.value = "ready";
|
|
8489
8493
|
} catch (e) {
|
|
8490
|
-
if (
|
|
8494
|
+
if (l !== o || a != null && a.signal.aborted) return;
|
|
8491
8495
|
t.value = "error";
|
|
8492
8496
|
}
|
|
8493
8497
|
});
|
|
8494
|
-
return function() {
|
|
8498
|
+
return function(e) {
|
|
8495
8499
|
return c.apply(this, arguments);
|
|
8496
8500
|
};
|
|
8497
8501
|
}(), l = () => {
|
|
@@ -8521,22 +8525,22 @@ var $d = ["src"], ef = {
|
|
|
8521
8525
|
let t = e, n = qr(), { content: r, load: i, previewUrl: a, renderer: s, status: u } = Fp({
|
|
8522
8526
|
canResolve: () => !!(n != null && n.canResolveArtifactUrl.value),
|
|
8523
8527
|
getFile: () => t.file,
|
|
8524
|
-
resolveUrls: (e) => {
|
|
8525
|
-
var
|
|
8526
|
-
return (
|
|
8528
|
+
resolveUrls: (e, t) => {
|
|
8529
|
+
var r;
|
|
8530
|
+
return (r = t ? n == null ? void 0 : n.resolveArtifactUrls(e, t) : n == null ? void 0 : n.resolveArtifactUrls(e)) == null ? Promise.resolve({}) : r;
|
|
8527
8531
|
}
|
|
8528
8532
|
});
|
|
8529
|
-
return V(() => t.file ?
|
|
8533
|
+
return V(() => t.file ? `${t.file.outputId}:${t.file.type}` : "", () => {
|
|
8530
8534
|
i();
|
|
8531
8535
|
}, { immediate: !0 }), (t, n) => (k(), c("div", Ip, [L(u) === "loading" ? (k(), c("div", Lp, [f(wp)])) : L(u) === "error" ? (k(), c("div", Rp, [l("span", null, I(L(G)("预览加载失败")), 1), f(L(W), {
|
|
8532
8536
|
size: "small",
|
|
8533
8537
|
text: "",
|
|
8534
8538
|
theme: "primary",
|
|
8535
|
-
onClick: L(i)
|
|
8539
|
+
onClick: n[0] || (n[0] = () => L(i)({ force: !0 }))
|
|
8536
8540
|
}, {
|
|
8537
8541
|
default: H(() => [d(I(L(G)("重试")), 1)]),
|
|
8538
8542
|
_: 1
|
|
8539
|
-
}
|
|
8543
|
+
})])) : L(u) === "empty" || !e.file ? (k(), c("div", zp, I(L(G)("暂无可预览的文件")), 1)) : L(s) === "html" ? (k(), o(Ep, {
|
|
8540
8544
|
key: 3,
|
|
8541
8545
|
content: L(r)
|
|
8542
8546
|
}, null, 8, ["content"])) : L(s) === "txt" ? (k(), o(Ap, {
|
|
@@ -8567,8 +8571,8 @@ var $d = ["src"], ef = {
|
|
|
8567
8571
|
let r = t, u = n, p = qr(), m = a(() => !!(p != null && p.canResolveArtifactUrl.value)), h = () => i(gn), g = F(""), _ = F(!1), v = a(() => {
|
|
8568
8572
|
let e = g.value.trim().toLowerCase();
|
|
8569
8573
|
return e ? r.artifacts.filter((t) => t.name.toLowerCase().includes(e)) : r.artifacts;
|
|
8570
|
-
}), y = a(() => r.artifacts.find((e) => e.
|
|
8571
|
-
e.
|
|
8574
|
+
}), y = a(() => r.artifacts.find((e) => e.outputId === r.activeId)), b = (e) => {
|
|
8575
|
+
e.outputId !== r.activeId && u("select", e.outputId);
|
|
8572
8576
|
}, x = function() {
|
|
8573
8577
|
var e = Z(function* (e) {
|
|
8574
8578
|
if (!(_.value || !(p != null && p.canResolveArtifactUrl.value))) {
|
|
@@ -8587,7 +8591,7 @@ var $d = ["src"], ef = {
|
|
|
8587
8591
|
}();
|
|
8588
8592
|
return V(() => {
|
|
8589
8593
|
var e;
|
|
8590
|
-
return (e = y.value) == null ? void 0 : e.
|
|
8594
|
+
return (e = y.value) == null ? void 0 : e.outputId;
|
|
8591
8595
|
}, () => {
|
|
8592
8596
|
_.value = !1;
|
|
8593
8597
|
}), (n, r) => (k(), c("div", Vp, [l("div", Hp, [
|
|
@@ -8600,8 +8604,8 @@ var $d = ["src"], ef = {
|
|
|
8600
8604
|
placeholder: L(G)("搜索文件关键字")
|
|
8601
8605
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
8602
8606
|
l("div", Wp, [v.value.length ? (k(!0), c(e, { key: 0 }, M(v.value, (e) => (k(), o(vp, {
|
|
8603
|
-
key: e.
|
|
8604
|
-
active: e.
|
|
8607
|
+
key: e.outputId,
|
|
8608
|
+
active: e.outputId === t.activeId,
|
|
8605
8609
|
file: e,
|
|
8606
8610
|
"on-preview": () => b(e),
|
|
8607
8611
|
variant: "list"
|
|
@@ -8628,9 +8632,17 @@ var $d = ["src"], ef = {
|
|
|
8628
8632
|
let t = a(() => {
|
|
8629
8633
|
var t, n;
|
|
8630
8634
|
return (t = (n = e()) == null || (n = n.metadata) == null ? void 0 : n.questions) == null ? [] : t;
|
|
8631
|
-
}), n = F({}), r = (e) => n.value[
|
|
8632
|
-
|
|
8633
|
-
},
|
|
8635
|
+
}), n = F({}), r = F(0), i = a(() => t.value.length), o = a(() => t.value.reduce((e, t, r) => e + +!!n.value[r], 0)), s = a(() => i.value > 0 && o.value === i.value), c = a(() => r.value > 0), l = a(() => r.value < i.value - 1), u = (e) => n.value[e], d = () => {
|
|
8636
|
+
c.value && --r.value;
|
|
8637
|
+
}, f = () => {
|
|
8638
|
+
l.value && (r.value += 1);
|
|
8639
|
+
}, p = (e, n, i) => {
|
|
8640
|
+
var a;
|
|
8641
|
+
n || e === r.value && ((a = t.value[e]) == null ? void 0 : a.multiSelect) !== !0 && (i.answer.some((e) => e.label === "others") || l.value && (r.value += 1));
|
|
8642
|
+
}, m = (e, t) => {
|
|
8643
|
+
let r = n.value[e];
|
|
8644
|
+
n.value = X(X({}, n.value), {}, { [e]: t }), t && p(e, r, t);
|
|
8645
|
+
}, h = () => t.value.map((e, t) => {
|
|
8634
8646
|
var r;
|
|
8635
8647
|
return (r = n.value[t]) == null ? {
|
|
8636
8648
|
question: e.question,
|
|
@@ -8639,18 +8651,23 @@ var $d = ["src"], ef = {
|
|
|
8639
8651
|
});
|
|
8640
8652
|
return {
|
|
8641
8653
|
questions: t,
|
|
8642
|
-
answeredCount:
|
|
8643
|
-
totalCount:
|
|
8644
|
-
completed:
|
|
8645
|
-
|
|
8646
|
-
|
|
8654
|
+
answeredCount: o,
|
|
8655
|
+
totalCount: i,
|
|
8656
|
+
completed: s,
|
|
8657
|
+
currentIndex: r,
|
|
8658
|
+
canGoPrev: c,
|
|
8659
|
+
canGoNext: l,
|
|
8660
|
+
goPrev: d,
|
|
8661
|
+
goNext: f,
|
|
8662
|
+
getAnswer: u,
|
|
8663
|
+
setAnswer: m,
|
|
8647
8664
|
buildResolvePayload: () => {
|
|
8648
8665
|
var t, n;
|
|
8649
8666
|
return {
|
|
8650
8667
|
interruptId: (t = (n = e()) == null ? void 0 : n.id) == null ? "" : t,
|
|
8651
8668
|
reason: gt.UserQuestion,
|
|
8652
8669
|
status: "resolved",
|
|
8653
|
-
payload: { answers:
|
|
8670
|
+
payload: { answers: h() }
|
|
8654
8671
|
};
|
|
8655
8672
|
},
|
|
8656
8673
|
buildSkipPayload: () => nm(e())
|
|
@@ -8781,83 +8798,108 @@ var $d = ["src"], ef = {
|
|
|
8781
8798
|
"onSelect"
|
|
8782
8799
|
]))), 128))]));
|
|
8783
8800
|
}
|
|
8784
|
-
}), ym = { class: "ai-user-question-card__title-wrap" }, bm = { class: "ai-user-question-card__title" }, xm = { class: "ai-user-question-
|
|
8801
|
+
}), ym = { class: "ai-user-question-card__title-wrap" }, bm = { class: "ai-user-question-card__title" }, xm = { class: "ai-user-question-card__header-actions" }, Sm = { class: "ai-user-question-card__pager" }, Cm = ["disabled"], wm = { class: "ai-user-question-card__pager-text" }, Tm = ["disabled"], Em = { class: "ai-user-question-card__body" }, Dm = { class: "ai-user-question-card__question-title" }, Om = { class: "ai-user-question-card__question-text" }, km = {
|
|
8785
8802
|
key: 0,
|
|
8786
8803
|
class: "ai-user-question-card__tag"
|
|
8787
|
-
},
|
|
8804
|
+
}, Am = { class: "ai-user-question-card__options" }, jm = { class: "ai-user-question-card__footer" }, Mm = { class: "ai-user-question-card__progress" }, Nm = { class: "ai-user-question-card__progress-num" }, Pm = { class: "ai-user-question-card__actions" }, Fm = /* @__PURE__ */ m({
|
|
8788
8805
|
__name: "user-question-card",
|
|
8789
8806
|
props: {
|
|
8790
8807
|
interrupt: {},
|
|
8791
8808
|
onResume: { type: Function }
|
|
8792
8809
|
},
|
|
8793
8810
|
setup(t) {
|
|
8794
|
-
let n = t, r = ji(), i = F(!1), { questions: u, answeredCount: p, totalCount: m, completed: h,
|
|
8811
|
+
let n = t, r = ji(), i = F(!1), { questions: u, answeredCount: p, totalCount: m, completed: h, currentIndex: g, canGoPrev: _, canGoNext: v, goPrev: y, goNext: x, getAnswer: C, setAnswer: T, buildResolvePayload: E, buildSkipPayload: D } = tm(() => n.interrupt), O = a(() => {
|
|
8795
8812
|
var e;
|
|
8796
8813
|
return ((e = n.interrupt.metadata) == null || (e = e.questions) == null || (e = e[0]) == null ? void 0 : e.header) || n.interrupt.message || "";
|
|
8797
|
-
}),
|
|
8814
|
+
}), A = () => {
|
|
8798
8815
|
i.value = !i.value;
|
|
8799
|
-
},
|
|
8816
|
+
}, ee = () => {
|
|
8800
8817
|
i.value && (i.value = !1);
|
|
8801
|
-
},
|
|
8818
|
+
}, j = F(null), te = () => {
|
|
8802
8819
|
var e;
|
|
8803
|
-
!h.value ||
|
|
8804
|
-
},
|
|
8820
|
+
!h.value || j.value !== null || (j.value = "complete", (e = n.onResume) == null || e.call(n, E(), n.interrupt));
|
|
8821
|
+
}, P = () => {
|
|
8805
8822
|
var e;
|
|
8806
|
-
|
|
8823
|
+
j.value === null && (j.value = "skip", (e = n.onResume) == null || e.call(n, D(), n.interrupt));
|
|
8807
8824
|
};
|
|
8808
8825
|
return (t, n) => (k(), c("section", { class: S(["ai-user-question-card", { "ai-user-question-card--collapsed": i.value }]) }, [
|
|
8809
8826
|
l("header", {
|
|
8810
8827
|
class: "ai-user-question-card__header",
|
|
8811
|
-
onClick:
|
|
8812
|
-
}, [l("div", ym, [f(L(Ln), { class: "ai-user-question-card__help-icon" }), U((k(), c("span", bm, [d(I(
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8828
|
+
onClick: ee
|
|
8829
|
+
}, [l("div", ym, [f(L(Ln), { class: "ai-user-question-card__help-icon" }), U((k(), c("span", bm, [d(I(O.value), 1)])), [[L(Pi), X({}, L(r))]])]), l("div", xm, [
|
|
8830
|
+
l("div", Sm, [
|
|
8831
|
+
l("button", {
|
|
8832
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !L(_) }]),
|
|
8833
|
+
disabled: !L(_),
|
|
8834
|
+
type: "button",
|
|
8835
|
+
onClick: n[0] || (n[0] = le((...e) => L(y) && L(y)(...e), ["stop"]))
|
|
8836
|
+
}, [f(L(Cn), { class: "ai-user-question-card__nav-icon" })], 10, Cm),
|
|
8837
|
+
l("span", wm, I(L(g) + 1) + " / " + I(L(m)), 1),
|
|
8838
|
+
l("button", {
|
|
8839
|
+
class: S(["ai-user-question-card__nav-btn", { "is-disabled": !L(v) }]),
|
|
8840
|
+
disabled: !L(v),
|
|
8841
|
+
type: "button",
|
|
8842
|
+
onClick: n[1] || (n[1] = le((...e) => L(x) && L(x)(...e), ["stop"]))
|
|
8843
|
+
}, [f(L(wn), { class: "ai-user-question-card__nav-icon" })], 10, Tm)
|
|
8844
|
+
]),
|
|
8845
|
+
n[2] || (n[2] = l("span", { class: "ai-user-question-card__divider" }, null, -1)),
|
|
8846
|
+
l("button", {
|
|
8847
|
+
class: "ai-user-question-card__collapse-btn",
|
|
8848
|
+
type: "button",
|
|
8849
|
+
onClick: le(A, ["stop"])
|
|
8850
|
+
}, [f(L(Cn), {
|
|
8851
|
+
class: "ai-user-question-card__arrow",
|
|
8852
|
+
style: w({ transform: i.value ? "rotate(180deg)" : "rotate(-90deg)" })
|
|
8853
|
+
}, null, 8, ["style"])])
|
|
8854
|
+
])]),
|
|
8855
|
+
U(l("div", Em, [(k(!0), c(e, null, M(L(u), (e, n) => U((k(), c("div", {
|
|
8818
8856
|
key: n,
|
|
8819
8857
|
class: "ai-user-question-card__question"
|
|
8820
|
-
}, [l("div",
|
|
8858
|
+
}, [l("div", Dm, [l("span", Om, I(n + 1) + ". " + I(e.question), 1), e.multiSelect === void 0 ? s("", !0) : (k(), c("span", km, I(e.multiSelect ? L(G)("多选") : L(G)("单选")), 1))]), l("div", Am, [N(t.$slots, "question", b({ ref_for: !0 }, {
|
|
8821
8859
|
question: e,
|
|
8822
8860
|
qIndex: n,
|
|
8823
|
-
answer: L(
|
|
8824
|
-
setAnswer: (e) => L(
|
|
8825
|
-
confirm:
|
|
8861
|
+
answer: L(C)(n),
|
|
8862
|
+
setAnswer: (e) => L(T)(n, e),
|
|
8863
|
+
confirm: te
|
|
8826
8864
|
}), () => [f(vm, {
|
|
8827
8865
|
question: e,
|
|
8828
|
-
onAnswer: (e) => L(
|
|
8829
|
-
onConfirm:
|
|
8830
|
-
}, null, 8, ["question", "onAnswer"])])])]))), 128))], 512), [[ae, !i.value]]),
|
|
8831
|
-
U(l("footer",
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8866
|
+
onAnswer: (e) => L(T)(n, e),
|
|
8867
|
+
onConfirm: te
|
|
8868
|
+
}, null, 8, ["question", "onAnswer"])])])])), [[ae, n === L(g)]])), 128))], 512), [[ae, !i.value]]),
|
|
8869
|
+
U(l("footer", jm, [l("span", Mm, [
|
|
8870
|
+
d(I(L(G)("已完成")) + " ", 1),
|
|
8871
|
+
l("span", Nm, I(L(p)), 1),
|
|
8872
|
+
d(" " + I(L(G)("题")), 1)
|
|
8873
|
+
]), l("div", Pm, [f(L(W), {
|
|
8874
|
+
class: "ai-user-question-card__skip",
|
|
8875
|
+
disabled: j.value === "complete",
|
|
8876
|
+
loading: j.value === "skip",
|
|
8835
8877
|
size: "small",
|
|
8836
|
-
|
|
8837
|
-
onClick:
|
|
8878
|
+
text: "",
|
|
8879
|
+
onClick: P
|
|
8838
8880
|
}, {
|
|
8839
|
-
default: H(() => [
|
|
8881
|
+
default: H(() => [j.value === "skip" ? s("", !0) : (k(), o(L(Bn), {
|
|
8840
8882
|
key: 0,
|
|
8841
|
-
class: "ai-user-question-
|
|
8842
|
-
})), d(" " + I(L(G)("
|
|
8883
|
+
class: "ai-user-question-card__skip-icon"
|
|
8884
|
+
})), d(" " + I(L(G)("跳过")), 1)]),
|
|
8843
8885
|
_: 1
|
|
8844
8886
|
}, 8, ["disabled", "loading"]), f(L(W), {
|
|
8845
|
-
class: "ai-user-question-
|
|
8846
|
-
disabled:
|
|
8847
|
-
loading:
|
|
8887
|
+
class: "ai-user-question-card__complete",
|
|
8888
|
+
disabled: !L(h) || j.value === "skip",
|
|
8889
|
+
loading: j.value === "complete",
|
|
8848
8890
|
size: "small",
|
|
8849
|
-
|
|
8850
|
-
onClick:
|
|
8891
|
+
theme: "primary",
|
|
8892
|
+
onClick: te
|
|
8851
8893
|
}, {
|
|
8852
|
-
default: H(() => [
|
|
8894
|
+
default: H(() => [j.value === "complete" ? s("", !0) : (k(), o(L(zn), {
|
|
8853
8895
|
key: 0,
|
|
8854
|
-
class: "ai-user-question-
|
|
8855
|
-
})), d(" " + I(L(G)("
|
|
8896
|
+
class: "ai-user-question-card__enter-icon"
|
|
8897
|
+
})), d(" " + I(L(G)("完成")), 1)]),
|
|
8856
8898
|
_: 1
|
|
8857
|
-
}, 8, ["disabled", "loading"])], 512), [[ae, !i.value]])
|
|
8899
|
+
}, 8, ["disabled", "loading"])])], 512), [[ae, !i.value]])
|
|
8858
8900
|
], 2));
|
|
8859
8901
|
}
|
|
8860
|
-
}),
|
|
8902
|
+
}), Im = { class: "ai-delete-confirm" }, Lm = { class: "ai-delete-confirm__title" }, Rm = { class: "ai-delete-confirm__desc" }, zm = { class: "ai-delete-confirm__actions" }, Bm = /* @__PURE__ */ m({
|
|
8861
8903
|
__name: "delete-tool",
|
|
8862
8904
|
props: {
|
|
8863
8905
|
description: {},
|
|
@@ -8900,10 +8942,10 @@ var $d = ["src"], ef = {
|
|
|
8900
8942
|
ref_key: "tippyRef",
|
|
8901
8943
|
ref: i
|
|
8902
8944
|
}, c.value, { onShow: u }), {
|
|
8903
|
-
content: H(() => [l("div",
|
|
8904
|
-
l("div",
|
|
8905
|
-
l("div",
|
|
8906
|
-
l("div",
|
|
8945
|
+
content: H(() => [l("div", Im, [
|
|
8946
|
+
l("div", Lm, I(L(G)("确认删除该回答?")), 1),
|
|
8947
|
+
l("div", Rm, I(L(G)("删除操作无法撤回,请谨慎操作!")), 1),
|
|
8948
|
+
l("div", zm, [f(L(W), {
|
|
8907
8949
|
size: "small",
|
|
8908
8950
|
theme: "danger",
|
|
8909
8951
|
onClick: m
|
|
@@ -8922,7 +8964,7 @@ var $d = ["src"], ef = {
|
|
|
8922
8964
|
_: 1
|
|
8923
8965
|
}, 16));
|
|
8924
8966
|
}
|
|
8925
|
-
}),
|
|
8967
|
+
}), Vm = { class: "ai-feedback-title" }, Hm = { class: "ai-feedback-reason-list" }, Um = ["onClick"], Wm = { class: "ai-feedback-other" }, Gm = { class: "ai-feedback-footer" }, Km = /* @__PURE__ */ m({
|
|
8926
8968
|
__name: "user-feedback",
|
|
8927
8969
|
props: {
|
|
8928
8970
|
loading: { type: Boolean },
|
|
@@ -8942,23 +8984,23 @@ var $d = ["src"], ef = {
|
|
|
8942
8984
|
class: "ai-user-feedback",
|
|
8943
8985
|
onMouseenter: r[1] || (r[1] = le(() => {}, ["stop", "prevent"]))
|
|
8944
8986
|
}, [
|
|
8945
|
-
l("div",
|
|
8946
|
-
l("div",
|
|
8987
|
+
l("div", Vm, I(t.title), 1),
|
|
8988
|
+
l("div", Hm, [t.loading ? (k(), c(e, { key: 0 }, M(8, (e) => l("div", {
|
|
8947
8989
|
key: e,
|
|
8948
8990
|
class: "reason-item ai-skeleton-element"
|
|
8949
8991
|
})), 64)) : (k(!0), c(e, { key: 1 }, M(t.reasonList, (e) => (k(), c("div", {
|
|
8950
8992
|
key: e,
|
|
8951
8993
|
class: S(["reason-item", { "is-active": a.value.includes(e) }]),
|
|
8952
8994
|
onClick: (t) => o(e)
|
|
8953
|
-
}, I(e), 11,
|
|
8954
|
-
l("div",
|
|
8995
|
+
}, I(e), 11, Um))), 128))]),
|
|
8996
|
+
l("div", Wm, [f(L(pe), {
|
|
8955
8997
|
modelValue: i.value,
|
|
8956
8998
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => i.value = e),
|
|
8957
8999
|
placeholder: L(G)("说出您的想法"),
|
|
8958
9000
|
rows: 3,
|
|
8959
9001
|
type: "textarea"
|
|
8960
9002
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
8961
|
-
l("div",
|
|
9003
|
+
l("div", Gm, [f(L(W), {
|
|
8962
9004
|
class: "custom-btn",
|
|
8963
9005
|
disabled: !i.value && a.value.length === 0,
|
|
8964
9006
|
size: "small",
|
|
@@ -8978,17 +9020,17 @@ var $d = ["src"], ef = {
|
|
|
8978
9020
|
})])
|
|
8979
9021
|
], 32));
|
|
8980
9022
|
}
|
|
8981
|
-
}),
|
|
9023
|
+
}), qm = {
|
|
8982
9024
|
ref: "messageToolsRef",
|
|
8983
9025
|
class: "ai-message-tools-container"
|
|
8984
|
-
},
|
|
9026
|
+
}, Jm = {
|
|
8985
9027
|
class: "message-tools",
|
|
8986
9028
|
style: { "margin-right": "8px" }
|
|
8987
|
-
},
|
|
9029
|
+
}, Ym = {
|
|
8988
9030
|
key: 0,
|
|
8989
9031
|
class: "ai-divider",
|
|
8990
9032
|
style: { "margin-right": "8px" }
|
|
8991
|
-
},
|
|
9033
|
+
}, Xm = { class: "message-tools" }, Zm = /* @__PURE__ */ m({
|
|
8992
9034
|
__name: "message-tools",
|
|
8993
9035
|
props: {
|
|
8994
9036
|
messageTools: { default: () => kt },
|
|
@@ -9049,8 +9091,8 @@ var $d = ["src"], ef = {
|
|
|
9049
9091
|
};
|
|
9050
9092
|
return O(() => {
|
|
9051
9093
|
v(), p.value = [];
|
|
9052
|
-
}), (n, r) => (k(), c("div",
|
|
9053
|
-
l("div",
|
|
9094
|
+
}), (n, r) => (k(), c("div", qm, [
|
|
9095
|
+
l("div", Jm, [(k(!0), c(e, null, M(t.messageTools, (n) => (k(), c(e, { key: n.id }, [n.id === "delete" ? (k(), o(Bm, b({
|
|
9054
9096
|
key: 0,
|
|
9055
9097
|
ref_for: !0
|
|
9056
9098
|
}, n, {
|
|
@@ -9073,14 +9115,14 @@ var $d = ["src"], ef = {
|
|
|
9073
9115
|
"tippy-options",
|
|
9074
9116
|
"onClick"
|
|
9075
9117
|
]))], 64))), 128))]),
|
|
9076
|
-
t.updateTools.length > 0 ? (k(), c("div",
|
|
9077
|
-
l("div",
|
|
9118
|
+
t.updateTools.length > 0 ? (k(), c("div", Ym)) : s("", !0),
|
|
9119
|
+
l("div", Xm, [(k(!0), c(e, null, M(t.updateTools, (n) => (k(), c(e, { key: n.id }, [n.id === "like" || n.id === "unlike" ? (k(), o(L(xe), b({
|
|
9078
9120
|
key: 0,
|
|
9079
9121
|
ref_for: !0,
|
|
9080
9122
|
ref_key: "feedbackTippyRef",
|
|
9081
9123
|
ref: u
|
|
9082
9124
|
}, { ref_for: !0 }, h.value, { onShow: (e) => C(n.id) }), {
|
|
9083
|
-
content: H(() => [f(
|
|
9125
|
+
content: H(() => [f(Km, {
|
|
9084
9126
|
loading: d.value,
|
|
9085
9127
|
"reason-list": p.value,
|
|
9086
9128
|
title: n.id === "like" ? L(G)("什么原因让你满意?") : L(G)("什么原因让你不满意?"),
|
|
@@ -9106,7 +9148,7 @@ var $d = ["src"], ef = {
|
|
|
9106
9148
|
"onClick"
|
|
9107
9149
|
])]),
|
|
9108
9150
|
_: 2
|
|
9109
|
-
}, 1040, ["onShow"])) : n.id === "delete" ? (k(), o(
|
|
9151
|
+
}, 1040, ["onShow"])) : n.id === "delete" ? (k(), o(Bm, b({
|
|
9110
9152
|
key: 1,
|
|
9111
9153
|
ref_for: !0
|
|
9112
9154
|
}, n, {
|
|
@@ -9131,7 +9173,7 @@ var $d = ["src"], ef = {
|
|
|
9131
9173
|
]))], 64))), 128))])
|
|
9132
9174
|
], 512));
|
|
9133
9175
|
}
|
|
9134
|
-
}),
|
|
9176
|
+
}), Qm = m({
|
|
9135
9177
|
name: "HighlightKeyword",
|
|
9136
9178
|
props: { text: {
|
|
9137
9179
|
type: String,
|
|
@@ -9148,7 +9190,7 @@ var $d = ["src"], ef = {
|
|
|
9148
9190
|
});
|
|
9149
9191
|
return () => g("span", r.value);
|
|
9150
9192
|
}
|
|
9151
|
-
}),
|
|
9193
|
+
}), $m = { class: "ai-activity-message" }, eh = { class: "ai-activity-message-content" }, th = /* @__PURE__ */ m({
|
|
9152
9194
|
__name: "activity-layout",
|
|
9153
9195
|
props: /* @__PURE__ */ y({ activityType: {} }, {
|
|
9154
9196
|
collapsed: X({ type: Boolean }, { default: !1 }),
|
|
@@ -9157,15 +9199,15 @@ var $d = ["src"], ef = {
|
|
|
9157
9199
|
emits: ["update:collapsed"],
|
|
9158
9200
|
setup(e) {
|
|
9159
9201
|
let t = z(e, "collapsed");
|
|
9160
|
-
return (n, r) => (k(), c("div",
|
|
9202
|
+
return (n, r) => (k(), c("div", $m, [l("div", {
|
|
9161
9203
|
class: "ai-activity-message-title",
|
|
9162
9204
|
onClick: r[0] || (r[0] = (e) => t.value = !t.value)
|
|
9163
9205
|
}, [N(n.$slots, "title", C(h({ collapsed: t.value }))), e.activityType === L(_t).FlowAgent ? s("", !0) : (k(), c("span", {
|
|
9164
9206
|
key: 0,
|
|
9165
9207
|
class: S(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": t.value }])
|
|
9166
|
-
}, [f(L(Wn))], 2))]), U(l("div",
|
|
9208
|
+
}, [f(L(Wn))], 2))]), U(l("div", eh, [N(n.$slots, "default")], 512), [[ae, !t.value]])]));
|
|
9167
9209
|
}
|
|
9168
|
-
}),
|
|
9210
|
+
}), nh = [
|
|
9169
9211
|
{
|
|
9170
9212
|
color: "#3A84FF",
|
|
9171
9213
|
icon: null,
|
|
@@ -9221,16 +9263,16 @@ var $d = ["src"], ef = {
|
|
|
9221
9263
|
label: G("跳过"),
|
|
9222
9264
|
rawStates: ["SKIPPED"]
|
|
9223
9265
|
}
|
|
9224
|
-
],
|
|
9266
|
+
], rh = Object.fromEntries(nh.map((e) => [e.key, e])), ih = Object.fromEntries(nh.flatMap((e) => e.rawStates.map((t) => [t, e.key]))), ah = (e) => {
|
|
9225
9267
|
var t;
|
|
9226
|
-
return (t =
|
|
9227
|
-
},
|
|
9268
|
+
return (t = ih[e]) == null ? "running" : t;
|
|
9269
|
+
}, oh = (e) => {
|
|
9228
9270
|
var t;
|
|
9229
|
-
return (t =
|
|
9230
|
-
},
|
|
9231
|
-
let t =
|
|
9271
|
+
return (t = rh[e].dotColor) == null ? rh[e].color : t;
|
|
9272
|
+
}, sh = (e) => {
|
|
9273
|
+
let t = rh[e].icon;
|
|
9232
9274
|
return t ? i(t) : null;
|
|
9233
|
-
},
|
|
9275
|
+
}, ch = (e) => {
|
|
9234
9276
|
let t = a(() => {
|
|
9235
9277
|
var t;
|
|
9236
9278
|
return Array.isArray(e.value) ? e.value : [(t = e.value) == null ? {} : t];
|
|
@@ -9244,10 +9286,10 @@ var $d = ["src"], ef = {
|
|
|
9244
9286
|
viewTasks: a(() => t.value.map((e) => {
|
|
9245
9287
|
var t, n;
|
|
9246
9288
|
let r = Object.values((t = e.nodes) == null ? {} : t).map((e) => {
|
|
9247
|
-
let t =
|
|
9289
|
+
let t = ah(e.state);
|
|
9248
9290
|
return {
|
|
9249
9291
|
convergedState: t,
|
|
9250
|
-
dotColor:
|
|
9292
|
+
dotColor: oh(t),
|
|
9251
9293
|
elapsedTimeText: pt(e.elapsed_time),
|
|
9252
9294
|
id: e.id,
|
|
9253
9295
|
name: e.name,
|
|
@@ -9255,7 +9297,7 @@ var $d = ["src"], ef = {
|
|
|
9255
9297
|
retryable: !!e.retryable,
|
|
9256
9298
|
skippable: !!e.skippable
|
|
9257
9299
|
};
|
|
9258
|
-
}), i = r.reduce((e, t) => e + t.raw.elapsed_time, 0), a =
|
|
9300
|
+
}), i = r.reduce((e, t) => e + t.raw.elapsed_time, 0), a = ah((n = e.task_state) == null ? "" : n);
|
|
9259
9301
|
return {
|
|
9260
9302
|
convergedState: a,
|
|
9261
9303
|
hasConfidence: !!e.has_confidence,
|
|
@@ -9263,7 +9305,7 @@ var $d = ["src"], ef = {
|
|
|
9263
9305
|
isActive: !!e.is_active,
|
|
9264
9306
|
nodes: r,
|
|
9265
9307
|
raw: e,
|
|
9266
|
-
stateIcon:
|
|
9308
|
+
stateIcon: sh(a),
|
|
9267
9309
|
taskId: e.task_id,
|
|
9268
9310
|
taskName: e.task_name,
|
|
9269
9311
|
totalTimeText: pt(i)
|
|
@@ -9271,21 +9313,21 @@ var $d = ["src"], ef = {
|
|
|
9271
9313
|
})),
|
|
9272
9314
|
visibleStats: a(() => {
|
|
9273
9315
|
let e = {};
|
|
9274
|
-
for (let t of
|
|
9316
|
+
for (let t of nh) e[t.key] = 0;
|
|
9275
9317
|
for (let i of t.value) {
|
|
9276
9318
|
var n, r;
|
|
9277
|
-
for (let [t, a] of Object.entries((n = (r = i.statistics) == null ? void 0 : r.state_counts) == null ? {} : n)) e[
|
|
9319
|
+
for (let [t, a] of Object.entries((n = (r = i.statistics) == null ? void 0 : r.state_counts) == null ? {} : n)) e[ah(t)] += a;
|
|
9278
9320
|
}
|
|
9279
|
-
return
|
|
9321
|
+
return nh.filter((t) => e[t.key] > 0).map((t) => ({
|
|
9280
9322
|
color: t.color,
|
|
9281
9323
|
display: e[t.key] > 99 ? "99+" : String(e[t.key]),
|
|
9282
|
-
dotColor:
|
|
9324
|
+
dotColor: oh(t.key),
|
|
9283
9325
|
key: t.key,
|
|
9284
9326
|
label: t.label
|
|
9285
9327
|
}));
|
|
9286
9328
|
})
|
|
9287
9329
|
};
|
|
9288
|
-
},
|
|
9330
|
+
}, lh = [{
|
|
9289
9331
|
blockedTip: () => G("任务正在跳过中,不可重试"),
|
|
9290
9332
|
icon: nr,
|
|
9291
9333
|
id: bt.FlowNodeRetry,
|
|
@@ -9299,10 +9341,10 @@ var $d = ["src"], ef = {
|
|
|
9299
9341
|
label: () => G("跳过"),
|
|
9300
9342
|
pendingLabel: () => G("跳过中"),
|
|
9301
9343
|
visible: (e) => e.convergedState === "failed" && e.skippable
|
|
9302
|
-
}],
|
|
9344
|
+
}], uh = (e, t) => `${e.task_id}:${t.id}:${t.retry}`, dh = (e) => {
|
|
9303
9345
|
let { hideResumeActions: t, onInterruptResume: n, openNodeDetail: r } = e, i = F({}), a = (e, t, r) => {
|
|
9304
9346
|
var a;
|
|
9305
|
-
let o =
|
|
9347
|
+
let o = uh(t, r);
|
|
9306
9348
|
i.value[o] || (i.value = X(X({}, i.value), {}, { [o]: e }), (a = n.value) == null || a.call(n, {
|
|
9307
9349
|
payload: {
|
|
9308
9350
|
node_id: r.id,
|
|
@@ -9313,7 +9355,7 @@ var $d = ["src"], ef = {
|
|
|
9313
9355
|
};
|
|
9314
9356
|
return {
|
|
9315
9357
|
getNodeActions: (e, n) => {
|
|
9316
|
-
let o = i.value[
|
|
9358
|
+
let o = i.value[uh(e.raw, n.raw)], s = (t != null && t.value ? [] : lh).filter((e) => e.visible(n)).map((t) => {
|
|
9317
9359
|
let r = o === t.id, i = o !== void 0 && !r;
|
|
9318
9360
|
return {
|
|
9319
9361
|
disabled: o !== void 0,
|
|
@@ -9334,47 +9376,47 @@ var $d = ["src"], ef = {
|
|
|
9334
9376
|
run: () => r(e.raw, n.raw)
|
|
9335
9377
|
}), s;
|
|
9336
9378
|
},
|
|
9337
|
-
isNodePending: (e, t) => i.value[
|
|
9379
|
+
isNodePending: (e, t) => i.value[uh(e.raw, t.raw)] !== void 0
|
|
9338
9380
|
};
|
|
9339
|
-
},
|
|
9381
|
+
}, fh = { class: "ai-detail-section" }, ph = { class: "section-heading" }, mh = { class: "section-text" }, hh = /* @__PURE__ */ m({
|
|
9340
9382
|
__name: "detail-section",
|
|
9341
9383
|
props: { title: {} },
|
|
9342
9384
|
setup(e) {
|
|
9343
|
-
return (t, n) => (k(), c("div",
|
|
9385
|
+
return (t, n) => (k(), c("div", fh, [l("div", ph, [n[0] || (n[0] = l("span", { class: "section-bar" }, null, -1)), l("span", mh, I(e.title), 1)]), N(t.$slots, "default")]));
|
|
9344
9386
|
}
|
|
9345
|
-
}),
|
|
9387
|
+
}), gh = { class: "ai-simple-table" }, _h = { key: 0 }, vh = ["colspan"], yh = /* @__PURE__ */ m({
|
|
9346
9388
|
__name: "simple-table",
|
|
9347
9389
|
props: {
|
|
9348
9390
|
columns: {},
|
|
9349
9391
|
data: {}
|
|
9350
9392
|
},
|
|
9351
9393
|
setup(t) {
|
|
9352
|
-
return (n, r) => (k(), c("table",
|
|
9394
|
+
return (n, r) => (k(), c("table", gh, [l("thead", null, [l("tr", null, [(k(!0), c(e, null, M(t.columns, (e) => (k(), c("th", { key: e.key }, I(e.label), 1))), 128))])]), l("tbody", null, [(k(!0), c(e, null, M(t.data, (n, r) => (k(), c("tr", { key: r }, [(k(!0), c(e, null, M(t.columns, (e) => {
|
|
9353
9395
|
var t;
|
|
9354
9396
|
return k(), c("td", {
|
|
9355
9397
|
key: e.key,
|
|
9356
9398
|
class: S({ "is-break-all": e.breakAll })
|
|
9357
9399
|
}, I((t = n[e.key]) == null ? "--" : t), 3);
|
|
9358
|
-
}), 128))]))), 128)), t.data.length ? s("", !0) : (k(), c("tr",
|
|
9400
|
+
}), 128))]))), 128)), t.data.length ? s("", !0) : (k(), c("tr", _h, [l("td", {
|
|
9359
9401
|
class: "is-empty",
|
|
9360
9402
|
colspan: t.columns.length
|
|
9361
|
-
}, " -- ", 8,
|
|
9403
|
+
}, " -- ", 8, vh)]))])]));
|
|
9362
9404
|
}
|
|
9363
|
-
}),
|
|
9405
|
+
}), bh = { class: "ai-flow-agent-node-detail" }, xh = { class: "detail-title" }, Sh = {
|
|
9364
9406
|
key: 1,
|
|
9365
9407
|
class: "detail-title-content"
|
|
9366
|
-
},
|
|
9408
|
+
}, Ch = { class: "detail-tab-bar" }, wh = ["onClick"], Th = { class: "detail-body" }, Eh = { class: "skeleton-section" }, Dh = { class: "skeleton-section" }, Oh = { class: "info-form" }, kh = { class: "info-label" }, Ah = { class: "info-value" }, jh = { class: "info-row" }, Mh = { class: "info-label" }, Nh = { class: "info-value" }, Ph = {
|
|
9367
9409
|
key: 0,
|
|
9368
9410
|
class: "failure-item"
|
|
9369
|
-
},
|
|
9411
|
+
}, Fh = {
|
|
9370
9412
|
key: 1,
|
|
9371
9413
|
class: "failure-item"
|
|
9372
|
-
},
|
|
9414
|
+
}, Ih = { class: "info-row" }, Lh = { class: "info-label" }, Rh = { class: "info-value" }, zh = {
|
|
9373
9415
|
key: 0,
|
|
9374
9416
|
class: "skeleton-section"
|
|
9375
|
-
},
|
|
9417
|
+
}, Bh = /* @__PURE__ */ function(e) {
|
|
9376
9418
|
return e.Config = "config", e.Output = "output", e;
|
|
9377
|
-
}(
|
|
9419
|
+
}(Bh || {}), Vh = /* @__PURE__ */ m({
|
|
9378
9420
|
__name: "flow-agent-node-detail",
|
|
9379
9421
|
props: {
|
|
9380
9422
|
data: {},
|
|
@@ -9387,10 +9429,10 @@ var $d = ["src"], ef = {
|
|
|
9387
9429
|
},
|
|
9388
9430
|
setup(t) {
|
|
9389
9431
|
let n = [{
|
|
9390
|
-
key:
|
|
9432
|
+
key: Bh.Config,
|
|
9391
9433
|
label: G("节点配置")
|
|
9392
9434
|
}, {
|
|
9393
|
-
key:
|
|
9435
|
+
key: Bh.Output,
|
|
9394
9436
|
label: G("节点输出")
|
|
9395
9437
|
}], r = [{
|
|
9396
9438
|
key: "key",
|
|
@@ -9419,7 +9461,7 @@ var $d = ["src"], ef = {
|
|
|
9419
9461
|
breakAll: !0,
|
|
9420
9462
|
key: "value",
|
|
9421
9463
|
label: G("参数值")
|
|
9422
|
-
}], p = { forced_fail: mt ? "Force Fail" : "强制失败" }, m = t, h = F(
|
|
9464
|
+
}], p = { forced_fail: mt ? "Force Fail" : "强制失败" }, m = t, h = F(Bh.Config), g = a(() => {
|
|
9423
9465
|
var e;
|
|
9424
9466
|
return (e = m.data) == null ? void 0 : e.basic_info;
|
|
9425
9467
|
}), _ = a(() => {
|
|
@@ -9481,56 +9523,56 @@ var $d = ["src"], ef = {
|
|
|
9481
9523
|
}), T = (e) => e == null ? "--" : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
9482
9524
|
return (a, p) => {
|
|
9483
9525
|
var m;
|
|
9484
|
-
return k(), c("div",
|
|
9485
|
-
l("h3",
|
|
9486
|
-
l("div",
|
|
9526
|
+
return k(), c("div", bh, [
|
|
9527
|
+
l("h3", xh, [t.loading ? (k(), c(e, { key: 0 }, [l("span", null, I(L(G)("节点")) + ":", 1), p[0] || (p[0] = l("span", { class: "skeleton-title ai-skeleton-element" }, null, -1))], 64)) : (k(), c("div", Sh, I(L(G)("节点")) + ":" + I((m = g.value) == null ? void 0 : m.node_name), 1)), N(a.$slots, "locateButton")]),
|
|
9528
|
+
l("div", Ch, [(k(), c(e, null, M(n, (e) => l("div", {
|
|
9487
9529
|
key: e.key,
|
|
9488
9530
|
class: S(["detail-tab", { "is-active": h.value === e.key }]),
|
|
9489
9531
|
onClick: (t) => h.value = e.key
|
|
9490
|
-
}, [(k(), o(P(e.key ===
|
|
9491
|
-
l("div",
|
|
9532
|
+
}, [(k(), o(P(e.key === Bh.Config ? L(cn) : L(sn)), { class: "detail-tab-icon" })), d(" " + I(e.label), 1)], 10, wh)), 64))]),
|
|
9533
|
+
l("div", Th, [h.value === Bh.Config ? (k(), c(e, { key: 0 }, [t.loading ? (k(), c(e, { key: 0 }, [l("div", Eh, [p[1] || (p[1] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, M(6, (e) => l("div", {
|
|
9492
9534
|
key: e,
|
|
9493
9535
|
class: "skeleton-row ai-skeleton-element"
|
|
9494
|
-
})), 64))]), l("div",
|
|
9536
|
+
})), 64))]), l("div", Dh, [p[2] || (p[2] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, M(4, (e) => l("div", {
|
|
9495
9537
|
key: e,
|
|
9496
9538
|
class: "skeleton-row ai-skeleton-element"
|
|
9497
9539
|
})), 64))])], 64)) : (k(), c(e, { key: 1 }, [
|
|
9498
|
-
f(
|
|
9540
|
+
f(hh, { title: L(G)("基础信息") }, {
|
|
9499
9541
|
default: H(() => {
|
|
9500
9542
|
var t, n, r;
|
|
9501
|
-
return [l("div",
|
|
9543
|
+
return [l("div", Oh, [
|
|
9502
9544
|
(k(!0), c(e, null, M(_.value, (e) => (k(), c("div", {
|
|
9503
9545
|
key: e.label,
|
|
9504
9546
|
class: "info-row"
|
|
9505
|
-
}, [l("div",
|
|
9506
|
-
l("div",
|
|
9507
|
-
l("div",
|
|
9547
|
+
}, [l("div", kh, I(e.label), 1), l("div", Ah, I(e.value), 1)]))), 128)),
|
|
9548
|
+
l("div", jh, [l("div", Mh, I(L(G)("失败处理")), 1), l("div", Nh, [v.value ? (k(), c(e, { key: 0 }, [(t = g.value) != null && t.skippable ? (k(), c("span", Ph, [p[3] || (p[3] = l("span", { class: "tag-badge" }, "MS", -1)), d(" " + I(L(G)("手动跳过")) + I(!((n = g.value) == null || (n = n.auto_retry) == null) && n.enable ? ";" : ""), 1)])) : s("", !0), !((r = g.value) == null || (r = r.auto_retry) == null) && r.enable ? (k(), c("span", Fh, [p[4] || (p[4] = l("span", { class: "tag-badge" }, "AR", -1)), d(" " + I(y.value), 1)])) : s("", !0)], 64)) : (k(), c(e, { key: 1 }, [d("--")], 64))])]),
|
|
9549
|
+
l("div", Ih, [l("div", Lh, I(L(G)("超时控制")), 1), l("div", Rh, I(b.value), 1)])
|
|
9508
9550
|
])];
|
|
9509
9551
|
}),
|
|
9510
9552
|
_: 1
|
|
9511
9553
|
}, 8, ["title"]),
|
|
9512
|
-
f(
|
|
9513
|
-
default: H(() => [f(
|
|
9554
|
+
f(hh, { title: L(G)("输入参数") }, {
|
|
9555
|
+
default: H(() => [f(yh, {
|
|
9514
9556
|
columns: r,
|
|
9515
9557
|
data: x.value
|
|
9516
9558
|
}, null, 8, ["data"])]),
|
|
9517
9559
|
_: 1
|
|
9518
9560
|
}, 8, ["title"]),
|
|
9519
|
-
f(
|
|
9520
|
-
default: H(() => [f(
|
|
9561
|
+
f(hh, { title: L(G)("输出参数") }, {
|
|
9562
|
+
default: H(() => [f(yh, {
|
|
9521
9563
|
columns: i,
|
|
9522
9564
|
data: C.value
|
|
9523
9565
|
}, null, 8, ["data"])]),
|
|
9524
9566
|
_: 1
|
|
9525
9567
|
}, 8, ["title"])
|
|
9526
|
-
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div",
|
|
9568
|
+
], 64))], 64)) : (k(), c(e, { key: 1 }, [t.loading ? (k(), c("div", zh, [p[5] || (p[5] = l("div", { class: "skeleton-heading ai-skeleton-element" }, null, -1)), (k(), c(e, null, M(5, (e) => l("div", {
|
|
9527
9569
|
key: e,
|
|
9528
9570
|
class: "skeleton-row ai-skeleton-element"
|
|
9529
|
-
})), 64))])) : (k(), o(
|
|
9571
|
+
})), 64))])) : (k(), o(hh, {
|
|
9530
9572
|
key: 1,
|
|
9531
9573
|
title: L(G)("结构化输出")
|
|
9532
9574
|
}, {
|
|
9533
|
-
default: H(() => [f(
|
|
9575
|
+
default: H(() => [f(yh, {
|
|
9534
9576
|
columns: u,
|
|
9535
9577
|
data: w.value
|
|
9536
9578
|
}, null, 8, ["data"])]),
|
|
@@ -9539,7 +9581,7 @@ var $d = ["src"], ef = {
|
|
|
9539
9581
|
]);
|
|
9540
9582
|
};
|
|
9541
9583
|
}
|
|
9542
|
-
}),
|
|
9584
|
+
}), Hh = (e) => e.task_id == null ? "" : `${e.task_id}`, Uh = Hh, Wh = (e, t) => e.task_id == null ? "" : `${e.task_id}|${t.id}|${t.name}`, Gh = (e) => {
|
|
9543
9585
|
let { messageUid: t, taskList: n } = e, r = oi(), i = ti(), o = a(() => {
|
|
9544
9586
|
var e, t;
|
|
9545
9587
|
return (e = (t = r.selectedTab.value) == null ? void 0 : t.name) == null ? "" : e;
|
|
@@ -9548,20 +9590,20 @@ var $d = ["src"], ef = {
|
|
|
9548
9590
|
}, l = a(() => {
|
|
9549
9591
|
if (s.value) return o.value;
|
|
9550
9592
|
let e = n.value.find((e) => e.is_active);
|
|
9551
|
-
return (e == null ? void 0 : e.task_id) == null ? o.value :
|
|
9593
|
+
return (e == null ? void 0 : e.task_id) == null ? o.value : Hh(e);
|
|
9552
9594
|
}), u = (e) => {
|
|
9553
9595
|
let t = l.value;
|
|
9554
|
-
return t ===
|
|
9555
|
-
}, d = (e, t) => l.value ===
|
|
9596
|
+
return t === Hh(e) || t === Uh(e);
|
|
9597
|
+
}, d = (e, t) => l.value === Wh(e, t), f = (e, n) => {
|
|
9556
9598
|
var i, a;
|
|
9557
9599
|
let o = e.task_id;
|
|
9558
9600
|
o != null && (c(), (i = r.addCustomTab) == null || i.call(r, {
|
|
9559
9601
|
closable: n.closable,
|
|
9560
9602
|
label: n.name,
|
|
9561
|
-
name:
|
|
9603
|
+
name: Wh(e, n),
|
|
9562
9604
|
order: (a = n.tab_order) == null ? 100 : a,
|
|
9563
9605
|
data: {
|
|
9564
|
-
component:
|
|
9606
|
+
component: Vh,
|
|
9565
9607
|
messageUid: t.value,
|
|
9566
9608
|
props: {
|
|
9567
9609
|
data: {},
|
|
@@ -9579,10 +9621,10 @@ var $d = ["src"], ef = {
|
|
|
9579
9621
|
a && (c(), (n = r.addCustomTab) == null || n.call(r, {
|
|
9580
9622
|
closable: e.closable,
|
|
9581
9623
|
label: G("有效证据"),
|
|
9582
|
-
name:
|
|
9624
|
+
name: Uh(e),
|
|
9583
9625
|
order: (i = e.tab_order) == null ? 10 : i,
|
|
9584
9626
|
data: {
|
|
9585
|
-
component:
|
|
9627
|
+
component: Vh,
|
|
9586
9628
|
messageUid: t.value,
|
|
9587
9629
|
props: {
|
|
9588
9630
|
data: {},
|
|
@@ -9601,10 +9643,10 @@ var $d = ["src"], ef = {
|
|
|
9601
9643
|
}), O(() => {
|
|
9602
9644
|
if (i != null && i.value) for (let i of n.value) {
|
|
9603
9645
|
var e, t, a;
|
|
9604
|
-
(e = r.removeCustomTab) == null || e.call(r,
|
|
9646
|
+
(e = r.removeCustomTab) == null || e.call(r, Hh(i)), (t = r.removeCustomTab) == null || t.call(r, Uh(i));
|
|
9605
9647
|
for (let e of Object.values((a = i.nodes) == null ? {} : a)) {
|
|
9606
9648
|
var o;
|
|
9607
|
-
(o = r.removeCustomTab) == null || o.call(r,
|
|
9649
|
+
(o = r.removeCustomTab) == null || o.call(r, Wh(i, e));
|
|
9608
9650
|
}
|
|
9609
9651
|
}
|
|
9610
9652
|
}), {
|
|
@@ -9615,7 +9657,7 @@ var $d = ["src"], ef = {
|
|
|
9615
9657
|
openConfidence: p,
|
|
9616
9658
|
openNodeDetail: f
|
|
9617
9659
|
};
|
|
9618
|
-
},
|
|
9660
|
+
}, Kh = { class: "ai-activity-message-title-text" }, qh = { class: "flow-agent-title-label" }, Jh = { class: "flow-agent-stat-tooltip" }, Yh = { class: "flow-agent-stat-tooltip-status" }, Xh = { class: "flow-agent-stat-tooltip-label" }, Zh = ["onClick"], Qh = { class: "flow-agent-task-state-icon" }, $h = { class: "flow-agent-task-name" }, eg = { class: "flow-agent-task-trailing" }, tg = { class: "flow-agent-task-time" }, ng = ["onClick"], rg = { class: "flow-agent-task-nodes" }, ig = { class: "flow-agent-node-status" }, ag = ["title"], og = { class: "flow-agent-node-trailing" }, sg = { class: "flow-agent-node-time" }, cg = { class: "flow-agent-node-actions" }, lg = ["onClick"], ug = /* @__PURE__ */ m({
|
|
9619
9661
|
__name: "flow-agent-content",
|
|
9620
9662
|
props: /* @__PURE__ */ y({
|
|
9621
9663
|
content: {},
|
|
@@ -9628,17 +9670,17 @@ var $d = ["src"], ef = {
|
|
|
9628
9670
|
}),
|
|
9629
9671
|
emits: ["update:collapsed"],
|
|
9630
9672
|
setup(t) {
|
|
9631
|
-
let n = t, r = ji(), i = z(t, "collapsed"), u = Oi(), p = a(() => u.value === Ft.Share), m = a(() => n.status === J.Pending || n.status === J.Streaming), { isTaskExpanded: h, taskList: g, toggleTaskExpanded: _, viewTasks: v, visibleStats: y } =
|
|
9673
|
+
let n = t, r = ji(), i = z(t, "collapsed"), u = Oi(), p = a(() => u.value === Ft.Share), m = a(() => n.status === J.Pending || n.status === J.Streaming), { isTaskExpanded: h, taskList: g, toggleTaskExpanded: _, viewTasks: v, visibleStats: y } = ch(ne(n, "content")), { isNodeSelected: x, isTaskSelected: C, openConfidence: T, openNodeDetail: E } = Gh({
|
|
9632
9674
|
messageUid: ne(n, "messageUid"),
|
|
9633
9675
|
taskList: g
|
|
9634
|
-
}), { getNodeActions: D, isNodePending: O } =
|
|
9676
|
+
}), { getNodeActions: D, isNodePending: O } = dh({
|
|
9635
9677
|
hideResumeActions: p,
|
|
9636
9678
|
onInterruptResume: ne(n, "onInterruptResume"),
|
|
9637
9679
|
openNodeDetail: E
|
|
9638
9680
|
}), A = (e) => {
|
|
9639
9681
|
e.disabled || e.run();
|
|
9640
9682
|
};
|
|
9641
|
-
return (t, n) => (k(), o(
|
|
9683
|
+
return (t, n) => (k(), o(th, {
|
|
9642
9684
|
collapsed: i.value,
|
|
9643
9685
|
"onUpdate:collapsed": n[0] || (n[0] = (e) => i.value = e),
|
|
9644
9686
|
"activity-type": L(_t).FlowAgent,
|
|
@@ -9653,11 +9695,11 @@ var $d = ["src"], ef = {
|
|
|
9653
9695
|
followCursor: !1,
|
|
9654
9696
|
offset: [0, 10]
|
|
9655
9697
|
})), {
|
|
9656
|
-
content: H(() => [l("div",
|
|
9698
|
+
content: H(() => [l("div", Jh, [(k(!0), c(e, null, M(L(y), (e) => (k(), c("div", {
|
|
9657
9699
|
key: e.key,
|
|
9658
9700
|
class: "flow-agent-stat-tooltip-item"
|
|
9659
9701
|
}, [
|
|
9660
|
-
l("span",
|
|
9702
|
+
l("span", Yh, [e.key === "running" ? (k(), o(L(me), {
|
|
9661
9703
|
key: 0,
|
|
9662
9704
|
mode: "spin",
|
|
9663
9705
|
size: "mini",
|
|
@@ -9667,7 +9709,7 @@ var $d = ["src"], ef = {
|
|
|
9667
9709
|
class: "flow-agent-stat-dot",
|
|
9668
9710
|
style: w({ borderColor: e.dotColor })
|
|
9669
9711
|
}, null, 4))]),
|
|
9670
|
-
l("span",
|
|
9712
|
+
l("span", Xh, I(e.label) + ":", 1),
|
|
9671
9713
|
l("span", {
|
|
9672
9714
|
class: "flow-agent-stat-tooltip-count",
|
|
9673
9715
|
style: w({ color: e.color })
|
|
@@ -9676,7 +9718,7 @@ var $d = ["src"], ef = {
|
|
|
9676
9718
|
default: H(() => [l("span", { class: S(["ai-activity-message-title-icon", { "icon-collapsed": i.value }]) }, [m.value ? (k(), o(yr, {
|
|
9677
9719
|
key: 0,
|
|
9678
9720
|
size: 12
|
|
9679
|
-
})) : (k(), o(L(Zt), { key: 1 }))], 2), l("span",
|
|
9721
|
+
})) : (k(), o(L(Zt), { key: 1 }))], 2), l("span", Kh, [l("span", qh, I(L(G)("执行情况")) + ":", 1), (k(!0), c(e, null, M(L(y), (e) => (k(), c("span", {
|
|
9680
9722
|
key: e.key,
|
|
9681
9723
|
class: "flow-agent-stat-item"
|
|
9682
9724
|
}, [e.key === "running" ? (k(), o(L(me), {
|
|
@@ -9707,27 +9749,27 @@ var $d = ["src"], ef = {
|
|
|
9707
9749
|
l("span", {
|
|
9708
9750
|
class: S(["flow-agent-task-arrow", { "is-expanded": L(h)(t.raw) }]),
|
|
9709
9751
|
onClick: le((e) => L(_)(t.raw), ["stop"])
|
|
9710
|
-
}, [f(L(Zt))], 10,
|
|
9711
|
-
l("span",
|
|
9752
|
+
}, [f(L(Zt))], 10, Zh),
|
|
9753
|
+
l("span", Qh, [t.convergedState === "running" ? (k(), o(L(me), {
|
|
9712
9754
|
key: 0,
|
|
9713
9755
|
mode: "spin",
|
|
9714
9756
|
size: "mini",
|
|
9715
9757
|
theme: "primary"
|
|
9716
9758
|
})) : (k(), o(P(t.stateIcon), { key: 1 }))]),
|
|
9717
|
-
U((k(), c("span",
|
|
9718
|
-
l("span",
|
|
9759
|
+
U((k(), c("span", $h, [f(L(Qm), { text: t.taskName }, null, 8, ["text"])])), [[L(Pi), X({}, L(r))]]),
|
|
9760
|
+
l("span", eg, [l("span", tg, I(t.totalTimeText), 1), t.hasConfidence ? (k(), c("span", {
|
|
9719
9761
|
key: 0,
|
|
9720
9762
|
class: "flow-agent-task-action-btn flow-agent-task-confidence-btn",
|
|
9721
9763
|
onClick: le((e) => L(T)(t.raw), ["stop"])
|
|
9722
|
-
}, [f(L(sn)), d(" " + I((n = t.confidenceTitle) == null ? L(G)("有效证据") : n), 1)], 8,
|
|
9723
|
-
], 2), U(l("div",
|
|
9764
|
+
}, [f(L(sn)), d(" " + I((n = t.confidenceTitle) == null ? L(G)("有效证据") : n), 1)], 8, ng)) : s("", !0)])
|
|
9765
|
+
], 2), U(l("div", rg, [(k(!0), c(e, null, M(t.nodes, (n) => (k(), c("div", {
|
|
9724
9766
|
key: n.id,
|
|
9725
9767
|
class: S(["flow-agent-node-item", {
|
|
9726
9768
|
"is-selected": L(x)(t.raw, n.raw),
|
|
9727
9769
|
"is-pending": L(O)(t, n)
|
|
9728
9770
|
}])
|
|
9729
9771
|
}, [
|
|
9730
|
-
l("span",
|
|
9772
|
+
l("span", ig, [n.convergedState === "running" ? (k(), o(L(me), {
|
|
9731
9773
|
key: 0,
|
|
9732
9774
|
mode: "spin",
|
|
9733
9775
|
size: "mini",
|
|
@@ -9740,8 +9782,8 @@ var $d = ["src"], ef = {
|
|
|
9740
9782
|
U((k(), c("span", {
|
|
9741
9783
|
class: "flow-agent-node-name",
|
|
9742
9784
|
title: n.name
|
|
9743
|
-
}, [f(L(
|
|
9744
|
-
l("span",
|
|
9785
|
+
}, [f(L(Qm), { text: n.name }, null, 8, ["text"])], 8, ag)), [[L(Pi), X({}, L(r))]]),
|
|
9786
|
+
l("span", og, [l("span", sg, I(n.elapsedTimeText), 1), l("span", cg, [(k(!0), c(e, null, M(L(D)(t, n), (e) => U((k(), c("span", {
|
|
9745
9787
|
key: e.id,
|
|
9746
9788
|
class: S(["flow-agent-node-action-btn", { "is-disabled": e.disabled }]),
|
|
9747
9789
|
onClick: le((t) => A(e), ["stop"])
|
|
@@ -9751,7 +9793,7 @@ var $d = ["src"], ef = {
|
|
|
9751
9793
|
mode: "spin",
|
|
9752
9794
|
size: "mini",
|
|
9753
9795
|
theme: "primary"
|
|
9754
|
-
})) : (k(), o(P(e.icon), { key: 1 })), d(" " + I(e.label), 1)], 10,
|
|
9796
|
+
})) : (k(), o(P(e.icon), { key: 1 })), d(" " + I(e.label), 1)], 10, lg)), [[L(Se), e.tooltip ? X(X({}, L(r)), {}, {
|
|
9755
9797
|
content: e.tooltip,
|
|
9756
9798
|
theme: "ai-chat-box",
|
|
9757
9799
|
offset: [0, 8]
|
|
@@ -9761,7 +9803,7 @@ var $d = ["src"], ef = {
|
|
|
9761
9803
|
_: 1
|
|
9762
9804
|
}, 8, ["collapsed", "activity-type"]));
|
|
9763
9805
|
}
|
|
9764
|
-
}),
|
|
9806
|
+
}), dg = { class: "ai-activity-message-title-icon" }, fg = { class: "ai-activity-message-title-text" }, pg = { class: "ai-knowledge-rag-content" }, mg = /* @__PURE__ */ m({
|
|
9765
9807
|
__name: "knowledge-rag-content",
|
|
9766
9808
|
props: /* @__PURE__ */ y({
|
|
9767
9809
|
content: {},
|
|
@@ -9774,22 +9816,22 @@ var $d = ["src"], ef = {
|
|
|
9774
9816
|
emits: ["update:collapsed"],
|
|
9775
9817
|
setup(e) {
|
|
9776
9818
|
let t = e, n = z(e, "collapsed"), r = a(() => t.status === J.Pending || t.status === J.Streaming), i = a(() => r.value ? G("检索中") : G("检索完成"));
|
|
9777
|
-
return (t, a) => (k(), o(
|
|
9819
|
+
return (t, a) => (k(), o(th, {
|
|
9778
9820
|
collapsed: n.value,
|
|
9779
9821
|
"onUpdate:collapsed": a[0] || (a[0] = (e) => n.value = e)
|
|
9780
9822
|
}, {
|
|
9781
|
-
title: H(() => [l("span",
|
|
9823
|
+
title: H(() => [l("span", dg, [r.value ? (k(), o(yr, { key: 0 })) : (k(), o(L(qt), {
|
|
9782
9824
|
key: 1,
|
|
9783
9825
|
style: { "font-size": "12px" }
|
|
9784
|
-
}))]), l("span",
|
|
9826
|
+
}))]), l("span", fg, I(i.value), 1)]),
|
|
9785
9827
|
default: H(() => {
|
|
9786
9828
|
var t, n;
|
|
9787
|
-
return [l("div",
|
|
9829
|
+
return [l("div", pg, [f(Jl, { content: ((t = e.content) == null ? void 0 : t.content) || "" }, null, 8, ["content"])]), f(Xl, { content: ((n = e.content) == null ? void 0 : n.referenceDocument) || [] }, null, 8, ["content"])];
|
|
9788
9830
|
}),
|
|
9789
9831
|
_: 1
|
|
9790
9832
|
}, 8, ["collapsed"]));
|
|
9791
9833
|
}
|
|
9792
|
-
}),
|
|
9834
|
+
}), hg = { class: "ai-activity-message-title-icon" }, gg = { class: "ai-activity-message-title-text" }, _g = /* @__PURE__ */ m({
|
|
9793
9835
|
__name: "reference-doc-content",
|
|
9794
9836
|
props: /* @__PURE__ */ y({
|
|
9795
9837
|
content: {},
|
|
@@ -9805,16 +9847,16 @@ var $d = ["src"], ef = {
|
|
|
9805
9847
|
let r = (e = (n = t.content) == null ? void 0 : n.length) == null ? 0 : e;
|
|
9806
9848
|
return mt ? `Reference ${r} documents as reference` : `引用 ${r} 篇资料作为参考`;
|
|
9807
9849
|
});
|
|
9808
|
-
return (t, i) => (k(), o(
|
|
9850
|
+
return (t, i) => (k(), o(th, {
|
|
9809
9851
|
collapsed: n.value,
|
|
9810
9852
|
"onUpdate:collapsed": i[0] || (i[0] = (e) => n.value = e)
|
|
9811
9853
|
}, {
|
|
9812
|
-
title: H(() => [l("span",
|
|
9854
|
+
title: H(() => [l("span", hg, [f(L(qt), { style: { "font-size": "12px" } })]), l("span", gg, I(r.value), 1)]),
|
|
9813
9855
|
default: H(() => [f(Xl, { content: e.content || [] }, null, 8, ["content"])]),
|
|
9814
9856
|
_: 1
|
|
9815
9857
|
}, 8, ["collapsed"]));
|
|
9816
9858
|
}
|
|
9817
|
-
}),
|
|
9859
|
+
}), vg = /* @__PURE__ */ m({
|
|
9818
9860
|
__name: "activity-message",
|
|
9819
9861
|
props: /* @__PURE__ */ y({
|
|
9820
9862
|
activityType: {},
|
|
@@ -9834,9 +9876,9 @@ var $d = ["src"], ef = {
|
|
|
9834
9876
|
emits: ["update:collapsed"],
|
|
9835
9877
|
setup(e) {
|
|
9836
9878
|
let t = {
|
|
9837
|
-
[_t.FlowAgent]:
|
|
9838
|
-
[_t.KnowledgeRag]:
|
|
9839
|
-
[_t.ReferenceDocument]:
|
|
9879
|
+
[_t.FlowAgent]: ug,
|
|
9880
|
+
[_t.KnowledgeRag]: mg,
|
|
9881
|
+
[_t.ReferenceDocument]: _g
|
|
9840
9882
|
}, n = e, r = z(e, "collapsed"), i = a(() => {
|
|
9841
9883
|
var e;
|
|
9842
9884
|
return t[(e = n.activityType) == null ? "" : e];
|
|
@@ -9857,7 +9899,7 @@ var $d = ["src"], ef = {
|
|
|
9857
9899
|
"status"
|
|
9858
9900
|
])) : s("", !0);
|
|
9859
9901
|
}
|
|
9860
|
-
}),
|
|
9902
|
+
}), yg = { class: "ai-toolcall-desc" }, bg = { class: "desc-title" }, xg = { class: "desc-panel" }, Sg = { class: "desc-label" }, Cg = { class: "desc-value" }, wg = /* @__PURE__ */ m({
|
|
9861
9903
|
__name: "desc-panel",
|
|
9862
9904
|
props: {
|
|
9863
9905
|
desc: {},
|
|
@@ -9871,19 +9913,19 @@ var $d = ["src"], ef = {
|
|
|
9871
9913
|
return n.desc;
|
|
9872
9914
|
}
|
|
9873
9915
|
});
|
|
9874
|
-
return (n, a) => (k(), c("div",
|
|
9916
|
+
return (n, a) => (k(), c("div", yg, [l("div", bg, I(t.title), 1), l("div", xg, [i.value !== null && typeof i.value == "object" ? (k(!0), c(e, { key: 0 }, M(i.value, (e, t) => (k(), c("div", {
|
|
9875
9917
|
key: t,
|
|
9876
9918
|
class: "desc-panel-item"
|
|
9877
|
-
}, [l("span",
|
|
9919
|
+
}, [l("span", Sg, [f(L(Qm), { text: String(t) }, null, 8, ["text"]), a[0] || (a[0] = d(":", -1))]), l("span", Cg, [f(L(Qm), {
|
|
9878
9920
|
style: { "word-break": "break-all" },
|
|
9879
9921
|
text: r(e)
|
|
9880
|
-
}, null, 8, ["text"])])]))), 128)) : (k(), o(L(
|
|
9922
|
+
}, null, 8, ["text"])])]))), 128)) : (k(), o(L(Qm), {
|
|
9881
9923
|
key: 1,
|
|
9882
9924
|
style: { wordBreak: "break-all" },
|
|
9883
9925
|
text: r(i.value)
|
|
9884
9926
|
}, null, 8, ["text"]))])]));
|
|
9885
9927
|
}
|
|
9886
|
-
}),
|
|
9928
|
+
}), Tg = { class: "ai-tool-message" }, Eg = /* @__PURE__ */ m({
|
|
9887
9929
|
__name: "tool-message",
|
|
9888
9930
|
props: {
|
|
9889
9931
|
duration: {},
|
|
@@ -9899,15 +9941,15 @@ var $d = ["src"], ef = {
|
|
|
9899
9941
|
property: {}
|
|
9900
9942
|
},
|
|
9901
9943
|
setup(e) {
|
|
9902
|
-
return (t, n) => (k(), c("div",
|
|
9944
|
+
return (t, n) => (k(), c("div", Tg, [f(wg, {
|
|
9903
9945
|
desc: e.content || (typeof e.error == "string" ? e.error : void 0),
|
|
9904
9946
|
title: L(G)("返回内容")
|
|
9905
9947
|
}, null, 8, ["desc", "title"])]));
|
|
9906
9948
|
}
|
|
9907
|
-
}),
|
|
9949
|
+
}), Dg = { class: "ai-toolcall-render" }, Og = { class: "toolcall-header-title" }, kg = { class: "toolcall-status-title" }, Ag = {
|
|
9908
9950
|
key: 1,
|
|
9909
9951
|
class: "toolcall-duration"
|
|
9910
|
-
},
|
|
9952
|
+
}, jg = { class: "ai-toolcall-render-content" }, Mg = /* @__PURE__ */ m({
|
|
9911
9953
|
__name: "toolcall-render",
|
|
9912
9954
|
props: {
|
|
9913
9955
|
duration: {},
|
|
@@ -9940,6 +9982,7 @@ var $d = ["src"], ef = {
|
|
|
9940
9982
|
switch (t.status) {
|
|
9941
9983
|
default:
|
|
9942
9984
|
case J.Pending: return G("调用中");
|
|
9985
|
+
case J.Completed:
|
|
9943
9986
|
case J.Complete:
|
|
9944
9987
|
case J.Success: return G("调用成功");
|
|
9945
9988
|
case J.Error || ((e = t.toolCall) == null || (e = e.toolMessage) == null ? void 0 : e.error): return G("调用失败");
|
|
@@ -9951,89 +9994,81 @@ var $d = ["src"], ef = {
|
|
|
9951
9994
|
});
|
|
9952
9995
|
return (t, n) => {
|
|
9953
9996
|
var r, a, u, p;
|
|
9954
|
-
return k(), c("div",
|
|
9997
|
+
return k(), c("div", Dg, [l("div", {
|
|
9955
9998
|
class: S(["ai-toolcall-render-header", `toolcall-status-${e.status}`]),
|
|
9956
9999
|
onClick: h
|
|
9957
10000
|
}, [
|
|
9958
10001
|
f(L(Zt), { class: S({ "is-collapsed": m.value }) }, null, 8, ["class"]),
|
|
9959
10002
|
d(" " + I((r = e.toolCall) != null && r.function.mcpName ? L(G)("调用 MCP:") : L(G)("调用工具:")) + " ", 1),
|
|
9960
|
-
U((k(), c("span",
|
|
10003
|
+
U((k(), c("span", Og, [f(L(Qm), { text: g.value }, null, 8, ["text"])])), [[L(Pi), X(X({}, L(i)), {}, {
|
|
9961
10004
|
text: g.value,
|
|
9962
10005
|
appendTo: "parent"
|
|
9963
10006
|
})]]),
|
|
9964
|
-
l("span",
|
|
10007
|
+
l("span", kg, [
|
|
9965
10008
|
e.status === L(J).Pending || e.status === L(J).Streaming ? (k(), o(L(me), {
|
|
9966
10009
|
key: 0,
|
|
9967
10010
|
mode: "spin",
|
|
9968
10011
|
size: "mini",
|
|
9969
10012
|
theme: "primary"
|
|
9970
10013
|
})) : s("", !0),
|
|
9971
|
-
f(L(
|
|
9972
|
-
v.value ? (k(), c("span",
|
|
10014
|
+
f(L(Qm), { text: _.value }, null, 8, ["text"]),
|
|
10015
|
+
v.value ? (k(), c("span", Ag, " (" + I(v.value) + ") ", 1)) : s("", !0)
|
|
9973
10016
|
])
|
|
9974
|
-
], 2), U(l("div",
|
|
9975
|
-
f(
|
|
10017
|
+
], 2), U(l("div", jg, [
|
|
10018
|
+
f(wg, {
|
|
9976
10019
|
desc: (a = e.toolCall) == null ? void 0 : a.function.description,
|
|
9977
10020
|
title: L(G)("描述")
|
|
9978
10021
|
}, null, 8, ["desc", "title"]),
|
|
9979
|
-
f(
|
|
10022
|
+
f(wg, {
|
|
9980
10023
|
desc: (u = e.toolCall) == null ? void 0 : u.function.arguments,
|
|
9981
10024
|
title: L(G)("参数")
|
|
9982
10025
|
}, null, 8, ["desc", "title"]),
|
|
9983
|
-
(p = e.toolCall) != null && p.toolMessage ? (k(), o(
|
|
10026
|
+
(p = e.toolCall) != null && p.toolMessage ? (k(), o(Eg, C(b({ key: 0 }, e.toolCall.toolMessage)), null, 16)) : s("", !0)
|
|
9984
10027
|
], 512), [[ae, !m.value]])]);
|
|
9985
10028
|
};
|
|
9986
10029
|
}
|
|
9987
|
-
}),
|
|
10030
|
+
}), Ng = { class: "ai-message-artifacts" }, Pg = /* @__PURE__ */ m({
|
|
9988
10031
|
__name: "message-artifacts",
|
|
9989
10032
|
props: {
|
|
9990
10033
|
artifacts: {},
|
|
9991
|
-
messageUid: {},
|
|
9992
10034
|
onDownload: { type: Function },
|
|
9993
10035
|
onPreview: { type: Function }
|
|
9994
10036
|
},
|
|
9995
10037
|
setup(t) {
|
|
9996
|
-
return (n, r) => (k(), c("div",
|
|
10038
|
+
return (n, r) => (k(), c("div", Ng, [(k(!0), c(e, null, M(t.artifacts, (e) => (k(), o(vp, {
|
|
9997
10039
|
key: e.outputId,
|
|
9998
10040
|
file: e,
|
|
9999
|
-
index: n,
|
|
10000
|
-
"message-uid": t.messageUid,
|
|
10001
10041
|
"on-download": t.onDownload,
|
|
10002
10042
|
"on-preview": t.onPreview
|
|
10003
10043
|
}, null, 8, [
|
|
10004
10044
|
"file",
|
|
10005
|
-
"index",
|
|
10006
|
-
"message-uid",
|
|
10007
10045
|
"on-download",
|
|
10008
10046
|
"on-preview"
|
|
10009
10047
|
]))), 128))]));
|
|
10010
10048
|
}
|
|
10011
|
-
}),
|
|
10049
|
+
}), Fg = { class: "ai-assistant-message" }, Ig = {
|
|
10012
10050
|
key: 0,
|
|
10013
10051
|
class: "ai-assistant-message-content"
|
|
10014
|
-
},
|
|
10052
|
+
}, Lg = /* @__PURE__ */ m({
|
|
10015
10053
|
__name: "assistant-message",
|
|
10016
10054
|
props: {
|
|
10017
|
-
toolCalls: {},
|
|
10018
10055
|
content: {},
|
|
10019
10056
|
id: {},
|
|
10020
10057
|
messageId: {},
|
|
10021
10058
|
name: {},
|
|
10059
|
+
property: {},
|
|
10022
10060
|
role: {},
|
|
10023
10061
|
status: {},
|
|
10024
|
-
|
|
10025
|
-
|
|
10062
|
+
toolCalls: {},
|
|
10063
|
+
uid: {}
|
|
10026
10064
|
},
|
|
10027
10065
|
setup(t) {
|
|
10028
10066
|
let n = t, r = a(() => {
|
|
10029
10067
|
var e;
|
|
10030
10068
|
return (e = n.property) == null ? void 0 : e.artifacts;
|
|
10031
|
-
}), i = a(() => {
|
|
10032
|
-
var e;
|
|
10033
|
-
return (e = n.uid) == null ? n.id == null ? "" : String(n.id) : e;
|
|
10034
10069
|
});
|
|
10035
|
-
return (n,
|
|
10036
|
-
t.content ? (k(), c("div",
|
|
10070
|
+
return (n, i) => (k(), c("div", Fg, [
|
|
10071
|
+
t.content ? (k(), c("div", Ig, [N(n.$slots, "default", C(h({ content: t.content })), () => [f(Zl, {
|
|
10037
10072
|
content: t.content || "",
|
|
10038
10073
|
status: t.status,
|
|
10039
10074
|
type: L(_t).Text
|
|
@@ -10044,20 +10079,19 @@ var $d = ["src"], ef = {
|
|
|
10044
10079
|
])])])) : s("", !0),
|
|
10045
10080
|
t.toolCalls && t.toolCalls.length > 0 ? (k(!0), c(e, { key: 1 }, M(t.toolCalls, (e) => {
|
|
10046
10081
|
var n, r;
|
|
10047
|
-
return k(), o(
|
|
10082
|
+
return k(), o(Mg, {
|
|
10048
10083
|
key: e.id,
|
|
10049
10084
|
status: (n = (r = e.toolMessage) == null ? void 0 : r.status) == null ? t.status : n,
|
|
10050
10085
|
"tool-call": e
|
|
10051
10086
|
}, null, 8, ["status", "tool-call"]);
|
|
10052
10087
|
}), 128)) : s("", !0),
|
|
10053
|
-
r.value && r.value.length > 0 ? (k(), o(
|
|
10088
|
+
r.value && r.value.length > 0 ? (k(), o(Pg, {
|
|
10054
10089
|
key: 2,
|
|
10055
|
-
artifacts: r.value
|
|
10056
|
-
|
|
10057
|
-
}, null, 8, ["artifacts", "message-uid"])) : s("", !0)
|
|
10090
|
+
artifacts: r.value
|
|
10091
|
+
}, null, 8, ["artifacts"])) : s("", !0)
|
|
10058
10092
|
]));
|
|
10059
10093
|
}
|
|
10060
|
-
}),
|
|
10094
|
+
}), Rg = { class: "ai-info-message" }, zg = { class: "ai-info-message-body" }, Bg = /* @__PURE__ */ m({
|
|
10061
10095
|
__name: "info-message",
|
|
10062
10096
|
props: {
|
|
10063
10097
|
content: {},
|
|
@@ -10070,18 +10104,18 @@ var $d = ["src"], ef = {
|
|
|
10070
10104
|
property: {}
|
|
10071
10105
|
},
|
|
10072
10106
|
setup(t) {
|
|
10073
|
-
return (n, r) => (k(), c("div",
|
|
10107
|
+
return (n, r) => (k(), c("div", Rg, [l("div", zg, [(k(!0), c(e, null, M(Array.isArray(t.content) ? t.content : [t.content], (e, t) => (k(), c("div", {
|
|
10074
10108
|
key: t,
|
|
10075
10109
|
class: "ai-info-message-content"
|
|
10076
|
-
}, I(e), 1))), 128))]));
|
|
10110
|
+
}, I(e), 1))), 128))])]));
|
|
10077
10111
|
}
|
|
10078
|
-
}),
|
|
10112
|
+
}), Vg = { class: "ai-tool-approval-card" }, Hg = { class: "ai-tool-approval-card__header" }, Ug = { class: "ai-tool-approval-card__title-wrap" }, Wg = { class: "ai-tool-approval-card__title" }, Gg = { class: "ai-tool-approval-card__fields" }, Kg = { class: "ai-tool-approval-card__field" }, qg = { class: "ai-tool-approval-card__field" }, Jg = {
|
|
10079
10113
|
key: 0,
|
|
10080
10114
|
class: "ai-tool-approval-card__processor"
|
|
10081
|
-
},
|
|
10115
|
+
}, Yg = { class: "ai-tool-approval-card__processor-text" }, Xg = { class: "ai-tool-approval-card__actions" }, Zg = {
|
|
10082
10116
|
key: 1,
|
|
10083
10117
|
class: "ai-tool-approval-card__cancel-wrap"
|
|
10084
|
-
},
|
|
10118
|
+
}, Qg = 2e3, $g = /* @__PURE__ */ m({
|
|
10085
10119
|
__name: "tool-approval-card",
|
|
10086
10120
|
props: {
|
|
10087
10121
|
interrupt: {},
|
|
@@ -10122,7 +10156,7 @@ var $d = ["src"], ef = {
|
|
|
10122
10156
|
}, A = F(!1), ee = F(!1), j, te = () => {
|
|
10123
10157
|
ee.value = !0, clearTimeout(j), j = setTimeout(() => {
|
|
10124
10158
|
ee.value = !1;
|
|
10125
|
-
},
|
|
10159
|
+
}, Qg);
|
|
10126
10160
|
}, M = () => {
|
|
10127
10161
|
var e;
|
|
10128
10162
|
A.value || (A.value = !0, te(), (e = t.onInterruptResume) == null || e.call(t, {
|
|
@@ -10136,10 +10170,10 @@ var $d = ["src"], ef = {
|
|
|
10136
10170
|
payload: { interrupt_id: t.interrupt.id }
|
|
10137
10171
|
}, t.interrupt));
|
|
10138
10172
|
};
|
|
10139
|
-
return O(() => clearTimeout(j)), (t, r) => (k(), c("section",
|
|
10140
|
-
l("header",
|
|
10173
|
+
return O(() => clearTimeout(j)), (t, r) => (k(), c("section", Vg, [
|
|
10174
|
+
l("header", Hg, [l("div", Ug, [
|
|
10141
10175
|
r[0] || (r[0] = l("span", { class: "ai-tool-approval-card__title-bar" }, null, -1)),
|
|
10142
|
-
l("span",
|
|
10176
|
+
l("span", Wg, I(h.value.title || L(G)("算法方案评审单")), 1),
|
|
10143
10177
|
U(f(L(er), {
|
|
10144
10178
|
class: S(["ai-tool-approval-card__copy-icon", { "is-disabled": !C.value }]),
|
|
10145
10179
|
onClick: D
|
|
@@ -10173,9 +10207,9 @@ var $d = ["src"], ef = {
|
|
|
10173
10207
|
size: "mini",
|
|
10174
10208
|
theme: "primary"
|
|
10175
10209
|
})), d(" " + I(b.value), 1)], 2)]),
|
|
10176
|
-
l("dl",
|
|
10177
|
-
v.value ? (k(), c("div",
|
|
10178
|
-
l("div",
|
|
10210
|
+
l("dl", Gg, [l("div", Kg, [l("dt", null, I(L(G)("单据编号")), 1), l("dd", null, I(h.value.sn || "--"), 1)]), l("div", qg, [l("dt", null, I(L(G)("提交时间")), 1), l("dd", null, I(h.value.submit_time || "--"), 1)])]),
|
|
10211
|
+
v.value ? (k(), c("div", Jg, [f(L(Pn), { class: "ai-tool-approval-card__processor-icon" }), U((k(), c("span", Yg, [d(I(L(G)("当前处理人")) + ":" + I(x.value), 1)])), [[L(Pi), X({}, L(n))]])])) : s("", !0),
|
|
10212
|
+
l("div", Xg, [f(L(W), {
|
|
10179
10213
|
class: "ai-tool-approval-card__detail",
|
|
10180
10214
|
disabled: !h.value.url,
|
|
10181
10215
|
theme: "primary",
|
|
@@ -10194,7 +10228,7 @@ var $d = ["src"], ef = {
|
|
|
10194
10228
|
}, {
|
|
10195
10229
|
default: H(() => [d(I(L(G)("取消审批")), 1)]),
|
|
10196
10230
|
_: 1
|
|
10197
|
-
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) : U((k(), c("span",
|
|
10231
|
+
}, 8, ["disabled", "loading"])) : e.readonly ? s("", !0) : U((k(), c("span", Zg, [f(L(W), {
|
|
10198
10232
|
class: "ai-tool-approval-card__cancel",
|
|
10199
10233
|
disabled: "",
|
|
10200
10234
|
outline: ""
|
|
@@ -10208,13 +10242,13 @@ var $d = ["src"], ef = {
|
|
|
10208
10242
|
})]])])
|
|
10209
10243
|
]));
|
|
10210
10244
|
}
|
|
10211
|
-
}),
|
|
10245
|
+
}), e_ = { class: "ai-interrupt-message" }, t_ = {
|
|
10212
10246
|
key: 0,
|
|
10213
10247
|
class: "ai-interrupt-message__content"
|
|
10214
|
-
},
|
|
10248
|
+
}, n_ = {
|
|
10215
10249
|
key: 1,
|
|
10216
10250
|
class: "ai-interrupt-message__fallback"
|
|
10217
|
-
},
|
|
10251
|
+
}, r_ = /* @__PURE__ */ m({
|
|
10218
10252
|
__name: "interrupt-message",
|
|
10219
10253
|
props: {
|
|
10220
10254
|
content: {},
|
|
@@ -10228,14 +10262,14 @@ var $d = ["src"], ef = {
|
|
|
10228
10262
|
onInterruptResume: { type: Function }
|
|
10229
10263
|
},
|
|
10230
10264
|
setup(t) {
|
|
10231
|
-
let n = { [gt.AIDevToolApproval]:
|
|
10265
|
+
let n = { [gt.AIDevToolApproval]: $g }, r = (e) => ({
|
|
10232
10266
|
id: e.interruptId || e.id || "",
|
|
10233
10267
|
reason: gt.AIDevToolApproval,
|
|
10234
10268
|
toolCallId: "",
|
|
10235
10269
|
metadata: e.payload.metadata
|
|
10236
10270
|
}), i = {
|
|
10237
10271
|
[gt.AIDevToolApproval]: (e) => ({
|
|
10238
|
-
component:
|
|
10272
|
+
component: $g,
|
|
10239
10273
|
props: {
|
|
10240
10274
|
interrupt: r(e),
|
|
10241
10275
|
onInterruptResume: d.onInterruptResume,
|
|
@@ -10264,13 +10298,13 @@ var $d = ["src"], ef = {
|
|
|
10264
10298
|
let r = (t = d.content) == null ? void 0 : t.result;
|
|
10265
10299
|
if (r) return (n = i[r.reason]) == null ? void 0 : n.call(i, r);
|
|
10266
10300
|
});
|
|
10267
|
-
return (n, r) => (k(), c("div",
|
|
10268
|
-
p.value ? (k(), c("div",
|
|
10301
|
+
return (n, r) => (k(), c("div", e_, [
|
|
10302
|
+
p.value ? (k(), c("div", t_, I(p.value), 1)) : s("", !0),
|
|
10269
10303
|
(k(!0), c(e, null, M(f.value, (n) => (k(), c(e, { key: n.toolCallId }, [m(n) ? (k(), o(P(m(n)), {
|
|
10270
10304
|
key: 0,
|
|
10271
10305
|
interrupt: n,
|
|
10272
10306
|
"on-interrupt-resume": t.onInterruptResume
|
|
10273
|
-
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div",
|
|
10307
|
+
}, null, 40, ["interrupt", "on-interrupt-resume"])) : g(n) ? s("", !0) : (k(), c("div", n_, I(n.message || L(G)("暂不支持的中断消息")), 1))], 64))), 128)),
|
|
10274
10308
|
_.value ? (k(), o(P(_.value.component), C(b({ key: 1 }, _.value.props)), u({ _: 2 }, [n.$slots.answeredQuestion ? {
|
|
10275
10309
|
name: "answer",
|
|
10276
10310
|
fn: H((e) => [N(n.$slots, "answeredQuestion", C(h(e)))]),
|
|
@@ -10278,15 +10312,15 @@ var $d = ["src"], ef = {
|
|
|
10278
10312
|
} : void 0]), 1040)) : s("", !0)
|
|
10279
10313
|
]));
|
|
10280
10314
|
}
|
|
10281
|
-
}),
|
|
10315
|
+
}), i_ = { class: "ai-loading-message" }, a_ = /* @__PURE__ */ m({
|
|
10282
10316
|
__name: "loading-message",
|
|
10283
10317
|
setup(e) {
|
|
10284
|
-
return (e, t) => (k(), c("div",
|
|
10318
|
+
return (e, t) => (k(), c("div", i_, [f(yr, { size: 18 }), N(e.$slots, "default", {}, () => [d(I(L(G)("请求中...")), 1)])]));
|
|
10285
10319
|
}
|
|
10286
|
-
}),
|
|
10320
|
+
}), o_ = { class: "ai-reasoning-message" }, s_ = {
|
|
10287
10321
|
key: 0,
|
|
10288
10322
|
class: "ai-reasoning-message-title-icon"
|
|
10289
|
-
},
|
|
10323
|
+
}, c_ = { class: "ai-reasoning-message-title-text" }, l_ = { class: "ai-reasoning-message-content" }, u_ = /* @__PURE__ */ m({
|
|
10290
10324
|
__name: "reasoning-message",
|
|
10291
10325
|
props: /* @__PURE__ */ y({
|
|
10292
10326
|
duration: {},
|
|
@@ -10322,7 +10356,7 @@ var $d = ["src"], ef = {
|
|
|
10322
10356
|
});
|
|
10323
10357
|
return (n, i) => {
|
|
10324
10358
|
var a;
|
|
10325
|
-
return k(), c("div",
|
|
10359
|
+
return k(), c("div", o_, [l("div", {
|
|
10326
10360
|
class: S(["ai-reasoning-message-title", {
|
|
10327
10361
|
"ai-reasoning-message-title-collapsed": r.value,
|
|
10328
10362
|
"is-thinking": t.status === L(J).Pending || t.status === L(J).Streaming,
|
|
@@ -10331,10 +10365,10 @@ var $d = ["src"], ef = {
|
|
|
10331
10365
|
}]),
|
|
10332
10366
|
onClick: i[0] || (i[0] = (e) => r.value = !r.value)
|
|
10333
10367
|
}, [
|
|
10334
|
-
t.status === L(J).Pending || t.status === L(J).Streaming ? (k(), c("span",
|
|
10335
|
-
l("span",
|
|
10368
|
+
t.status === L(J).Pending || t.status === L(J).Streaming ? (k(), c("span", s_, [f(yr)])) : s("", !0),
|
|
10369
|
+
l("span", c_, I(u.value), 1),
|
|
10336
10370
|
l("span", { class: S(["ai-reasoning-message-title-icon collapsed-icon", { "is-collapsed": r.value }]) }, [f(L(Wn))], 2)
|
|
10337
|
-
], 2), U(l("div",
|
|
10371
|
+
], 2), U(l("div", l_, [t.status === L(J).Error ? (k(), o(kl, {
|
|
10338
10372
|
key: 0,
|
|
10339
10373
|
content: ((a = t.content) == null ? void 0 : a.join("\n")) || ""
|
|
10340
10374
|
}, null, 8, ["content"])) : (k(!0), c(e, { key: 1 }, M(Array.isArray(t.content) ? t.content : [t.content], (e) => (k(), o(Jl, {
|
|
@@ -10343,50 +10377,50 @@ var $d = ["src"], ef = {
|
|
|
10343
10377
|
}, null, 8, ["content"]))), 128))], 512), [[ae, !r.value]])]);
|
|
10344
10378
|
};
|
|
10345
10379
|
}
|
|
10346
|
-
}),
|
|
10380
|
+
}), d_ = { class: "ai-key-value-content" }, f_ = {
|
|
10347
10381
|
key: 0,
|
|
10348
10382
|
class: "ai-key-value-title"
|
|
10349
|
-
},
|
|
10383
|
+
}, p_ = { class: "ai-key-value-content" }, m_ = { class: "item-key" }, h_ = { class: "item-value" }, g_ = /* @__PURE__ */ m({
|
|
10350
10384
|
__name: "key-value-content",
|
|
10351
10385
|
props: {
|
|
10352
10386
|
content: {},
|
|
10353
10387
|
title: {}
|
|
10354
10388
|
},
|
|
10355
10389
|
setup(t) {
|
|
10356
|
-
return (n, r) => (k(), c("div",
|
|
10390
|
+
return (n, r) => (k(), c("div", d_, [t.title ? (k(), c("div", f_, [f(L(Un)), d(" " + I(t.title), 1)])) : s("", !0), l("div", p_, [(k(!0), c(e, null, M(t.content, (e) => (k(), c("div", {
|
|
10357
10391
|
key: e.key,
|
|
10358
10392
|
class: "key-value-item"
|
|
10359
10393
|
}, [
|
|
10360
|
-
l("div",
|
|
10394
|
+
l("div", m_, I(e.key), 1),
|
|
10361
10395
|
r[0] || (r[0] = d(" : ", -1)),
|
|
10362
|
-
l("div",
|
|
10396
|
+
l("div", h_, I(e.value), 1)
|
|
10363
10397
|
]))), 128))])]));
|
|
10364
10398
|
}
|
|
10365
|
-
}),
|
|
10399
|
+
}), __ = { class: "ai-text-content" }, v_ = /* @__PURE__ */ m({
|
|
10366
10400
|
__name: "text-content",
|
|
10367
10401
|
props: { content: {} },
|
|
10368
10402
|
setup(e) {
|
|
10369
|
-
return (t, n) => (k(), c("div",
|
|
10403
|
+
return (t, n) => (k(), c("div", __, I(e.content), 1));
|
|
10370
10404
|
}
|
|
10371
|
-
}),
|
|
10405
|
+
}), y_ = { class: "ai-user-message" }, b_ = {
|
|
10372
10406
|
key: 0,
|
|
10373
10407
|
class: "ai-user-message-binary-files"
|
|
10374
|
-
},
|
|
10408
|
+
}, x_ = {
|
|
10375
10409
|
key: 1,
|
|
10376
10410
|
class: "ai-user-message-content"
|
|
10377
|
-
},
|
|
10411
|
+
}, S_ = { class: "user-edit-footer" }, C_ = /* @__PURE__ */ m({
|
|
10378
10412
|
__name: "user-message",
|
|
10379
10413
|
props: {
|
|
10380
10414
|
content: {},
|
|
10381
10415
|
id: {},
|
|
10382
10416
|
messageId: {},
|
|
10383
10417
|
name: {},
|
|
10418
|
+
onAction: { type: Function },
|
|
10419
|
+
property: {},
|
|
10384
10420
|
role: {},
|
|
10385
10421
|
status: {},
|
|
10386
|
-
uid: {},
|
|
10387
|
-
property: {},
|
|
10388
|
-
onAction: { type: Function },
|
|
10389
10422
|
tippyOptions: {},
|
|
10423
|
+
uid: {},
|
|
10390
10424
|
messageToolsStatus: {},
|
|
10391
10425
|
onInputConfirm: { type: Function },
|
|
10392
10426
|
onShortcutConfirm: { type: Function }
|
|
@@ -10480,7 +10514,7 @@ var $d = ["src"], ef = {
|
|
|
10480
10514
|
}();
|
|
10481
10515
|
return (n, i) => {
|
|
10482
10516
|
var a, v;
|
|
10483
|
-
return k(), c("div",
|
|
10517
|
+
return k(), c("div", y_, [g.value && typeof g.value == "string" ? (k(), o(Id, {
|
|
10484
10518
|
key: 0,
|
|
10485
10519
|
class: "ai-user-message-cite",
|
|
10486
10520
|
content: g.value
|
|
@@ -10499,7 +10533,7 @@ var $d = ["src"], ef = {
|
|
|
10499
10533
|
"on-send-message": A,
|
|
10500
10534
|
"support-upload": (a = (v = L(r)) == null ? void 0 : v.supportUpload.value) == null ? !1 : a
|
|
10501
10535
|
}, {
|
|
10502
|
-
"send-icon": H(() => [l("div",
|
|
10536
|
+
"send-icon": H(() => [l("div", S_, [f(L(W), {
|
|
10503
10537
|
size: "small",
|
|
10504
10538
|
onClick: E
|
|
10505
10539
|
}, {
|
|
@@ -10519,7 +10553,7 @@ var $d = ["src"], ef = {
|
|
|
10519
10553
|
"default-upload-files",
|
|
10520
10554
|
"support-upload"
|
|
10521
10555
|
]))], 64)) : (k(), c(e, { key: 1 }, [
|
|
10522
|
-
y.value.length ? (k(), c(e, { key: 0 }, [x.value.length ? (k(), c("div",
|
|
10556
|
+
y.value.length ? (k(), c(e, { key: 0 }, [x.value.length ? (k(), c("div", b_, [f(mf, {
|
|
10523
10557
|
files: x.value,
|
|
10524
10558
|
readonly: !0
|
|
10525
10559
|
}, null, 8, ["files"])])) : s("", !0), (k(!0), c(e, null, M(S.value, (e, t) => {
|
|
@@ -10532,15 +10566,15 @@ var $d = ["src"], ef = {
|
|
|
10532
10566
|
readonly: !0
|
|
10533
10567
|
}, null, 8, ["files"])]);
|
|
10534
10568
|
}), 128))], 64)) : s("", !0),
|
|
10535
|
-
g.value || C.value.length ? (k(), c("div",
|
|
10569
|
+
g.value || C.value.length ? (k(), c("div", x_, [Array.isArray(g.value) ? (k(), o(g_, {
|
|
10536
10570
|
key: 0,
|
|
10537
10571
|
content: g.value,
|
|
10538
10572
|
title: h.value
|
|
10539
|
-
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 }, M(C.value, (e, t) => (k(), o(
|
|
10573
|
+
}, null, 8, ["content", "title"])) : t.content ? (k(!0), c(e, { key: 1 }, M(C.value, (e, t) => (k(), o(v_, {
|
|
10540
10574
|
key: t,
|
|
10541
10575
|
content: e
|
|
10542
10576
|
}, null, 8, ["content"]))), 128)) : s("", !0)])) : s("", !0),
|
|
10543
|
-
t.messageToolsStatus === L(Ad).Hidden ? s("", !0) : (k(), o(
|
|
10577
|
+
t.messageToolsStatus === L(Ad).Hidden ? s("", !0) : (k(), o(Zm, {
|
|
10544
10578
|
key: 2,
|
|
10545
10579
|
class: "ai-user-message-tools",
|
|
10546
10580
|
"message-tools": L(At),
|
|
@@ -10556,7 +10590,7 @@ var $d = ["src"], ef = {
|
|
|
10556
10590
|
], 64))]);
|
|
10557
10591
|
};
|
|
10558
10592
|
}
|
|
10559
|
-
}),
|
|
10593
|
+
}), w_ = /* @__PURE__ */ m({
|
|
10560
10594
|
__name: "message-render",
|
|
10561
10595
|
props: {
|
|
10562
10596
|
messageToolsStatus: {},
|
|
@@ -10570,39 +10604,39 @@ var $d = ["src"], ef = {
|
|
|
10570
10604
|
setup(e) {
|
|
10571
10605
|
let t = e, n = ie(), r = a(() => {
|
|
10572
10606
|
switch (t.message.role) {
|
|
10573
|
-
case q.User: return g(
|
|
10607
|
+
case q.User: return g(C_, X(X({}, t.message), {}, {
|
|
10574
10608
|
onAction: t.onAction,
|
|
10575
10609
|
onInputConfirm: t.onInputConfirm,
|
|
10576
10610
|
onShortcutConfirm: t.onShortcutConfirm,
|
|
10577
10611
|
messageToolsStatus: t.messageToolsStatus,
|
|
10578
10612
|
tippyOptions: t.tippyOptions
|
|
10579
10613
|
}));
|
|
10580
|
-
case q.Assistant: return g(
|
|
10614
|
+
case q.Assistant: return g(Lg, t.message, { default: (e) => N(n, "default", e, () => [g(Zl, {
|
|
10581
10615
|
content: t.message.content || "",
|
|
10582
10616
|
status: t.message.status
|
|
10583
10617
|
}, n.codeHeader ? { codeHeader: (e) => {
|
|
10584
10618
|
var t;
|
|
10585
10619
|
return (t = n.codeHeader) == null ? void 0 : t.call(n, e);
|
|
10586
10620
|
} } : void 0)]) });
|
|
10587
|
-
case q.Info: return g(
|
|
10588
|
-
case q.Reasoning: return g(
|
|
10589
|
-
case q.Tool: return g(
|
|
10590
|
-
case q.Activity: return g(
|
|
10591
|
-
case q.Interrupt: return g(
|
|
10621
|
+
case q.Info: return g(Bg, t.message);
|
|
10622
|
+
case q.Reasoning: return g(u_, t.message);
|
|
10623
|
+
case q.Tool: return g(Eg, t.message);
|
|
10624
|
+
case q.Activity: return g(vg, X(X({}, t.message), {}, { onInterruptResume: t.onInterruptResume }));
|
|
10625
|
+
case q.Interrupt: return g(r_, X(X({}, t.message), {}, { onInterruptResume: t.onInterruptResume }), n.answeredQuestion ? { answeredQuestion: (e) => {
|
|
10592
10626
|
var t;
|
|
10593
10627
|
return (t = n.answeredQuestion) == null ? void 0 : t.call(n, e);
|
|
10594
10628
|
} } : void 0);
|
|
10595
|
-
case q.Loading: return g(
|
|
10629
|
+
case q.Loading: return g(a_, t.message);
|
|
10596
10630
|
default: return null;
|
|
10597
10631
|
}
|
|
10598
10632
|
});
|
|
10599
10633
|
return (e, t) => (k(), o(P(r.value)));
|
|
10600
10634
|
}
|
|
10601
|
-
}),
|
|
10635
|
+
}), T_ = [
|
|
10602
10636
|
"id",
|
|
10603
10637
|
"onMouseenter",
|
|
10604
10638
|
"onMouseleave"
|
|
10605
|
-
],
|
|
10639
|
+
], E_ = { class: "ai-message-fixed-bottom" }, D_ = /* @__PURE__ */ m({
|
|
10606
10640
|
__name: "message-container",
|
|
10607
10641
|
props: /* @__PURE__ */ y({
|
|
10608
10642
|
enableSelection: {
|
|
@@ -10714,7 +10748,7 @@ var $d = ["src"], ef = {
|
|
|
10714
10748
|
message: e,
|
|
10715
10749
|
messageToolsStatus: t.messageToolsStatus,
|
|
10716
10750
|
onInterruptResume: n.onInterruptResume
|
|
10717
|
-
}), () => [(k(), o(
|
|
10751
|
+
}), () => [(k(), o(w_, {
|
|
10718
10752
|
key: i,
|
|
10719
10753
|
message: e,
|
|
10720
10754
|
"message-tools-status": t.messageToolsStatus,
|
|
@@ -10735,7 +10769,7 @@ var $d = ["src"], ef = {
|
|
|
10735
10769
|
"on-interrupt-resume",
|
|
10736
10770
|
"on-shortcut-confirm",
|
|
10737
10771
|
"tippy-options"
|
|
10738
|
-
]))])), 128)), t.renderMode !== L(Ft).Share && !(t.enableSelection && i.type !== L(q).Loading) && !i.pause && i.type === L(q).Assistant && t.messageToolsStatus !== L(Ad).Hidden ? (k(), o(
|
|
10772
|
+
]))])), 128)), t.renderMode !== L(Ft).Share && !(t.enableSelection && i.type !== L(q).Loading) && !i.pause && i.type === L(q).Assistant && t.messageToolsStatus !== L(Ad).Hidden ? (k(), o(Zm, {
|
|
10739
10773
|
key: 0,
|
|
10740
10774
|
"message-tools": _.value,
|
|
10741
10775
|
"message-tools-status": t.messageToolsStatus,
|
|
@@ -10755,14 +10789,14 @@ var $d = ["src"], ef = {
|
|
|
10755
10789
|
"tippy-options",
|
|
10756
10790
|
"update-tools",
|
|
10757
10791
|
"onFeedback"
|
|
10758
|
-
])) : s("", !0)], 6)])], 44,
|
|
10792
|
+
])) : s("", !0)], 6)])], 44, T_))), 128)),
|
|
10759
10793
|
l("div", {
|
|
10760
10794
|
ref_key: "messageContainerBottomRef",
|
|
10761
10795
|
ref: d,
|
|
10762
10796
|
class: "message-container-bottom",
|
|
10763
10797
|
tabindex: "0"
|
|
10764
10798
|
}, null, 512),
|
|
10765
|
-
l("div",
|
|
10799
|
+
l("div", E_, [U(f(fr, {
|
|
10766
10800
|
loading: t.messageStatus === L(J).StopLoading,
|
|
10767
10801
|
title: t.messageStatus === L(J).StopLoading ? L(G)("正在停止") : L(G)("停止生成"),
|
|
10768
10802
|
onClick: a[0] || (a[0] = (e) => r.$emit("stopStreaming"))
|
|
@@ -10778,13 +10812,13 @@ var $d = ["src"], ef = {
|
|
|
10778
10812
|
}, 8, ["title", "onClick"]), [[ae, L(m)]])])
|
|
10779
10813
|
], 512));
|
|
10780
10814
|
}
|
|
10781
|
-
}),
|
|
10815
|
+
}), O_ = { class: "ai-execution-summary" }, k_ = { class: "ai-execution-summary-header" }, A_ = { class: "ai-execution-summary-content" }, j_ = ["onMouseenter"], M_ = { class: "content-item-header" }, N_ = { class: "content-item-title" }, P_ = { class: "content-item-messages" }, F_ = {
|
|
10782
10816
|
key: 0,
|
|
10783
10817
|
class: "timeline-line"
|
|
10784
|
-
},
|
|
10818
|
+
}, I_ = {
|
|
10785
10819
|
key: 1,
|
|
10786
10820
|
class: "ai-execution-summary-content-empty"
|
|
10787
|
-
},
|
|
10821
|
+
}, L_ = { class: "ai-execution-summary-content-empty-text" }, R_ = /* @__PURE__ */ m({
|
|
10788
10822
|
__name: "execution-summary",
|
|
10789
10823
|
props: { messageGroups: {} },
|
|
10790
10824
|
emits: ["locateMessageGroup", "updateKeyword"],
|
|
@@ -10798,21 +10832,21 @@ var $d = ["src"], ef = {
|
|
|
10798
10832
|
}, h = () => {
|
|
10799
10833
|
a.value = "", r("updateKeyword", "");
|
|
10800
10834
|
};
|
|
10801
|
-
return (n, g) => (k(), c("div",
|
|
10835
|
+
return (n, g) => (k(), c("div", O_, [l("div", k_, [f(L(pe), {
|
|
10802
10836
|
modelValue: L(a),
|
|
10803
10837
|
"onUpdate:modelValue": [g[0] || (g[0] = (e) => v(a) ? a.value = e : null), g[1] || (g[1] = (e) => r("updateKeyword", e))],
|
|
10804
10838
|
class: "ai-execution-summary-header-input",
|
|
10805
10839
|
clearable: "",
|
|
10806
10840
|
placeholder: L(G)("搜索 关键字")
|
|
10807
|
-
}, null, 8, ["modelValue", "placeholder"])]), l("div",
|
|
10841
|
+
}, null, 8, ["modelValue", "placeholder"])]), l("div", A_, [t.messageGroups.length ? (k(!0), c(e, { key: 0 }, M(t.messageGroups, (n, r) => (k(), c("div", {
|
|
10808
10842
|
key: n.uid,
|
|
10809
10843
|
class: "ai-execution-summary-content-item",
|
|
10810
10844
|
onMouseenter: (e) => u.value = n.uid,
|
|
10811
10845
|
onMouseleave: g[2] || (g[2] = (e) => u.value = void 0)
|
|
10812
10846
|
}, [
|
|
10813
|
-
l("div",
|
|
10847
|
+
l("div", M_, [
|
|
10814
10848
|
g[3] || (g[3] = l("span", { class: "timeline-dot" }, null, -1)),
|
|
10815
|
-
U((k(), c("span",
|
|
10849
|
+
U((k(), c("span", N_, [d(I(typeof n.userMessageTitle == "number" ? p(n.userMessageTitle) : n.userMessageTitle), 1)])), [[L(Pi), X({}, L(i))]]),
|
|
10816
10850
|
U(f(L(W), {
|
|
10817
10851
|
class: "content-item-locate",
|
|
10818
10852
|
text: "",
|
|
@@ -10823,15 +10857,15 @@ var $d = ["src"], ef = {
|
|
|
10823
10857
|
_: 1
|
|
10824
10858
|
}, 8, ["onClick"]), [[ae, u.value === n.uid]])
|
|
10825
10859
|
]),
|
|
10826
|
-
l("div",
|
|
10860
|
+
l("div", P_, [(k(!0), c(e, null, M(n.messages, (e, t) => (k(), o(w_, {
|
|
10827
10861
|
key: t,
|
|
10828
10862
|
message: e
|
|
10829
10863
|
}, null, 8, ["message"]))), 128))]),
|
|
10830
|
-
r < t.messageGroups.length - 1 ? (k(), c("div",
|
|
10831
|
-
], 40,
|
|
10864
|
+
r < t.messageGroups.length - 1 ? (k(), c("div", F_)) : s("", !0)
|
|
10865
|
+
], 40, j_))), 128)) : (k(), c("div", I_, [f(L(de), {
|
|
10832
10866
|
class: "empty-exception",
|
|
10833
10867
|
type: "empty"
|
|
10834
|
-
}), l("div",
|
|
10868
|
+
}), l("div", L_, [d(I(L(a) ? L(G)("搜索结果为空") : L(G)("暂无数据")) + " ", 1), L(a) ? (k(), o(L(W), {
|
|
10835
10869
|
key: 0,
|
|
10836
10870
|
text: "",
|
|
10837
10871
|
theme: "primary",
|
|
@@ -10841,7 +10875,7 @@ var $d = ["src"], ef = {
|
|
|
10841
10875
|
_: 1
|
|
10842
10876
|
})) : s("", !0)])]))])]));
|
|
10843
10877
|
}
|
|
10844
|
-
}),
|
|
10878
|
+
}), z_ = { class: "ai-selection-footer" }, B_ = { class: "ai-selection-footer-left" }, V_ = { class: "select-all-text" }, H_ = { class: "ai-selection-footer-right" }, U_ = /* @__PURE__ */ m({
|
|
10845
10879
|
__name: "selection-footer",
|
|
10846
10880
|
props: {
|
|
10847
10881
|
isAllSelected: { type: Boolean },
|
|
@@ -10855,10 +10889,10 @@ var $d = ["src"], ef = {
|
|
|
10855
10889
|
],
|
|
10856
10890
|
setup(e, { emit: t }) {
|
|
10857
10891
|
let n = t;
|
|
10858
|
-
return (t, r) => (k(), c("div",
|
|
10892
|
+
return (t, r) => (k(), c("div", z_, [l("div", B_, [f(L(ue), {
|
|
10859
10893
|
"model-value": e.isAllSelected,
|
|
10860
10894
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => n("toggle-all", e))
|
|
10861
|
-
}, null, 8, ["model-value"]), l("span",
|
|
10895
|
+
}, null, 8, ["model-value"]), l("span", V_, I(L(G)("全选")), 1)]), l("div", H_, [f(L(W), {
|
|
10862
10896
|
disabled: e.loading,
|
|
10863
10897
|
onClick: r[1] || (r[1] = (e) => n("cancel"))
|
|
10864
10898
|
}, {
|
|
@@ -10874,16 +10908,16 @@ var $d = ["src"], ef = {
|
|
|
10874
10908
|
_: 1
|
|
10875
10909
|
}, 8, ["disabled", "loading"])])]));
|
|
10876
10910
|
}
|
|
10877
|
-
}),
|
|
10911
|
+
}), W_ = ["data-ai-size"], G_ = {
|
|
10878
10912
|
key: 0,
|
|
10879
10913
|
class: "ai-chat-container-loading"
|
|
10880
|
-
},
|
|
10914
|
+
}, K_ = { class: "screen-wrapper" }, q_ = {
|
|
10881
10915
|
key: 1,
|
|
10882
10916
|
class: "ai-welcome-content"
|
|
10883
|
-
},
|
|
10917
|
+
}, J_ = { class: "ai-welcome-title" }, Y_ = {
|
|
10884
10918
|
key: 0,
|
|
10885
10919
|
class: "ai-welcome-remark"
|
|
10886
|
-
},
|
|
10920
|
+
}, X_ = /* @__PURE__ */ m({
|
|
10887
10921
|
__name: "chat-container",
|
|
10888
10922
|
props: /* @__PURE__ */ y({
|
|
10889
10923
|
chatLoading: { type: Boolean },
|
|
@@ -10992,7 +11026,7 @@ var $d = ["src"], ef = {
|
|
|
10992
11026
|
var e;
|
|
10993
11027
|
return (e = u.commonTippyOptions) == null ? {} : e;
|
|
10994
11028
|
}) });
|
|
10995
|
-
let { displayTabs: ne, tabs: re, selectedTab: R, isCollapse: ie, addCustomTab: ae,
|
|
11029
|
+
let { displayTabs: ne, tabs: re, selectedTab: R, isCollapse: ie, addCustomTab: ae, ensureCustomTab: oe, removeCustomTab: se, selectCustomTab: ce, resetCustomTab: le } = ai({
|
|
10996
11030
|
executionTabVisible: () => u.executionTabVisible,
|
|
10997
11031
|
onTabChange: function() {
|
|
10998
11032
|
var e = Z(function* (e) {
|
|
@@ -11013,16 +11047,23 @@ var $d = ["src"], ef = {
|
|
|
11013
11047
|
return e.apply(this, arguments);
|
|
11014
11048
|
};
|
|
11015
11049
|
}()
|
|
11016
|
-
}),
|
|
11050
|
+
}), ue = () => {
|
|
11051
|
+
oe({
|
|
11052
|
+
closable: !1,
|
|
11053
|
+
label: G("文件产物"),
|
|
11054
|
+
name: Ur,
|
|
11055
|
+
order: -1
|
|
11056
|
+
});
|
|
11057
|
+
}, de = F(""), fe = te([]), pe = F(), me = F((() => {
|
|
11017
11058
|
var e;
|
|
11018
11059
|
let t = (e = u.resizeProps) == null ? void 0 : e.initialDivide;
|
|
11019
11060
|
return typeof t == "number" ? t : 400;
|
|
11020
|
-
})()),
|
|
11021
|
-
keyword:
|
|
11061
|
+
})()), he = a(() => `calc(100% - ${me.value}px)`), { messageGroups: ge, executionGroups: ve, sessionArtifacts: ye, isShareMode: xe, isAllSelected: Se, onToggleShareAll: Ce, onCancelShare: we, onConfirmShare: Te, pendingApprovalTipText: Ee, activeUserQuestionInterrupt: De } = bi({
|
|
11062
|
+
keyword: de,
|
|
11022
11063
|
messages: a(() => u.messages),
|
|
11023
11064
|
renderMode: a(() => p.value),
|
|
11024
|
-
selectedUserMessages:
|
|
11025
|
-
}),
|
|
11065
|
+
selectedUserMessages: fe
|
|
11066
|
+
}), Oe = a(() => re.value.some((e) => e.name === Ur)), { activeArtifactId: ke, setActiveArtifactId: Ae } = Kr({
|
|
11026
11067
|
getOnArtifactClick: () => u.onArtifactClick,
|
|
11027
11068
|
onOpen: () => {
|
|
11028
11069
|
ae({
|
|
@@ -11033,33 +11074,37 @@ var $d = ["src"], ef = {
|
|
|
11033
11074
|
});
|
|
11034
11075
|
}
|
|
11035
11076
|
});
|
|
11036
|
-
V(
|
|
11037
|
-
e.length
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11077
|
+
V(ye, (e) => {
|
|
11078
|
+
if (!e.length) {
|
|
11079
|
+
se(Ur), Ae("");
|
|
11080
|
+
return;
|
|
11081
|
+
}
|
|
11082
|
+
ue(), e.some((e) => e.outputId === ke.value) || Ae(e[0].outputId);
|
|
11083
|
+
}, { immediate: !0 }), V(ie, (e) => {
|
|
11084
|
+
e && (de.value = "", me.value = 0), j("collapseChange", e, me.value);
|
|
11085
|
+
}), V(() => ve.value, (e) => {
|
|
11086
|
+
!e.length && !de.value && !Oe.value && le();
|
|
11042
11087
|
}, {
|
|
11043
11088
|
immediate: !0,
|
|
11044
11089
|
deep: !1
|
|
11045
11090
|
});
|
|
11046
|
-
let
|
|
11091
|
+
let je = a(() => {
|
|
11047
11092
|
var e;
|
|
11048
|
-
return u.messageStatus === J.StopLoading ? J.StopLoading : (e =
|
|
11049
|
-
}),
|
|
11093
|
+
return u.messageStatus === J.StopLoading ? J.StopLoading : (e = ge.value) != null && e.some((e) => e.messages.some((e) => e.id === "__loading__")) ? J.Fetching : u.messageStatus;
|
|
11094
|
+
}), Me = () => {
|
|
11050
11095
|
D.value = null, j("shortcutClose");
|
|
11051
|
-
},
|
|
11096
|
+
}, Ne = (e) => {
|
|
11052
11097
|
j("shortcutSubmit", e);
|
|
11053
|
-
},
|
|
11098
|
+
}, Pe = () => {
|
|
11054
11099
|
j("deleteShortcut");
|
|
11055
|
-
},
|
|
11100
|
+
}, Fe = (e) => {
|
|
11056
11101
|
j("selectShortcut", e);
|
|
11057
|
-
},
|
|
11102
|
+
}, Ie = (e, t) => {
|
|
11058
11103
|
j("update:modelValue", e, t);
|
|
11059
|
-
},
|
|
11104
|
+
}, Le = function() {
|
|
11060
11105
|
var e = Z(function* (e, t) {
|
|
11061
11106
|
var n;
|
|
11062
|
-
let r =
|
|
11107
|
+
let r = De.value;
|
|
11063
11108
|
return (n = u.onSendMessage) == null ? void 0 : n.call(u, e, t, r ? {
|
|
11064
11109
|
payload: nm(r),
|
|
11065
11110
|
interrupt: r
|
|
@@ -11068,13 +11113,13 @@ var $d = ["src"], ef = {
|
|
|
11068
11113
|
return function(t, n) {
|
|
11069
11114
|
return e.apply(this, arguments);
|
|
11070
11115
|
};
|
|
11071
|
-
}(),
|
|
11116
|
+
}(), Re = () => {
|
|
11072
11117
|
ie.value = !ie.value;
|
|
11073
|
-
},
|
|
11118
|
+
}, ze = (e) => {
|
|
11074
11119
|
if (!e) return;
|
|
11075
11120
|
let t = document.getElementById(e);
|
|
11076
11121
|
if (!t) {
|
|
11077
|
-
let t =
|
|
11122
|
+
let t = ge.value.find((t) => t.messages.some((t) => t.uid === e));
|
|
11078
11123
|
if (t) {
|
|
11079
11124
|
var n;
|
|
11080
11125
|
(n = document.getElementById(t.uid)) == null || n.scrollIntoView({ behavior: "smooth" });
|
|
@@ -11082,15 +11127,15 @@ var $d = ["src"], ef = {
|
|
|
11082
11127
|
return;
|
|
11083
11128
|
}
|
|
11084
11129
|
t.scrollIntoView({ behavior: "smooth" });
|
|
11085
|
-
},
|
|
11086
|
-
|
|
11087
|
-
},
|
|
11088
|
-
|
|
11089
|
-
},
|
|
11130
|
+
}, Be = (e) => e === "execution" ? on : e === "file-artifact" ? hn : cn, Ve = (e) => {
|
|
11131
|
+
ce(re.value.find((t) => t.name === e));
|
|
11132
|
+
}, He = (e) => {
|
|
11133
|
+
de.value = e;
|
|
11134
|
+
}, Ue = function() {
|
|
11090
11135
|
var e = Z(function* (e, t) {
|
|
11091
11136
|
var n;
|
|
11092
11137
|
if (e.id === "share" || e.triggerSelection) {
|
|
11093
|
-
|
|
11138
|
+
pe.value = e, xe.value = !0;
|
|
11094
11139
|
return;
|
|
11095
11140
|
}
|
|
11096
11141
|
return (n = u.onAgentAction) == null ? void 0 : n.call(u, e, t);
|
|
@@ -11098,27 +11143,27 @@ var $d = ["src"], ef = {
|
|
|
11098
11143
|
return function(t, n) {
|
|
11099
11144
|
return e.apply(this, arguments);
|
|
11100
11145
|
};
|
|
11101
|
-
}(),
|
|
11102
|
-
j("confirmShare",
|
|
11103
|
-
|
|
11146
|
+
}(), We = () => {
|
|
11147
|
+
j("confirmShare", Te(), pe.value), x(() => {
|
|
11148
|
+
xe.value = !1, fe.value = [], pe.value = void 0;
|
|
11104
11149
|
});
|
|
11105
|
-
},
|
|
11106
|
-
|
|
11107
|
-
},
|
|
11108
|
-
|
|
11150
|
+
}, Ge = () => {
|
|
11151
|
+
we(), pe.value = void 0;
|
|
11152
|
+
}, Ke = (e) => {
|
|
11153
|
+
me.value = e;
|
|
11109
11154
|
};
|
|
11110
11155
|
return O(() => {
|
|
11111
|
-
|
|
11156
|
+
le(), typeof document < "u" && delete document.body.dataset.aiSize;
|
|
11112
11157
|
}), n({
|
|
11113
11158
|
selectedTab: R,
|
|
11114
11159
|
addCustomTab: ae,
|
|
11115
|
-
removeCustomTab:
|
|
11116
|
-
selectCustomTab:
|
|
11160
|
+
removeCustomTab: se,
|
|
11161
|
+
selectCustomTab: ce,
|
|
11117
11162
|
enterShareMode: () => {
|
|
11118
|
-
|
|
11163
|
+
xe.value = !0;
|
|
11119
11164
|
},
|
|
11120
11165
|
exitShareMode: () => {
|
|
11121
|
-
|
|
11166
|
+
Ge();
|
|
11122
11167
|
}
|
|
11123
11168
|
}), (n, r) => {
|
|
11124
11169
|
var a, u;
|
|
@@ -11126,16 +11171,16 @@ var $d = ["src"], ef = {
|
|
|
11126
11171
|
class: "ai-chat-container",
|
|
11127
11172
|
"data-ai-size": t.size,
|
|
11128
11173
|
style: w({
|
|
11129
|
-
"--resize-main-width":
|
|
11174
|
+
"--resize-main-width": he.value,
|
|
11130
11175
|
borderTopColor: L(ie) ? "transparent" : "#eaebf0"
|
|
11131
11176
|
})
|
|
11132
|
-
}, [t.chatLoading ? (k(), c("div",
|
|
11177
|
+
}, [t.chatLoading ? (k(), c("div", G_, [f(wp)])) : (k(), o(L(_e), b({
|
|
11133
11178
|
key: 1,
|
|
11134
|
-
class: ["ai-chat-container-resize-layout", { "ai-is-collapse": L(ie) || L(ne).length > 0 && !((a =
|
|
11135
|
-
}, T.value, { onResizing:
|
|
11179
|
+
class: ["ai-chat-container-resize-layout", { "ai-is-collapse": L(ie) || L(ne).length > 0 && !((a = de.value) != null && a.length) && ((u = L(ve)) == null ? void 0 : u.length) < 1 && !Oe.value }]
|
|
11180
|
+
}, T.value, { onResizing: Ke }), {
|
|
11136
11181
|
aside: H(() => {
|
|
11137
11182
|
var n, a, u, p, h, x;
|
|
11138
|
-
return [!L(ie) && L(ne).length > 0 && ((n = L(
|
|
11183
|
+
return [!L(ie) && L(ne).length > 0 && ((n = L(ve)) != null && n.length || (a = de.value) != null && a.length || Oe.value) ? (k(), c("div", {
|
|
11139
11184
|
key: 0,
|
|
11140
11185
|
ref_key: "fullScreenRef",
|
|
11141
11186
|
ref: m,
|
|
@@ -11146,11 +11191,11 @@ var $d = ["src"], ef = {
|
|
|
11146
11191
|
class: "ai-chat-container-tab",
|
|
11147
11192
|
"label-height": 40,
|
|
11148
11193
|
type: "unborder-card",
|
|
11149
|
-
onChange:
|
|
11194
|
+
onChange: Ve
|
|
11150
11195
|
}, {
|
|
11151
11196
|
setting: H(() => {
|
|
11152
11197
|
var e;
|
|
11153
|
-
return [l("div",
|
|
11198
|
+
return [l("div", K_, [f(Ii, {
|
|
11154
11199
|
class: "screen-btn",
|
|
11155
11200
|
"tippy-options": X(X({}, t.commonTippyOptions), {}, {
|
|
11156
11201
|
appendTo: L(_) ? m.value : (e = t.commonTippyOptions) == null ? void 0 : e.appendTo,
|
|
@@ -11180,13 +11225,13 @@ var $d = ["src"], ef = {
|
|
|
11180
11225
|
(n = t.el) == null || n.scrollIntoView({ behavior: "smooth" });
|
|
11181
11226
|
}
|
|
11182
11227
|
}
|
|
11183
|
-
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab: L(
|
|
11184
|
-
g(
|
|
11228
|
+
}, (n = (r = t.getSideTabRenderComponent) == null ? void 0 : r.call(t, g, e, { removeCustomTab: L(se) })) == null ? [
|
|
11229
|
+
g(Be(e.name), { class: "ai-execution-summary-icon" }),
|
|
11185
11230
|
U(g("span", { class: "ai-execution-summary-label-text" }, (i = e.label) == null ? "" : i), [[L(Pi), X(X({}, t.commonTippyOptions), {}, { text: (a = e.label) == null ? "" : a })]]),
|
|
11186
11231
|
e.closable !== !1 && e.name !== L("execution") ? g(L(Xn), {
|
|
11187
11232
|
class: "ai-execution-close-icon",
|
|
11188
11233
|
onClick: () => {
|
|
11189
|
-
L(
|
|
11234
|
+
L(se)(e.name);
|
|
11190
11235
|
}
|
|
11191
11236
|
}) : null
|
|
11192
11237
|
] : n);
|
|
@@ -11195,18 +11240,18 @@ var $d = ["src"], ef = {
|
|
|
11195
11240
|
}, null, 8, ["label", "name"]))), 128))]),
|
|
11196
11241
|
_: 1
|
|
11197
11242
|
}, 8, ["active"]),
|
|
11198
|
-
((u = L(R)) == null ? void 0 : u.name) === L("execution") && t.executionTabVisible !== !1 ? (k(), c(e, { key: 0 }, [L(ie) ? s("", !0) : (k(), o(
|
|
11243
|
+
((u = L(R)) == null ? void 0 : u.name) === L("execution") && t.executionTabVisible !== !1 ? (k(), c(e, { key: 0 }, [L(ie) ? s("", !0) : (k(), o(R_, {
|
|
11199
11244
|
key: 0,
|
|
11200
|
-
"message-groups": L(
|
|
11245
|
+
"message-groups": L(ve),
|
|
11201
11246
|
style: { height: "calc(100% - 40px)" },
|
|
11202
|
-
onLocateMessageGroup:
|
|
11203
|
-
onUpdateKeyword:
|
|
11247
|
+
onLocateMessageGroup: ze,
|
|
11248
|
+
onUpdateKeyword: He
|
|
11204
11249
|
}, null, 8, ["message-groups"]))], 64)) : ((p = L(R)) == null ? void 0 : p.name) === L("file-artifact") ? (k(), o(Qp, {
|
|
11205
11250
|
key: 1,
|
|
11206
|
-
"active-id": L(
|
|
11207
|
-
artifacts: L(
|
|
11251
|
+
"active-id": L(ke),
|
|
11252
|
+
artifacts: L(ye),
|
|
11208
11253
|
style: { height: "calc(100% - 40px)" },
|
|
11209
|
-
onSelect: L(
|
|
11254
|
+
onSelect: L(Ae)
|
|
11210
11255
|
}, null, 8, [
|
|
11211
11256
|
"active-id",
|
|
11212
11257
|
"artifacts",
|
|
@@ -11223,7 +11268,7 @@ var $d = ["src"], ef = {
|
|
|
11223
11268
|
theme: "primary",
|
|
11224
11269
|
onClick: r[0] || (r[0] = (e) => {
|
|
11225
11270
|
var t;
|
|
11226
|
-
return
|
|
11271
|
+
return ze((t = L(R)) == null || (t = t.data) == null ? void 0 : t.messageUid);
|
|
11227
11272
|
})
|
|
11228
11273
|
}, {
|
|
11229
11274
|
default: H(() => [d(I(L(G)("在对话中定位")), 1)]),
|
|
@@ -11231,13 +11276,13 @@ var $d = ["src"], ef = {
|
|
|
11231
11276
|
})]),
|
|
11232
11277
|
_: 1
|
|
11233
11278
|
}, 16))])) : s("", !0)
|
|
11234
|
-
], 512)) : s("", !0), L(ne).length > 0 && ((x = L(
|
|
11279
|
+
], 512)) : s("", !0), L(ne).length > 0 && ((x = L(ve)) != null && x.length || Oe.value) ? (k(), c("div", {
|
|
11235
11280
|
key: 1,
|
|
11236
11281
|
class: S(["collapse-button", {
|
|
11237
11282
|
"is-right": t.placement === "right",
|
|
11238
11283
|
"is-collapsed": L(ie)
|
|
11239
11284
|
}]),
|
|
11240
|
-
onClick:
|
|
11285
|
+
onClick: Re
|
|
11241
11286
|
}, [f(L(Wn))], 2)) : s("", !0)];
|
|
11242
11287
|
}),
|
|
11243
11288
|
main: H(() => {
|
|
@@ -11245,12 +11290,12 @@ var $d = ["src"], ef = {
|
|
|
11245
11290
|
return [(i = t.messages) != null && i.length ? N(n.$slots, "default", C(b({ key: 0 }, {
|
|
11246
11291
|
messages: t.messages,
|
|
11247
11292
|
messageStatus: t.messageStatus,
|
|
11248
|
-
messageGroups: L(
|
|
11249
|
-
selectedUserMessages:
|
|
11293
|
+
messageGroups: L(ge),
|
|
11294
|
+
selectedUserMessages: fe.value,
|
|
11250
11295
|
messageToolsStatus: t.messageToolsStatus,
|
|
11251
|
-
isShareMode: L(
|
|
11296
|
+
isShareMode: L(xe),
|
|
11252
11297
|
commonTippyOptions: t.commonTippyOptions,
|
|
11253
|
-
handleAgentAction:
|
|
11298
|
+
handleAgentAction: Ue,
|
|
11254
11299
|
onAgentFeedback: t.onAgentFeedback,
|
|
11255
11300
|
onInterruptResume: t.onInterruptResume,
|
|
11256
11301
|
onUserAction: t.onUserAction,
|
|
@@ -11258,18 +11303,18 @@ var $d = ["src"], ef = {
|
|
|
11258
11303
|
onUserShortcutConfirm: t.onUserShortcutConfirm
|
|
11259
11304
|
})), () => {
|
|
11260
11305
|
var e;
|
|
11261
|
-
return [(e = t.messages) != null && e.length ? (k(), o(
|
|
11306
|
+
return [(e = t.messages) != null && e.length ? (k(), o(D_, {
|
|
11262
11307
|
key: 0,
|
|
11263
|
-
"selected-user-messages":
|
|
11264
|
-
"onUpdate:selectedUserMessages": r[1] || (r[1] = (e) =>
|
|
11265
|
-
"enable-selection": L(
|
|
11266
|
-
"message-groups": L(
|
|
11267
|
-
"message-status":
|
|
11308
|
+
"selected-user-messages": fe.value,
|
|
11309
|
+
"onUpdate:selectedUserMessages": r[1] || (r[1] = (e) => fe.value = e),
|
|
11310
|
+
"enable-selection": L(xe),
|
|
11311
|
+
"message-groups": L(ge),
|
|
11312
|
+
"message-status": je.value,
|
|
11268
11313
|
"message-tools": t.messageTools,
|
|
11269
11314
|
"message-tools-status": t.messageToolsStatus,
|
|
11270
11315
|
"message-tools-tippy-options": t.commonTippyOptions,
|
|
11271
11316
|
messages: t.messages,
|
|
11272
|
-
"on-agent-action":
|
|
11317
|
+
"on-agent-action": Ue,
|
|
11273
11318
|
"on-agent-feedback": t.onAgentFeedback,
|
|
11274
11319
|
"on-interrupt-resume": t.onInterruptResume,
|
|
11275
11320
|
"on-user-action": t.onUserAction,
|
|
@@ -11303,61 +11348,61 @@ var $d = ["src"], ef = {
|
|
|
11303
11348
|
"render-mode",
|
|
11304
11349
|
"update-tools"
|
|
11305
11350
|
])) : s("", !0)];
|
|
11306
|
-
}) : (k(), c("div",
|
|
11351
|
+
}) : (k(), c("div", q_, [N(n.$slots, "welcome", C(h({
|
|
11307
11352
|
openingRemark: t.openingRemark,
|
|
11308
11353
|
welcomeTitle: t.welcomeTitle
|
|
11309
11354
|
})), () => {
|
|
11310
11355
|
var e;
|
|
11311
11356
|
return [
|
|
11312
11357
|
f(L(Kt)),
|
|
11313
|
-
l("h2",
|
|
11314
|
-
t.openingRemark ? (k(), c("div",
|
|
11358
|
+
l("h2", J_, I((e = t.welcomeTitle) == null ? L(G)("你好,我是小鲸") : e), 1),
|
|
11359
|
+
t.openingRemark ? (k(), c("div", Y_, [f(Zl, { content: t.openingRemark }, null, 8, ["content"])])) : s("", !0)
|
|
11315
11360
|
];
|
|
11316
|
-
})])), p.value === L(Ft).Share ? s("", !0) : (k(), c(e, { key: 2 }, [L(
|
|
11361
|
+
})])), p.value === L(Ft).Share ? s("", !0) : (k(), c(e, { key: 2 }, [L(xe) ? (k(), o(U_, {
|
|
11317
11362
|
key: 0,
|
|
11318
|
-
"is-all-selected": L(
|
|
11363
|
+
"is-all-selected": L(Se),
|
|
11319
11364
|
loading: !1,
|
|
11320
|
-
"selected-count":
|
|
11321
|
-
onCancel:
|
|
11322
|
-
onConfirm:
|
|
11323
|
-
onToggleAll: L(
|
|
11365
|
+
"selected-count": fe.value.length,
|
|
11366
|
+
onCancel: Ge,
|
|
11367
|
+
onConfirm: We,
|
|
11368
|
+
onToggleAll: L(Ce)
|
|
11324
11369
|
}, null, 8, [
|
|
11325
11370
|
"is-all-selected",
|
|
11326
11371
|
"selected-count",
|
|
11327
11372
|
"onToggleAll"
|
|
11328
11373
|
])) : !((a = D.value) == null || (a = a.components) == null) && a.length ? (k(), o(Br, b({ key: 1 }, D.value, {
|
|
11329
11374
|
class: { "is-welcome-overlay": !((u = t.messages) != null && u.length) },
|
|
11330
|
-
onClose:
|
|
11331
|
-
onSubmit:
|
|
11375
|
+
onClose: Me,
|
|
11376
|
+
onSubmit: Ne
|
|
11332
11377
|
}), null, 16, ["class"])) : (k(), o(lp, {
|
|
11333
11378
|
key: 2,
|
|
11334
11379
|
cite: A.value,
|
|
11335
11380
|
"onUpdate:cite": r[3] || (r[3] = (e) => A.value = e),
|
|
11336
11381
|
"selected-model": ee.value,
|
|
11337
11382
|
"onUpdate:selectedModel": r[4] || (r[4] = (e) => ee.value = e),
|
|
11338
|
-
"message-status":
|
|
11383
|
+
"message-status": je.value,
|
|
11339
11384
|
"model-value": t.modelValue,
|
|
11340
11385
|
models: t.models,
|
|
11341
|
-
"on-send-message":
|
|
11386
|
+
"on-send-message": Le,
|
|
11342
11387
|
"on-stop-sending": t.onStopSending,
|
|
11343
11388
|
"on-upload": t.onUpload,
|
|
11344
11389
|
placeholder: t.placeholder,
|
|
11345
11390
|
prompts: t.prompts,
|
|
11346
11391
|
resources: t.resources,
|
|
11347
|
-
"send-disabled-tip": L(
|
|
11392
|
+
"send-disabled-tip": L(Ee),
|
|
11348
11393
|
"shortcut-id": (d = D.value) == null ? void 0 : d.id,
|
|
11349
11394
|
shortcuts: t.shortcuts,
|
|
11350
11395
|
skills: t.skills,
|
|
11351
11396
|
"support-upload": t.supportUpload,
|
|
11352
11397
|
"tippy-options": t.commonTippyOptions,
|
|
11353
|
-
onDeleteShortcut:
|
|
11398
|
+
onDeleteShortcut: Pe,
|
|
11354
11399
|
onModelChange: r[5] || (r[5] = (e) => j("modelChange", e)),
|
|
11355
|
-
onSelectShortcut:
|
|
11356
|
-
"onUpdate:modelValue":
|
|
11400
|
+
onSelectShortcut: Fe,
|
|
11401
|
+
"onUpdate:modelValue": Ie
|
|
11357
11402
|
}, {
|
|
11358
|
-
interrupt: H(() => [L(
|
|
11403
|
+
interrupt: H(() => [L(De) ? (k(), o(L(Fm), {
|
|
11359
11404
|
key: 0,
|
|
11360
|
-
interrupt: L(
|
|
11405
|
+
interrupt: L(De),
|
|
11361
11406
|
"on-resume": t.onInterruptResume
|
|
11362
11407
|
}, {
|
|
11363
11408
|
question: H(({ question: e, qIndex: t, answer: r, setAnswer: i, confirm: a }) => [N(n.$slots, "interruptQuestion", C(h({
|
|
@@ -11368,9 +11413,9 @@ var $d = ["src"], ef = {
|
|
|
11368
11413
|
confirm: a
|
|
11369
11414
|
})))]),
|
|
11370
11415
|
_: 3
|
|
11371
|
-
}, 8, ["interrupt", "on-resume"])) : s("", !0), L(
|
|
11416
|
+
}, 8, ["interrupt", "on-resume"])) : s("", !0), L(Ee) ? (k(), o(fp, {
|
|
11372
11417
|
key: 1,
|
|
11373
|
-
content: L(
|
|
11418
|
+
content: L(Ee)
|
|
11374
11419
|
}, null, 8, ["content"])) : s("", !0)]),
|
|
11375
11420
|
_: 3
|
|
11376
11421
|
}, 8, [
|
|
@@ -11393,10 +11438,10 @@ var $d = ["src"], ef = {
|
|
|
11393
11438
|
]))], 64))];
|
|
11394
11439
|
}),
|
|
11395
11440
|
_: 3
|
|
11396
|
-
}, 16, ["class"]))], 12,
|
|
11441
|
+
}, 16, ["class"]))], 12, W_);
|
|
11397
11442
|
};
|
|
11398
11443
|
}
|
|
11399
|
-
}),
|
|
11444
|
+
}), Z_ = { class: "ai-image-preview-group" }, Q_ = /* @__PURE__ */ m(X(X({}, { name: "ImagePreviewGroup" }), {}, {
|
|
11400
11445
|
__name: "image-preview-group",
|
|
11401
11446
|
props: {
|
|
11402
11447
|
maskClosable: {
|
|
@@ -11425,7 +11470,7 @@ var $d = ["src"], ef = {
|
|
|
11425
11470
|
let a = [...t.keys()], o = a.map((e) => t.get(e)()), s = a.indexOf(e);
|
|
11426
11471
|
r.value = o, i.value = s >= 0 ? s : 0, n.value = !0;
|
|
11427
11472
|
}
|
|
11428
|
-
}), (t, a) => (k(), c("div",
|
|
11473
|
+
}), (t, a) => (k(), c("div", Z_, [N(t.$slots, "default"), n.value ? (k(), o(af, {
|
|
11429
11474
|
key: 0,
|
|
11430
11475
|
current: i.value,
|
|
11431
11476
|
"onUpdate:current": a[0] || (a[0] = (e) => i.value = e),
|
|
@@ -11448,10 +11493,10 @@ var $d = ["src"], ef = {
|
|
|
11448
11493
|
"show-info"
|
|
11449
11494
|
])) : s("", !0)]));
|
|
11450
11495
|
}
|
|
11451
|
-
})),
|
|
11496
|
+
})), $_ = ["alt", "src"], ev = {
|
|
11452
11497
|
key: 1,
|
|
11453
11498
|
class: "ai-image-error"
|
|
11454
|
-
},
|
|
11499
|
+
}, tv = /* @__PURE__ */ m(X(X({}, { name: "AiImage" }), {}, {
|
|
11455
11500
|
__name: "image",
|
|
11456
11501
|
props: {
|
|
11457
11502
|
alt: { default: "" },
|
|
@@ -11543,8 +11588,8 @@ var $d = ["src"], ef = {
|
|
|
11543
11588
|
style: ee,
|
|
11544
11589
|
onError: M,
|
|
11545
11590
|
onLoad: j
|
|
11546
|
-
}, null, 40,
|
|
11547
|
-
h.value === "error" ? (k(), c("div",
|
|
11591
|
+
}, null, 40, $_)) : s("", !0),
|
|
11592
|
+
h.value === "error" ? (k(), c("div", ev, [f(L($t), { class: "ai-image-error-icon" })])) : s("", !0),
|
|
11548
11593
|
h.value === "error" ? (k(), c("div", {
|
|
11549
11594
|
key: 2,
|
|
11550
11595
|
class: "ai-image-error-overlay",
|
|
@@ -11572,4 +11617,4 @@ var $d = ["src"], ef = {
|
|
|
11572
11617
|
}
|
|
11573
11618
|
}));
|
|
11574
11619
|
//#endregion
|
|
11575
|
-
export { Kt as AIBluekingBannerIcon, Gt as AIBluekingIcon, yt as AIFileType, K as APPROVAL_STATUS, vt as APPROVAL_STATUS_MAP, Hr as ARTIFACT_PREVIEW_TOKEN, cr as ActiveLikeIcon, lr as ActiveUnLikeIcon, Qn as AgentIcon,
|
|
11620
|
+
export { Kt as AIBluekingBannerIcon, Gt as AIBluekingIcon, yt as AIFileType, K as APPROVAL_STATUS, vt as APPROVAL_STATUS_MAP, Hr as ARTIFACT_PREVIEW_TOKEN, Wr as ARTIFACT_URL_CACHE_TTL_MS, cr as ActiveLikeIcon, lr as ActiveUnLikeIcon, Qn as AgentIcon, tv as AiImage, yr as AiLoading, Tr as AiSelection, qn as ArrowDownIcon, Cn as ArrowLeftIcon, Zt as ArrowRightIcon, wn as ArrowRightPreviewIcon, hn as ArtifactTabIcon, tn as BkFlowFailedIcon, rn as BkFlowPendingIcon, an as BkFlowSkippedIcon, en as BkFlowSuccessIcon, nn as BkFlowSuspendedIcon, wt as CHAT_Z_INDEX, kt as CONST_MESSAGE_TOOLS, jt as CONST_UPDATE_TOOLS, At as CONST_USER_MESSAGE_TOOLS, Qr as CONTAINER_SCROLL_TOKEN, ni as CUSTOM_TAB_TOKEN, X_ as ChatContainer, lp as ChatInput, Nn as CheckCircleFillIcon, tr as CiteIcon, Fn as CloseCircleFillIcon, On as CloseCircleIcon, Xn as CloseIcon, hl as CodeContent, Wn as CollapsedIcon, Kn as ContentLoadingIcon, Zl as ContentRender, er as CopyIcon, dr as DEFAULT_SHORTCUTS, ii as DEFAULT_TAB_ORDER, bu as Delete, An as DeleteCircleIcon, or as DeleteIcon, kn as DocLinkIcon, qt as DocumentIcon, gn as DownloadFileIcon, xn as DownloadIcon, Et as EDITOR_MENU_Z_INDEX, Tt as EDITOR_Z_INDEX, ri as EXECUTION_TAB_NAME, sr as EditIcon, zn as EnterIcon, Gn as ErrorIcon, on as ExecutionIcon, R_ as ExecutionSummary, Ur as FILE_ARTIFACT_TAB_NAME, jn as FileUploadIcon, bn as FitScreenIcon, Jn as FullScreenIcon, li as GLOBAL_CONFIG_TOKEN, Pt as HIGHLIGHT_KEYWORD_CLASS_NAME, Ln as HelpDocIcon, Qm as HighlightKeyword, mn as HtmlIcon, Dd as IMAGE_PREVIEW_GROUP_KEY, En as ImageBrokenIcon, Sl as ImageContent, $t as ImageErrorIcon, af as ImagePreview, Q_ as ImagePreviewGroup, Dn as ImageSizeIcon, Rn as InfoIcon, xu as InsertText, r_ as InterruptMessageRender, gt as InterruptReason, bt as InterruptResumeOperation, fn as JpgIcon, dn as JsonIcon, It as LOADING_MESSAGE_ID, wl as LatexContent, ir as LikeIcon, Qt as LinkIcon, Hn as LoadingMessageIcon, Mt as MAX_UPLOAD_FILES, Nt as MAX_UPLOAD_FILE_SIZE, Jl as MarkdownContent, un as MarkdownIcon, Lt as MarkdownLanguageMap, El as MermaidContent, D_ as MessageContainer, _t as MessageContentType, wp as MessageLoading, w_ as MessageRender, q as MessageRole, Od as MessageState, J as MessageStatus, Zm as MessageTools, Ad as MessageToolsStatus, Km as MessageUserFeedback, sp as ModelSelector, $n as MoreAgentIcon, Zn as MoreIcon, sn as NodeOutputIcon, cn as NodeTabIcon, $p as OTHERS_OPTION_LABEL, Pi as OverflowTips, ln as PdfIcon, Sn as PreviewCloseIcon, Jt as PreviewIcon, nr as RebuildIcon, Tn as ReloadIcon, Xt as RemoveIcon, Ft as RenderMode, Su as ReplaceAll, In as RevokedIcon, yn as RotateIcon, Ot as SELECTION_Z_INDEX, Dt as SHORTCUT_MENU_Z_INDEX, $r as SHOW_SCROLL_BOTTOM_BTN_DISTANCE, fr as ScrollBtn, Mn as SearchIcon, U_ as SelectionFooter, Vn as SendMessageIcon, rr as ShareIcon, Sr as ShortcutBtn, kr as ShortcutBtns, Br as ShortcutRender, Bn as SkipIcon, Yt as TargetIcon, Un as ThinkingIcon, Pn as TimeIcon, Mg as ToolCallRender, ur as ToolIconsMap, pn as TxtIcon, Yn as UnFullScreenIcon, ar as UnLikeIcon, kd as UploadStatus, St as UserMultiChoiceQuestionSchema, fm as UserQuestionAnsweredCard, Fm as UserQuestionCard, vm as UserQuestionChoice, gm as UserQuestionOption, Ct as UserQuestionSchema, xt as UserSingleChoiceQuestionSchema, Gl as VNodeRenderer, _n as ZoomInIcon, vn as ZoomOutIcon, nm as buildSkipResumePayload, kl as commonErrorContent, Y as commonSVGProps, Ze as completeMarkdownSyntax, bd as createEditor, tu as docToString, dt as formatDuration, pt as formatElapsedTime, Be as formatFileSize, Ve as formatUploadNotAddedMessage, ft as generateUUID, ut as getCookieByName, ze as getFileExtension, Re as getFilePreviewUrl, xi as getScrollParent, di as injectGlobalConfig, mt as isEn, Le as isImageFile, ht as lang, Gc as markdownAnimationAttrs, Qc as markdownItBkInlineStyle, rl as markdownItLatex, al as markdownItMermaid, wu as microtask, Cu as min, He as needsMarkdownCompletion, Ed as noop, xd as plainSchema, Ue as removeCompletionSuffix, Td as resourceTypeMap, wd as schema, nu as stringToDoc, G as t, em as toLetter, Gr as triggerArtifactDownload, Vr as useAnimationText, qr as useArtifactPreviewConsumer, Kr as useArtifactPreviewProvider, Xr as useClipboard, Zr as useCommandSelection, ti as useContainerScrollConsumer, ei as useContainerScrollProvider, oi as useCustomTabConsumer, ai as useCustomTabProvider, ci as useFullScreen, ui as useGlobalConfig, fi as useMenuKeydown, bi as useMessageGroup, Er as useObserverVisibleList, Si as useParentScrolling, tm as useUserQuestion, Cd as voidNode };
|