page-agent-sdk 2.41.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/page-agent-sdk.iife.js +78 -78
- package/dist/page-agent-sdk.js +335 -336
- package/dist/page-agent-sdk.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/headless.d.ts +2 -0
- package/types/index.d.ts +2 -0
package/dist/page-agent-sdk.js
CHANGED
|
@@ -12747,7 +12747,7 @@ var dg = { class: "chat-header" }, fg = { class: "header-left" }, pg = { class:
|
|
|
12747
12747
|
let n = e.__vccOpts || e;
|
|
12748
12748
|
for (let [e, r] of t) n[e] = r;
|
|
12749
12749
|
return n;
|
|
12750
|
-
}, wg = /*#__PURE__*/ Cg(Sg, [["__scopeId", "data-v-
|
|
12750
|
+
}, wg = /*#__PURE__*/ Cg(Sg, [["__scopeId", "data-v-9e29849d"]]), Tg = {
|
|
12751
12751
|
key: 0,
|
|
12752
12752
|
class: "focus-bar"
|
|
12753
12753
|
}, Eg = { class: "focus-bar-text" }, Dg = {
|
|
@@ -22109,12 +22109,9 @@ app.mount('#app');
|
|
|
22109
22109
|
}, null, 8, ["code", "lang"])) : Q("", !0)]))], 64));
|
|
22110
22110
|
}
|
|
22111
22111
|
}), ex = {
|
|
22112
|
-
key: 1,
|
|
22113
|
-
class: "typing-text"
|
|
22114
|
-
}, tx = {
|
|
22115
22112
|
key: 0,
|
|
22116
22113
|
class: "stream-cursor"
|
|
22117
|
-
},
|
|
22114
|
+
}, tx = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22118
22115
|
__name: "MessageBubble",
|
|
22119
22116
|
props: {
|
|
22120
22117
|
content: {},
|
|
@@ -22124,43 +22121,39 @@ app.mount('#app');
|
|
|
22124
22121
|
showCursor: { type: Boolean }
|
|
22125
22122
|
},
|
|
22126
22123
|
setup(e) {
|
|
22127
|
-
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [e.showTyping
|
|
22128
|
-
n[0] ||= Z("span", { class: "dot" }, null, -1),
|
|
22129
|
-
n[1] ||= Z("span", { class: "dot" }, null, -1),
|
|
22130
|
-
n[2] ||= Z("span", { class: "dot" }, null, -1)
|
|
22131
|
-
], 64)) : (Y(), X("span", ex, "思考中…"))], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), ns($b, {
|
|
22124
|
+
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: H(["typing-dot", { pulse: e.showTyping }]) }, null, 2), n[0] ||= Z("span", { class: "typing-text" }, "思考中...", -1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), ns($b, {
|
|
22132
22125
|
key: 0,
|
|
22133
22126
|
content: e.content
|
|
22134
|
-
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [ms(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span",
|
|
22127
|
+
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [ms(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", ex)) : Q("", !0)], 64));
|
|
22135
22128
|
}
|
|
22136
|
-
}), [["__scopeId", "data-v-
|
|
22129
|
+
}), [["__scopeId", "data-v-c38029d9"]]), nx = { class: "message-time" }, rx = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22137
22130
|
__name: "MessageTime",
|
|
22138
22131
|
props: { time: {} },
|
|
22139
22132
|
setup(e) {
|
|
22140
|
-
return (t, n) => (Y(), X("div",
|
|
22133
|
+
return (t, n) => (Y(), X("div", nx, U(e.time), 1));
|
|
22141
22134
|
}
|
|
22142
|
-
}), [["__scopeId", "data-v-4a976e4a"]]),
|
|
22135
|
+
}), [["__scopeId", "data-v-4a976e4a"]]), ix = { class: "msg-actions" }, ax = ["title"], ox = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22143
22136
|
__name: "MessageActions",
|
|
22144
22137
|
props: { copied: { type: Boolean } },
|
|
22145
22138
|
emits: ["copy", "regenerate"],
|
|
22146
22139
|
setup(e) {
|
|
22147
|
-
return (t, n) => (Y(), X("div",
|
|
22140
|
+
return (t, n) => (Y(), X("div", ix, [Z("button", {
|
|
22148
22141
|
class: "msg-action-btn",
|
|
22149
22142
|
title: e.copied ? "已复制" : "复制",
|
|
22150
22143
|
onClick: n[0] ||= (e) => t.$emit("copy")
|
|
22151
|
-
}, U(e.copied ? "✓ 已复制" : "📋 复制"), 9,
|
|
22144
|
+
}, U(e.copied ? "✓ 已复制" : "📋 复制"), 9, ax), Z("button", {
|
|
22152
22145
|
class: "msg-action-btn",
|
|
22153
22146
|
title: "重新生成",
|
|
22154
22147
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
22155
22148
|
}, "🔄 重新生成")]));
|
|
22156
22149
|
}
|
|
22157
|
-
}), [["__scopeId", "data-v-33638c4b"]]),
|
|
22150
|
+
}), [["__scopeId", "data-v-33638c4b"]]), sx = ["data-msg-idx"], cx = {
|
|
22158
22151
|
key: 0,
|
|
22159
22152
|
class: "message-avatar"
|
|
22160
|
-
},
|
|
22153
|
+
}, lx = { class: "message-content" }, ux = {
|
|
22161
22154
|
key: 2,
|
|
22162
22155
|
class: "msg-focuses"
|
|
22163
|
-
},
|
|
22156
|
+
}, dx = ["title", "onClick"], fx = ["onClick"], px = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22164
22157
|
__name: "MessageRow",
|
|
22165
22158
|
props: {
|
|
22166
22159
|
message: {},
|
|
@@ -22184,7 +22177,7 @@ app.mount('#app');
|
|
|
22184
22177
|
return (t, c) => (Y(), X("div", {
|
|
22185
22178
|
class: H(["message-row", e.message.role]),
|
|
22186
22179
|
"data-msg-idx": e.index
|
|
22187
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
22180
|
+
}, [e.showAvatar ? (Y(), X("div", cx, U(e.message.role === "user" ? "👤" : "🤖"), 1)) : Q("", !0), Z("div", lx, [
|
|
22188
22181
|
r.value ? (Y(), ns(Ng, {
|
|
22189
22182
|
key: 0,
|
|
22190
22183
|
text: i.value,
|
|
@@ -22195,7 +22188,7 @@ app.mount('#app');
|
|
|
22195
22188
|
key: 1,
|
|
22196
22189
|
steps: a.value
|
|
22197
22190
|
}, null, 8, ["steps"])) : Q("", !0),
|
|
22198
|
-
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div",
|
|
22191
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", ux, [(Y(!0), X(J, null, ia(e.message.focuses, (e) => (Y(), X("span", {
|
|
22199
22192
|
key: e.path,
|
|
22200
22193
|
class: "msg-focus-chip",
|
|
22201
22194
|
title: `回看 ${e.path}`,
|
|
@@ -22204,8 +22197,8 @@ app.mount('#app');
|
|
|
22204
22197
|
type: "button",
|
|
22205
22198
|
class: "msg-focus-chip-x",
|
|
22206
22199
|
onClick: gl((t) => K(n).removeFocus(e.path), ["stop"])
|
|
22207
|
-
}, "✕", 8,
|
|
22208
|
-
ls(
|
|
22200
|
+
}, "✕", 8, fx)], 8, dx))), 128))])) : Q("", !0),
|
|
22201
|
+
ls(tx, {
|
|
22209
22202
|
content: e.message.content,
|
|
22210
22203
|
role: e.message.role,
|
|
22211
22204
|
"is-pending-assistant": e.isPendingAssistant,
|
|
@@ -22218,28 +22211,28 @@ app.mount('#app');
|
|
|
22218
22211
|
"show-typing",
|
|
22219
22212
|
"show-cursor"
|
|
22220
22213
|
]),
|
|
22221
|
-
ls(
|
|
22222
|
-
o.value ? (Y(), ns(
|
|
22214
|
+
ls(rx, { time: e.time }, null, 8, ["time"]),
|
|
22215
|
+
o.value ? (Y(), ns(ox, {
|
|
22223
22216
|
key: 3,
|
|
22224
22217
|
copied: e.copied,
|
|
22225
22218
|
onCopy: c[1] ||= (e) => t.$emit("copy"),
|
|
22226
22219
|
onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
|
|
22227
22220
|
}, null, 8, ["copied"])) : Q("", !0)
|
|
22228
|
-
])], 10,
|
|
22221
|
+
])], 10, sx));
|
|
22229
22222
|
}
|
|
22230
|
-
}), [["__scopeId", "data-v-
|
|
22223
|
+
}), [["__scopeId", "data-v-77afcc15"]]), mx = {
|
|
22231
22224
|
key: 0,
|
|
22232
22225
|
class: "empty-state"
|
|
22233
|
-
},
|
|
22226
|
+
}, hx = {
|
|
22234
22227
|
key: 1,
|
|
22235
22228
|
class: "message-row assistant"
|
|
22236
|
-
},
|
|
22229
|
+
}, gx = {
|
|
22237
22230
|
key: 0,
|
|
22238
22231
|
class: "message-avatar"
|
|
22239
|
-
},
|
|
22232
|
+
}, _x = { class: "message-content" }, vx = {
|
|
22240
22233
|
key: 2,
|
|
22241
22234
|
class: "error-bar"
|
|
22242
|
-
},
|
|
22235
|
+
}, yx = { class: "error-text" }, bx = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22243
22236
|
__name: "MessageList",
|
|
22244
22237
|
props: {
|
|
22245
22238
|
showAvatar: { type: Boolean },
|
|
@@ -22254,8 +22247,8 @@ app.mount('#app');
|
|
|
22254
22247
|
onScroll: y[2] ||= (...e) => K(f) && K(f)(...e),
|
|
22255
22248
|
onWheel: y[3] ||= (...e) => K(p) && K(p)(...e)
|
|
22256
22249
|
}, [
|
|
22257
|
-
g.value ? Q("", !0) : (Y(), X("div",
|
|
22258
|
-
(Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(
|
|
22250
|
+
g.value ? Q("", !0) : (Y(), X("div", mx, [...y[4] ||= [Z("div", { class: "empty-icon" }, "💬", -1), Z("p", null, "有什么可以帮你的?", -1)]])),
|
|
22251
|
+
(Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(px, {
|
|
22259
22252
|
key: c,
|
|
22260
22253
|
message: t,
|
|
22261
22254
|
index: c,
|
|
@@ -22285,15 +22278,15 @@ app.mount('#app');
|
|
|
22285
22278
|
"onCopy",
|
|
22286
22279
|
"onRegenerate"
|
|
22287
22280
|
]))), 128)),
|
|
22288
|
-
K(u).loading && !v.value ? (Y(), X("div",
|
|
22281
|
+
K(u).loading && !v.value ? (Y(), X("div", hx, [e.showAvatar ? (Y(), X("div", gx, "🤖")) : Q("", !0), Z("div", _x, [ls(tx, {
|
|
22289
22282
|
content: "",
|
|
22290
22283
|
role: "assistant",
|
|
22291
22284
|
"is-pending-assistant": !0,
|
|
22292
22285
|
"show-typing": e.showTyping,
|
|
22293
22286
|
"show-cursor": !1
|
|
22294
22287
|
}, null, 8, ["show-typing"])])])) : Q("", !0),
|
|
22295
|
-
K(u).error ? (Y(), X("div",
|
|
22296
|
-
Z("span",
|
|
22288
|
+
K(u).error ? (Y(), X("div", vx, [
|
|
22289
|
+
Z("span", yx, U(K(u).error), 1),
|
|
22297
22290
|
_.value ? (Y(), X("button", {
|
|
22298
22291
|
key: 0,
|
|
22299
22292
|
class: "retry-btn",
|
|
@@ -22308,54 +22301,54 @@ app.mount('#app');
|
|
|
22308
22301
|
])) : Q("", !0)
|
|
22309
22302
|
], 544));
|
|
22310
22303
|
}
|
|
22311
|
-
}), [["__scopeId", "data-v-fe599f6d"]]),
|
|
22304
|
+
}), [["__scopeId", "data-v-fe599f6d"]]), xx = {
|
|
22312
22305
|
key: 0,
|
|
22313
22306
|
class: "queued-bar"
|
|
22314
|
-
},
|
|
22307
|
+
}, Sx = { class: "queued-head" }, Cx = { class: "queued-count" }, wx = { class: "queued-idx" }, Tx = { class: "queued-text" }, Ex = ["onClick"], Dx = ["onClick"], Ox = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22315
22308
|
__name: "QueuedBar",
|
|
22316
22309
|
setup(e) {
|
|
22317
22310
|
let { chat: t, editQueued: n } = ug(), { queuedTasks: r, removeQueuedTask: i } = t;
|
|
22318
|
-
return (e, t) => K(r).length ? (Y(), X("div",
|
|
22311
|
+
return (e, t) => K(r).length ? (Y(), X("div", xx, [Z("div", Sx, [
|
|
22319
22312
|
t[0] ||= Z("span", { class: "queued-icon" }, "📋", -1),
|
|
22320
22313
|
t[1] ||= Z("span", { class: "queued-title" }, "排队中 · 生成完后自动执行", -1),
|
|
22321
|
-
Z("span",
|
|
22314
|
+
Z("span", Cx, U(K(r).length), 1)
|
|
22322
22315
|
]), (Y(!0), X(J, null, ia(K(r), (e, t) => (Y(), X("div", {
|
|
22323
22316
|
key: t,
|
|
22324
22317
|
class: "queued-item"
|
|
22325
22318
|
}, [
|
|
22326
|
-
Z("span",
|
|
22327
|
-
Z("span",
|
|
22319
|
+
Z("span", wx, U(t + 1), 1),
|
|
22320
|
+
Z("span", Tx, U(e), 1),
|
|
22328
22321
|
Z("button", {
|
|
22329
22322
|
class: "queued-act",
|
|
22330
22323
|
title: "修改(填回输入框编辑)",
|
|
22331
22324
|
onClick: (e) => K(n)(t)
|
|
22332
|
-
}, "✏️", 8,
|
|
22325
|
+
}, "✏️", 8, Ex),
|
|
22333
22326
|
Z("button", {
|
|
22334
22327
|
class: "queued-act queued-del",
|
|
22335
22328
|
title: "撤销该任务",
|
|
22336
22329
|
onClick: (e) => K(i)(t)
|
|
22337
|
-
}, "✕", 8,
|
|
22330
|
+
}, "✕", 8, Dx)
|
|
22338
22331
|
]))), 128))])) : Q("", !0);
|
|
22339
22332
|
}
|
|
22340
|
-
}), [["__scopeId", "data-v-f32730a9"]]),
|
|
22333
|
+
}), [["__scopeId", "data-v-f32730a9"]]), kx = {
|
|
22341
22334
|
key: 0,
|
|
22342
22335
|
class: "approval-bar"
|
|
22343
|
-
},
|
|
22336
|
+
}, Ax = {
|
|
22344
22337
|
key: 0,
|
|
22345
22338
|
class: "approval-question"
|
|
22346
|
-
},
|
|
22339
|
+
}, jx = {
|
|
22347
22340
|
key: 1,
|
|
22348
22341
|
class: "approval-context"
|
|
22349
|
-
},
|
|
22342
|
+
}, Mx = {
|
|
22350
22343
|
key: 2,
|
|
22351
22344
|
class: "approval-recommend"
|
|
22352
|
-
},
|
|
22345
|
+
}, Nx = {
|
|
22353
22346
|
key: 3,
|
|
22354
22347
|
class: "approval-options"
|
|
22355
|
-
},
|
|
22348
|
+
}, Px = ["onClick"], Fx = { class: "approval-actions" }, Ix = { class: "approval-head" }, Lx = { class: "approval-title" }, Rx = {
|
|
22356
22349
|
key: 0,
|
|
22357
22350
|
class: "approval-args"
|
|
22358
|
-
},
|
|
22351
|
+
}, zx = { class: "approval-actions" }, Bx = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22359
22352
|
__name: "ApprovalBar",
|
|
22360
22353
|
setup(e) {
|
|
22361
22354
|
let { pendingApproval: t, resolveApproval: n } = ug().chat, r = /* @__PURE__ */ bn(!1);
|
|
@@ -22375,17 +22368,17 @@ app.mount('#app');
|
|
|
22375
22368
|
return String(e);
|
|
22376
22369
|
}
|
|
22377
22370
|
});
|
|
22378
|
-
return (e, s) => K(t) ? (Y(), X("div",
|
|
22371
|
+
return (e, s) => K(t) ? (Y(), X("div", kx, [i.value ? (Y(), X(J, { key: 0 }, [
|
|
22379
22372
|
s[5] ||= Z("div", { class: "approval-head" }, [Z("span", { class: "approval-icon" }, "❓"), Z("span", { class: "approval-title" }, "AI 需要你确认")], -1),
|
|
22380
|
-
K(t).args?.question ? (Y(), X("div",
|
|
22381
|
-
K(t).args?.context ? (Y(), X("div",
|
|
22382
|
-
K(t).args?.recommendation ? (Y(), X("div",
|
|
22383
|
-
a.value.length ? (Y(), X("div",
|
|
22373
|
+
K(t).args?.question ? (Y(), X("div", Ax, U(K(t).args.question), 1)) : Q("", !0),
|
|
22374
|
+
K(t).args?.context ? (Y(), X("div", jx, U(K(t).args.context), 1)) : Q("", !0),
|
|
22375
|
+
K(t).args?.recommendation ? (Y(), X("div", Mx, "💡 推荐:" + U(K(t).args.recommendation), 1)) : Q("", !0),
|
|
22376
|
+
a.value.length ? (Y(), X("div", Nx, [(Y(!0), X(J, null, ia(a.value, (e) => (Y(), X("button", {
|
|
22384
22377
|
key: e,
|
|
22385
22378
|
class: "approval-opt",
|
|
22386
22379
|
onClick: (t) => K(n)(e)
|
|
22387
|
-
}, U(e), 9,
|
|
22388
|
-
Z("div",
|
|
22380
|
+
}, U(e), 9, Px))), 128))])) : Q("", !0),
|
|
22381
|
+
Z("div", Fx, [Z("button", {
|
|
22389
22382
|
class: "approval-deny",
|
|
22390
22383
|
onClick: s[0] ||= (e) => K(n)(!1)
|
|
22391
22384
|
}, "拒绝"), a.value.length ? Q("", !0) : (Y(), X("button", {
|
|
@@ -22394,17 +22387,17 @@ app.mount('#app');
|
|
|
22394
22387
|
onClick: s[1] ||= (e) => K(n)(!0)
|
|
22395
22388
|
}, "允许"))])
|
|
22396
22389
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
22397
|
-
Z("div",
|
|
22390
|
+
Z("div", Ix, [
|
|
22398
22391
|
s[7] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
22399
|
-
Z("span",
|
|
22392
|
+
Z("span", Lx, [s[6] ||= ms("需确认工具调用:", -1), Z("code", null, U(K(t).toolName), 1)]),
|
|
22400
22393
|
o.value ? (Y(), X("button", {
|
|
22401
22394
|
key: 0,
|
|
22402
22395
|
class: "approval-toggle",
|
|
22403
22396
|
onClick: s[2] ||= (e) => r.value = !r.value
|
|
22404
22397
|
}, U(r.value ? "收起参数" : "查看参数") + U(r.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
22405
22398
|
]),
|
|
22406
|
-
o.value && r.value ? (Y(), X("pre",
|
|
22407
|
-
Z("div",
|
|
22399
|
+
o.value && r.value ? (Y(), X("pre", Rx, U(o.value), 1)) : Q("", !0),
|
|
22400
|
+
Z("div", zx, [Z("button", {
|
|
22408
22401
|
class: "approval-deny",
|
|
22409
22402
|
onClick: s[3] ||= (e) => K(n)(!1)
|
|
22410
22403
|
}, "拒绝"), Z("button", {
|
|
@@ -22413,13 +22406,13 @@ app.mount('#app');
|
|
|
22413
22406
|
}, "允许")])
|
|
22414
22407
|
], 64))])) : Q("", !0);
|
|
22415
22408
|
}
|
|
22416
|
-
}), [["__scopeId", "data-v-296a936f"]]),
|
|
22409
|
+
}), [["__scopeId", "data-v-296a936f"]]), Vx = {
|
|
22417
22410
|
key: 0,
|
|
22418
22411
|
class: "conflict-bar"
|
|
22419
|
-
},
|
|
22412
|
+
}, Hx = { class: "conflict-head" }, Ux = { class: "conflict-title" }, Wx = { class: "conflict-detail" }, Gx = {
|
|
22420
22413
|
key: 0,
|
|
22421
22414
|
class: "conflict-diff"
|
|
22422
|
-
},
|
|
22415
|
+
}, Kx = { class: "conflict-diff-col" }, qx = { class: "conflict-diff-pre" }, Jx = { class: "conflict-diff-col" }, Yx = { class: "conflict-diff-pre" }, Xx = { class: "conflict-actions" }, Zx = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22423
22416
|
__name: "ConflictBar",
|
|
22424
22417
|
props: {
|
|
22425
22418
|
pendingConflict: {},
|
|
@@ -22449,19 +22442,19 @@ app.mount('#app');
|
|
|
22449
22442
|
return String(e);
|
|
22450
22443
|
}
|
|
22451
22444
|
});
|
|
22452
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
22453
|
-
Z("div",
|
|
22445
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", Vx, [
|
|
22446
|
+
Z("div", Hx, [a[6] ||= Z("span", { class: "conflict-icon" }, "⚠️", -1), Z("span", Ux, [
|
|
22454
22447
|
a[4] ||= ms("写入冲突:", -1),
|
|
22455
22448
|
Z("code", null, U(e.pendingConflict.path), 1),
|
|
22456
22449
|
a[5] ||= ms(" 已被外部修改", -1)
|
|
22457
22450
|
])]),
|
|
22458
|
-
Z("div",
|
|
22451
|
+
Z("div", Wx, " AI 基于「读取时的旧值」准备" + U(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
|
|
22459
22452
|
Z("button", {
|
|
22460
22453
|
class: "conflict-toggle",
|
|
22461
22454
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
22462
22455
|
}, U(n.value ? "收起对比" : "查看值对比") + U(n.value ? " ▴" : " ▾"), 1),
|
|
22463
|
-
n.value ? (Y(), X("div",
|
|
22464
|
-
Z("div",
|
|
22456
|
+
n.value ? (Y(), X("div", Gx, [Z("div", Kx, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", qx, U(r.value || "(delete 操作无值)"), 1)]), Z("div", Jx, [a[8] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", Yx, U(i.value), 1)])])) : Q("", !0),
|
|
22457
|
+
Z("div", Xx, [
|
|
22465
22458
|
Z("button", {
|
|
22466
22459
|
class: "conflict-keep",
|
|
22467
22460
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
@@ -22480,16 +22473,16 @@ app.mount('#app');
|
|
|
22480
22473
|
])
|
|
22481
22474
|
])) : Q("", !0);
|
|
22482
22475
|
}
|
|
22483
|
-
}), [["__scopeId", "data-v-195e5b23"]]),
|
|
22476
|
+
}), [["__scopeId", "data-v-195e5b23"]]), Qx = { class: "chat-footer" }, $x = { class: "chat-input-wrap" }, eS = {
|
|
22484
22477
|
key: 0,
|
|
22485
22478
|
class: "focus-chips"
|
|
22486
|
-
},
|
|
22479
|
+
}, tS = ["title", "onClick"], nS = { class: "focus-chip-path" }, rS = ["onClick"], iS = ["placeholder", "rows"], aS = { class: "input-actions" }, oS = ["disabled", "title"], sS = {
|
|
22487
22480
|
key: 0,
|
|
22488
22481
|
width: "16",
|
|
22489
22482
|
height: "16",
|
|
22490
22483
|
viewBox: "0 0 24 24",
|
|
22491
22484
|
fill: "currentColor"
|
|
22492
|
-
},
|
|
22485
|
+
}, cS = {
|
|
22493
22486
|
key: 1,
|
|
22494
22487
|
width: "18",
|
|
22495
22488
|
height: "18",
|
|
@@ -22497,7 +22490,7 @@ app.mount('#app');
|
|
|
22497
22490
|
fill: "none",
|
|
22498
22491
|
stroke: "currentColor",
|
|
22499
22492
|
"stroke-width": "2"
|
|
22500
|
-
},
|
|
22493
|
+
}, lS = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22501
22494
|
__name: "ChatInput",
|
|
22502
22495
|
props: {
|
|
22503
22496
|
placeholder: {},
|
|
@@ -22505,242 +22498,243 @@ app.mount('#app');
|
|
|
22505
22498
|
},
|
|
22506
22499
|
setup(e) {
|
|
22507
22500
|
let t = ug(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l } = t, { state: u, stop: d } = t.chat;
|
|
22508
|
-
return (t, f) => (Y(), X("div",
|
|
22501
|
+
return (t, f) => (Y(), X("div", Qx, [K(a) ? (Y(), X("button", {
|
|
22509
22502
|
key: 0,
|
|
22510
22503
|
class: "undo-foot-btn",
|
|
22511
22504
|
title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
22512
22505
|
onClick: f[0] ||= (...e) => K(o) && K(o)(...e)
|
|
22513
|
-
}, "↩ 回退")) : Q("", !0), Z("div",
|
|
22514
|
-
K(s).length ? (Y(), X("div",
|
|
22506
|
+
}, "↩ 回退")) : Q("", !0), Z("div", $x, [
|
|
22507
|
+
K(s).length ? (Y(), X("div", eS, [(Y(!0), X(J, null, ia(K(s), (e) => (Y(), X("span", {
|
|
22515
22508
|
key: e.path,
|
|
22516
22509
|
class: "focus-chip",
|
|
22517
22510
|
title: `精修中:${e.path}(点击回看 · ✕ 移除)`,
|
|
22518
22511
|
onClick: (t) => K(l)(e)
|
|
22519
22512
|
}, [
|
|
22520
22513
|
f[4] ||= Z("span", { class: "focus-chip-icon" }, "🎯", -1),
|
|
22521
|
-
Z("code",
|
|
22514
|
+
Z("code", nS, U(e.path), 1),
|
|
22522
22515
|
Z("button", {
|
|
22523
22516
|
type: "button",
|
|
22524
22517
|
class: "focus-chip-x",
|
|
22525
22518
|
"data-test": "focus-clear",
|
|
22526
22519
|
title: "移除此焦点",
|
|
22527
22520
|
onClick: gl((t) => K(c)(e.path), ["stop"])
|
|
22528
|
-
}, "✕", 8,
|
|
22529
|
-
], 8,
|
|
22521
|
+
}, "✕", 8, rS)
|
|
22522
|
+
], 8, tS))), 128))])) : Q("", !0),
|
|
22530
22523
|
qr(Z("textarea", {
|
|
22531
22524
|
"onUpdate:modelValue": f[1] ||= (e) => /* @__PURE__ */ yn(n) ? n.value = e : null,
|
|
22532
22525
|
class: H(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
|
|
22533
22526
|
placeholder: e.placeholder,
|
|
22534
22527
|
rows: e.inputRows,
|
|
22535
22528
|
onKeydown: f[2] ||= (...e) => K(i) && K(i)(...e)
|
|
22536
|
-
}, null, 42,
|
|
22537
|
-
Z("div",
|
|
22529
|
+
}, null, 42, iS), [[pl, K(n)]]),
|
|
22530
|
+
Z("div", aS, [f[7] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
|
|
22538
22531
|
class: H(["send-btn", { "stop-btn": K(u).loading }]),
|
|
22539
22532
|
disabled: !K(u).loading && !K(n).trim(),
|
|
22540
22533
|
title: K(u).loading ? "停止生成" : "发送",
|
|
22541
22534
|
onClick: f[3] ||= (e) => K(u).loading ? K(d)() : K(r)()
|
|
22542
|
-
}, [K(u).loading ? (Y(), X("svg",
|
|
22535
|
+
}, [K(u).loading ? (Y(), X("svg", sS, [...f[5] ||= [Z("rect", {
|
|
22543
22536
|
x: "6",
|
|
22544
22537
|
y: "6",
|
|
22545
22538
|
width: "12",
|
|
22546
22539
|
height: "12",
|
|
22547
22540
|
rx: "2"
|
|
22548
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
22541
|
+
}, null, -1)]])) : (Y(), X("svg", cS, [...f[6] ||= [Z("line", {
|
|
22549
22542
|
x1: "22",
|
|
22550
22543
|
y1: "2",
|
|
22551
22544
|
x2: "11",
|
|
22552
22545
|
y2: "13"
|
|
22553
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
22546
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, oS)])
|
|
22554
22547
|
])]));
|
|
22555
22548
|
}
|
|
22556
|
-
}), [["__scopeId", "data-v-
|
|
22549
|
+
}), [["__scopeId", "data-v-a9087737"]]), uS = {
|
|
22557
22550
|
key: 0,
|
|
22558
22551
|
class: "debug-drawer"
|
|
22559
|
-
},
|
|
22552
|
+
}, dS = { class: "drawer-header" }, fS = { class: "tab-group" }, pS = { class: "header-actions" }, mS = {
|
|
22560
22553
|
key: 0,
|
|
22561
22554
|
class: "drawer-filters"
|
|
22562
|
-
},
|
|
22555
|
+
}, hS = ["onClick"], gS = { class: "chip-count" }, _S = { class: "chip-count" }, vS = { class: "drawer-body" }, yS = {
|
|
22563
22556
|
key: 0,
|
|
22564
22557
|
class: "trace-panel"
|
|
22565
|
-
},
|
|
22558
|
+
}, bS = {
|
|
22566
22559
|
key: 0,
|
|
22567
22560
|
class: "trace-empty"
|
|
22568
|
-
},
|
|
22561
|
+
}, xS = { class: "trace-metrics" }, SS = { class: "metric-card" }, CS = { class: "metric-card" }, wS = { class: "metric-card" }, TS = { class: "metric-card" }, ES = {
|
|
22569
22562
|
key: 0,
|
|
22570
22563
|
class: "metric-card"
|
|
22571
|
-
},
|
|
22564
|
+
}, DS = {
|
|
22572
22565
|
key: 1,
|
|
22573
22566
|
class: "metric-card"
|
|
22574
|
-
},
|
|
22567
|
+
}, OS = { class: "trace-spans" }, kS = { class: "span-ico" }, AS = { class: "span-name" }, jS = {
|
|
22575
22568
|
key: 0,
|
|
22576
22569
|
class: "span-dur"
|
|
22577
|
-
},
|
|
22570
|
+
}, MS = {
|
|
22578
22571
|
key: 1,
|
|
22579
22572
|
class: "span-status"
|
|
22580
|
-
},
|
|
22573
|
+
}, NS = {
|
|
22581
22574
|
key: 1,
|
|
22582
22575
|
class: "context-panel"
|
|
22583
|
-
},
|
|
22576
|
+
}, PS = {
|
|
22584
22577
|
key: 0,
|
|
22585
22578
|
class: "trace-empty"
|
|
22586
|
-
},
|
|
22579
|
+
}, FS = { class: "ctx-overview" }, IS = { class: "ctx-occupancy" }, LS = ["title"], RS = { class: "ctx-pct" }, zS = { class: "ctx-kv-row" }, BS = { class: "ctx-kv" }, VS = {
|
|
22587
22580
|
key: 0,
|
|
22588
22581
|
class: "ctx-kv"
|
|
22589
|
-
},
|
|
22582
|
+
}, HS = {
|
|
22590
22583
|
key: 1,
|
|
22591
22584
|
class: "ctx-kv"
|
|
22592
|
-
},
|
|
22585
|
+
}, US = ["title"], WS = { class: "ctx-cat-bar" }, GS = { class: "ctx-cat-tokens" }, KS = {
|
|
22593
22586
|
key: 0,
|
|
22594
22587
|
class: "ctx-compression"
|
|
22595
|
-
},
|
|
22588
|
+
}, qS = { class: "ctx-kv-row" }, JS = { class: "ctx-kv" }, YS = { class: "ctx-kv" }, XS = { class: "ctx-kv" }, ZS = {
|
|
22596
22589
|
key: 0,
|
|
22597
22590
|
class: "ctx-kv"
|
|
22598
|
-
},
|
|
22591
|
+
}, QS = {
|
|
22599
22592
|
key: 2,
|
|
22600
22593
|
class: "subagent-panel"
|
|
22601
|
-
},
|
|
22594
|
+
}, $S = {
|
|
22602
22595
|
key: 0,
|
|
22603
22596
|
class: "trace-empty"
|
|
22604
|
-
},
|
|
22597
|
+
}, eC = {
|
|
22605
22598
|
key: 0,
|
|
22606
22599
|
class: "sub-section"
|
|
22607
|
-
},
|
|
22600
|
+
}, tC = { class: "sub-section-title" }, nC = { class: "sub-head" }, rC = { class: "sub-label" }, iC = { class: "sub-steps-badge" }, aC = { class: "sub-task" }, oC = {
|
|
22608
22601
|
key: 1,
|
|
22609
22602
|
class: "sub-section"
|
|
22610
|
-
},
|
|
22603
|
+
}, sC = { class: "sub-section-title" }, cC = { class: "sub-head" }, lC = { class: "sub-label" }, uC = {
|
|
22611
22604
|
key: 0,
|
|
22612
22605
|
class: "sub-dur"
|
|
22613
|
-
},
|
|
22606
|
+
}, dC = ["onClick"], fC = { class: "sub-task" }, pC = {
|
|
22614
22607
|
key: 0,
|
|
22615
22608
|
class: "sub-result"
|
|
22616
|
-
},
|
|
22609
|
+
}, mC = {
|
|
22617
22610
|
key: 1,
|
|
22618
22611
|
class: "sub-steps-list"
|
|
22619
|
-
},
|
|
22612
|
+
}, hC = { class: "sub-step-kind" }, gC = { class: "sub-step-name" }, _C = { class: "sub-step-ts" }, vC = {
|
|
22620
22613
|
key: 0,
|
|
22621
22614
|
class: "empty"
|
|
22622
|
-
},
|
|
22615
|
+
}, yC = { class: "log-head" }, bC = {
|
|
22623
22616
|
key: 0,
|
|
22624
22617
|
class: "log-source"
|
|
22625
|
-
},
|
|
22618
|
+
}, xC = { class: "log-time" }, SC = { class: "log-body" }, CC = { class: "kv-grid" }, wC = { class: "kv" }, TC = { class: "v" }, EC = { class: "kv" }, DC = { class: "v" }, OC = { class: "kv" }, kC = { class: "v" }, AC = { class: "kv" }, jC = { class: "v" }, MC = { class: "section-label" }, NC = { class: "chip-row" }, PC = { class: "msg-list" }, FC = { class: "msg-text" }, IC = { class: "badge-row" }, LC = { class: "badge" }, RC = {
|
|
22626
22619
|
key: 0,
|
|
22627
22620
|
class: "badge muted"
|
|
22628
|
-
},
|
|
22621
|
+
}, zC = { class: "badge muted" }, BC = {
|
|
22629
22622
|
key: 1,
|
|
22630
22623
|
class: "badge muted"
|
|
22631
|
-
},
|
|
22624
|
+
}, VC = ["onClick"], HC = {
|
|
22632
22625
|
key: 0,
|
|
22633
22626
|
class: "msg-list"
|
|
22634
|
-
},
|
|
22627
|
+
}, UC = { class: "msg-detail" }, WC = {
|
|
22635
22628
|
key: 0,
|
|
22636
22629
|
class: "msg-text"
|
|
22637
|
-
},
|
|
22630
|
+
}, GC = { class: "tc-inline-name" }, KC = { class: "tc-inline-args" }, qC = {
|
|
22638
22631
|
key: 1,
|
|
22639
22632
|
class: "tc-id"
|
|
22640
|
-
},
|
|
22633
|
+
}, JC = {
|
|
22641
22634
|
key: 1,
|
|
22642
22635
|
class: "log-raw"
|
|
22643
|
-
},
|
|
22636
|
+
}, YC = { class: "badge-row" }, XC = { class: "badge" }, ZC = {
|
|
22644
22637
|
key: 0,
|
|
22645
22638
|
class: "badge warn"
|
|
22646
|
-
},
|
|
22639
|
+
}, QC = {
|
|
22647
22640
|
key: 0,
|
|
22648
22641
|
class: "resp-content"
|
|
22649
|
-
},
|
|
22642
|
+
}, $C = {
|
|
22650
22643
|
key: 1,
|
|
22651
22644
|
class: "tc-list"
|
|
22652
|
-
},
|
|
22645
|
+
}, ew = { class: "tc-name" }, tw = { class: "tc-args" }, nw = {
|
|
22653
22646
|
key: 2,
|
|
22654
22647
|
class: "usage-row"
|
|
22655
|
-
},
|
|
22648
|
+
}, rw = { class: "usage" }, iw = { class: "usage" }, aw = { class: "usage" }, ow = {
|
|
22656
22649
|
key: 3,
|
|
22657
22650
|
class: "tc-card inline"
|
|
22658
|
-
},
|
|
22651
|
+
}, sw = { class: "tc-name" }, cw = { class: "tc-args" }, lw = {
|
|
22659
22652
|
key: 4,
|
|
22660
22653
|
class: "tc-card inline"
|
|
22661
|
-
},
|
|
22654
|
+
}, uw = { class: "tc-name" }, dw = { class: "tc-args" }, fw = {
|
|
22662
22655
|
key: 5,
|
|
22663
22656
|
class: "err-box"
|
|
22664
|
-
},
|
|
22657
|
+
}, pw = { class: "log-footer" }, mw = ["onClick"], hw = ["onClick"], gw = {
|
|
22665
22658
|
key: 0,
|
|
22666
22659
|
class: "log-raw"
|
|
22667
|
-
},
|
|
22660
|
+
}, _w = {
|
|
22668
22661
|
key: 0,
|
|
22669
22662
|
class: "empty"
|
|
22670
|
-
},
|
|
22663
|
+
}, vw = {
|
|
22671
22664
|
key: 1,
|
|
22672
22665
|
class: "flow-section"
|
|
22673
|
-
},
|
|
22666
|
+
}, yw = { class: "flow-ico" }, bw = { class: "flow-label" }, xw = { class: "flow-detail" }, Sw = { class: "flow-time" }, Cw = { class: "flow-round-head" }, ww = { class: "flow-round-body" }, Tw = { class: "flow-ico" }, Ew = { class: "flow-label" }, Dw = { class: "flow-detail" }, Ow = { class: "flow-time" }, kw = {
|
|
22674
22667
|
key: 5,
|
|
22675
22668
|
class: "info-body"
|
|
22676
|
-
},
|
|
22669
|
+
}, Aw = {
|
|
22677
22670
|
key: 0,
|
|
22678
22671
|
class: "empty"
|
|
22679
|
-
},
|
|
22672
|
+
}, jw = { class: "info-section" }, Mw = { class: "kv-grid" }, Nw = { class: "kv" }, Pw = { class: "v" }, Fw = { class: "kv" }, Iw = { class: "v" }, Lw = { class: "kv" }, Rw = { class: "v" }, zw = { class: "kv" }, Bw = { class: "v" }, Vw = {
|
|
22680
22673
|
class: "kv",
|
|
22681
22674
|
style: { "margin-top": "6px" }
|
|
22682
|
-
},
|
|
22675
|
+
}, Hw = {
|
|
22683
22676
|
class: "v",
|
|
22684
22677
|
style: { "font-size": "11px" }
|
|
22685
|
-
},
|
|
22678
|
+
}, Uw = { class: "info-section" }, Ww = { class: "info-title" }, Gw = { class: "info-name" }, Kw = { class: "info-desc" }, qw = {
|
|
22686
22679
|
key: 0,
|
|
22687
22680
|
class: "info-section"
|
|
22688
|
-
},
|
|
22681
|
+
}, Jw = { class: "info-title" }, Yw = ["onClick"], Xw = { class: "info-desc" }, Zw = {
|
|
22689
22682
|
key: 0,
|
|
22690
22683
|
class: "skill-content"
|
|
22691
|
-
},
|
|
22684
|
+
}, Qw = {
|
|
22692
22685
|
key: 0,
|
|
22693
22686
|
class: "skill-loading"
|
|
22694
|
-
},
|
|
22687
|
+
}, $w = {
|
|
22695
22688
|
key: 1,
|
|
22696
22689
|
class: "skill-error"
|
|
22697
|
-
},
|
|
22690
|
+
}, eT = {
|
|
22698
22691
|
key: 2,
|
|
22699
22692
|
class: "skill-pre"
|
|
22700
|
-
},
|
|
22693
|
+
}, tT = {
|
|
22701
22694
|
key: 1,
|
|
22702
22695
|
class: "info-section"
|
|
22703
|
-
},
|
|
22696
|
+
}, nT = { class: "info-item" }, rT = { class: "info-name" }, iT = { class: "info-desc" }, aT = { class: "info-section" }, oT = { class: "kv-grid" }, sT = { class: "kv" }, cT = { class: "v" }, lT = { class: "kv" }, uT = { class: "v" }, dT = { class: "kv" }, fT = { class: "v" }, pT = { class: "kv" }, mT = {
|
|
22704
22697
|
class: "v",
|
|
22705
22698
|
style: { "font-size": "11px" }
|
|
22706
|
-
},
|
|
22699
|
+
}, hT = {
|
|
22707
22700
|
key: 2,
|
|
22708
22701
|
class: "info-section"
|
|
22709
|
-
},
|
|
22702
|
+
}, gT = { class: "info-title" }, _T = { class: "info-name" }, vT = { class: "src-tag mcp" }, yT = { class: "info-desc" }, bT = {
|
|
22710
22703
|
key: 3,
|
|
22711
22704
|
class: "info-section"
|
|
22712
|
-
},
|
|
22705
|
+
}, xT = { class: "kv-grid" }, ST = { class: "kv" }, CT = { class: "v" }, wT = { class: "kv" }, TT = { class: "v" }, ET = { class: "kv" }, DT = { class: "v" }, OT = {
|
|
22713
22706
|
key: 0,
|
|
22714
22707
|
class: "kv"
|
|
22715
|
-
},
|
|
22708
|
+
}, kT = {
|
|
22716
22709
|
class: "v",
|
|
22717
22710
|
style: { "font-size": "11px" }
|
|
22718
|
-
},
|
|
22711
|
+
}, AT = {
|
|
22719
22712
|
key: 4,
|
|
22720
22713
|
class: "info-section"
|
|
22721
|
-
},
|
|
22714
|
+
}, jT = { class: "info-title" }, MT = {
|
|
22722
22715
|
key: 5,
|
|
22723
22716
|
class: "info-section"
|
|
22724
|
-
},
|
|
22717
|
+
}, NT = { class: "info-pre" }, PT = {
|
|
22725
22718
|
key: 6,
|
|
22726
22719
|
class: "info-section"
|
|
22727
|
-
},
|
|
22720
|
+
}, FT = { class: "info-kv" }, IT = { class: "kv" }, LT = { class: "v" }, RT = { class: "kv" }, zT = { class: "v" }, BT = { class: "kv" }, VT = { class: "v" }, HT = { class: "kv" }, UT = { class: "v" }, WT = { class: "kv" }, GT = {
|
|
22728
22721
|
class: "v",
|
|
22729
22722
|
style: { "font-size": "11px" }
|
|
22730
|
-
},
|
|
22723
|
+
}, KT = {
|
|
22731
22724
|
key: 0,
|
|
22732
22725
|
class: "kv"
|
|
22733
|
-
},
|
|
22726
|
+
}, qT = {
|
|
22734
22727
|
class: "v",
|
|
22735
22728
|
style: { "font-size": "11px" }
|
|
22736
|
-
},
|
|
22729
|
+
}, JT = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
22737
22730
|
__name: "DebugDrawer",
|
|
22738
22731
|
props: {
|
|
22739
22732
|
logs: { default: () => [] },
|
|
22740
22733
|
visible: { type: Boolean },
|
|
22741
22734
|
getInfo: {},
|
|
22742
22735
|
infoTick: {},
|
|
22743
|
-
getSkillContent: {}
|
|
22736
|
+
getSkillContent: {},
|
|
22737
|
+
csTheme: {}
|
|
22744
22738
|
},
|
|
22745
22739
|
emits: ["update:visible", "clear"],
|
|
22746
22740
|
setup(e, { emit: t }) {
|
|
@@ -22977,8 +22971,8 @@ app.mount('#app');
|
|
|
22977
22971
|
}
|
|
22978
22972
|
}
|
|
22979
22973
|
return (t, n) => (Y(), ns(mi, { to: "body" }, [ls(pc, { name: "drawer" }, {
|
|
22980
|
-
default: Gr(() => [e.visible ? (Y(), X("div",
|
|
22981
|
-
Z("div",
|
|
22974
|
+
default: Gr(() => [e.visible ? (Y(), X("div", uS, [Z("div", { class: H(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
22975
|
+
Z("div", dS, [Z("div", fS, [
|
|
22982
22976
|
Z("button", {
|
|
22983
22977
|
class: H(["tab-btn", { active: y.value === "logs" }]),
|
|
22984
22978
|
onClick: n[0] ||= (e) => w("logs")
|
|
@@ -23007,7 +23001,7 @@ app.mount('#app');
|
|
|
23007
23001
|
class: H(["tab-btn", { active: y.value === "info" }]),
|
|
23008
23002
|
onClick: n[5] ||= (e) => w("info")
|
|
23009
23003
|
}, "🧬 Agent 信息", 2)) : Q("", !0)
|
|
23010
|
-
]), Z("div",
|
|
23004
|
+
]), Z("div", pS, [y.value === "logs" ? (Y(), X("button", {
|
|
23011
23005
|
key: 0,
|
|
23012
23006
|
class: "hd-btn",
|
|
23013
23007
|
title: "清空日志",
|
|
@@ -23017,38 +23011,38 @@ app.mount('#app');
|
|
|
23017
23011
|
title: "关闭",
|
|
23018
23012
|
onClick: _
|
|
23019
23013
|
}, "✕")])]),
|
|
23020
|
-
y.value === "logs" ? (Y(), X("div",
|
|
23014
|
+
y.value === "logs" ? (Y(), X("div", mS, [(Y(), X(J, null, ia(s, (e, t) => Z("button", {
|
|
23021
23015
|
key: t,
|
|
23022
23016
|
class: H(["filter-chip", { active: i.value === t }]),
|
|
23023
23017
|
style: Te({ "--chip-color": e.color }),
|
|
23024
23018
|
onClick: (e) => i.value = t
|
|
23025
|
-
}, [ms(U(e.icon) + " " + U(e.label) + " ", 1), Z("span",
|
|
23019
|
+
}, [ms(U(e.icon) + " " + U(e.label) + " ", 1), Z("span", gS, U(u.value[t] || 0), 1)], 14, hS)), 64)), Z("button", {
|
|
23026
23020
|
class: H(["filter-chip all", { active: i.value === "all" }]),
|
|
23027
23021
|
onClick: n[6] ||= (e) => i.value = "all"
|
|
23028
|
-
}, [n[7] ||= ms(" 全部 ", -1), Z("span",
|
|
23029
|
-
Z("div",
|
|
23030
|
-
y.value === "trace" ? (Y(), X("div",
|
|
23031
|
-
Z("div",
|
|
23032
|
-
Z("div",
|
|
23033
|
-
Z("div",
|
|
23034
|
-
Z("div",
|
|
23035
|
-
j.value.compressions ? (Y(), X("div",
|
|
23036
|
-
j.value.totalTokens ? (Y(), X("div",
|
|
23037
|
-
]), Z("div",
|
|
23022
|
+
}, [n[7] ||= ms(" 全部 ", -1), Z("span", _S, U(u.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
23023
|
+
Z("div", vS, [
|
|
23024
|
+
y.value === "trace" ? (Y(), X("div", yS, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", xS, [
|
|
23025
|
+
Z("div", SS, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, U(j.value.rounds), 1)]),
|
|
23026
|
+
Z("div", CS, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, U(j.value.totalDurationMs) + "ms", 1)]),
|
|
23027
|
+
Z("div", wS, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, U(j.value.avgRoundMs) + "ms", 1)]),
|
|
23028
|
+
Z("div", TS, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, U(j.value.toolCalls) + "(✅" + U(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
|
|
23029
|
+
j.value.compressions ? (Y(), X("div", ES, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, U(j.value.compressions), 1)])) : Q("", !0),
|
|
23030
|
+
j.value.totalTokens ? (Y(), X("div", DS, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, U(j.value.totalTokens.total), 1)])) : Q("", !0)
|
|
23031
|
+
]), Z("div", OS, [(Y(!0), X(J, null, ia(A.value, (e) => (Y(), X("div", {
|
|
23038
23032
|
key: e.id,
|
|
23039
23033
|
class: H(["trace-span", [e.type, e.status]])
|
|
23040
23034
|
}, [
|
|
23041
|
-
Z("span",
|
|
23042
|
-
Z("span",
|
|
23043
|
-
e.durationMs ? (Y(), X("span",
|
|
23044
|
-
e.status === "error" ? (Y(), X("span",
|
|
23045
|
-
], 2))), 128))])], 64)) : (Y(), X("div",
|
|
23035
|
+
Z("span", kS, U(ne(e.type)), 1),
|
|
23036
|
+
Z("span", AS, U(e.name), 1),
|
|
23037
|
+
e.durationMs ? (Y(), X("span", jS, U(e.durationMs) + "ms", 1)) : Q("", !0),
|
|
23038
|
+
e.status === "error" ? (Y(), X("span", MS, "❌")) : Q("", !0)
|
|
23039
|
+
], 2))), 128))])], 64)) : (Y(), X("div", bS, [...n[8] ||= [
|
|
23046
23040
|
ms("未开启 tracing(", -1),
|
|
23047
23041
|
Z("code", null, "capabilities.tracing:true", -1),
|
|
23048
23042
|
ms(")或暂无 trace。跑一轮 agent 后刷新。", -1)
|
|
23049
23043
|
]]))])) : Q("", !0),
|
|
23050
|
-
y.value === "context" ? (Y(), X("div",
|
|
23051
|
-
Z("div",
|
|
23044
|
+
y.value === "context" ? (Y(), X("div", NS, [M.value ? (Y(), X(J, { key: 1 }, [
|
|
23045
|
+
Z("div", FS, [Z("div", IS, [Z("div", {
|
|
23052
23046
|
class: "ctx-bar-track",
|
|
23053
23047
|
title: `占用 ${Math.round(M.value.occupancy * 100)}%`
|
|
23054
23048
|
}, [Z("div", {
|
|
@@ -23059,10 +23053,10 @@ app.mount('#app');
|
|
|
23059
23053
|
class: "ctx-threshold-mark",
|
|
23060
23054
|
style: Te({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
|
|
23061
23055
|
title: "压缩阈值"
|
|
23062
|
-
}, null, 4)) : Q("", !0)], 8,
|
|
23063
|
-
Z("span",
|
|
23064
|
-
M.value.contextWindow ? (Y(), X("span",
|
|
23065
|
-
M.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
23056
|
+
}, null, 4)) : Q("", !0)], 8, LS), Z("span", RS, U(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", zS, [
|
|
23057
|
+
Z("span", BS, "估算 " + U(M.value.totalTokens) + " token", 1),
|
|
23058
|
+
M.value.contextWindow ? (Y(), X("span", VS, "窗口 " + U(M.value.contextWindow), 1)) : Q("", !0),
|
|
23059
|
+
M.value.thresholdRatio > 0 ? (Y(), X("span", HS, "阈值 " + U(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
23066
23060
|
])]),
|
|
23067
23061
|
n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
|
|
23068
23062
|
(Y(!0), X(J, null, ia(M.value.categories, (e) => (Y(), X("div", {
|
|
@@ -23072,243 +23066,243 @@ app.mount('#app');
|
|
|
23072
23066
|
Z("span", {
|
|
23073
23067
|
class: "ctx-cat-label",
|
|
23074
23068
|
title: e.label
|
|
23075
|
-
}, U(e.label), 9,
|
|
23076
|
-
Z("div",
|
|
23069
|
+
}, U(e.label), 9, US),
|
|
23070
|
+
Z("div", WS, [Z("div", {
|
|
23077
23071
|
class: "ctx-cat-fill",
|
|
23078
23072
|
style: Te({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
23079
23073
|
}, null, 4)]),
|
|
23080
|
-
Z("span",
|
|
23074
|
+
Z("span", GS, [ms(U(e.tokens) + " ", 1), Z("i", null, "(" + U(Math.round(e.pct * 100)) + "%)", 1)])
|
|
23081
23075
|
]))), 128)),
|
|
23082
|
-
M.value.compression ? (Y(), X("div",
|
|
23083
|
-
Z("span",
|
|
23084
|
-
Z("span",
|
|
23085
|
-
Z("span",
|
|
23086
|
-
M.value.compression.decision ? (Y(), X("span",
|
|
23076
|
+
M.value.compression ? (Y(), X("div", KS, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", qS, [
|
|
23077
|
+
Z("span", JS, "摘要 " + U(M.value.compression.roundsSummarized) + "/" + U(M.value.compression.roundsTotal) + " 轮", 1),
|
|
23078
|
+
Z("span", YS, "召回 " + U(M.value.compression.roundsRecalled), 1),
|
|
23079
|
+
Z("span", XS, U(M.value.compression.strategy), 1),
|
|
23080
|
+
M.value.compression.decision ? (Y(), X("span", ZS, "🤖 agent 决策:" + U(re(M.value.compression.decision)), 1)) : Q("", !0)
|
|
23087
23081
|
])])) : Q("", !0)
|
|
23088
|
-
], 64)) : (Y(), X("div",
|
|
23089
|
-
y.value === "subagent" ? (Y(), X("div",
|
|
23082
|
+
], 64)) : (Y(), X("div", PS, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
|
|
23083
|
+
y.value === "subagent" ? (Y(), X("div", QS, [!P.value.length && !ee.value.length ? (Y(), X("div", $S, [...n[17] ||= [
|
|
23090
23084
|
ms(" 尚未委派子 agent。主 agent 调用 ", -1),
|
|
23091
23085
|
Z("code", null, "use_<id>", -1),
|
|
23092
23086
|
ms(" 或 ", -1),
|
|
23093
23087
|
Z("code", null, "spawn_agent", -1),
|
|
23094
23088
|
ms(" 后,这里展示运行状态与委派历史。 ", -1)
|
|
23095
|
-
]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div",
|
|
23089
|
+
]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div", eC, [Z("div", tC, "▶ 运行中 (" + U(P.value.length) + ")", 1), (Y(!0), X(J, null, ia(P.value, (e, t) => (Y(), X("div", {
|
|
23096
23090
|
key: "a" + t,
|
|
23097
23091
|
class: H(["sub-card", e.status])
|
|
23098
|
-
}, [Z("div",
|
|
23092
|
+
}, [Z("div", nC, [
|
|
23099
23093
|
Z("span", {
|
|
23100
23094
|
class: "sub-status",
|
|
23101
23095
|
style: Te({ background: F[e.status] && F[e.status].color || "#9ca3af" })
|
|
23102
23096
|
}, U(F[e.status] && F[e.status].label || e.status), 5),
|
|
23103
|
-
Z("span",
|
|
23104
|
-
Z("span",
|
|
23105
|
-
]), Z("div",
|
|
23097
|
+
Z("span", rC, U(e.label), 1),
|
|
23098
|
+
Z("span", iC, U(e.steps.length) + " 步", 1)
|
|
23099
|
+
]), Z("div", aC, U(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), ee.value.length ? (Y(), X("div", oC, [Z("div", sC, "🕐 历史 (" + U(ee.value.length) + ")", 1), (Y(!0), X(J, null, ia(ee.value, (e, t) => (Y(), X("div", {
|
|
23106
23100
|
key: "h" + t,
|
|
23107
23101
|
class: H(["sub-card", e.status])
|
|
23108
23102
|
}, [
|
|
23109
|
-
Z("div",
|
|
23103
|
+
Z("div", cC, [
|
|
23110
23104
|
Z("span", {
|
|
23111
23105
|
class: "sub-status",
|
|
23112
23106
|
style: Te({ background: F[e.status] && F[e.status].color || "#9ca3af" })
|
|
23113
23107
|
}, U(F[e.status] && F[e.status].label || e.status), 5),
|
|
23114
|
-
Z("span",
|
|
23115
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
23108
|
+
Z("span", lC, U(e.label), 1),
|
|
23109
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", uC, U(e.durationMs) + "ms", 1)),
|
|
23116
23110
|
e.steps.length ? (Y(), X("button", {
|
|
23117
23111
|
key: 1,
|
|
23118
23112
|
class: "sub-toggle",
|
|
23119
23113
|
onClick: (e) => te(t)
|
|
23120
|
-
}, U(I.value.has(t) ? "收起" : "步骤"), 9,
|
|
23114
|
+
}, U(I.value.has(t) ? "收起" : "步骤"), 9, dC)) : Q("", !0)
|
|
23121
23115
|
]),
|
|
23122
|
-
Z("div",
|
|
23123
|
-
e.resultPreview ? (Y(), X("div",
|
|
23124
|
-
I.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
23116
|
+
Z("div", fC, U(k(e.task, 80)), 1),
|
|
23117
|
+
e.resultPreview ? (Y(), X("div", pC, U(e.resultPreview), 1)) : Q("", !0),
|
|
23118
|
+
I.value.has(t) && e.steps.length ? (Y(), X("div", mC, [(Y(!0), X(J, null, ia(e.steps, (e, t) => (Y(), X("div", {
|
|
23125
23119
|
key: t,
|
|
23126
23120
|
class: "sub-step"
|
|
23127
23121
|
}, [
|
|
23128
|
-
Z("span",
|
|
23129
|
-
Z("span",
|
|
23130
|
-
Z("span",
|
|
23122
|
+
Z("span", hC, U(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
23123
|
+
Z("span", gC, U(e.name), 1),
|
|
23124
|
+
Z("span", _C, U(d(e.ts)), 1)
|
|
23131
23125
|
]))), 128))])) : Q("", !0)
|
|
23132
23126
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
23133
|
-
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div",
|
|
23127
|
+
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", vC, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, ia(l.value, (e, t) => (Y(), X("div", {
|
|
23134
23128
|
key: t,
|
|
23135
23129
|
class: "log-item"
|
|
23136
23130
|
}, [
|
|
23137
|
-
Z("div",
|
|
23131
|
+
Z("div", yC, [
|
|
23138
23132
|
Z("span", {
|
|
23139
23133
|
class: "log-type",
|
|
23140
23134
|
style: Te({ background: s[e.type].color })
|
|
23141
23135
|
}, U(s[e.type].icon) + " " + U(s[e.type].label), 5),
|
|
23142
|
-
e.source ? (Y(), X("span",
|
|
23143
|
-
Z("span",
|
|
23136
|
+
e.source ? (Y(), X("span", bC, "↳ " + U(e.source), 1)) : Q("", !0),
|
|
23137
|
+
Z("span", xC, U(d(e.timestamp)), 1)
|
|
23144
23138
|
]),
|
|
23145
|
-
Z("div",
|
|
23146
|
-
Z("div",
|
|
23147
|
-
Z("div",
|
|
23148
|
-
Z("div",
|
|
23149
|
-
Z("div",
|
|
23150
|
-
Z("div",
|
|
23139
|
+
Z("div", SC, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
23140
|
+
Z("div", CC, [
|
|
23141
|
+
Z("div", wC, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", TC, U(e.data.model), 1)]),
|
|
23142
|
+
Z("div", EC, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", DC, U(e.data.temperature), 1)]),
|
|
23143
|
+
Z("div", OC, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", kC, U(e.data.maxTokens), 1)]),
|
|
23144
|
+
Z("div", AC, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", jC, U(e.data.totalMessages), 1)])
|
|
23151
23145
|
]),
|
|
23152
|
-
Z("div",
|
|
23153
|
-
Z("div",
|
|
23146
|
+
Z("div", MC, "工具 (" + U(e.data.tools?.length || 0) + ")", 1),
|
|
23147
|
+
Z("div", NC, [(Y(!0), X(J, null, ia(e.data.tools, (e) => (Y(), X("span", {
|
|
23154
23148
|
key: e,
|
|
23155
23149
|
class: "tool-chip"
|
|
23156
23150
|
}, U(e), 1))), 128))]),
|
|
23157
23151
|
n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
|
|
23158
|
-
Z("div",
|
|
23152
|
+
Z("div", PC, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
|
|
23159
23153
|
key: t,
|
|
23160
23154
|
class: "msg-row"
|
|
23161
23155
|
}, [Z("span", {
|
|
23162
23156
|
class: "msg-role",
|
|
23163
23157
|
style: Te({ background: g(e.type).color })
|
|
23164
|
-
}, U(g(e.type).label), 5), Z("span",
|
|
23165
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
23166
|
-
Z("span",
|
|
23167
|
-
e.data.model ? (Y(), X("span",
|
|
23168
|
-
Z("span",
|
|
23169
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
23158
|
+
}, U(g(e.type).label), 5), Z("span", FC, U(e.content), 1)]))), 128))])
|
|
23159
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", IC, [
|
|
23160
|
+
Z("span", LC, "第 " + U(e.data.round) + " 轮", 1),
|
|
23161
|
+
e.data.model ? (Y(), X("span", RC, U(e.data.model), 1)) : Q("", !0),
|
|
23162
|
+
Z("span", zC, U((e.data.messages || []).length) + " 条消息", 1),
|
|
23163
|
+
e.data.tools?.length ? (Y(), X("span", BC, U(e.data.tools.length) + " 工具", 1)) : Q("", !0),
|
|
23170
23164
|
Z("button", {
|
|
23171
23165
|
class: "view-toggle",
|
|
23172
23166
|
onClick: (e) => p(t)
|
|
23173
|
-
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9,
|
|
23174
|
-
]), o.value.has(t) ? (Y(), X("pre",
|
|
23167
|
+
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, VC)
|
|
23168
|
+
]), o.value.has(t) ? (Y(), X("pre", JC, [Z("code", null, U(m(e.data.messages)), 1)])) : (Y(), X("div", HC, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
|
|
23175
23169
|
key: t,
|
|
23176
23170
|
class: "msg-row"
|
|
23177
23171
|
}, [Z("span", {
|
|
23178
23172
|
class: "msg-role",
|
|
23179
23173
|
style: Te({ background: g(e.role).color })
|
|
23180
|
-
}, U(g(e.role).label), 5), Z("div",
|
|
23181
|
-
e.content ? (Y(), X("span",
|
|
23174
|
+
}, U(g(e.role).label), 5), Z("div", UC, [
|
|
23175
|
+
e.content ? (Y(), X("span", WC, U(e.content), 1)) : Q("", !0),
|
|
23182
23176
|
(Y(!0), X(J, null, ia(e.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
23183
23177
|
key: t,
|
|
23184
23178
|
class: "tc-inline"
|
|
23185
|
-
}, [Z("span",
|
|
23186
|
-
e.tool_call_id ? (Y(), X("span",
|
|
23179
|
+
}, [Z("span", GC, "🔧 " + U(e.function?.name || e.name), 1), Z("code", KC, U(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
23180
|
+
e.tool_call_id ? (Y(), X("span", qC, "↳ tool_call_id: " + U(e.tool_call_id), 1)) : Q("", !0)
|
|
23187
23181
|
])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
23188
|
-
Z("div",
|
|
23189
|
-
e.data.content ? (Y(), X("div",
|
|
23190
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
23182
|
+
Z("div", YC, [Z("span", XC, "第 " + U(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", ZC, "🔧 " + U(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
|
|
23183
|
+
e.data.content ? (Y(), X("div", QC, U(e.data.content), 1)) : Q("", !0),
|
|
23184
|
+
e.data.toolCalls?.length ? (Y(), X("div", $C, [(Y(!0), X(J, null, ia(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
23191
23185
|
key: t,
|
|
23192
23186
|
class: "tc-card"
|
|
23193
|
-
}, [Z("div",
|
|
23194
|
-
e.data.usage ? (Y(), X("div",
|
|
23195
|
-
Z("span",
|
|
23196
|
-
Z("span",
|
|
23197
|
-
Z("span",
|
|
23187
|
+
}, [Z("div", ew, "🔧 " + U(e.name), 1), Z("pre", tw, U(m(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
23188
|
+
e.data.usage ? (Y(), X("div", nw, [
|
|
23189
|
+
Z("span", rw, "prompt: " + U(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
23190
|
+
Z("span", iw, "completion: " + U(e.data.usage.completion_tokens ?? "-"), 1),
|
|
23191
|
+
Z("span", aw, "total: " + U(e.data.usage.total_tokens ?? "-"), 1)
|
|
23198
23192
|
])) : Q("", !0)
|
|
23199
|
-
], 64)) : e.type === "tool_call" ? (Y(), X("div",
|
|
23200
|
-
Z("div",
|
|
23193
|
+
], 64)) : e.type === "tool_call" ? (Y(), X("div", ow, [Z("div", sw, "🔧 " + U(e.data.name), 1), Z("pre", cw, U(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", lw, [Z("div", uw, "✅ " + U(e.data.name) + " 结果", 1), Z("pre", dw, U(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", fw, U(e.data.tool ? `[${e.data.tool}] ` : "") + U(e.data.error), 1)) : Q("", !0)]),
|
|
23194
|
+
Z("div", pw, [Z("button", {
|
|
23201
23195
|
class: "raw-toggle",
|
|
23202
23196
|
onClick: (e) => f(t)
|
|
23203
|
-
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9,
|
|
23197
|
+
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, mw), Z("button", {
|
|
23204
23198
|
class: "raw-toggle",
|
|
23205
23199
|
onClick: (t) => K(sg)(m(e.data))
|
|
23206
|
-
}, "复制", 8,
|
|
23207
|
-
a.value.has(t) ? (Y(), X("pre",
|
|
23200
|
+
}, "复制", 8, hw)]),
|
|
23201
|
+
a.value.has(t) ? (Y(), X("pre", gw, [Z("code", null, U(m(e.data)), 1)])) : Q("", !0)
|
|
23208
23202
|
]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
|
|
23209
|
-
c.value.length ? Q("", !0) : (Y(), X("div",
|
|
23210
|
-
O.value.pre.length ? (Y(), X("div",
|
|
23203
|
+
c.value.length ? Q("", !0) : (Y(), X("div", _w, "暂无日志,发送消息后这里按轮次展示执行流程")),
|
|
23204
|
+
O.value.pre.length ? (Y(), X("div", vw, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, ia(O.value.pre, (e, t) => (Y(), X("div", {
|
|
23211
23205
|
key: "p" + t,
|
|
23212
23206
|
class: H(["flow-node", e.type])
|
|
23213
23207
|
}, [
|
|
23214
|
-
Z("span",
|
|
23215
|
-
Z("span",
|
|
23216
|
-
Z("span",
|
|
23217
|
-
Z("span",
|
|
23208
|
+
Z("span", yw, U(s[e.type]?.icon), 1),
|
|
23209
|
+
Z("span", bw, U(s[e.type]?.label), 1),
|
|
23210
|
+
Z("span", xw, U(L(e)), 1),
|
|
23211
|
+
Z("span", Sw, U(d(e.timestamp)), 1)
|
|
23218
23212
|
], 2))), 128))])) : Q("", !0),
|
|
23219
23213
|
(Y(!0), X(J, null, ia(O.value.rounds, (e) => (Y(), X("div", {
|
|
23220
23214
|
key: e.round,
|
|
23221
23215
|
class: "flow-round"
|
|
23222
|
-
}, [Z("div",
|
|
23216
|
+
}, [Z("div", Cw, "🔁 第 " + U(e.round) + " 轮", 1), Z("div", ww, [(Y(!0), X(J, null, ia(e.items, (e, t) => (Y(), X("div", {
|
|
23223
23217
|
key: t,
|
|
23224
23218
|
class: H(["flow-node", e.type])
|
|
23225
23219
|
}, [
|
|
23226
|
-
Z("span",
|
|
23227
|
-
Z("span",
|
|
23228
|
-
Z("span",
|
|
23229
|
-
Z("span",
|
|
23220
|
+
Z("span", Tw, U(s[e.type]?.icon), 1),
|
|
23221
|
+
Z("span", Ew, U(s[e.type]?.label), 1),
|
|
23222
|
+
Z("span", Dw, U(L(e)), 1),
|
|
23223
|
+
Z("span", Ow, U(d(e.timestamp)), 1)
|
|
23230
23224
|
], 2))), 128))])]))), 128))
|
|
23231
|
-
], 64)) : (Y(), X("div",
|
|
23232
|
-
Z("div",
|
|
23225
|
+
], 64)) : (Y(), X("div", kw, [b.value ? (Y(), X(J, { key: 1 }, [
|
|
23226
|
+
Z("div", jw, [
|
|
23233
23227
|
n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
|
|
23234
|
-
Z("div",
|
|
23235
|
-
Z("div",
|
|
23236
|
-
Z("div",
|
|
23237
|
-
Z("div",
|
|
23238
|
-
Z("div",
|
|
23228
|
+
Z("div", Mw, [
|
|
23229
|
+
Z("div", Nw, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", Pw, U(b.value.id), 1)]),
|
|
23230
|
+
Z("div", Fw, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", Iw, U(b.value.model || "-"), 1)]),
|
|
23231
|
+
Z("div", Lw, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", Rw, U(b.value.tools.length), 1)]),
|
|
23232
|
+
Z("div", zw, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", Bw, U(b.value.middleware.length), 1)])
|
|
23239
23233
|
]),
|
|
23240
|
-
Z("div",
|
|
23234
|
+
Z("div", Vw, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", Hw, U(b.value.middleware.join(" → ") || "-"), 1)])
|
|
23241
23235
|
]),
|
|
23242
|
-
Z("div",
|
|
23236
|
+
Z("div", Uw, [Z("div", Ww, "🔧 工具 (" + U(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.tools, (e) => (Y(), X("div", {
|
|
23243
23237
|
key: e.name,
|
|
23244
23238
|
class: "info-item"
|
|
23245
|
-
}, [Z("div",
|
|
23239
|
+
}, [Z("div", Gw, [ms(U(e.name), 1), e.source ? (Y(), X("span", {
|
|
23246
23240
|
key: 0,
|
|
23247
23241
|
class: H(["src-tag", D(e.source)])
|
|
23248
|
-
}, U(e.source), 3)) : Q("", !0)]), Z("div",
|
|
23249
|
-
b.value.skills.length ? (Y(), X("div",
|
|
23242
|
+
}, U(e.source), 3)) : Q("", !0)]), Z("div", Kw, U(e.description), 1)]))), 128))]),
|
|
23243
|
+
b.value.skills.length ? (Y(), X("div", qw, [Z("div", Jw, [ms("📘 技能 (" + U(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", {
|
|
23250
23244
|
key: e.name,
|
|
23251
23245
|
class: "info-item"
|
|
23252
23246
|
}, [
|
|
23253
23247
|
Z("div", {
|
|
23254
23248
|
class: "info-name skill-toggle",
|
|
23255
23249
|
onClick: (t) => S(e.name)
|
|
23256
|
-
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + U(e.name), 1)], 8,
|
|
23257
|
-
Z("div",
|
|
23258
|
-
x.value[e.name] ? (Y(), X("div",
|
|
23250
|
+
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + U(e.name), 1)], 8, Yw),
|
|
23251
|
+
Z("div", Xw, U(e.description), 1),
|
|
23252
|
+
x.value[e.name] ? (Y(), X("div", Zw, [x.value[e.name].loading ? (Y(), X("div", Qw, "加载中…")) : x.value[e.name].error ? (Y(), X("div", $w, U(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", eT, U(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
23259
23253
|
]))), 128))])) : Q("", !0),
|
|
23260
|
-
b.value.data ? (Y(), X("div",
|
|
23261
|
-
Z("div",
|
|
23262
|
-
Z("div",
|
|
23263
|
-
Z("div",
|
|
23264
|
-
Z("div",
|
|
23265
|
-
Z("div",
|
|
23254
|
+
b.value.data ? (Y(), X("div", tT, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", nT, [Z("div", rT, U(b.value.data.description || "主数据对象"), 1), Z("div", iT, "schema: " + U(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
|
|
23255
|
+
Z("div", aT, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", oT, [
|
|
23256
|
+
Z("div", sT, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", cT, U(b.value.subagent.enabled ? "是" : "否"), 1)]),
|
|
23257
|
+
Z("div", lT, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", uT, U(b.value.subagent.maxDepth), 1)]),
|
|
23258
|
+
Z("div", dT, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", fT, U(b.value.subagent.maxParallel), 1)]),
|
|
23259
|
+
Z("div", pT, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", mT, U(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
|
|
23266
23260
|
])]),
|
|
23267
|
-
b.value.mcp?.servers?.length ? (Y(), X("div",
|
|
23261
|
+
b.value.mcp?.servers?.length ? (Y(), X("div", hT, [Z("div", gT, "🔌 MCP (" + U(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.mcp.servers, (e) => (Y(), X("div", {
|
|
23268
23262
|
key: e.name,
|
|
23269
23263
|
class: "info-item"
|
|
23270
|
-
}, [Z("div",
|
|
23271
|
-
b.value.verify ? (Y(), X("div",
|
|
23272
|
-
Z("div",
|
|
23273
|
-
Z("div",
|
|
23274
|
-
Z("div",
|
|
23275
|
-
b.value.verify.adversarial ? (Y(), X("div",
|
|
23264
|
+
}, [Z("div", _T, [ms(U(e.name) + " ", 1), Z("span", vT, U(e.toolCount) + " 工具", 1)]), Z("div", yT, U(e.url), 1)]))), 128))])) : Q("", !0),
|
|
23265
|
+
b.value.verify ? (Y(), X("div", bT, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", xT, [
|
|
23266
|
+
Z("div", ST, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", CT, U(b.value.verify.enabled ? "是" : "否"), 1)]),
|
|
23267
|
+
Z("div", wT, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", TT, U(b.value.verify.maxAttempts), 1)]),
|
|
23268
|
+
Z("div", ET, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", DT, U(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
|
|
23269
|
+
b.value.verify.adversarial ? (Y(), X("div", OT, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", kT, U(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
|
|
23276
23270
|
])])) : Q("", !0),
|
|
23277
|
-
b.value.todos.length ? (Y(), X("div",
|
|
23271
|
+
b.value.todos.length ? (Y(), X("div", AT, [Z("div", jT, "📋 任务清单 (" + U(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.todos, (e, t) => (Y(), X("div", {
|
|
23278
23272
|
key: t,
|
|
23279
23273
|
class: "info-todo"
|
|
23280
23274
|
}, [Z("span", {
|
|
23281
23275
|
class: "todo-tag",
|
|
23282
23276
|
style: Te({ background: T[e.status] && T[e.status].color || "#9ca3af" })
|
|
23283
23277
|
}, U(E(e.status)), 5), Z("span", null, U(e.content), 1)]))), 128))])) : Q("", !0),
|
|
23284
|
-
b.value.memory ? (Y(), X("div",
|
|
23285
|
-
b.value.lastCompression ? (Y(), X("div",
|
|
23286
|
-
Z("div",
|
|
23287
|
-
Z("div",
|
|
23288
|
-
Z("div",
|
|
23289
|
-
Z("div",
|
|
23290
|
-
Z("div",
|
|
23291
|
-
b.value.lastCompression.decision ? (Y(), X("div",
|
|
23278
|
+
b.value.memory ? (Y(), X("div", MT, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", NT, U(b.value.memory), 1)])) : Q("", !0),
|
|
23279
|
+
b.value.lastCompression ? (Y(), X("div", PT, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", FT, [
|
|
23280
|
+
Z("div", IT, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", LT, U(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
|
|
23281
|
+
Z("div", RT, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", zT, U(b.value.lastCompression.roundsSummarized) + " / " + U(b.value.lastCompression.roundsTotal), 1)]),
|
|
23282
|
+
Z("div", BT, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", VT, U(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
|
|
23283
|
+
Z("div", HT, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", UT, U(b.value.lastCompression.originalMessages) + " → " + U(b.value.lastCompression.compressedMessages), 1)]),
|
|
23284
|
+
Z("div", WT, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", GT, U(b.value.lastCompression.strategy), 1)]),
|
|
23285
|
+
b.value.lastCompression.decision ? (Y(), X("div", KT, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", qT, "🤖 " + U(re(b.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
23292
23286
|
])])) : Q("", !0)
|
|
23293
|
-
], 64)) : (Y(), X("div",
|
|
23287
|
+
], 64)) : (Y(), X("div", Aw, "暂无信息"))]))
|
|
23294
23288
|
])
|
|
23295
|
-
]), Z("div", {
|
|
23289
|
+
], 2), Z("div", {
|
|
23296
23290
|
class: "drawer-mask",
|
|
23297
23291
|
onClick: _
|
|
23298
23292
|
})])) : Q("", !0)]),
|
|
23299
23293
|
_: 1
|
|
23300
23294
|
})]));
|
|
23301
23295
|
}
|
|
23302
|
-
}), [["__scopeId", "data-v-
|
|
23296
|
+
}), [["__scopeId", "data-v-bb8e2650"]]), YT = { class: "skill-panel" }, XT = { class: "skill-header" }, ZT = { class: "skill-section" }, QT = { class: "section-title" }, $T = { class: "field" }, eE = ["disabled"], tE = { class: "field" }, nE = { class: "field field-textarea" }, rE = {
|
|
23303
23297
|
key: 0,
|
|
23304
23298
|
class: "skill-error"
|
|
23305
|
-
},
|
|
23299
|
+
}, iE = { class: "skill-section" }, aE = { class: "section-title" }, oE = {
|
|
23306
23300
|
key: 0,
|
|
23307
23301
|
class: "empty-hint"
|
|
23308
|
-
},
|
|
23302
|
+
}, sE = {
|
|
23309
23303
|
key: 1,
|
|
23310
23304
|
class: "skill-list"
|
|
23311
|
-
},
|
|
23305
|
+
}, cE = { class: "skill-actions" }, lE = ["onClick"], uE = ["onClick"], dE = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
23312
23306
|
__name: "SkillPanel",
|
|
23313
23307
|
props: {
|
|
23314
23308
|
visible: { type: Boolean },
|
|
@@ -23362,54 +23356,54 @@ app.mount('#app');
|
|
|
23362
23356
|
key: 0,
|
|
23363
23357
|
class: "skill-mask",
|
|
23364
23358
|
onClick: n[4] ||= gl((e) => r("close"), ["self"])
|
|
23365
|
-
}, [Z("div",
|
|
23366
|
-
Z("div",
|
|
23359
|
+
}, [Z("div", YT, [
|
|
23360
|
+
Z("div", XT, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
|
|
23367
23361
|
class: "skill-close",
|
|
23368
23362
|
title: "关闭",
|
|
23369
23363
|
onClick: n[0] ||= (e) => r("close")
|
|
23370
23364
|
}, "✕")]),
|
|
23371
|
-
Z("div",
|
|
23372
|
-
Z("div",
|
|
23365
|
+
Z("div", ZT, [
|
|
23366
|
+
Z("div", QT, [ms(U(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
|
|
23373
23367
|
key: 0,
|
|
23374
23368
|
class: "btn btn-ghost btn-cancel",
|
|
23375
23369
|
title: "取消编辑,回到新建",
|
|
23376
23370
|
onClick: h
|
|
23377
23371
|
}, "取消编辑")) : Q("", !0)]),
|
|
23378
|
-
Z("label",
|
|
23372
|
+
Z("label", $T, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), qr(Z("input", {
|
|
23379
23373
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
23380
23374
|
disabled: !!u.value,
|
|
23381
23375
|
placeholder: "如:my-writer",
|
|
23382
23376
|
class: "field-input"
|
|
23383
|
-
}, null, 8,
|
|
23384
|
-
Z("label",
|
|
23377
|
+
}, null, 8, eE), [[pl, i.value]])]),
|
|
23378
|
+
Z("label", tE, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), qr(Z("input", {
|
|
23385
23379
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
23386
23380
|
placeholder: "一句话说明用途与触发时机",
|
|
23387
23381
|
class: "field-input"
|
|
23388
23382
|
}, null, 512), [[pl, a.value]])]),
|
|
23389
|
-
Z("label",
|
|
23383
|
+
Z("label", nE, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), qr(Z("textarea", {
|
|
23390
23384
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
23391
23385
|
placeholder: "skill 全文指令(支持 Markdown)",
|
|
23392
23386
|
rows: "6",
|
|
23393
23387
|
class: "field-input"
|
|
23394
23388
|
}, null, 512), [[pl, o.value]])]),
|
|
23395
|
-
s.value ? (Y(), X("div",
|
|
23389
|
+
s.value ? (Y(), X("div", rE, U(s.value), 1)) : Q("", !0),
|
|
23396
23390
|
Z("button", {
|
|
23397
23391
|
class: "btn btn-primary",
|
|
23398
23392
|
onClick: f
|
|
23399
23393
|
}, U(u.value ? "保存修改" : "添加 Skill"), 1)
|
|
23400
23394
|
]),
|
|
23401
|
-
Z("div",
|
|
23395
|
+
Z("div", iE, [Z("div", aE, "已创建 Skill(" + U(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", sE, [(Y(!0), X(J, null, ia(c.value, (e) => (Y(), X("li", {
|
|
23402
23396
|
key: e,
|
|
23403
23397
|
class: "skill-item"
|
|
23404
|
-
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span",
|
|
23398
|
+
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span", cE, [Z("button", {
|
|
23405
23399
|
class: "btn btn-ghost btn-edit",
|
|
23406
23400
|
title: "加载到表单编辑",
|
|
23407
23401
|
onClick: (t) => m(e)
|
|
23408
|
-
}, "编辑", 8,
|
|
23402
|
+
}, "编辑", 8, lE), Z("button", {
|
|
23409
23403
|
class: "btn btn-ghost btn-del",
|
|
23410
23404
|
title: "删除该用户 skill",
|
|
23411
23405
|
onClick: (t) => p(e)
|
|
23412
|
-
}, "删除", 8,
|
|
23406
|
+
}, "删除", 8, uE)])]))), 128))])) : (Y(), X("div", oE, "暂无用户创建的 skill"))]),
|
|
23413
23407
|
n[9] ||= Z("div", { class: "skill-hint" }, [
|
|
23414
23408
|
ms(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
|
|
23415
23409
|
Z("code", null, "load_skill(name)"),
|
|
@@ -23421,7 +23415,7 @@ app.mount('#app');
|
|
|
23421
23415
|
_: 1
|
|
23422
23416
|
})]));
|
|
23423
23417
|
}
|
|
23424
|
-
}), [["__scopeId", "data-v-c6a22ea5"]]),
|
|
23418
|
+
}), [["__scopeId", "data-v-c6a22ea5"]]), fE = /*#__PURE__*/ Cg(/* @__PURE__ */ Mi({
|
|
23425
23419
|
__name: "ChatDialog",
|
|
23426
23420
|
props: {
|
|
23427
23421
|
fetchResponse: {},
|
|
@@ -23468,7 +23462,8 @@ app.mount('#app');
|
|
|
23468
23462
|
onAddFocus: {},
|
|
23469
23463
|
onRemoveFocus: {},
|
|
23470
23464
|
onFocusChipClick: {},
|
|
23471
|
-
sections: {}
|
|
23465
|
+
sections: {},
|
|
23466
|
+
csTheme: {}
|
|
23472
23467
|
},
|
|
23473
23468
|
emits: ["close"],
|
|
23474
23469
|
setup(e, { emit: t }) {
|
|
@@ -23506,7 +23501,8 @@ app.mount('#app');
|
|
|
23506
23501
|
})) : Q("", !0), Z("div", {
|
|
23507
23502
|
class: H(["chat-dialog", {
|
|
23508
23503
|
collapsed: !K(a) && !e.drawer,
|
|
23509
|
-
drawer: e.drawer
|
|
23504
|
+
drawer: e.drawer,
|
|
23505
|
+
"cs-theme-dark": e.csTheme === "dark"
|
|
23510
23506
|
}]),
|
|
23511
23507
|
style: Te(d.value ? {
|
|
23512
23508
|
width: d.value,
|
|
@@ -23556,7 +23552,7 @@ app.mount('#app');
|
|
|
23556
23552
|
key: 2,
|
|
23557
23553
|
name: "cs-slide"
|
|
23558
23554
|
}, {
|
|
23559
|
-
default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(
|
|
23555
|
+
default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(bx, {
|
|
23560
23556
|
"show-avatar": e.showAvatar,
|
|
23561
23557
|
"show-typing": e.showTyping
|
|
23562
23558
|
}, null, 8, ["show-avatar", "show-typing"]), [[jc, K(a)]])], !0)]),
|
|
@@ -23565,15 +23561,15 @@ app.mount('#app');
|
|
|
23565
23561
|
l("queued") ? aa(t.$slots, "queued", {
|
|
23566
23562
|
key: 3,
|
|
23567
23563
|
chat: K(i)
|
|
23568
|
-
}, () => [ls(
|
|
23564
|
+
}, () => [ls(Ox)], !0) : Q("", !0),
|
|
23569
23565
|
l("approval") ? aa(t.$slots, "approval", {
|
|
23570
23566
|
key: 4,
|
|
23571
23567
|
chat: K(i)
|
|
23572
|
-
}, () => [ls(
|
|
23568
|
+
}, () => [ls(Bx)], !0) : Q("", !0),
|
|
23573
23569
|
l("conflict") ? aa(t.$slots, "conflict", {
|
|
23574
23570
|
key: 5,
|
|
23575
23571
|
chat: K(i)
|
|
23576
|
-
}, () => [ls(
|
|
23572
|
+
}, () => [ls(Zx, {
|
|
23577
23573
|
"pending-conflict": e.pendingConflict,
|
|
23578
23574
|
"on-resolve": e.onResolveConflict
|
|
23579
23575
|
}, null, 8, ["pending-conflict", "on-resolve"])], !0) : Q("", !0),
|
|
@@ -23581,7 +23577,7 @@ app.mount('#app');
|
|
|
23581
23577
|
key: 6,
|
|
23582
23578
|
name: "cs-slide"
|
|
23583
23579
|
}, {
|
|
23584
|
-
default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(
|
|
23580
|
+
default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(lS, {
|
|
23585
23581
|
placeholder: e.placeholder,
|
|
23586
23582
|
"input-rows": e.inputRows
|
|
23587
23583
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
@@ -23590,24 +23586,26 @@ app.mount('#app');
|
|
|
23590
23586
|
l("debug") ? aa(t.$slots, "debug", {
|
|
23591
23587
|
key: 7,
|
|
23592
23588
|
chat: K(i)
|
|
23593
|
-
}, () => [ls(
|
|
23589
|
+
}, () => [ls(JT, {
|
|
23594
23590
|
visible: K(o),
|
|
23595
23591
|
"onUpdate:visible": n[2] ||= (e) => /* @__PURE__ */ yn(o) ? o.value = e : null,
|
|
23596
23592
|
logs: e.debugLogs,
|
|
23597
23593
|
"get-info": e.getInfo,
|
|
23598
23594
|
"info-tick": e.infoTick,
|
|
23599
|
-
"get-skill-content": e.getSkillContent
|
|
23595
|
+
"get-skill-content": e.getSkillContent,
|
|
23596
|
+
"cs-theme": e.csTheme
|
|
23600
23597
|
}, null, 8, [
|
|
23601
23598
|
"visible",
|
|
23602
23599
|
"logs",
|
|
23603
23600
|
"get-info",
|
|
23604
23601
|
"info-tick",
|
|
23605
|
-
"get-skill-content"
|
|
23602
|
+
"get-skill-content",
|
|
23603
|
+
"cs-theme"
|
|
23606
23604
|
])], !0) : Q("", !0),
|
|
23607
23605
|
l("skill") ? aa(t.$slots, "skill", {
|
|
23608
23606
|
key: 8,
|
|
23609
23607
|
chat: K(i)
|
|
23610
|
-
}, () => [ls(
|
|
23608
|
+
}, () => [ls(dE, {
|
|
23611
23609
|
visible: K(s),
|
|
23612
23610
|
"on-add-skill": e.onAddSkill,
|
|
23613
23611
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -23624,13 +23622,13 @@ app.mount('#app');
|
|
|
23624
23622
|
])], !0) : Q("", !0)
|
|
23625
23623
|
], 6)], 64));
|
|
23626
23624
|
}
|
|
23627
|
-
}), [["__scopeId", "data-v-
|
|
23625
|
+
}), [["__scopeId", "data-v-e0eb0bbe"]]);
|
|
23628
23626
|
//#endregion
|
|
23629
23627
|
//#region src/core/sdk/mountChatDialog.ts
|
|
23630
|
-
function
|
|
23628
|
+
function pE(e) {
|
|
23631
23629
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
23632
23630
|
return r = Sl(/* @__PURE__ */ Mi({ setup() {
|
|
23633
|
-
return () => Xs(
|
|
23631
|
+
return () => Xs(fE, {
|
|
23634
23632
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
23635
23633
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
23636
23634
|
if (n) {
|
|
@@ -23641,7 +23639,7 @@ function hE(e) {
|
|
|
23641
23639
|
},
|
|
23642
23640
|
title: n.title,
|
|
23643
23641
|
placeholder: n.placeholder,
|
|
23644
|
-
debugLogs: a.value,
|
|
23642
|
+
debugLogs: a.value.slice(),
|
|
23645
23643
|
initialMessages: t.messages,
|
|
23646
23644
|
getInfo: () => t.getInfo(),
|
|
23647
23645
|
onUndo: t.checkpoint ? () => t.checkpoint.restore() : void 0,
|
|
@@ -23671,6 +23669,7 @@ function hE(e) {
|
|
|
23671
23669
|
getUserSkillNames: t.skillsController ? () => t.listUserSkills() : void 0,
|
|
23672
23670
|
onGetSkill: t.skillsController ? (e) => t.getUserSkill(e) : void 0,
|
|
23673
23671
|
drawer: n.drawer === !0,
|
|
23672
|
+
csTheme: n.theme === "dark" ? "dark" : "light",
|
|
23674
23673
|
drawerWidth: n.drawerWidth,
|
|
23675
23674
|
drawerHidden: n.drawerHidden === !0,
|
|
23676
23675
|
inputRows: n.inputRows,
|
|
@@ -23728,12 +23727,12 @@ function hE(e) {
|
|
|
23728
23727
|
}
|
|
23729
23728
|
//#endregion
|
|
23730
23729
|
//#region src/core/sdk/ragSubagent.ts
|
|
23731
|
-
var
|
|
23730
|
+
var mE = "你是知识检索专家。可用工具: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你是只读检索角色,不要尝试修改任何数据。", hE = "# 知识检索策略(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", gE = {
|
|
23732
23731
|
name: "rag-search",
|
|
23733
23732
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
23734
|
-
getContent: () =>
|
|
23733
|
+
getContent: () => hE
|
|
23735
23734
|
};
|
|
23736
|
-
function
|
|
23735
|
+
function _E(e, n, i) {
|
|
23737
23736
|
return r(async ({ query: e, topK: t }) => {
|
|
23738
23737
|
try {
|
|
23739
23738
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -23750,7 +23749,7 @@ function yE(e, n, i) {
|
|
|
23750
23749
|
})
|
|
23751
23750
|
});
|
|
23752
23751
|
}
|
|
23753
|
-
function
|
|
23752
|
+
function vE(e, n) {
|
|
23754
23753
|
return r(async ({ source: e }) => {
|
|
23755
23754
|
try {
|
|
23756
23755
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -23764,11 +23763,11 @@ function bE(e, n) {
|
|
|
23764
23763
|
schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
|
|
23765
23764
|
});
|
|
23766
23765
|
}
|
|
23767
|
-
function
|
|
23766
|
+
function yE(e) {
|
|
23768
23767
|
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;
|
|
23769
23768
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
23770
23769
|
let p = [];
|
|
23771
|
-
t && p.push(
|
|
23770
|
+
t && p.push(_E(s, t, o)), n && p.push(vE(c, n)), f && p.push(...f);
|
|
23772
23771
|
let m = r ? [
|
|
23773
23772
|
"vfs_grep",
|
|
23774
23773
|
"vfs_read",
|
|
@@ -23777,17 +23776,17 @@ function xE(e) {
|
|
|
23777
23776
|
return {
|
|
23778
23777
|
id: i,
|
|
23779
23778
|
description: a ?? "检索知识库(组件文档/UI 规范/业务规则),返回有依据的结构化结论。需要查阅文档才能回答或决定如何配置时委派",
|
|
23780
|
-
systemPrompt:
|
|
23779
|
+
systemPrompt: mE,
|
|
23781
23780
|
tools: p.length ? p : void 0,
|
|
23782
23781
|
allowedTools: m,
|
|
23783
|
-
skills: d ?? [
|
|
23782
|
+
skills: d ?? [gE],
|
|
23784
23783
|
maxToolRounds: l,
|
|
23785
23784
|
...u === void 0 ? {} : { summarization: u }
|
|
23786
23785
|
};
|
|
23787
23786
|
}
|
|
23788
23787
|
//#endregion
|
|
23789
23788
|
//#region src/core/sdk/htmlSubagent.ts
|
|
23790
|
-
function
|
|
23789
|
+
function bE(e) {
|
|
23791
23790
|
return `你是纯代码组件生成专家。可用工具:vfs_write / vfs_edit / vfs_rm(写/改/删代码到 vfs ${e}) / vfs_grep + vfs_read(读 vfs) / write + set(写 data 引用,writablePaths 限定) / read / write_todos + update_todo(规划)。
|
|
23792
23791
|
|
|
23793
23792
|
代码存储约定(重要):
|
|
@@ -23801,12 +23800,12 @@ function SE(e) {
|
|
|
23801
23800
|
3. 小段代码 vfs_write 整体写;大段用 vfs_edit 增量拼(避免单次输出超限);
|
|
23802
23801
|
4. 生成后 read(vfs 文件 + data 引用)确认结构正确;只写 writablePaths 内 data + ${e} 下 vfs。`;
|
|
23803
23802
|
}
|
|
23804
|
-
var
|
|
23803
|
+
var xE = "# 纯代码组件生成规范\n\n## 代码存储约定(重要)\n- 代码正文写 vfs:html/<name>.vue(如 html/hero.vue)\n- data 存引用:{ type:'custom', codeRef:'vfs://html/<name>.vue', name, props }\n- 改代码:vfs_edit 改 vfs 文件(data 的 codeRef 引用不变)\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制交互 / 一次性特效 / 特殊布局)→ 写 custom 代码组件\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## Vue SFC 规范\n- Vue 3 <template> + <script setup>(组合式)\n- props 用 defineProps;事件用 defineEmits\n- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)\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- 颜色对比达标;不只用颜色传达信息", SE = {
|
|
23805
23804
|
name: "html-builder",
|
|
23806
23805
|
description: "纯代码组件(custom Vue SFC)生成规范:代码存 vfs+data 引用 / SFC 规范 / 安全底线 / props / 组件库引用 / 可访问性",
|
|
23807
|
-
getContent: () =>
|
|
23806
|
+
getContent: () => xE
|
|
23808
23807
|
};
|
|
23809
|
-
function
|
|
23808
|
+
function CE(e) {
|
|
23810
23809
|
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 } = e;
|
|
23811
23810
|
if (!t?.length) throw Error("[page-agent-sdk][createHtmlSubagent] writablePaths 必填(代码组件 data 区,如 [\"components\"])");
|
|
23812
23811
|
let d = [];
|
|
@@ -23815,7 +23814,7 @@ function TE(e) {
|
|
|
23815
23814
|
return {
|
|
23816
23815
|
id: r,
|
|
23817
23816
|
description: i ?? "生成/修改纯代码组件(custom Vue SFC)。代码写 vfs,data 存引用;能规划(write_todos)+ 执行。需写代码组件或灵活定制时委派",
|
|
23818
|
-
systemPrompt:
|
|
23817
|
+
systemPrompt: bE(n),
|
|
23819
23818
|
writablePaths: t,
|
|
23820
23819
|
allowedTools: [
|
|
23821
23820
|
"vfs_write",
|
|
@@ -23827,15 +23826,15 @@ function TE(e) {
|
|
|
23827
23826
|
middleware: d.length ? d : void 0,
|
|
23828
23827
|
summarization: o === !1 ? void 0 : o,
|
|
23829
23828
|
temperature: c,
|
|
23830
|
-
skills: l ?? [
|
|
23829
|
+
skills: l ?? [SE],
|
|
23831
23830
|
maxToolRounds: s,
|
|
23832
23831
|
tools: f.length ? f : void 0
|
|
23833
23832
|
};
|
|
23834
23833
|
}
|
|
23835
23834
|
//#endregion
|
|
23836
23835
|
//#region src/core/index.ts
|
|
23837
|
-
function
|
|
23838
|
-
return ag(e,
|
|
23836
|
+
function wE(e) {
|
|
23837
|
+
return ag(e, pE);
|
|
23839
23838
|
}
|
|
23840
23839
|
//#endregion
|
|
23841
|
-
export {
|
|
23840
|
+
export { Bx as ApprovalBar, Jp as CAPABILITIES, Zp as CONTEXT_PRESETS, fE as ChatDialog, wg as ChatHeader, lS as ChatInput, Zb as CodePreview, cp as CompressDecisionSchema, Zx as ConflictBar, np as DEFAULT_SYSTEM_PROMPT, JT as DebugDrawer, Ag as FocusBar, Ab as HLJS_BLOCK_MAX_CHARS, Nd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, $b as MessageContent, bx as MessageList, px as MessageRow, Ox as QueuedBar, ef as STOP_WORDS, dE as SkillPanel, nm as UNSAFE_KEYS, Fh as actionsToInspectInfo, Ph as actionsToTools, Nl as agentError, Xf as analyzeContext, hm as applyPatchToClone, gm as applyPatchToLive, Ml as asAgentError, rp as buildDataPrompt, ip as buildSystemPrompt, cg as chatContextKey, mh as commitSetToBind, tp as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, sg as copyText, bu as createAgent, Md as createApprovalMiddleware, lg as createChatContext, wE as createChatSdk, Ud as createCheckpointManager, Wd as createCheckpointMiddleware, bp as createConflictManager, Zf as createContextInspectorMiddleware, gh as createDataOps, CE as createHtmlSubagent, Id as createHumanConfirmMiddleware, Fd as createHumanConfirmTool, Vp as createMemoryBackend, Td as createMemoryMiddleware, y as createProxyLlm, yE as createRagSubagent, ld as createSandboxRunner, Xp as createSdkEvents, Qh as createSerialRunner, Gp as createSessionStore, Jh as createSkillStore, Df as createSubagentMiddleware, df as createSubagentTracker, Af as createSubagentsMiddleware, Hh as createUsageHintsMiddleware, jf as createVerifyMiddleware, Cm as createVfs, Up as createWebStorageBackend, Lf as createWriteBackCheck, cm as deepClone, Rh as defineDataToolset, dd as defineSkill, ap as defineTool, sm as deleteByPath, lp as deriveTitle, Mu as describeSchemaNode, uu as detectGarbledToolCall, ym as diffObjects, Sh as domToStructure, wh as domTools, Lh as domToolsStatic, nf as estimateMessageTokens, rf as estimateRoundTokens, Hl as estimateTokens, C as extractReasoningDelta, Zu as extractSchemaHint, Qf as extractText, S as extractTextDelta, w as extractUsage, vh as fetchDocTools, Ih as fetchTools, ph as filterByToolMode, Nu as formatConstraints, Ol as formatZodIssues, am as getByPath, Ch as getDomTool, Dh as getEnvSummary, wu as getSchemaAtPath, xu as getSchemaTopKeys, Gl as getTraceMetrics, mm as hashValue, af as indexSummarize, Ah as inspectEnvTool, jh as inspectTools, up as isChatModel, tu as isContextLengthError, Su as isPathAllowed, Np as isQuotaError, rm as isUnsafePath, Hm as jpEval, Al as jsonParseError, dm as limitDepth, Ib as markedToHtml, lm as maybeParseValue, T as normalizeUsage, Wl as offloadPassThroughChars, Ul as offloadThresholdChars, Ku as presets, Eu as projectBySchema, Tu as projectBySchemaDeep, um as projectFields, of as recallRounds, Lb as renderMarkdownHtml, Pu as renderSchemaHint, Fu as renderSchemaOverview, Lu as renderSchemaShallow, Yp as resolveCapabilities, $p as resolveContextOptions, qp as resolveDialogConfig, yp as resolveLlm, Vl as resolveModelCaps, Kp as resolveStorage, vm as restoreInPlace, _m as restoreLive, jl as routeError, ud as runHostScript, Km as runSandboxedScript, im as safeMerge, Eh as safeSerialize, fm as safeStringify, Wm as searchJson, zh as selectBuiltinTools, om as setByPath, sf as shouldTriggerCompression, qu as systemPromptHelpers, tf as tokenize, $ as toolError, Cu as unwrapSchema, og as useChat, ug as useChatContext, e as z, kl as zodError };
|