page-agent-sdk 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/page-agent-sdk.headless.js +9 -2
- package/dist/page-agent-sdk.iife.js +53 -52
- package/dist/page-agent-sdk.js +353 -328
- package/dist/page-agent-sdk.umd.cjs +38 -37
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/headless.d.ts +1 -1
- package/types/index.d.ts +1 -1
package/dist/page-agent-sdk.js
CHANGED
|
@@ -8155,6 +8155,13 @@ function Vp(e) {
|
|
|
8155
8155
|
[Lp]: /* @__PURE__ */ new Set()
|
|
8156
8156
|
};
|
|
8157
8157
|
},
|
|
8158
|
+
augmentPrompt: () => {
|
|
8159
|
+
let e = i()?.get?.().bind, o = [];
|
|
8160
|
+
if (zp(e, t, (e) => {
|
|
8161
|
+
let t = typeof e.name == "string" && e.name ? e.name : "(未命名)", i = `${n}${e.__pgId}.${r}`, s = !!a.files[i];
|
|
8162
|
+
o.push(`- ${t} → ${i}${s ? "" : "(尚未检出,先 vfs_write 创建)"}`);
|
|
8163
|
+
}), o.length) return `## 组件代码文件地图(改组件时按 name 直接改对应 vfs 文件;框架自动 checkout/commit)\n${o.join("\n")}`;
|
|
8164
|
+
},
|
|
8158
8165
|
wrapToolCall: async (e, a) => {
|
|
8159
8166
|
let o = e.name === "vfs_write" || e.name === "vfs_edit" || e.name === "vfs_rm" ? e.args?.path : void 0, s = typeof o == "string" ? jp(o) : void 0, c = typeof s == "string" && s.startsWith(n);
|
|
8160
8167
|
if (c) {
|
|
@@ -22374,13 +22381,31 @@ app.mount('#app');
|
|
|
22374
22381
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
22375
22382
|
}, "🔄 重新生成")]));
|
|
22376
22383
|
}
|
|
22377
|
-
}), [["__scopeId", "data-v-33638c4b"]]), wx =
|
|
22384
|
+
}), [["__scopeId", "data-v-33638c4b"]]), wx = {
|
|
22385
|
+
key: 0,
|
|
22386
|
+
class: "avatar-icon",
|
|
22387
|
+
viewBox: "0 0 1024 1024",
|
|
22388
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22389
|
+
"aria-hidden": "true"
|
|
22390
|
+
}, Tx = {
|
|
22391
|
+
key: 1,
|
|
22392
|
+
class: "avatar-icon",
|
|
22393
|
+
viewBox: "0 0 1024 1024",
|
|
22394
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22395
|
+
"aria-hidden": "true"
|
|
22396
|
+
}, Ex = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22397
|
+
__name: "AvatarIcon",
|
|
22398
|
+
props: { role: {} },
|
|
22399
|
+
setup(e) {
|
|
22400
|
+
return (t, n) => e.role === "user" ? (Y(), X("svg", wx, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", Tx, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
|
|
22401
|
+
}
|
|
22402
|
+
}), [["__scopeId", "data-v-dd253c12"]]), Dx = ["data-msg-idx"], Ox = {
|
|
22378
22403
|
key: 0,
|
|
22379
22404
|
class: "message-avatar"
|
|
22380
|
-
},
|
|
22405
|
+
}, kx = { class: "message-content" }, Ax = {
|
|
22381
22406
|
key: 2,
|
|
22382
22407
|
class: "msg-focuses"
|
|
22383
|
-
},
|
|
22408
|
+
}, jx = ["title", "onClick"], Mx = ["onClick"], Nx = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22384
22409
|
__name: "MessageRow",
|
|
22385
22410
|
props: {
|
|
22386
22411
|
message: {},
|
|
@@ -22404,7 +22429,7 @@ app.mount('#app');
|
|
|
22404
22429
|
return (t, c) => (Y(), X("div", {
|
|
22405
22430
|
class: U(["message-row", e.message.role]),
|
|
22406
22431
|
"data-msg-idx": e.index
|
|
22407
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
22432
|
+
}, [e.showAvatar ? (Y(), X("div", Ox, [ls(Ex, { role: e.message.role }, null, 8, ["role"])])) : Q("", !0), Z("div", kx, [
|
|
22408
22433
|
r.value ? (Y(), ns(Gg, {
|
|
22409
22434
|
key: 0,
|
|
22410
22435
|
text: i.value,
|
|
@@ -22415,7 +22440,7 @@ app.mount('#app');
|
|
|
22415
22440
|
key: 1,
|
|
22416
22441
|
steps: a.value
|
|
22417
22442
|
}, null, 8, ["steps"])) : Q("", !0),
|
|
22418
|
-
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div",
|
|
22443
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", Ax, [(Y(!0), X(J, null, ia(e.message.focuses, (e) => (Y(), X("span", {
|
|
22419
22444
|
key: e.path,
|
|
22420
22445
|
class: "msg-focus-chip",
|
|
22421
22446
|
title: `回看 ${e.path}`,
|
|
@@ -22424,7 +22449,7 @@ app.mount('#app');
|
|
|
22424
22449
|
type: "button",
|
|
22425
22450
|
class: "msg-focus-chip-x",
|
|
22426
22451
|
onClick: gl((t) => K(n).removeFocus(e.path), ["stop"])
|
|
22427
|
-
}, "✕", 8,
|
|
22452
|
+
}, "✕", 8, Mx)], 8, jx))), 128))])) : Q("", !0),
|
|
22428
22453
|
ls(vx, {
|
|
22429
22454
|
content: e.message.content,
|
|
22430
22455
|
role: e.message.role,
|
|
@@ -22445,21 +22470,21 @@ app.mount('#app');
|
|
|
22445
22470
|
onCopy: c[1] ||= (e) => t.$emit("copy"),
|
|
22446
22471
|
onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
|
|
22447
22472
|
}, null, 8, ["copied"])) : Q("", !0)
|
|
22448
|
-
])], 10,
|
|
22473
|
+
])], 10, Dx));
|
|
22449
22474
|
}
|
|
22450
|
-
}), [["__scopeId", "data-v-
|
|
22475
|
+
}), [["__scopeId", "data-v-cc6e79b0"]]), Px = { class: "chat-body" }, Fx = {
|
|
22451
22476
|
key: 0,
|
|
22452
22477
|
class: "empty-state"
|
|
22453
|
-
},
|
|
22478
|
+
}, Ix = {
|
|
22454
22479
|
key: 1,
|
|
22455
22480
|
class: "message-row assistant"
|
|
22456
|
-
},
|
|
22481
|
+
}, Lx = {
|
|
22457
22482
|
key: 0,
|
|
22458
22483
|
class: "message-avatar"
|
|
22459
|
-
},
|
|
22484
|
+
}, Rx = { class: "message-content" }, zx = {
|
|
22460
22485
|
key: 2,
|
|
22461
22486
|
class: "error-bar"
|
|
22462
|
-
},
|
|
22487
|
+
}, Bx = { class: "error-text" }, Vx = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22463
22488
|
__name: "MessageList",
|
|
22464
22489
|
props: {
|
|
22465
22490
|
showAvatar: { type: Boolean },
|
|
@@ -22467,9 +22492,9 @@ app.mount('#app');
|
|
|
22467
22492
|
},
|
|
22468
22493
|
setup(e) {
|
|
22469
22494
|
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l } = Sg(), { state: u, retry: d, regenerate: f } = t, p = Ys(() => u.messages.length > 0), m = Ys(() => u.messages.some((e) => e.role === "user")), h = Ys(() => u.messages[u.messages.length - 1]?.role === "assistant");
|
|
22470
|
-
return (t, g) => (Y(), X("div",
|
|
22471
|
-
p.value ? Q("", !0) : (Y(), X("div",
|
|
22472
|
-
(Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(
|
|
22495
|
+
return (t, g) => (Y(), X("div", Px, [
|
|
22496
|
+
p.value ? Q("", !0) : (Y(), X("div", Fx, [...g[2] ||= [Z("div", { class: "empty-icon" }, "💬", -1), Z("p", null, "有什么可以帮你的?", -1)]])),
|
|
22497
|
+
(Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(Nx, {
|
|
22473
22498
|
key: c,
|
|
22474
22499
|
message: t,
|
|
22475
22500
|
index: c,
|
|
@@ -22499,15 +22524,15 @@ app.mount('#app');
|
|
|
22499
22524
|
"onCopy",
|
|
22500
22525
|
"onRegenerate"
|
|
22501
22526
|
]))), 128)),
|
|
22502
|
-
K(u).loading && !h.value ? (Y(), X("div",
|
|
22527
|
+
K(u).loading && !h.value ? (Y(), X("div", Ix, [e.showAvatar ? (Y(), X("div", Lx, [ls(Ex, { role: "assistant" })])) : Q("", !0), Z("div", Rx, [ls(vx, {
|
|
22503
22528
|
content: "",
|
|
22504
22529
|
role: "assistant",
|
|
22505
22530
|
"is-pending-assistant": !0,
|
|
22506
22531
|
"show-typing": e.showTyping,
|
|
22507
22532
|
"show-cursor": !1
|
|
22508
22533
|
}, null, 8, ["show-typing"])])])) : Q("", !0),
|
|
22509
|
-
K(u).error ? (Y(), X("div",
|
|
22510
|
-
Z("span",
|
|
22534
|
+
K(u).error ? (Y(), X("div", zx, [
|
|
22535
|
+
Z("span", Bx, W(K(u).error), 1),
|
|
22511
22536
|
m.value ? (Y(), X("button", {
|
|
22512
22537
|
key: 0,
|
|
22513
22538
|
class: "retry-btn",
|
|
@@ -22522,54 +22547,54 @@ app.mount('#app');
|
|
|
22522
22547
|
])) : Q("", !0)
|
|
22523
22548
|
]));
|
|
22524
22549
|
}
|
|
22525
|
-
}), [["__scopeId", "data-v-
|
|
22550
|
+
}), [["__scopeId", "data-v-79cdf41e"]]), Hx = {
|
|
22526
22551
|
key: 0,
|
|
22527
22552
|
class: "queued-bar"
|
|
22528
|
-
},
|
|
22553
|
+
}, Ux = { class: "queued-head" }, Wx = { class: "queued-count" }, Gx = { class: "queued-idx" }, Kx = { class: "queued-text" }, qx = ["onClick"], Jx = ["onClick"], Yx = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22529
22554
|
__name: "QueuedBar",
|
|
22530
22555
|
setup(e) {
|
|
22531
22556
|
let { chat: t, editQueued: n } = Sg(), { queuedTasks: r, removeQueuedTask: i } = t;
|
|
22532
|
-
return (e, t) => K(r).length ? (Y(), X("div",
|
|
22557
|
+
return (e, t) => K(r).length ? (Y(), X("div", Hx, [Z("div", Ux, [
|
|
22533
22558
|
t[0] ||= Z("span", { class: "queued-icon" }, "📋", -1),
|
|
22534
22559
|
t[1] ||= Z("span", { class: "queued-title" }, "排队中 · 生成完后自动执行", -1),
|
|
22535
|
-
Z("span",
|
|
22560
|
+
Z("span", Wx, W(K(r).length), 1)
|
|
22536
22561
|
]), (Y(!0), X(J, null, ia(K(r), (e, t) => (Y(), X("div", {
|
|
22537
22562
|
key: t,
|
|
22538
22563
|
class: "queued-item"
|
|
22539
22564
|
}, [
|
|
22540
|
-
Z("span",
|
|
22541
|
-
Z("span",
|
|
22565
|
+
Z("span", Gx, W(t + 1), 1),
|
|
22566
|
+
Z("span", Kx, W(e), 1),
|
|
22542
22567
|
Z("button", {
|
|
22543
22568
|
class: "queued-act",
|
|
22544
22569
|
title: "修改(填回输入框编辑)",
|
|
22545
22570
|
onClick: (e) => K(n)(t)
|
|
22546
|
-
}, "✏️", 8,
|
|
22571
|
+
}, "✏️", 8, qx),
|
|
22547
22572
|
Z("button", {
|
|
22548
22573
|
class: "queued-act queued-del",
|
|
22549
22574
|
title: "撤销该任务",
|
|
22550
22575
|
onClick: (e) => K(i)(t)
|
|
22551
|
-
}, "✕", 8,
|
|
22576
|
+
}, "✕", 8, Jx)
|
|
22552
22577
|
]))), 128))])) : Q("", !0);
|
|
22553
22578
|
}
|
|
22554
|
-
}), [["__scopeId", "data-v-f32730a9"]]),
|
|
22579
|
+
}), [["__scopeId", "data-v-f32730a9"]]), Xx = {
|
|
22555
22580
|
key: 0,
|
|
22556
22581
|
class: "approval-bar"
|
|
22557
|
-
},
|
|
22582
|
+
}, Zx = {
|
|
22558
22583
|
key: 0,
|
|
22559
22584
|
class: "approval-question"
|
|
22560
|
-
},
|
|
22585
|
+
}, Qx = {
|
|
22561
22586
|
key: 1,
|
|
22562
22587
|
class: "approval-context"
|
|
22563
|
-
},
|
|
22588
|
+
}, $x = {
|
|
22564
22589
|
key: 2,
|
|
22565
22590
|
class: "approval-recommend"
|
|
22566
|
-
},
|
|
22591
|
+
}, eS = {
|
|
22567
22592
|
key: 3,
|
|
22568
22593
|
class: "approval-options"
|
|
22569
|
-
},
|
|
22594
|
+
}, tS = ["onClick"], nS = { class: "approval-actions" }, rS = { class: "approval-head" }, iS = { class: "approval-title" }, aS = {
|
|
22570
22595
|
key: 0,
|
|
22571
22596
|
class: "approval-args"
|
|
22572
|
-
},
|
|
22597
|
+
}, oS = { class: "approval-actions" }, sS = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22573
22598
|
__name: "ApprovalBar",
|
|
22574
22599
|
setup(e) {
|
|
22575
22600
|
let { pendingApproval: t, resolveApproval: n } = Sg().chat, r = /* @__PURE__ */ bn(!1);
|
|
@@ -22589,17 +22614,17 @@ app.mount('#app');
|
|
|
22589
22614
|
return String(e);
|
|
22590
22615
|
}
|
|
22591
22616
|
});
|
|
22592
|
-
return (e, s) => K(t) ? (Y(), X("div",
|
|
22617
|
+
return (e, s) => K(t) ? (Y(), X("div", Xx, [i.value ? (Y(), X(J, { key: 0 }, [
|
|
22593
22618
|
s[5] ||= Z("div", { class: "approval-head" }, [Z("span", { class: "approval-icon" }, "❓"), Z("span", { class: "approval-title" }, "AI 需要你确认")], -1),
|
|
22594
|
-
K(t).args?.question ? (Y(), X("div",
|
|
22595
|
-
K(t).args?.context ? (Y(), X("div",
|
|
22596
|
-
K(t).args?.recommendation ? (Y(), X("div",
|
|
22597
|
-
a.value.length ? (Y(), X("div",
|
|
22619
|
+
K(t).args?.question ? (Y(), X("div", Zx, W(K(t).args.question), 1)) : Q("", !0),
|
|
22620
|
+
K(t).args?.context ? (Y(), X("div", Qx, W(K(t).args.context), 1)) : Q("", !0),
|
|
22621
|
+
K(t).args?.recommendation ? (Y(), X("div", $x, "💡 推荐:" + W(K(t).args.recommendation), 1)) : Q("", !0),
|
|
22622
|
+
a.value.length ? (Y(), X("div", eS, [(Y(!0), X(J, null, ia(a.value, (e) => (Y(), X("button", {
|
|
22598
22623
|
key: e,
|
|
22599
22624
|
class: "approval-opt",
|
|
22600
22625
|
onClick: (t) => K(n)(e)
|
|
22601
|
-
}, W(e), 9,
|
|
22602
|
-
Z("div",
|
|
22626
|
+
}, W(e), 9, tS))), 128))])) : Q("", !0),
|
|
22627
|
+
Z("div", nS, [Z("button", {
|
|
22603
22628
|
class: "approval-deny",
|
|
22604
22629
|
onClick: s[0] ||= (e) => K(n)(!1)
|
|
22605
22630
|
}, "拒绝"), a.value.length ? Q("", !0) : (Y(), X("button", {
|
|
@@ -22608,17 +22633,17 @@ app.mount('#app');
|
|
|
22608
22633
|
onClick: s[1] ||= (e) => K(n)(!0)
|
|
22609
22634
|
}, "允许"))])
|
|
22610
22635
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
22611
|
-
Z("div",
|
|
22636
|
+
Z("div", rS, [
|
|
22612
22637
|
s[7] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
22613
|
-
Z("span",
|
|
22638
|
+
Z("span", iS, [s[6] ||= ms("需确认工具调用:", -1), Z("code", null, W(K(t).toolName), 1)]),
|
|
22614
22639
|
o.value ? (Y(), X("button", {
|
|
22615
22640
|
key: 0,
|
|
22616
22641
|
class: "approval-toggle",
|
|
22617
22642
|
onClick: s[2] ||= (e) => r.value = !r.value
|
|
22618
22643
|
}, W(r.value ? "收起参数" : "查看参数") + W(r.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
22619
22644
|
]),
|
|
22620
|
-
o.value && r.value ? (Y(), X("pre",
|
|
22621
|
-
Z("div",
|
|
22645
|
+
o.value && r.value ? (Y(), X("pre", aS, W(o.value), 1)) : Q("", !0),
|
|
22646
|
+
Z("div", oS, [Z("button", {
|
|
22622
22647
|
class: "approval-deny",
|
|
22623
22648
|
onClick: s[3] ||= (e) => K(n)(!1)
|
|
22624
22649
|
}, "拒绝"), Z("button", {
|
|
@@ -22627,13 +22652,13 @@ app.mount('#app');
|
|
|
22627
22652
|
}, "允许")])
|
|
22628
22653
|
], 64))])) : Q("", !0);
|
|
22629
22654
|
}
|
|
22630
|
-
}), [["__scopeId", "data-v-296a936f"]]),
|
|
22655
|
+
}), [["__scopeId", "data-v-296a936f"]]), cS = {
|
|
22631
22656
|
key: 0,
|
|
22632
22657
|
class: "conflict-bar"
|
|
22633
|
-
},
|
|
22658
|
+
}, lS = { class: "conflict-head" }, uS = { class: "conflict-title" }, dS = { class: "conflict-detail" }, fS = {
|
|
22634
22659
|
key: 0,
|
|
22635
22660
|
class: "conflict-diff"
|
|
22636
|
-
},
|
|
22661
|
+
}, pS = { class: "conflict-diff-col" }, mS = { class: "conflict-diff-pre" }, hS = { class: "conflict-diff-col" }, gS = { class: "conflict-diff-pre" }, _S = { class: "conflict-actions" }, vS = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22637
22662
|
__name: "ConflictBar",
|
|
22638
22663
|
props: {
|
|
22639
22664
|
pendingConflict: {},
|
|
@@ -22663,19 +22688,19 @@ app.mount('#app');
|
|
|
22663
22688
|
return String(e);
|
|
22664
22689
|
}
|
|
22665
22690
|
});
|
|
22666
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
22667
|
-
Z("div",
|
|
22691
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", cS, [
|
|
22692
|
+
Z("div", lS, [a[6] ||= Z("span", { class: "conflict-icon" }, "⚠️", -1), Z("span", uS, [
|
|
22668
22693
|
a[4] ||= ms("写入冲突:", -1),
|
|
22669
22694
|
Z("code", null, W(e.pendingConflict.path), 1),
|
|
22670
22695
|
a[5] ||= ms(" 已被外部修改", -1)
|
|
22671
22696
|
])]),
|
|
22672
|
-
Z("div",
|
|
22697
|
+
Z("div", dS, " AI 基于「读取时的旧值」准备" + W(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
|
|
22673
22698
|
Z("button", {
|
|
22674
22699
|
class: "conflict-toggle",
|
|
22675
22700
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
22676
22701
|
}, W(n.value ? "收起对比" : "查看值对比") + W(n.value ? " ▴" : " ▾"), 1),
|
|
22677
|
-
n.value ? (Y(), X("div",
|
|
22678
|
-
Z("div",
|
|
22702
|
+
n.value ? (Y(), X("div", fS, [Z("div", pS, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", mS, W(r.value || "(delete 操作无值)"), 1)]), Z("div", hS, [a[8] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", gS, W(i.value), 1)])])) : Q("", !0),
|
|
22703
|
+
Z("div", _S, [
|
|
22679
22704
|
Z("button", {
|
|
22680
22705
|
class: "conflict-keep",
|
|
22681
22706
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
@@ -22694,16 +22719,16 @@ app.mount('#app');
|
|
|
22694
22719
|
])
|
|
22695
22720
|
])) : Q("", !0);
|
|
22696
22721
|
}
|
|
22697
|
-
}), [["__scopeId", "data-v-195e5b23"]]),
|
|
22722
|
+
}), [["__scopeId", "data-v-195e5b23"]]), yS = { class: "chat-footer" }, bS = { class: "chat-input-wrap" }, xS = {
|
|
22698
22723
|
key: 0,
|
|
22699
22724
|
class: "focus-chips"
|
|
22700
|
-
},
|
|
22725
|
+
}, SS = ["title", "onClick"], CS = { class: "focus-chip-path" }, wS = ["onClick"], TS = ["placeholder", "rows"], ES = { class: "input-actions" }, DS = ["disabled", "title"], OS = {
|
|
22701
22726
|
key: 0,
|
|
22702
22727
|
width: "16",
|
|
22703
22728
|
height: "16",
|
|
22704
22729
|
viewBox: "0 0 24 24",
|
|
22705
22730
|
fill: "currentColor"
|
|
22706
|
-
},
|
|
22731
|
+
}, kS = {
|
|
22707
22732
|
key: 1,
|
|
22708
22733
|
width: "18",
|
|
22709
22734
|
height: "18",
|
|
@@ -22711,7 +22736,7 @@ app.mount('#app');
|
|
|
22711
22736
|
fill: "none",
|
|
22712
22737
|
stroke: "currentColor",
|
|
22713
22738
|
"stroke-width": "2"
|
|
22714
|
-
},
|
|
22739
|
+
}, AS = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22715
22740
|
__name: "ChatInput",
|
|
22716
22741
|
props: {
|
|
22717
22742
|
placeholder: {},
|
|
@@ -22719,235 +22744,235 @@ app.mount('#app');
|
|
|
22719
22744
|
},
|
|
22720
22745
|
setup(e) {
|
|
22721
22746
|
let t = Sg(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l } = t, { state: u, stop: d } = t.chat;
|
|
22722
|
-
return (t, f) => (Y(), X("div",
|
|
22747
|
+
return (t, f) => (Y(), X("div", yS, [K(a) ? (Y(), X("button", {
|
|
22723
22748
|
key: 0,
|
|
22724
22749
|
class: "undo-foot-btn",
|
|
22725
22750
|
title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
22726
22751
|
onClick: f[0] ||= (...e) => K(o) && K(o)(...e)
|
|
22727
|
-
}, "↩ 回退")) : Q("", !0), Z("div",
|
|
22728
|
-
K(s).length ? (Y(), X("div",
|
|
22752
|
+
}, "↩ 回退")) : Q("", !0), Z("div", bS, [
|
|
22753
|
+
K(s).length ? (Y(), X("div", xS, [(Y(!0), X(J, null, ia(K(s), (e) => (Y(), X("span", {
|
|
22729
22754
|
key: e.path,
|
|
22730
22755
|
class: "focus-chip",
|
|
22731
22756
|
title: `精修中:${e.path}(点击回看 · ✕ 移除)`,
|
|
22732
22757
|
onClick: (t) => K(l)(e)
|
|
22733
22758
|
}, [
|
|
22734
22759
|
f[4] ||= Z("span", { class: "focus-chip-icon" }, "🎯", -1),
|
|
22735
|
-
Z("code",
|
|
22760
|
+
Z("code", CS, W(e.path), 1),
|
|
22736
22761
|
Z("button", {
|
|
22737
22762
|
type: "button",
|
|
22738
22763
|
class: "focus-chip-x",
|
|
22739
22764
|
"data-test": "focus-clear",
|
|
22740
22765
|
title: "移除此焦点",
|
|
22741
22766
|
onClick: gl((t) => K(c)(e.path), ["stop"])
|
|
22742
|
-
}, "✕", 8,
|
|
22743
|
-
], 8,
|
|
22767
|
+
}, "✕", 8, wS)
|
|
22768
|
+
], 8, SS))), 128))])) : Q("", !0),
|
|
22744
22769
|
qr(Z("textarea", {
|
|
22745
22770
|
"onUpdate:modelValue": f[1] ||= (e) => /* @__PURE__ */ yn(n) ? n.value = e : null,
|
|
22746
22771
|
class: U(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
|
|
22747
22772
|
placeholder: e.placeholder,
|
|
22748
22773
|
rows: e.inputRows,
|
|
22749
22774
|
onKeydown: f[2] ||= (...e) => K(i) && K(i)(...e)
|
|
22750
|
-
}, null, 42,
|
|
22751
|
-
Z("div",
|
|
22775
|
+
}, null, 42, TS), [[pl, K(n)]]),
|
|
22776
|
+
Z("div", ES, [f[7] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
|
|
22752
22777
|
class: U(["send-btn", { "stop-btn": K(u).loading }]),
|
|
22753
22778
|
disabled: !K(u).loading && !K(n).trim(),
|
|
22754
22779
|
title: K(u).loading ? "停止生成" : "发送",
|
|
22755
22780
|
onClick: f[3] ||= (e) => K(u).loading ? K(d)() : K(r)()
|
|
22756
|
-
}, [K(u).loading ? (Y(), X("svg",
|
|
22781
|
+
}, [K(u).loading ? (Y(), X("svg", OS, [...f[5] ||= [Z("rect", {
|
|
22757
22782
|
x: "6",
|
|
22758
22783
|
y: "6",
|
|
22759
22784
|
width: "12",
|
|
22760
22785
|
height: "12",
|
|
22761
22786
|
rx: "2"
|
|
22762
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
22787
|
+
}, null, -1)]])) : (Y(), X("svg", kS, [...f[6] ||= [Z("line", {
|
|
22763
22788
|
x1: "22",
|
|
22764
22789
|
y1: "2",
|
|
22765
22790
|
x2: "11",
|
|
22766
22791
|
y2: "13"
|
|
22767
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
22792
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, DS)])
|
|
22768
22793
|
])]));
|
|
22769
22794
|
}
|
|
22770
|
-
}), [["__scopeId", "data-v-a9087737"]]),
|
|
22795
|
+
}), [["__scopeId", "data-v-a9087737"]]), jS = {
|
|
22771
22796
|
key: 0,
|
|
22772
22797
|
class: "debug-drawer"
|
|
22773
|
-
},
|
|
22798
|
+
}, MS = { class: "drawer-header" }, NS = { class: "tab-group" }, PS = { class: "header-actions" }, FS = {
|
|
22774
22799
|
key: 0,
|
|
22775
22800
|
class: "drawer-filters"
|
|
22776
|
-
},
|
|
22801
|
+
}, IS = ["onClick"], LS = { class: "chip-count" }, RS = { class: "chip-count" }, zS = { class: "drawer-body" }, BS = {
|
|
22777
22802
|
key: 0,
|
|
22778
22803
|
class: "trace-panel"
|
|
22779
|
-
},
|
|
22804
|
+
}, VS = {
|
|
22780
22805
|
key: 0,
|
|
22781
22806
|
class: "trace-empty"
|
|
22782
|
-
},
|
|
22807
|
+
}, HS = { class: "trace-metrics" }, US = { class: "metric-card" }, WS = { class: "metric-card" }, GS = { class: "metric-card" }, KS = { class: "metric-card" }, qS = {
|
|
22783
22808
|
key: 0,
|
|
22784
22809
|
class: "metric-card"
|
|
22785
|
-
},
|
|
22810
|
+
}, JS = {
|
|
22786
22811
|
key: 1,
|
|
22787
22812
|
class: "metric-card"
|
|
22788
|
-
},
|
|
22813
|
+
}, YS = { class: "trace-spans" }, XS = { class: "span-ico" }, ZS = { class: "span-name" }, QS = {
|
|
22789
22814
|
key: 0,
|
|
22790
22815
|
class: "span-dur"
|
|
22791
|
-
},
|
|
22816
|
+
}, $S = {
|
|
22792
22817
|
key: 1,
|
|
22793
22818
|
class: "span-status"
|
|
22794
|
-
},
|
|
22819
|
+
}, eC = {
|
|
22795
22820
|
key: 1,
|
|
22796
22821
|
class: "context-panel"
|
|
22797
|
-
},
|
|
22822
|
+
}, tC = {
|
|
22798
22823
|
key: 0,
|
|
22799
22824
|
class: "trace-empty"
|
|
22800
|
-
},
|
|
22825
|
+
}, nC = { class: "ctx-overview" }, rC = { class: "ctx-occupancy" }, iC = ["title"], aC = { class: "ctx-pct" }, oC = { class: "ctx-kv-row" }, sC = { class: "ctx-kv" }, cC = {
|
|
22801
22826
|
key: 0,
|
|
22802
22827
|
class: "ctx-kv"
|
|
22803
|
-
},
|
|
22828
|
+
}, lC = {
|
|
22804
22829
|
key: 1,
|
|
22805
22830
|
class: "ctx-kv"
|
|
22806
|
-
},
|
|
22831
|
+
}, uC = ["title"], dC = { class: "ctx-cat-bar" }, fC = { class: "ctx-cat-tokens" }, pC = {
|
|
22807
22832
|
key: 0,
|
|
22808
22833
|
class: "ctx-compression"
|
|
22809
|
-
},
|
|
22834
|
+
}, mC = { class: "ctx-kv-row" }, hC = { class: "ctx-kv" }, gC = { class: "ctx-kv" }, _C = { class: "ctx-kv" }, vC = {
|
|
22810
22835
|
key: 0,
|
|
22811
22836
|
class: "ctx-kv"
|
|
22812
|
-
},
|
|
22837
|
+
}, yC = {
|
|
22813
22838
|
key: 2,
|
|
22814
22839
|
class: "subagent-panel"
|
|
22815
|
-
},
|
|
22840
|
+
}, bC = {
|
|
22816
22841
|
key: 0,
|
|
22817
22842
|
class: "trace-empty"
|
|
22818
|
-
},
|
|
22843
|
+
}, xC = {
|
|
22819
22844
|
key: 0,
|
|
22820
22845
|
class: "sub-section"
|
|
22821
|
-
},
|
|
22846
|
+
}, SC = { class: "sub-section-title" }, CC = { class: "sub-head" }, wC = { class: "sub-label" }, TC = { class: "sub-steps-badge" }, EC = { class: "sub-task" }, DC = {
|
|
22822
22847
|
key: 1,
|
|
22823
22848
|
class: "sub-section"
|
|
22824
|
-
},
|
|
22849
|
+
}, OC = { class: "sub-section-title" }, kC = { class: "sub-head" }, AC = { class: "sub-label" }, jC = {
|
|
22825
22850
|
key: 0,
|
|
22826
22851
|
class: "sub-dur"
|
|
22827
|
-
},
|
|
22852
|
+
}, MC = ["onClick"], NC = { class: "sub-task" }, PC = {
|
|
22828
22853
|
key: 0,
|
|
22829
22854
|
class: "sub-result"
|
|
22830
|
-
},
|
|
22855
|
+
}, FC = {
|
|
22831
22856
|
key: 1,
|
|
22832
22857
|
class: "sub-steps-list"
|
|
22833
|
-
},
|
|
22858
|
+
}, IC = { class: "sub-step-kind" }, LC = { class: "sub-step-name" }, RC = { class: "sub-step-ts" }, zC = {
|
|
22834
22859
|
key: 0,
|
|
22835
22860
|
class: "empty"
|
|
22836
|
-
},
|
|
22861
|
+
}, BC = { class: "log-head" }, VC = {
|
|
22837
22862
|
key: 0,
|
|
22838
22863
|
class: "log-source"
|
|
22839
|
-
},
|
|
22864
|
+
}, HC = { class: "log-time" }, UC = { class: "log-body" }, WC = { class: "kv-grid" }, GC = { class: "kv" }, KC = { class: "v" }, qC = { class: "kv" }, JC = { class: "v" }, YC = { class: "kv" }, XC = { class: "v" }, ZC = { class: "kv" }, QC = { class: "v" }, $C = { class: "section-label" }, ew = { class: "chip-row" }, tw = { class: "msg-list" }, nw = { class: "msg-text" }, rw = { class: "badge-row" }, iw = { class: "badge" }, aw = {
|
|
22840
22865
|
key: 0,
|
|
22841
22866
|
class: "badge muted"
|
|
22842
|
-
},
|
|
22867
|
+
}, ow = { class: "badge muted" }, sw = {
|
|
22843
22868
|
key: 1,
|
|
22844
22869
|
class: "badge muted"
|
|
22845
|
-
},
|
|
22870
|
+
}, cw = ["onClick"], lw = {
|
|
22846
22871
|
key: 0,
|
|
22847
22872
|
class: "msg-list"
|
|
22848
|
-
},
|
|
22873
|
+
}, uw = { class: "msg-detail" }, dw = {
|
|
22849
22874
|
key: 0,
|
|
22850
22875
|
class: "msg-text"
|
|
22851
|
-
},
|
|
22876
|
+
}, fw = { class: "tc-inline-name" }, pw = { class: "tc-inline-args" }, mw = {
|
|
22852
22877
|
key: 1,
|
|
22853
22878
|
class: "tc-id"
|
|
22854
|
-
},
|
|
22879
|
+
}, hw = {
|
|
22855
22880
|
key: 1,
|
|
22856
22881
|
class: "log-raw"
|
|
22857
|
-
},
|
|
22882
|
+
}, gw = { class: "badge-row" }, _w = { class: "badge" }, vw = {
|
|
22858
22883
|
key: 0,
|
|
22859
22884
|
class: "badge warn"
|
|
22860
|
-
},
|
|
22885
|
+
}, yw = {
|
|
22861
22886
|
key: 0,
|
|
22862
22887
|
class: "resp-content"
|
|
22863
|
-
},
|
|
22888
|
+
}, bw = {
|
|
22864
22889
|
key: 1,
|
|
22865
22890
|
class: "tc-list"
|
|
22866
|
-
},
|
|
22891
|
+
}, xw = { class: "tc-name" }, Sw = { class: "tc-args" }, Cw = {
|
|
22867
22892
|
key: 2,
|
|
22868
22893
|
class: "usage-row"
|
|
22869
|
-
},
|
|
22894
|
+
}, ww = { class: "usage" }, Tw = { class: "usage" }, Ew = { class: "usage" }, Dw = {
|
|
22870
22895
|
key: 3,
|
|
22871
22896
|
class: "tc-card inline"
|
|
22872
|
-
},
|
|
22897
|
+
}, Ow = { class: "tc-name" }, kw = { class: "tc-args" }, Aw = {
|
|
22873
22898
|
key: 4,
|
|
22874
22899
|
class: "tc-card inline"
|
|
22875
|
-
},
|
|
22900
|
+
}, jw = { class: "tc-name" }, Mw = { class: "tc-args" }, Nw = {
|
|
22876
22901
|
key: 5,
|
|
22877
22902
|
class: "err-box"
|
|
22878
|
-
},
|
|
22903
|
+
}, Pw = { class: "log-footer" }, Fw = ["onClick"], Iw = ["onClick"], Lw = {
|
|
22879
22904
|
key: 0,
|
|
22880
22905
|
class: "log-raw"
|
|
22881
|
-
},
|
|
22906
|
+
}, Rw = {
|
|
22882
22907
|
key: 0,
|
|
22883
22908
|
class: "empty"
|
|
22884
|
-
},
|
|
22909
|
+
}, zw = {
|
|
22885
22910
|
key: 1,
|
|
22886
22911
|
class: "flow-section"
|
|
22887
|
-
},
|
|
22912
|
+
}, Bw = { class: "flow-ico" }, Vw = { class: "flow-label" }, Hw = { class: "flow-detail" }, Uw = { class: "flow-time" }, Ww = { class: "flow-round-head" }, Gw = { class: "flow-round-body" }, Kw = { class: "flow-ico" }, qw = { class: "flow-label" }, Jw = { class: "flow-detail" }, Yw = { class: "flow-time" }, Xw = {
|
|
22888
22913
|
key: 5,
|
|
22889
22914
|
class: "info-body"
|
|
22890
|
-
},
|
|
22915
|
+
}, Zw = {
|
|
22891
22916
|
key: 0,
|
|
22892
22917
|
class: "empty"
|
|
22893
|
-
},
|
|
22918
|
+
}, Qw = { class: "info-section" }, $w = { class: "kv-grid" }, eT = { class: "kv" }, tT = { class: "v" }, nT = { class: "kv" }, rT = { class: "v" }, iT = { class: "kv" }, aT = { class: "v" }, oT = { class: "kv" }, sT = { class: "v" }, cT = {
|
|
22894
22919
|
class: "kv",
|
|
22895
22920
|
style: { "margin-top": "6px" }
|
|
22896
|
-
},
|
|
22921
|
+
}, lT = {
|
|
22897
22922
|
class: "v",
|
|
22898
22923
|
style: { "font-size": "11px" }
|
|
22899
|
-
},
|
|
22924
|
+
}, uT = { class: "info-section" }, dT = { class: "info-title" }, fT = { class: "info-name" }, pT = { class: "info-desc" }, mT = {
|
|
22900
22925
|
key: 0,
|
|
22901
22926
|
class: "info-section"
|
|
22902
|
-
},
|
|
22927
|
+
}, hT = { class: "info-title" }, gT = ["onClick"], _T = { class: "info-desc" }, vT = {
|
|
22903
22928
|
key: 0,
|
|
22904
22929
|
class: "skill-content"
|
|
22905
|
-
},
|
|
22930
|
+
}, yT = {
|
|
22906
22931
|
key: 0,
|
|
22907
22932
|
class: "skill-loading"
|
|
22908
|
-
},
|
|
22933
|
+
}, bT = {
|
|
22909
22934
|
key: 1,
|
|
22910
22935
|
class: "skill-error"
|
|
22911
|
-
},
|
|
22936
|
+
}, xT = {
|
|
22912
22937
|
key: 2,
|
|
22913
22938
|
class: "skill-pre"
|
|
22914
|
-
},
|
|
22939
|
+
}, ST = {
|
|
22915
22940
|
key: 1,
|
|
22916
22941
|
class: "info-section"
|
|
22917
|
-
},
|
|
22942
|
+
}, CT = { class: "info-item" }, wT = { class: "info-name" }, TT = { class: "info-desc" }, ET = { class: "info-section" }, DT = { class: "kv-grid" }, OT = { class: "kv" }, kT = { class: "v" }, AT = { class: "kv" }, jT = { class: "v" }, MT = { class: "kv" }, NT = { class: "v" }, PT = { class: "kv" }, FT = {
|
|
22918
22943
|
class: "v",
|
|
22919
22944
|
style: { "font-size": "11px" }
|
|
22920
|
-
},
|
|
22945
|
+
}, IT = {
|
|
22921
22946
|
key: 2,
|
|
22922
22947
|
class: "info-section"
|
|
22923
|
-
},
|
|
22948
|
+
}, LT = { class: "info-title" }, RT = { class: "info-name" }, zT = { class: "src-tag mcp" }, BT = { class: "info-desc" }, VT = {
|
|
22924
22949
|
key: 3,
|
|
22925
22950
|
class: "info-section"
|
|
22926
|
-
},
|
|
22951
|
+
}, HT = { class: "kv-grid" }, UT = { class: "kv" }, WT = { class: "v" }, GT = { class: "kv" }, KT = { class: "v" }, qT = { class: "kv" }, JT = { class: "v" }, YT = {
|
|
22927
22952
|
key: 0,
|
|
22928
22953
|
class: "kv"
|
|
22929
|
-
},
|
|
22954
|
+
}, XT = {
|
|
22930
22955
|
class: "v",
|
|
22931
22956
|
style: { "font-size": "11px" }
|
|
22932
|
-
},
|
|
22957
|
+
}, ZT = {
|
|
22933
22958
|
key: 4,
|
|
22934
22959
|
class: "info-section"
|
|
22935
|
-
},
|
|
22960
|
+
}, QT = { class: "info-title" }, $T = {
|
|
22936
22961
|
key: 5,
|
|
22937
22962
|
class: "info-section"
|
|
22938
|
-
},
|
|
22963
|
+
}, eE = { class: "info-pre" }, tE = {
|
|
22939
22964
|
key: 6,
|
|
22940
22965
|
class: "info-section"
|
|
22941
|
-
},
|
|
22966
|
+
}, nE = { class: "info-kv" }, rE = { class: "kv" }, iE = { class: "v" }, aE = { class: "kv" }, oE = { class: "v" }, sE = { class: "kv" }, cE = { class: "v" }, lE = { class: "kv" }, uE = { class: "v" }, dE = { class: "kv" }, fE = {
|
|
22942
22967
|
class: "v",
|
|
22943
22968
|
style: { "font-size": "11px" }
|
|
22944
|
-
},
|
|
22969
|
+
}, pE = {
|
|
22945
22970
|
key: 0,
|
|
22946
22971
|
class: "kv"
|
|
22947
|
-
},
|
|
22972
|
+
}, mE = {
|
|
22948
22973
|
class: "v",
|
|
22949
22974
|
style: { "font-size": "11px" }
|
|
22950
|
-
},
|
|
22975
|
+
}, hE = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
22951
22976
|
__name: "DebugDrawer",
|
|
22952
22977
|
props: {
|
|
22953
22978
|
logs: { default: () => [] },
|
|
@@ -23192,8 +23217,8 @@ app.mount('#app');
|
|
|
23192
23217
|
}
|
|
23193
23218
|
}
|
|
23194
23219
|
return (t, n) => (Y(), ns(mi, { to: "body" }, [ls(pc, { name: "drawer" }, {
|
|
23195
|
-
default: Gr(() => [e.visible ? (Y(), X("div",
|
|
23196
|
-
Z("div",
|
|
23220
|
+
default: Gr(() => [e.visible ? (Y(), X("div", jS, [Z("div", { class: U(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
23221
|
+
Z("div", MS, [Z("div", NS, [
|
|
23197
23222
|
Z("button", {
|
|
23198
23223
|
class: U(["tab-btn", { active: y.value === "logs" }]),
|
|
23199
23224
|
onClick: n[0] ||= (e) => w("logs")
|
|
@@ -23222,7 +23247,7 @@ app.mount('#app');
|
|
|
23222
23247
|
class: U(["tab-btn", { active: y.value === "info" }]),
|
|
23223
23248
|
onClick: n[5] ||= (e) => w("info")
|
|
23224
23249
|
}, "🧬 Agent 信息", 2)) : Q("", !0)
|
|
23225
|
-
]), Z("div",
|
|
23250
|
+
]), Z("div", PS, [y.value === "logs" ? (Y(), X("button", {
|
|
23226
23251
|
key: 0,
|
|
23227
23252
|
class: "hd-btn",
|
|
23228
23253
|
title: "清空日志",
|
|
@@ -23232,38 +23257,38 @@ app.mount('#app');
|
|
|
23232
23257
|
title: "关闭",
|
|
23233
23258
|
onClick: _
|
|
23234
23259
|
}, "✕")])]),
|
|
23235
|
-
y.value === "logs" ? (Y(), X("div",
|
|
23260
|
+
y.value === "logs" ? (Y(), X("div", FS, [(Y(), X(J, null, ia(s, (e, t) => Z("button", {
|
|
23236
23261
|
key: t,
|
|
23237
23262
|
class: U(["filter-chip", { active: i.value === t }]),
|
|
23238
23263
|
style: we({ "--chip-color": e.color }),
|
|
23239
23264
|
onClick: (e) => i.value = t
|
|
23240
|
-
}, [ms(W(e.icon) + " " + W(e.label) + " ", 1), Z("span",
|
|
23265
|
+
}, [ms(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", LS, W(u.value[t] || 0), 1)], 14, IS)), 64)), Z("button", {
|
|
23241
23266
|
class: U(["filter-chip all", { active: i.value === "all" }]),
|
|
23242
23267
|
onClick: n[6] ||= (e) => i.value = "all"
|
|
23243
|
-
}, [n[7] ||= ms(" 全部 ", -1), Z("span",
|
|
23244
|
-
Z("div",
|
|
23245
|
-
y.value === "trace" ? (Y(), X("div",
|
|
23246
|
-
Z("div",
|
|
23247
|
-
Z("div",
|
|
23248
|
-
Z("div",
|
|
23249
|
-
Z("div",
|
|
23250
|
-
j.value.compressions ? (Y(), X("div",
|
|
23251
|
-
j.value.totalTokens ? (Y(), X("div",
|
|
23252
|
-
]), Z("div",
|
|
23268
|
+
}, [n[7] ||= ms(" 全部 ", -1), Z("span", RS, W(u.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
23269
|
+
Z("div", zS, [
|
|
23270
|
+
y.value === "trace" ? (Y(), X("div", BS, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", HS, [
|
|
23271
|
+
Z("div", US, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, W(j.value.rounds), 1)]),
|
|
23272
|
+
Z("div", WS, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, W(j.value.totalDurationMs) + "ms", 1)]),
|
|
23273
|
+
Z("div", GS, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, W(j.value.avgRoundMs) + "ms", 1)]),
|
|
23274
|
+
Z("div", KS, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, W(j.value.toolCalls) + "(✅" + W(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
|
|
23275
|
+
j.value.compressions ? (Y(), X("div", qS, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, W(j.value.compressions), 1)])) : Q("", !0),
|
|
23276
|
+
j.value.totalTokens ? (Y(), X("div", JS, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, W(j.value.totalTokens.total), 1)])) : Q("", !0)
|
|
23277
|
+
]), Z("div", YS, [(Y(!0), X(J, null, ia(A.value, (e) => (Y(), X("div", {
|
|
23253
23278
|
key: e.id,
|
|
23254
23279
|
class: U(["trace-span", [e.type, e.status]])
|
|
23255
23280
|
}, [
|
|
23256
|
-
Z("span",
|
|
23257
|
-
Z("span",
|
|
23258
|
-
e.durationMs ? (Y(), X("span",
|
|
23259
|
-
e.status === "error" ? (Y(), X("span",
|
|
23260
|
-
], 2))), 128))])], 64)) : (Y(), X("div",
|
|
23281
|
+
Z("span", XS, W(te(e.type)), 1),
|
|
23282
|
+
Z("span", ZS, W(e.name), 1),
|
|
23283
|
+
e.durationMs ? (Y(), X("span", QS, W(e.durationMs) + "ms", 1)) : Q("", !0),
|
|
23284
|
+
e.status === "error" ? (Y(), X("span", $S, "❌")) : Q("", !0)
|
|
23285
|
+
], 2))), 128))])], 64)) : (Y(), X("div", VS, [...n[8] ||= [
|
|
23261
23286
|
ms("未开启 tracing(", -1),
|
|
23262
23287
|
Z("code", null, "capabilities.tracing:true", -1),
|
|
23263
23288
|
ms(")或暂无 trace。跑一轮 agent 后刷新。", -1)
|
|
23264
23289
|
]]))])) : Q("", !0),
|
|
23265
|
-
y.value === "context" ? (Y(), X("div",
|
|
23266
|
-
Z("div",
|
|
23290
|
+
y.value === "context" ? (Y(), X("div", eC, [M.value ? (Y(), X(J, { key: 1 }, [
|
|
23291
|
+
Z("div", nC, [Z("div", rC, [Z("div", {
|
|
23267
23292
|
class: "ctx-bar-track",
|
|
23268
23293
|
title: `占用 ${Math.round(M.value.occupancy * 100)}%`
|
|
23269
23294
|
}, [Z("div", {
|
|
@@ -23274,10 +23299,10 @@ app.mount('#app');
|
|
|
23274
23299
|
class: "ctx-threshold-mark",
|
|
23275
23300
|
style: we({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
|
|
23276
23301
|
title: "压缩阈值"
|
|
23277
|
-
}, null, 4)) : Q("", !0)], 8,
|
|
23278
|
-
Z("span",
|
|
23279
|
-
M.value.contextWindow ? (Y(), X("span",
|
|
23280
|
-
M.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
23302
|
+
}, null, 4)) : Q("", !0)], 8, iC), Z("span", aC, W(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", oC, [
|
|
23303
|
+
Z("span", sC, "估算 " + W(M.value.totalTokens) + " token", 1),
|
|
23304
|
+
M.value.contextWindow ? (Y(), X("span", cC, "窗口 " + W(M.value.contextWindow), 1)) : Q("", !0),
|
|
23305
|
+
M.value.thresholdRatio > 0 ? (Y(), X("span", lC, "阈值 " + W(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
23281
23306
|
])]),
|
|
23282
23307
|
n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
|
|
23283
23308
|
(Y(!0), X(J, null, ia(M.value.categories, (e) => (Y(), X("div", {
|
|
@@ -23287,225 +23312,225 @@ app.mount('#app');
|
|
|
23287
23312
|
Z("span", {
|
|
23288
23313
|
class: "ctx-cat-label",
|
|
23289
23314
|
title: e.label
|
|
23290
|
-
}, W(e.label), 9,
|
|
23291
|
-
Z("div",
|
|
23315
|
+
}, W(e.label), 9, uC),
|
|
23316
|
+
Z("div", dC, [Z("div", {
|
|
23292
23317
|
class: "ctx-cat-fill",
|
|
23293
23318
|
style: we({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
23294
23319
|
}, null, 4)]),
|
|
23295
|
-
Z("span",
|
|
23320
|
+
Z("span", fC, [ms(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
|
|
23296
23321
|
]))), 128)),
|
|
23297
|
-
M.value.compression ? (Y(), X("div",
|
|
23298
|
-
Z("span",
|
|
23299
|
-
Z("span",
|
|
23300
|
-
Z("span",
|
|
23301
|
-
M.value.compression.decision ? (Y(), X("span",
|
|
23322
|
+
M.value.compression ? (Y(), X("div", pC, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", mC, [
|
|
23323
|
+
Z("span", hC, "摘要 " + W(M.value.compression.roundsSummarized) + "/" + W(M.value.compression.roundsTotal) + " 轮", 1),
|
|
23324
|
+
Z("span", gC, "召回 " + W(M.value.compression.roundsRecalled), 1),
|
|
23325
|
+
Z("span", _C, W(M.value.compression.strategy), 1),
|
|
23326
|
+
M.value.compression.decision ? (Y(), X("span", vC, "🤖 agent 决策:" + W(ne(M.value.compression.decision)), 1)) : Q("", !0)
|
|
23302
23327
|
])])) : Q("", !0)
|
|
23303
|
-
], 64)) : (Y(), X("div",
|
|
23304
|
-
y.value === "subagent" ? (Y(), X("div",
|
|
23328
|
+
], 64)) : (Y(), X("div", tC, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
|
|
23329
|
+
y.value === "subagent" ? (Y(), X("div", yC, [!P.value.length && !ee.value.length ? (Y(), X("div", bC, [...n[17] ||= [
|
|
23305
23330
|
ms(" 尚未委派子 agent。主 agent 调用 ", -1),
|
|
23306
23331
|
Z("code", null, "use_<id>", -1),
|
|
23307
23332
|
ms(" 或 ", -1),
|
|
23308
23333
|
Z("code", null, "spawn_agent", -1),
|
|
23309
23334
|
ms(" 后,这里展示运行状态与委派历史。 ", -1)
|
|
23310
|
-
]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div",
|
|
23335
|
+
]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div", xC, [Z("div", SC, "▶ 运行中 (" + W(P.value.length) + ")", 1), (Y(!0), X(J, null, ia(P.value, (e, t) => (Y(), X("div", {
|
|
23311
23336
|
key: "a" + t,
|
|
23312
23337
|
class: U(["sub-card", e.status])
|
|
23313
|
-
}, [Z("div",
|
|
23338
|
+
}, [Z("div", CC, [
|
|
23314
23339
|
Z("span", {
|
|
23315
23340
|
class: "sub-status",
|
|
23316
23341
|
style: we({ background: F[e.status] && F[e.status].color || "#9ca3af" })
|
|
23317
23342
|
}, W(F[e.status] && F[e.status].label || e.status), 5),
|
|
23318
|
-
Z("span",
|
|
23319
|
-
Z("span",
|
|
23320
|
-
]), Z("div",
|
|
23343
|
+
Z("span", wC, W(e.label), 1),
|
|
23344
|
+
Z("span", TC, W(e.steps.length) + " 步", 1)
|
|
23345
|
+
]), Z("div", EC, W(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), ee.value.length ? (Y(), X("div", DC, [Z("div", OC, "🕐 历史 (" + W(ee.value.length) + ")", 1), (Y(!0), X(J, null, ia(ee.value, (e, t) => (Y(), X("div", {
|
|
23321
23346
|
key: "h" + t,
|
|
23322
23347
|
class: U(["sub-card", e.status])
|
|
23323
23348
|
}, [
|
|
23324
|
-
Z("div",
|
|
23349
|
+
Z("div", kC, [
|
|
23325
23350
|
Z("span", {
|
|
23326
23351
|
class: "sub-status",
|
|
23327
23352
|
style: we({ background: F[e.status] && F[e.status].color || "#9ca3af" })
|
|
23328
23353
|
}, W(F[e.status] && F[e.status].label || e.status), 5),
|
|
23329
|
-
Z("span",
|
|
23330
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
23354
|
+
Z("span", AC, W(e.label), 1),
|
|
23355
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", jC, W(e.durationMs) + "ms", 1)),
|
|
23331
23356
|
e.steps.length ? (Y(), X("button", {
|
|
23332
23357
|
key: 1,
|
|
23333
23358
|
class: "sub-toggle",
|
|
23334
23359
|
onClick: (e) => L(t)
|
|
23335
|
-
}, W(I.value.has(t) ? "收起" : "步骤"), 9,
|
|
23360
|
+
}, W(I.value.has(t) ? "收起" : "步骤"), 9, MC)) : Q("", !0)
|
|
23336
23361
|
]),
|
|
23337
|
-
Z("div",
|
|
23338
|
-
e.resultPreview ? (Y(), X("div",
|
|
23339
|
-
I.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
23362
|
+
Z("div", NC, W(k(e.task, 80)), 1),
|
|
23363
|
+
e.resultPreview ? (Y(), X("div", PC, W(e.resultPreview), 1)) : Q("", !0),
|
|
23364
|
+
I.value.has(t) && e.steps.length ? (Y(), X("div", FC, [(Y(!0), X(J, null, ia(e.steps, (e, t) => (Y(), X("div", {
|
|
23340
23365
|
key: t,
|
|
23341
23366
|
class: "sub-step"
|
|
23342
23367
|
}, [
|
|
23343
|
-
Z("span",
|
|
23344
|
-
Z("span",
|
|
23345
|
-
Z("span",
|
|
23368
|
+
Z("span", IC, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
23369
|
+
Z("span", LC, W(e.name), 1),
|
|
23370
|
+
Z("span", RC, W(d(e.ts)), 1)
|
|
23346
23371
|
]))), 128))])) : Q("", !0)
|
|
23347
23372
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
23348
|
-
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div",
|
|
23373
|
+
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", zC, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, ia(l.value, (e, t) => (Y(), X("div", {
|
|
23349
23374
|
key: t,
|
|
23350
23375
|
class: "log-item"
|
|
23351
23376
|
}, [
|
|
23352
|
-
Z("div",
|
|
23377
|
+
Z("div", BC, [
|
|
23353
23378
|
Z("span", {
|
|
23354
23379
|
class: "log-type",
|
|
23355
23380
|
style: we({ background: s[e.type].color })
|
|
23356
23381
|
}, W(s[e.type].icon) + " " + W(s[e.type].label), 5),
|
|
23357
|
-
e.source ? (Y(), X("span",
|
|
23358
|
-
Z("span",
|
|
23382
|
+
e.source ? (Y(), X("span", VC, "↳ " + W(e.source), 1)) : Q("", !0),
|
|
23383
|
+
Z("span", HC, W(d(e.timestamp)), 1)
|
|
23359
23384
|
]),
|
|
23360
|
-
Z("div",
|
|
23361
|
-
Z("div",
|
|
23362
|
-
Z("div",
|
|
23363
|
-
Z("div",
|
|
23364
|
-
Z("div",
|
|
23365
|
-
Z("div",
|
|
23385
|
+
Z("div", UC, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
23386
|
+
Z("div", WC, [
|
|
23387
|
+
Z("div", GC, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", KC, W(e.data.model), 1)]),
|
|
23388
|
+
Z("div", qC, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", JC, W(e.data.temperature), 1)]),
|
|
23389
|
+
Z("div", YC, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", XC, W(e.data.maxTokens), 1)]),
|
|
23390
|
+
Z("div", ZC, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", QC, W(e.data.totalMessages), 1)])
|
|
23366
23391
|
]),
|
|
23367
|
-
Z("div",
|
|
23368
|
-
Z("div",
|
|
23392
|
+
Z("div", $C, "工具 (" + W(e.data.tools?.length || 0) + ")", 1),
|
|
23393
|
+
Z("div", ew, [(Y(!0), X(J, null, ia(e.data.tools, (e) => (Y(), X("span", {
|
|
23369
23394
|
key: e,
|
|
23370
23395
|
class: "tool-chip"
|
|
23371
23396
|
}, W(e), 1))), 128))]),
|
|
23372
23397
|
n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
|
|
23373
|
-
Z("div",
|
|
23398
|
+
Z("div", tw, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
|
|
23374
23399
|
key: t,
|
|
23375
23400
|
class: "msg-row"
|
|
23376
23401
|
}, [Z("span", {
|
|
23377
23402
|
class: "msg-role",
|
|
23378
23403
|
style: we({ background: g(e.type).color })
|
|
23379
|
-
}, W(g(e.type).label), 5), Z("span",
|
|
23380
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
23381
|
-
Z("span",
|
|
23382
|
-
e.data.model ? (Y(), X("span",
|
|
23383
|
-
Z("span",
|
|
23384
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
23404
|
+
}, W(g(e.type).label), 5), Z("span", nw, W(e.content), 1)]))), 128))])
|
|
23405
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", rw, [
|
|
23406
|
+
Z("span", iw, "第 " + W(e.data.round) + " 轮", 1),
|
|
23407
|
+
e.data.model ? (Y(), X("span", aw, W(e.data.model), 1)) : Q("", !0),
|
|
23408
|
+
Z("span", ow, W((e.data.messages || []).length) + " 条消息", 1),
|
|
23409
|
+
e.data.tools?.length ? (Y(), X("span", sw, W(e.data.tools.length) + " 工具", 1)) : Q("", !0),
|
|
23385
23410
|
Z("button", {
|
|
23386
23411
|
class: "view-toggle",
|
|
23387
23412
|
onClick: (e) => p(t)
|
|
23388
|
-
}, W(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9,
|
|
23389
|
-
]), o.value.has(t) ? (Y(), X("pre",
|
|
23413
|
+
}, W(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, cw)
|
|
23414
|
+
]), o.value.has(t) ? (Y(), X("pre", hw, [Z("code", null, W(m(e.data.messages)), 1)])) : (Y(), X("div", lw, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
|
|
23390
23415
|
key: t,
|
|
23391
23416
|
class: "msg-row"
|
|
23392
23417
|
}, [Z("span", {
|
|
23393
23418
|
class: "msg-role",
|
|
23394
23419
|
style: we({ background: g(e.role).color })
|
|
23395
|
-
}, W(g(e.role).label), 5), Z("div",
|
|
23396
|
-
e.content ? (Y(), X("span",
|
|
23420
|
+
}, W(g(e.role).label), 5), Z("div", uw, [
|
|
23421
|
+
e.content ? (Y(), X("span", dw, W(e.content), 1)) : Q("", !0),
|
|
23397
23422
|
(Y(!0), X(J, null, ia(e.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
23398
23423
|
key: t,
|
|
23399
23424
|
class: "tc-inline"
|
|
23400
|
-
}, [Z("span",
|
|
23401
|
-
e.tool_call_id ? (Y(), X("span",
|
|
23425
|
+
}, [Z("span", fw, "🔧 " + W(e.function?.name || e.name), 1), Z("code", pw, W(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
23426
|
+
e.tool_call_id ? (Y(), X("span", mw, "↳ tool_call_id: " + W(e.tool_call_id), 1)) : Q("", !0)
|
|
23402
23427
|
])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
23403
|
-
Z("div",
|
|
23404
|
-
e.data.content ? (Y(), X("div",
|
|
23405
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
23428
|
+
Z("div", gw, [Z("span", _w, "第 " + W(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", vw, "🔧 " + W(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
|
|
23429
|
+
e.data.content ? (Y(), X("div", yw, W(e.data.content), 1)) : Q("", !0),
|
|
23430
|
+
e.data.toolCalls?.length ? (Y(), X("div", bw, [(Y(!0), X(J, null, ia(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
23406
23431
|
key: t,
|
|
23407
23432
|
class: "tc-card"
|
|
23408
|
-
}, [Z("div",
|
|
23409
|
-
e.data.usage ? (Y(), X("div",
|
|
23410
|
-
Z("span",
|
|
23411
|
-
Z("span",
|
|
23412
|
-
Z("span",
|
|
23433
|
+
}, [Z("div", xw, "🔧 " + W(e.name), 1), Z("pre", Sw, W(m(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
23434
|
+
e.data.usage ? (Y(), X("div", Cw, [
|
|
23435
|
+
Z("span", ww, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
23436
|
+
Z("span", Tw, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
|
|
23437
|
+
Z("span", Ew, "total: " + W(e.data.usage.total_tokens ?? "-"), 1)
|
|
23413
23438
|
])) : Q("", !0)
|
|
23414
|
-
], 64)) : e.type === "tool_call" ? (Y(), X("div",
|
|
23415
|
-
Z("div",
|
|
23439
|
+
], 64)) : e.type === "tool_call" ? (Y(), X("div", Dw, [Z("div", Ow, "🔧 " + W(e.data.name), 1), Z("pre", kw, W(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", Aw, [Z("div", jw, "✅ " + W(e.data.name) + " 结果", 1), Z("pre", Mw, W(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", Nw, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
|
|
23440
|
+
Z("div", Pw, [Z("button", {
|
|
23416
23441
|
class: "raw-toggle",
|
|
23417
23442
|
onClick: (e) => f(t)
|
|
23418
|
-
}, W(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9,
|
|
23443
|
+
}, W(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, Fw), Z("button", {
|
|
23419
23444
|
class: "raw-toggle",
|
|
23420
23445
|
onClick: (t) => K(yg)(m(e.data))
|
|
23421
|
-
}, "复制", 8,
|
|
23422
|
-
a.value.has(t) ? (Y(), X("pre",
|
|
23446
|
+
}, "复制", 8, Iw)]),
|
|
23447
|
+
a.value.has(t) ? (Y(), X("pre", Lw, [Z("code", null, W(m(e.data)), 1)])) : Q("", !0)
|
|
23423
23448
|
]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
|
|
23424
|
-
c.value.length ? Q("", !0) : (Y(), X("div",
|
|
23425
|
-
O.value.pre.length ? (Y(), X("div",
|
|
23449
|
+
c.value.length ? Q("", !0) : (Y(), X("div", Rw, "暂无日志,发送消息后这里按轮次展示执行流程")),
|
|
23450
|
+
O.value.pre.length ? (Y(), X("div", zw, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, ia(O.value.pre, (e, t) => (Y(), X("div", {
|
|
23426
23451
|
key: "p" + t,
|
|
23427
23452
|
class: U(["flow-node", e.type])
|
|
23428
23453
|
}, [
|
|
23429
|
-
Z("span",
|
|
23430
|
-
Z("span",
|
|
23431
|
-
Z("span",
|
|
23432
|
-
Z("span",
|
|
23454
|
+
Z("span", Bw, W(s[e.type]?.icon), 1),
|
|
23455
|
+
Z("span", Vw, W(s[e.type]?.label), 1),
|
|
23456
|
+
Z("span", Hw, W(R(e)), 1),
|
|
23457
|
+
Z("span", Uw, W(d(e.timestamp)), 1)
|
|
23433
23458
|
], 2))), 128))])) : Q("", !0),
|
|
23434
23459
|
(Y(!0), X(J, null, ia(O.value.rounds, (e) => (Y(), X("div", {
|
|
23435
23460
|
key: e.round,
|
|
23436
23461
|
class: "flow-round"
|
|
23437
|
-
}, [Z("div",
|
|
23462
|
+
}, [Z("div", Ww, "🔁 第 " + W(e.round) + " 轮", 1), Z("div", Gw, [(Y(!0), X(J, null, ia(e.items, (e, t) => (Y(), X("div", {
|
|
23438
23463
|
key: t,
|
|
23439
23464
|
class: U(["flow-node", e.type])
|
|
23440
23465
|
}, [
|
|
23441
|
-
Z("span",
|
|
23442
|
-
Z("span",
|
|
23443
|
-
Z("span",
|
|
23444
|
-
Z("span",
|
|
23466
|
+
Z("span", Kw, W(s[e.type]?.icon), 1),
|
|
23467
|
+
Z("span", qw, W(s[e.type]?.label), 1),
|
|
23468
|
+
Z("span", Jw, W(R(e)), 1),
|
|
23469
|
+
Z("span", Yw, W(d(e.timestamp)), 1)
|
|
23445
23470
|
], 2))), 128))])]))), 128))
|
|
23446
|
-
], 64)) : (Y(), X("div",
|
|
23447
|
-
Z("div",
|
|
23471
|
+
], 64)) : (Y(), X("div", Xw, [b.value ? (Y(), X(J, { key: 1 }, [
|
|
23472
|
+
Z("div", Qw, [
|
|
23448
23473
|
n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
|
|
23449
|
-
Z("div",
|
|
23450
|
-
Z("div",
|
|
23451
|
-
Z("div",
|
|
23452
|
-
Z("div",
|
|
23453
|
-
Z("div",
|
|
23474
|
+
Z("div", $w, [
|
|
23475
|
+
Z("div", eT, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", tT, W(b.value.id), 1)]),
|
|
23476
|
+
Z("div", nT, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", rT, W(b.value.model || "-"), 1)]),
|
|
23477
|
+
Z("div", iT, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", aT, W(b.value.tools.length), 1)]),
|
|
23478
|
+
Z("div", oT, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", sT, W(b.value.middleware.length), 1)])
|
|
23454
23479
|
]),
|
|
23455
|
-
Z("div",
|
|
23480
|
+
Z("div", cT, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", lT, W(b.value.middleware.join(" → ") || "-"), 1)])
|
|
23456
23481
|
]),
|
|
23457
|
-
Z("div",
|
|
23482
|
+
Z("div", uT, [Z("div", dT, "🔧 工具 (" + W(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.tools, (e) => (Y(), X("div", {
|
|
23458
23483
|
key: e.name,
|
|
23459
23484
|
class: "info-item"
|
|
23460
|
-
}, [Z("div",
|
|
23485
|
+
}, [Z("div", fT, [ms(W(e.name), 1), e.source ? (Y(), X("span", {
|
|
23461
23486
|
key: 0,
|
|
23462
23487
|
class: U(["src-tag", D(e.source)])
|
|
23463
|
-
}, W(e.source), 3)) : Q("", !0)]), Z("div",
|
|
23464
|
-
b.value.skills.length ? (Y(), X("div",
|
|
23488
|
+
}, W(e.source), 3)) : Q("", !0)]), Z("div", pT, W(e.description), 1)]))), 128))]),
|
|
23489
|
+
b.value.skills.length ? (Y(), X("div", mT, [Z("div", hT, [ms("📘 技能 (" + W(b.value.skills.length) + ")", 1), n[30] ||= Z("span", { class: "info-hint" }, "点击展开查看全文", -1)]), (Y(!0), X(J, null, ia(b.value.skills, (e) => (Y(), X("div", {
|
|
23465
23490
|
key: e.name,
|
|
23466
23491
|
class: "info-item"
|
|
23467
23492
|
}, [
|
|
23468
23493
|
Z("div", {
|
|
23469
23494
|
class: "info-name skill-toggle",
|
|
23470
23495
|
onClick: (t) => S(e.name)
|
|
23471
|
-
}, [Z("span", { class: U(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + W(e.name), 1)], 8,
|
|
23472
|
-
Z("div",
|
|
23473
|
-
x.value[e.name] ? (Y(), X("div",
|
|
23496
|
+
}, [Z("span", { class: U(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + W(e.name), 1)], 8, gT),
|
|
23497
|
+
Z("div", _T, W(e.description), 1),
|
|
23498
|
+
x.value[e.name] ? (Y(), X("div", vT, [x.value[e.name].loading ? (Y(), X("div", yT, "加载中…")) : x.value[e.name].error ? (Y(), X("div", bT, W(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", xT, W(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
23474
23499
|
]))), 128))])) : Q("", !0),
|
|
23475
|
-
b.value.data ? (Y(), X("div",
|
|
23476
|
-
Z("div",
|
|
23477
|
-
Z("div",
|
|
23478
|
-
Z("div",
|
|
23479
|
-
Z("div",
|
|
23480
|
-
Z("div",
|
|
23500
|
+
b.value.data ? (Y(), X("div", ST, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", CT, [Z("div", wT, W(b.value.data.description || "主数据对象"), 1), Z("div", TT, "schema: " + W(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
|
|
23501
|
+
Z("div", ET, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", DT, [
|
|
23502
|
+
Z("div", OT, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", kT, W(b.value.subagent.enabled ? "是" : "否"), 1)]),
|
|
23503
|
+
Z("div", AT, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", jT, W(b.value.subagent.maxDepth), 1)]),
|
|
23504
|
+
Z("div", MT, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", NT, W(b.value.subagent.maxParallel), 1)]),
|
|
23505
|
+
Z("div", PT, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", FT, W(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
|
|
23481
23506
|
])]),
|
|
23482
|
-
b.value.mcp?.servers?.length ? (Y(), X("div",
|
|
23507
|
+
b.value.mcp?.servers?.length ? (Y(), X("div", IT, [Z("div", LT, "🔌 MCP (" + W(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.mcp.servers, (e) => (Y(), X("div", {
|
|
23483
23508
|
key: e.name,
|
|
23484
23509
|
class: "info-item"
|
|
23485
|
-
}, [Z("div",
|
|
23486
|
-
b.value.verify ? (Y(), X("div",
|
|
23487
|
-
Z("div",
|
|
23488
|
-
Z("div",
|
|
23489
|
-
Z("div",
|
|
23490
|
-
b.value.verify.adversarial ? (Y(), X("div",
|
|
23510
|
+
}, [Z("div", RT, [ms(W(e.name) + " ", 1), Z("span", zT, W(e.toolCount) + " 工具", 1)]), Z("div", BT, W(e.url), 1)]))), 128))])) : Q("", !0),
|
|
23511
|
+
b.value.verify ? (Y(), X("div", VT, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", HT, [
|
|
23512
|
+
Z("div", UT, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", WT, W(b.value.verify.enabled ? "是" : "否"), 1)]),
|
|
23513
|
+
Z("div", GT, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", KT, W(b.value.verify.maxAttempts), 1)]),
|
|
23514
|
+
Z("div", qT, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", JT, W(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
|
|
23515
|
+
b.value.verify.adversarial ? (Y(), X("div", YT, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", XT, W(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
|
|
23491
23516
|
])])) : Q("", !0),
|
|
23492
|
-
b.value.todos.length ? (Y(), X("div",
|
|
23517
|
+
b.value.todos.length ? (Y(), X("div", ZT, [Z("div", QT, "📋 任务清单 (" + W(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.todos, (e, t) => (Y(), X("div", {
|
|
23493
23518
|
key: t,
|
|
23494
23519
|
class: "info-todo"
|
|
23495
23520
|
}, [Z("span", {
|
|
23496
23521
|
class: "todo-tag",
|
|
23497
23522
|
style: we({ background: T[e.status] && T[e.status].color || "#9ca3af" })
|
|
23498
23523
|
}, W(E(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
|
|
23499
|
-
b.value.memory ? (Y(), X("div",
|
|
23500
|
-
b.value.lastCompression ? (Y(), X("div",
|
|
23501
|
-
Z("div",
|
|
23502
|
-
Z("div",
|
|
23503
|
-
Z("div",
|
|
23504
|
-
Z("div",
|
|
23505
|
-
Z("div",
|
|
23506
|
-
b.value.lastCompression.decision ? (Y(), X("div",
|
|
23524
|
+
b.value.memory ? (Y(), X("div", $T, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", eE, W(b.value.memory), 1)])) : Q("", !0),
|
|
23525
|
+
b.value.lastCompression ? (Y(), X("div", tE, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", nE, [
|
|
23526
|
+
Z("div", rE, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", iE, W(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
|
|
23527
|
+
Z("div", aE, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", oE, W(b.value.lastCompression.roundsSummarized) + " / " + W(b.value.lastCompression.roundsTotal), 1)]),
|
|
23528
|
+
Z("div", sE, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", cE, W(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
|
|
23529
|
+
Z("div", lE, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", uE, W(b.value.lastCompression.originalMessages) + " → " + W(b.value.lastCompression.compressedMessages), 1)]),
|
|
23530
|
+
Z("div", dE, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", fE, W(b.value.lastCompression.strategy), 1)]),
|
|
23531
|
+
b.value.lastCompression.decision ? (Y(), X("div", pE, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", mE, "🤖 " + W(ne(b.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
23507
23532
|
])])) : Q("", !0)
|
|
23508
|
-
], 64)) : (Y(), X("div",
|
|
23533
|
+
], 64)) : (Y(), X("div", Zw, "暂无信息"))]))
|
|
23509
23534
|
])
|
|
23510
23535
|
], 2), Z("div", {
|
|
23511
23536
|
class: "drawer-mask",
|
|
@@ -23514,16 +23539,16 @@ app.mount('#app');
|
|
|
23514
23539
|
_: 1
|
|
23515
23540
|
})]));
|
|
23516
23541
|
}
|
|
23517
|
-
}), [["__scopeId", "data-v-bb8e2650"]]),
|
|
23542
|
+
}), [["__scopeId", "data-v-bb8e2650"]]), gE = { class: "skill-panel" }, _E = { class: "skill-header" }, vE = { class: "skill-section" }, yE = { class: "section-title" }, bE = { class: "field" }, xE = ["disabled"], SE = { class: "field" }, CE = { class: "field field-textarea" }, wE = {
|
|
23518
23543
|
key: 0,
|
|
23519
23544
|
class: "skill-error"
|
|
23520
|
-
},
|
|
23545
|
+
}, TE = { class: "skill-section" }, EE = { class: "section-title" }, DE = {
|
|
23521
23546
|
key: 0,
|
|
23522
23547
|
class: "empty-hint"
|
|
23523
|
-
},
|
|
23548
|
+
}, OE = {
|
|
23524
23549
|
key: 1,
|
|
23525
23550
|
class: "skill-list"
|
|
23526
|
-
},
|
|
23551
|
+
}, kE = { class: "skill-actions" }, AE = ["onClick"], jE = ["onClick"], ME = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
23527
23552
|
__name: "SkillPanel",
|
|
23528
23553
|
props: {
|
|
23529
23554
|
visible: { type: Boolean },
|
|
@@ -23577,54 +23602,54 @@ app.mount('#app');
|
|
|
23577
23602
|
key: 0,
|
|
23578
23603
|
class: "skill-mask",
|
|
23579
23604
|
onClick: n[4] ||= gl((e) => r("close"), ["self"])
|
|
23580
|
-
}, [Z("div",
|
|
23581
|
-
Z("div",
|
|
23605
|
+
}, [Z("div", gE, [
|
|
23606
|
+
Z("div", _E, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
|
|
23582
23607
|
class: "skill-close",
|
|
23583
23608
|
title: "关闭",
|
|
23584
23609
|
onClick: n[0] ||= (e) => r("close")
|
|
23585
23610
|
}, "✕")]),
|
|
23586
|
-
Z("div",
|
|
23587
|
-
Z("div",
|
|
23611
|
+
Z("div", vE, [
|
|
23612
|
+
Z("div", yE, [ms(W(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
|
|
23588
23613
|
key: 0,
|
|
23589
23614
|
class: "btn btn-ghost btn-cancel",
|
|
23590
23615
|
title: "取消编辑,回到新建",
|
|
23591
23616
|
onClick: h
|
|
23592
23617
|
}, "取消编辑")) : Q("", !0)]),
|
|
23593
|
-
Z("label",
|
|
23618
|
+
Z("label", bE, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), qr(Z("input", {
|
|
23594
23619
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
23595
23620
|
disabled: !!u.value,
|
|
23596
23621
|
placeholder: "如:my-writer",
|
|
23597
23622
|
class: "field-input"
|
|
23598
|
-
}, null, 8,
|
|
23599
|
-
Z("label",
|
|
23623
|
+
}, null, 8, xE), [[pl, i.value]])]),
|
|
23624
|
+
Z("label", SE, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), qr(Z("input", {
|
|
23600
23625
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
23601
23626
|
placeholder: "一句话说明用途与触发时机",
|
|
23602
23627
|
class: "field-input"
|
|
23603
23628
|
}, null, 512), [[pl, a.value]])]),
|
|
23604
|
-
Z("label",
|
|
23629
|
+
Z("label", CE, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), qr(Z("textarea", {
|
|
23605
23630
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
23606
23631
|
placeholder: "skill 全文指令(支持 Markdown)",
|
|
23607
23632
|
rows: "6",
|
|
23608
23633
|
class: "field-input"
|
|
23609
23634
|
}, null, 512), [[pl, o.value]])]),
|
|
23610
|
-
s.value ? (Y(), X("div",
|
|
23635
|
+
s.value ? (Y(), X("div", wE, W(s.value), 1)) : Q("", !0),
|
|
23611
23636
|
Z("button", {
|
|
23612
23637
|
class: "btn btn-primary",
|
|
23613
23638
|
onClick: f
|
|
23614
23639
|
}, W(u.value ? "保存修改" : "添加 Skill"), 1)
|
|
23615
23640
|
]),
|
|
23616
|
-
Z("div",
|
|
23641
|
+
Z("div", TE, [Z("div", EE, "已创建 Skill(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", OE, [(Y(!0), X(J, null, ia(c.value, (e) => (Y(), X("li", {
|
|
23617
23642
|
key: e,
|
|
23618
23643
|
class: "skill-item"
|
|
23619
|
-
}, [Z("span", { class: U(["skill-name", { active: u.value === e }]) }, W(e), 3), Z("span",
|
|
23644
|
+
}, [Z("span", { class: U(["skill-name", { active: u.value === e }]) }, W(e), 3), Z("span", kE, [Z("button", {
|
|
23620
23645
|
class: "btn btn-ghost btn-edit",
|
|
23621
23646
|
title: "加载到表单编辑",
|
|
23622
23647
|
onClick: (t) => m(e)
|
|
23623
|
-
}, "编辑", 8,
|
|
23648
|
+
}, "编辑", 8, AE), Z("button", {
|
|
23624
23649
|
class: "btn btn-ghost btn-del",
|
|
23625
23650
|
title: "删除该用户 skill",
|
|
23626
23651
|
onClick: (t) => p(e)
|
|
23627
|
-
}, "删除", 8,
|
|
23652
|
+
}, "删除", 8, jE)])]))), 128))])) : (Y(), X("div", DE, "暂无用户创建的 skill"))]),
|
|
23628
23653
|
n[9] ||= Z("div", { class: "skill-hint" }, [
|
|
23629
23654
|
ms(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
|
|
23630
23655
|
Z("code", null, "load_skill(name)"),
|
|
@@ -23636,7 +23661,7 @@ app.mount('#app');
|
|
|
23636
23661
|
_: 1
|
|
23637
23662
|
})]));
|
|
23638
23663
|
}
|
|
23639
|
-
}), [["__scopeId", "data-v-c6a22ea5"]]),
|
|
23664
|
+
}), [["__scopeId", "data-v-c6a22ea5"]]), NE = /*#__PURE__*/ Fg(/* @__PURE__ */ Mi({
|
|
23640
23665
|
__name: "ChatDialog",
|
|
23641
23666
|
props: {
|
|
23642
23667
|
fetchResponse: {},
|
|
@@ -23780,7 +23805,7 @@ app.mount('#app');
|
|
|
23780
23805
|
key: 0,
|
|
23781
23806
|
name: "cs-slide"
|
|
23782
23807
|
}, {
|
|
23783
|
-
default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(
|
|
23808
|
+
default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(Vx, {
|
|
23784
23809
|
"show-avatar": e.showAvatar,
|
|
23785
23810
|
"show-typing": e.showTyping
|
|
23786
23811
|
}, null, 8, ["show-avatar", "show-typing"]), [[jc, K(a)]])], !0)]),
|
|
@@ -23789,15 +23814,15 @@ app.mount('#app');
|
|
|
23789
23814
|
f("queued") ? aa(t.$slots, "queued", {
|
|
23790
23815
|
key: 1,
|
|
23791
23816
|
chat: K(i)
|
|
23792
|
-
}, () => [ls(
|
|
23817
|
+
}, () => [ls(Yx)], !0) : Q("", !0),
|
|
23793
23818
|
f("approval") ? aa(t.$slots, "approval", {
|
|
23794
23819
|
key: 2,
|
|
23795
23820
|
chat: K(i)
|
|
23796
|
-
}, () => [ls(
|
|
23821
|
+
}, () => [ls(sS)], !0) : Q("", !0),
|
|
23797
23822
|
f("conflict") ? aa(t.$slots, "conflict", {
|
|
23798
23823
|
key: 3,
|
|
23799
23824
|
chat: K(i)
|
|
23800
|
-
}, () => [ls(
|
|
23825
|
+
}, () => [ls(vS, {
|
|
23801
23826
|
"pending-conflict": e.pendingConflict,
|
|
23802
23827
|
"on-resolve": e.onResolveConflict
|
|
23803
23828
|
}, null, 8, ["pending-conflict", "on-resolve"])], !0) : Q("", !0)
|
|
@@ -23806,7 +23831,7 @@ app.mount('#app');
|
|
|
23806
23831
|
key: 2,
|
|
23807
23832
|
name: "cs-slide"
|
|
23808
23833
|
}, {
|
|
23809
|
-
default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(
|
|
23834
|
+
default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(AS, {
|
|
23810
23835
|
placeholder: e.placeholder,
|
|
23811
23836
|
"input-rows": e.inputRows
|
|
23812
23837
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
@@ -23815,7 +23840,7 @@ app.mount('#app');
|
|
|
23815
23840
|
f("debug") ? aa(t.$slots, "debug", {
|
|
23816
23841
|
key: 3,
|
|
23817
23842
|
chat: K(i)
|
|
23818
|
-
}, () => [ls(
|
|
23843
|
+
}, () => [ls(hE, {
|
|
23819
23844
|
visible: K(o),
|
|
23820
23845
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ yn(o) ? o.value = e : null,
|
|
23821
23846
|
logs: e.debugLogs,
|
|
@@ -23834,7 +23859,7 @@ app.mount('#app');
|
|
|
23834
23859
|
f("skill") ? aa(t.$slots, "skill", {
|
|
23835
23860
|
key: 4,
|
|
23836
23861
|
chat: K(i)
|
|
23837
|
-
}, () => [ls(
|
|
23862
|
+
}, () => [ls(ME, {
|
|
23838
23863
|
visible: K(s),
|
|
23839
23864
|
"on-add-skill": e.onAddSkill,
|
|
23840
23865
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -23851,13 +23876,13 @@ app.mount('#app');
|
|
|
23851
23876
|
])], !0) : Q("", !0)
|
|
23852
23877
|
], 6)], 64));
|
|
23853
23878
|
}
|
|
23854
|
-
}), [["__scopeId", "data-v-
|
|
23879
|
+
}), [["__scopeId", "data-v-69c13a8d"]]);
|
|
23855
23880
|
//#endregion
|
|
23856
23881
|
//#region src/core/sdk/mountChatDialog.ts
|
|
23857
|
-
function
|
|
23882
|
+
function PE(e) {
|
|
23858
23883
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
23859
23884
|
return r = Sl(/* @__PURE__ */ Mi({ setup() {
|
|
23860
|
-
return () => Xs(
|
|
23885
|
+
return () => Xs(NE, {
|
|
23861
23886
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
23862
23887
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
23863
23888
|
if (n) {
|
|
@@ -23898,7 +23923,7 @@ function jE(e) {
|
|
|
23898
23923
|
getUserSkillNames: t.skillsController ? () => t.listUserSkills() : void 0,
|
|
23899
23924
|
onGetSkill: t.skillsController ? (e) => t.getUserSkill(e) : void 0,
|
|
23900
23925
|
drawer: n.drawer === !0,
|
|
23901
|
-
csTheme: n.theme === "
|
|
23926
|
+
csTheme: n.theme === "light" ? "light" : "dark",
|
|
23902
23927
|
drawerWidth: n.drawerWidth,
|
|
23903
23928
|
drawerHidden: n.drawerHidden === !0,
|
|
23904
23929
|
inputRows: n.inputRows,
|
|
@@ -23956,12 +23981,12 @@ function jE(e) {
|
|
|
23956
23981
|
}
|
|
23957
23982
|
//#endregion
|
|
23958
23983
|
//#region src/core/sdk/ragSubagent.ts
|
|
23959
|
-
var
|
|
23984
|
+
var FE = "你是知识检索专家。可用工具:search_docs(语义检索)/ load_doc(按 source 加载)/ vfs_grep+vfs_read(搜预注入文档)/ fetch_document(公网 URL)。\n\n工作方式:\n1. 分析任务,拆出需查证的要点(如:需要哪些组件、各自的 props 约束、UI 规范要求);\n2. 多源检索:先 vfs_grep 搜预注入文档(快、静态)→ 不够用 search_docs 语义检索 → 需特定文档用 load_doc → 公网用 fetch_document;\n3. 检索结果不足时换关键词、扩大 topK、或换源重试;\n4. 综合成结构化、可执行结论(不堆原文,提炼成可直接用于决策/配置的信息);\n5. 标注关键信息来源(文档名/段落),便于溯源;检索不到明确说「未检索到」,不编造。\n\n你是只读检索角色,不要尝试修改任何数据。", IE = "# 知识检索策略(RAG)\n\n## 多源决策树\n- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查\n- search_docs:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用\n- load_doc:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档\n- fetch_document:公网 URL —— 查公开资料\n\n## 综合规范\n- 多源交叉验证(关键结论优先 ≥2 源印证,或单一权威源)\n- 标注来源(文档名 / URL / 段落),便于溯源\n- 结构化、可执行结论(组件清单 + 各自 props 约束 + 适用场景),不堆原文\n- 未检索到明确说「未检索到」,不编造;建议替代方案(改关键词 / 建议写代码组件等)\n\n## 何时用何源\n- 静态文档(组件库文档 / UI 规范):vfs_grep\n- 语义相似(「瀑布流组件」「倒计时」「拼团」):search_docs\n- 已知文档 id / URL:load_doc\n- 公开 URL(设计规范网站 / 第三方文档):fetch_document", LE = {
|
|
23960
23985
|
name: "rag-search",
|
|
23961
23986
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
23962
|
-
getContent: () =>
|
|
23987
|
+
getContent: () => IE
|
|
23963
23988
|
};
|
|
23964
|
-
function
|
|
23989
|
+
function RE(e, n, i) {
|
|
23965
23990
|
return r(async ({ query: e, topK: t }) => {
|
|
23966
23991
|
try {
|
|
23967
23992
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -23978,7 +24003,7 @@ function FE(e, n, i) {
|
|
|
23978
24003
|
})
|
|
23979
24004
|
});
|
|
23980
24005
|
}
|
|
23981
|
-
function
|
|
24006
|
+
function zE(e, n) {
|
|
23982
24007
|
return r(async ({ source: e }) => {
|
|
23983
24008
|
try {
|
|
23984
24009
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -23992,11 +24017,11 @@ function IE(e, n) {
|
|
|
23992
24017
|
schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
|
|
23993
24018
|
});
|
|
23994
24019
|
}
|
|
23995
|
-
function
|
|
24020
|
+
function BE(e) {
|
|
23996
24021
|
let { retriever: t, loader: n, useVfs: r = !0, id: i = "rag", description: a, topK: o = 5, searchToolName: s = "search_docs", loadToolName: c = "load_doc", maxToolRounds: l = 8, summarization: u, skills: d, extraTools: f } = e;
|
|
23997
24022
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
23998
24023
|
let p = [];
|
|
23999
|
-
t && p.push(
|
|
24024
|
+
t && p.push(RE(s, t, o)), n && p.push(zE(c, n)), f && p.push(...f);
|
|
24000
24025
|
let m = r ? [
|
|
24001
24026
|
"vfs_grep",
|
|
24002
24027
|
"vfs_read",
|
|
@@ -24005,17 +24030,17 @@ function LE(e) {
|
|
|
24005
24030
|
return {
|
|
24006
24031
|
id: i,
|
|
24007
24032
|
description: a ?? "检索知识库(组件文档/UI 规范/业务规则),返回有依据的结构化结论。需要查阅文档才能回答或决定如何配置时委派",
|
|
24008
|
-
systemPrompt:
|
|
24033
|
+
systemPrompt: FE,
|
|
24009
24034
|
tools: p.length ? p : void 0,
|
|
24010
24035
|
allowedTools: m,
|
|
24011
|
-
skills: d ?? [
|
|
24036
|
+
skills: d ?? [LE],
|
|
24012
24037
|
maxToolRounds: l,
|
|
24013
24038
|
...u === void 0 ? {} : { summarization: u }
|
|
24014
24039
|
};
|
|
24015
24040
|
}
|
|
24016
24041
|
//#endregion
|
|
24017
24042
|
//#region src/core/tools/htmlValidate.ts
|
|
24018
|
-
var
|
|
24043
|
+
var VE = /* @__PURE__ */ new Set([
|
|
24019
24044
|
"area",
|
|
24020
24045
|
"base",
|
|
24021
24046
|
"br",
|
|
@@ -24030,12 +24055,12 @@ var RE = /* @__PURE__ */ new Set([
|
|
|
24030
24055
|
"source",
|
|
24031
24056
|
"track",
|
|
24032
24057
|
"wbr"
|
|
24033
|
-
]),
|
|
24058
|
+
]), HE = /* @__PURE__ */ new Set(["script", "style"]), UE = /* @__PURE__ */ new Set([
|
|
24034
24059
|
"html",
|
|
24035
24060
|
"head",
|
|
24036
24061
|
"body"
|
|
24037
24062
|
]);
|
|
24038
|
-
function
|
|
24063
|
+
function WE(e, t = {}) {
|
|
24039
24064
|
let n = t.sfc === !0, r = [], i = e.length;
|
|
24040
24065
|
if (!e.trim()) return r;
|
|
24041
24066
|
let a = [0];
|
|
@@ -24116,12 +24141,12 @@ function VE(e, t = {}) {
|
|
|
24116
24141
|
}
|
|
24117
24142
|
continue;
|
|
24118
24143
|
}
|
|
24119
|
-
if (
|
|
24144
|
+
if (UE.has(m) && r.push({
|
|
24120
24145
|
line: o(t),
|
|
24121
24146
|
code: "DOC_TAG_IN_FRAGMENT",
|
|
24122
24147
|
message: `<${m}> 不应出现(v-html 注入场景只输出内容片段,不要 html/head/body 外围)`
|
|
24123
|
-
}), !(
|
|
24124
|
-
if (
|
|
24148
|
+
}), !(VE.has(m) || h)) {
|
|
24149
|
+
if (HE.has(m)) {
|
|
24125
24150
|
m === "script" && !n && r.push({
|
|
24126
24151
|
line: o(t),
|
|
24127
24152
|
code: "SCRIPT_IN_FRAGMENT",
|
|
@@ -24155,7 +24180,7 @@ function VE(e, t = {}) {
|
|
|
24155
24180
|
}
|
|
24156
24181
|
//#endregion
|
|
24157
24182
|
//#region src/core/sdk/htmlSubagent.ts
|
|
24158
|
-
function
|
|
24183
|
+
function GE(e, t) {
|
|
24159
24184
|
let n = t === "html" ? "html" : "vue";
|
|
24160
24185
|
return `你是纯代码组件生成专家。可用工具:vfs_write / vfs_edit / vfs_rm(写/改/删代码工作副本 vfs ${e}) / vfs_read + vfs_grep(读 vfs) / validate_code(代码格式自检) / write + set(写 data,writablePaths 限定) / read / write_todos + update_todo(规划)。
|
|
24161
24186
|
|
|
@@ -24165,7 +24190,7 @@ function HE(e, t) {
|
|
|
24165
24190
|
- __pgId 是框架管的内部字段(组件稳定映射键):read 看不到、write 写不进,你别碰
|
|
24166
24191
|
|
|
24167
24192
|
两条工作路径:
|
|
24168
|
-
- **修改已有组件**(改颜色/文案/布局等):必经 vfs ——
|
|
24193
|
+
- **修改已有组件**(改颜色/文案/布局等):必经 vfs —— 上下文有「组件代码文件地图」(name → vfs 路径),按 name 找到对应文件直接 vfs_edit 增量改目标片段 → validate_code 自检;框架自动回写 data.code。勿直接 write data.code 改已有组件(绕过 vfs/verify,且无增量友好);文件未检出时先 vfs_write 创建
|
|
24169
24194
|
- **新建组件**:write({ patch:{ op:'set', jsonPath:'components.N', value:{ name, code:<正文>, props } } }) —— code 作为字段值直接进 data,框架自动补 __pgId
|
|
24170
24195
|
|
|
24171
24196
|
焦点精修(若继承到主 agent 焦点):
|
|
@@ -24189,16 +24214,16 @@ ${t === "html" ? `- 输出纯 HTML 片段(.${n}):结构 + 内联 <style>(class
|
|
|
24189
24214
|
5. 生成/修改完成后必须调 validate_code 自检(标签闭合 + 片段契约),报错用 vfs_edit 修正后复查,直到通过;
|
|
24190
24215
|
6. 最后 read(vfs + data)确认结构正确;只写 writablePaths 内 data + ${e} 下 vfs。`;
|
|
24191
24216
|
}
|
|
24192
|
-
var
|
|
24217
|
+
var KE = "# 纯代码组件生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs —— 按上下文「组件代码文件地图」(name → vfs 路径)定位文件,vfs_edit 增量改 → validate_code;勿直接 write data.code;文件未检出先 vfs_write 创建\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 焦点精修(继承主 agent 焦点时)\n- 上下文提示「当前精修目标」(如 components.2(banner))→ 只改该焦点组件的代码文件;改其他组件会被 PATH_DENIED 硬拦\n- 聚焦模式不能新建组件(数据写被拦),要新建先反馈主 agent 取消焦点\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制交互 / 一次性特效 / 特殊布局)→ 写 custom 代码组件\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## Vue SFC 规范\n- Vue 3 <template> + <script setup>(组合式)\n- props 用 defineProps;事件用 defineEmits\n- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)\n\n## 输出契约(必须)\n- 渲染产物经 v-html 等方式注入宿主:<template> 内不要 <!DOCTYPE> / <html> / <head> / <body> 外围标签,只输出内容片段\n- <template> 内不写 <script>;不引入外部脚本 / CDN\n- 每次生成/修改后调 validate_code 自检,报错修正直到通过\n\n## props 定义\n- 代码组件 defineProps 接受外部 data 传入(集成方渲染时按 data 的 props 字段传)\n\n## 组件库引用\n- 代码内可 import 组件库组件(如 <Button>);所用依赖以集成方渲染层已注入为准,不重复造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", qE = "# HTML 片段生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs —— 按上下文「组件代码文件地图」(name → vfs 路径)定位文件,vfs_edit 增量改 → validate_code;勿直接 write data.code;文件未检出先 vfs_write 创建\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 焦点精修(继承主 agent 焦点时)\n- 上下文提示「当前精修目标」(如 components.2(banner))→ 只改该焦点组件的代码文件;改其他组件会被 PATH_DENIED 硬拦\n- 聚焦模式不能新建组件(数据写被拦),要新建先反馈主 agent 取消焦点\n\n## 输出契约(必须)\n- 输出经 v-html 注入宿主的 HTML 片段:不要 <!DOCTYPE>,不要 <html> / <head> / <body> 外围标签\n- 单根元素包裹(如 <section class=\"hero\">…</section>)\n- 不写 <script>(v-html 注入不执行脚本);交互交宿主页面已有机制\n- 样式用片段内 <style>,class 统一加前缀防冲突(如 .pg-hero-…)\n- 不引入外部脚本 / CDN / 外链样式\n\n## 标签闭合(必须)\n- 非自闭合标签必须成对闭合(<img> / <br> / <input> 等 void 元素除外)\n- 每次生成/修改后调 validate_code 自检,报错用 vfs_edit 修正直到通过\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制布局 / 一次性专题页 / 特殊视觉效果)→ 写 HTML 片段\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", JE = {
|
|
24193
24218
|
name: "html-builder",
|
|
24194
24219
|
description: "纯代码组件(custom Vue SFC)生成规范:代码作为 data 资产 / vfs 工作副本 / SFC 规范 / 输出契约 / props / 组件库引用 / 可访问性",
|
|
24195
|
-
getContent: () =>
|
|
24196
|
-
},
|
|
24220
|
+
getContent: () => KE
|
|
24221
|
+
}, YE = {
|
|
24197
24222
|
name: "html-fragment",
|
|
24198
24223
|
description: "纯 HTML 片段(v-html 注入)生成规范:代码作为 data 资产 / vfs 工作副本 / 无外围标签 / 单根元素 / 标签闭合 / validate_code 自检 / 安全底线 / 可访问性",
|
|
24199
|
-
getContent: () =>
|
|
24224
|
+
getContent: () => qE
|
|
24200
24225
|
};
|
|
24201
|
-
function
|
|
24226
|
+
function XE(e = {}) {
|
|
24202
24227
|
let t = e.vfsPrefix ?? "html/";
|
|
24203
24228
|
return ({ state: e }) => {
|
|
24204
24229
|
let n = e.files;
|
|
@@ -24206,7 +24231,7 @@ function qE(e = {}) {
|
|
|
24206
24231
|
let r = [];
|
|
24207
24232
|
for (let [e, i] of Object.entries(n)) {
|
|
24208
24233
|
if (!e.startsWith(t)) continue;
|
|
24209
|
-
let n =
|
|
24234
|
+
let n = WE(i.content, { sfc: e.endsWith(".vue") });
|
|
24210
24235
|
for (let t of n) r.push(`${e} 第 ${t.line} 行:${t.message}(${t.code})`);
|
|
24211
24236
|
}
|
|
24212
24237
|
return r.length ? {
|
|
@@ -24215,7 +24240,7 @@ function qE(e = {}) {
|
|
|
24215
24240
|
} : { ok: !0 };
|
|
24216
24241
|
};
|
|
24217
24242
|
}
|
|
24218
|
-
function
|
|
24243
|
+
function ZE(e) {
|
|
24219
24244
|
let n;
|
|
24220
24245
|
return {
|
|
24221
24246
|
name: "html-validate-tools",
|
|
@@ -24244,7 +24269,7 @@ function JE(e) {
|
|
|
24244
24269
|
}
|
|
24245
24270
|
let a = [];
|
|
24246
24271
|
for (let e of i) {
|
|
24247
|
-
let t =
|
|
24272
|
+
let t = WE(e.content, { sfc: e.path.endsWith(".vue") });
|
|
24248
24273
|
t.length && a.push(`${e.path}:\n${t.map((e) => ` 第 ${e.line} 行 ${e.message}(${e.code})`).join("\n")}`);
|
|
24249
24274
|
}
|
|
24250
24275
|
return a.length ? `❌ 格式校验未通过:\n${a.join("\n")}\n请用 vfs_edit 修正后重新调用 validate_code 复查。` : `✅ 格式校验通过(${i.map((e) => e.path).join(", ")}:标签闭合、片段契约)。`;
|
|
@@ -24258,17 +24283,17 @@ function JE(e) {
|
|
|
24258
24283
|
})]
|
|
24259
24284
|
};
|
|
24260
24285
|
}
|
|
24261
|
-
var
|
|
24262
|
-
function
|
|
24286
|
+
var QE = 2;
|
|
24287
|
+
function $E(e) {
|
|
24263
24288
|
let { writablePaths: t, codeVfsPrefix: n = "html/", id: r = "html", description: i, planning: a = !0, summarization: o = !0, maxToolRounds: s = 12, temperature: c = .4, skills: l, extraTools: u, codeKind: d = "sfc", formatCheck: f = !0 } = e;
|
|
24264
24289
|
if (!t?.length) throw Error("[page-agent-sdk][createHtmlSubagent] writablePaths 必填(代码组件 data 区,如 [\"components\"])");
|
|
24265
24290
|
let p = d === "html" ? "html" : "vue", m = [];
|
|
24266
|
-
a && m.push(Hu()), f && (m.push(
|
|
24291
|
+
a && m.push(Hu()), f && (m.push(ZE(n)), m.push(Mf({ check: XE({ vfsPrefix: n }) })));
|
|
24267
24292
|
let h = u ?? [];
|
|
24268
24293
|
return {
|
|
24269
24294
|
id: r,
|
|
24270
24295
|
description: i ?? "生成/修改纯代码组件(custom 代码)。代码作为 data 资产(code 字段进 DB),vfs 作工作副本;能规划(write_todos)+ 执行。需写代码组件或灵活定制时委派",
|
|
24271
|
-
systemPrompt:
|
|
24296
|
+
systemPrompt: GE(n, d),
|
|
24272
24297
|
writablePaths: t,
|
|
24273
24298
|
allowedTools: [
|
|
24274
24299
|
"vfs_write",
|
|
@@ -24279,9 +24304,9 @@ function XE(e) {
|
|
|
24279
24304
|
],
|
|
24280
24305
|
middleware: m.length ? m : void 0,
|
|
24281
24306
|
summarization: o === !1 ? void 0 : o,
|
|
24282
|
-
maxVerifyAttempts: f ?
|
|
24307
|
+
maxVerifyAttempts: f ? QE : void 0,
|
|
24283
24308
|
temperature: c,
|
|
24284
|
-
skills: l ?? (d === "html" ? [
|
|
24309
|
+
skills: l ?? (d === "html" ? [YE] : [JE]),
|
|
24285
24310
|
maxToolRounds: s,
|
|
24286
24311
|
tools: h.length ? h : void 0,
|
|
24287
24312
|
_codeAsset: {
|
|
@@ -24293,8 +24318,8 @@ function XE(e) {
|
|
|
24293
24318
|
}
|
|
24294
24319
|
//#endregion
|
|
24295
24320
|
//#region src/core/index.ts
|
|
24296
|
-
function
|
|
24297
|
-
return _g(e,
|
|
24321
|
+
function eD(e) {
|
|
24322
|
+
return _g(e, PE);
|
|
24298
24323
|
}
|
|
24299
24324
|
//#endregion
|
|
24300
|
-
export {
|
|
24325
|
+
export { sS as ApprovalBar, jm as CAPABILITIES, Pm as CONTEXT_PRESETS, NE as ChatDialog, Ig as ChatHeader, AS as ChatInput, mx as CodePreview, Gp as CompressDecisionSchema, vS as ConflictBar, rp as DEFAULT_SYSTEM_PROMPT, hE as DebugDrawer, Hg as FocusBar, qb as HLJS_BLOCK_MAX_CHARS, VE as HTML_VOID_TAGS, Pd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, gx as MessageContent, Vx as MessageList, Nx as MessageRow, Yx as QueuedBar, tf as STOP_WORDS, ME as SkillPanel, op as UNSAFE_KEYS, qh as actionsToInspectInfo, Kh as actionsToTools, Nl as agentError, Zf as analyzeContext, yp as applyPatchToClone, bp as applyPatchToLive, Ml as asAgentError, ip as buildDataPrompt, ap as buildSystemPrompt, bg as chatContextKey, bh as commitSetToBind, np as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, yg as copyText, bu as createAgent, Nd as createApprovalMiddleware, xg as createChatContext, eD as createChatSdk, Wd as createCheckpointManager, Gd as createCheckpointMiddleware, rm as createConflictManager, Qf as createContextInspectorMiddleware, Oh as createDataOps, XE as createHtmlFormatCheck, $E as createHtmlSubagent, Ld as createHumanConfirmMiddleware, Id as createHumanConfirmTool, wm as createMemoryBackend, Ed as createMemoryMiddleware, y as createProxyLlm, BE as createRagSubagent, ud as createSandboxRunner, Nm as createSdkEvents, ug as createSerialRunner, Om as createSessionStore, og as createSkillStore, Of as createSubagentMiddleware, ff as createSubagentTracker, jf as createSubagentsMiddleware, eg as createUsageHintsMiddleware, Mf as createVerifyMiddleware, Dp as createVfs, Em as createWebStorageBackend, Rf as createWriteBackCheck, fp as deepClone, Xh as defineDataToolset, fd as defineSkill, Hp as defineTool, dp as deleteByPath, Kp as deriveTitle, Mu as describeSchemaNode, uu as detectGarbledToolCall, Cp as diffObjects, Ph as domToStructure, Ih as domTools, Yh as domToolsStatic, rf as estimateMessageTokens, af as estimateRoundTokens, Hl as estimateTokens, C as extractReasoningDelta, Qu as extractSchemaHint, $f as extractText, S as extractTextDelta, w as extractUsage, Ah as fetchDocTools, Jh as fetchTools, yh as filterByToolMode, Nu as formatConstraints, Ol as formatZodIssues, lp as getByPath, Fh as getDomTool, zh as getEnvSummary, wu as getSchemaAtPath, xu as getSchemaTopKeys, Gl as getTraceMetrics, vp as hashValue, of as indexSummarize, Hh as inspectEnvTool, Uh as inspectTools, qp as isChatModel, tu as isContextLengthError, Su as isPathAllowed, gm as isQuotaError, sp as isUnsafePath, Jm as jpEval, Al as jsonParseError, hp as limitDepth, $b as markedToHtml, pp as maybeParseValue, T as normalizeUsage, Wl as offloadPassThroughChars, Ul as offloadThresholdChars, qu as presets, Eu as projectBySchema, Tu as projectBySchemaDeep, mp as projectFields, sf as recallRounds, ex as renderMarkdownHtml, Pu as renderSchemaHint, Fu as renderSchemaOverview, Ru as renderSchemaShallow, Mm as resolveCapabilities, Im as resolveContextOptions, Am as resolveDialogConfig, nm as resolveLlm, Vl as resolveModelCaps, km as resolveStorage, Sp as restoreInPlace, xp as restoreLive, jl as routeError, dd as runHostScript, Qm as runSandboxedScript, cp as safeMerge, Rh as safeSerialize, gp as safeStringify, Xm as searchJson, Zh as selectBuiltinTools, up as setByPath, cf as shouldTriggerCompression, Ju as systemPromptHelpers, nf as tokenize, $ as toolError, Cu as unwrapSchema, vg as useChat, Sg as useChatContext, WE as validateHtmlFormat, e as z, kl as zodError };
|