page-agent-sdk 4.25.4 → 4.26.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 +836 -802
- package/dist/page-agent-sdk.iife.js +16 -16
- package/dist/page-agent-sdk.js +575 -527
- package/dist/page-agent-sdk.legacy.js +15386 -15331
- package/dist/page-agent-sdk.umd.cjs +16 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/headless.d.ts +17 -2
- package/types/index.d.ts +22 -4
package/dist/page-agent-sdk.js
CHANGED
|
@@ -1189,11 +1189,11 @@ function hn(e, t) {
|
|
|
1189
1189
|
n[r] = pn(r, e, t);
|
|
1190
1190
|
}), n;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function gn(e, t) {
|
|
1193
1193
|
let n = hn(e, t);
|
|
1194
1194
|
return (t, r, i) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? t : Reflect.get(L(n, r) && r in t ? n : t, r, i);
|
|
1195
1195
|
}
|
|
1196
|
-
var
|
|
1196
|
+
var U = { get: /* @__PURE__ */ gn(!1, !1) }, _n = { get: /* @__PURE__ */ gn(!1, !0) }, vn = { get: /* @__PURE__ */ gn(!0, !1) }, yn = { get: /* @__PURE__ */ gn(!0, !0) };
|
|
1197
1197
|
function bn(e, t, n) {
|
|
1198
1198
|
let r = /* @__PURE__ */ Fn(n);
|
|
1199
1199
|
if (r !== n && t.call(e, r)) {
|
|
@@ -1215,7 +1215,7 @@ function Tn(e) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
// @__NO_SIDE_EFFECTS__
|
|
1217
1217
|
function En(e) {
|
|
1218
|
-
return /* @__PURE__ */ Mn(e) ? e : An(e, !1, sn,
|
|
1218
|
+
return /* @__PURE__ */ Mn(e) ? e : An(e, !1, sn, U, xn);
|
|
1219
1219
|
}
|
|
1220
1220
|
// @__NO_SIDE_EFFECTS__
|
|
1221
1221
|
function Dn(e) {
|
|
@@ -9561,26 +9561,37 @@ function hg(e = {}) {
|
|
|
9561
9561
|
let t = (t, n) => e.confirm ? !!e.confirm(t, n) : e.tools === void 0 || e.tools.includes(t);
|
|
9562
9562
|
return {
|
|
9563
9563
|
name: "approval",
|
|
9564
|
-
wrapToolCall: async (n, r) =>
|
|
9565
|
-
|
|
9566
|
-
|
|
9564
|
+
wrapToolCall: async (n, r) => e.remember && e.grants?.has(n.name) ? (n.logSink?.({
|
|
9565
|
+
timestamp: Date.now(),
|
|
9566
|
+
type: "middleware",
|
|
9567
|
+
data: {
|
|
9568
|
+
stage: "approval_auto_allowed",
|
|
9569
|
+
toolName: n.name
|
|
9570
|
+
}
|
|
9571
|
+
}), r(n)) : t(n.name, n.args) ? new Promise((t) => {
|
|
9572
|
+
let i = !1, a = [], o = (o) => {
|
|
9573
|
+
if (i) return;
|
|
9574
|
+
i = !0, a.forEach((e) => e());
|
|
9575
|
+
let s = typeof o == "object" && o ? o : null, c = s ? s.approved === !0 : o !== !1, l = !!s?.remember && c;
|
|
9576
|
+
if (l && e.grants?.add(n.name), n.logSink?.({
|
|
9567
9577
|
timestamp: Date.now(),
|
|
9568
9578
|
type: "middleware",
|
|
9569
9579
|
data: {
|
|
9570
9580
|
stage: "approval_resolved",
|
|
9571
9581
|
toolName: n.name,
|
|
9572
|
-
approved:
|
|
9582
|
+
approved: c ? l ? "granted" : String(o).slice(0, 60) : !1
|
|
9573
9583
|
}
|
|
9574
|
-
}),
|
|
9584
|
+
}), c) r(n).then(t, (e) => t({
|
|
9585
|
+
content: `工具执行失败:${e?.message ?? e}`,
|
|
9586
|
+
status: "error"
|
|
9587
|
+
}));
|
|
9588
|
+
else {
|
|
9575
9589
|
let e = n.args ?? {}, r = e.path || e.jsonPath || e.patch?.jsonPath || (Array.isArray(e.patches) ? e.patches.map((e) => e?.jsonPath).filter(Boolean).join(",") : "") || "";
|
|
9576
9590
|
t({
|
|
9577
9591
|
content: `用户拒绝了 ${n.name} 调用${r ? `(path=${r})` : ""}。请改用只读工具、调整路径或换方案后再试。`,
|
|
9578
9592
|
status: "error"
|
|
9579
9593
|
});
|
|
9580
|
-
}
|
|
9581
|
-
content: `工具执行失败:${e?.message ?? e}`,
|
|
9582
|
-
status: "error"
|
|
9583
|
-
}));
|
|
9594
|
+
}
|
|
9584
9595
|
};
|
|
9585
9596
|
if (n.signal) {
|
|
9586
9597
|
if (n.signal.aborted) return o(!1);
|
|
@@ -9613,7 +9624,8 @@ function hg(e = {}) {
|
|
|
9613
9624
|
args: n.args,
|
|
9614
9625
|
resolve: o,
|
|
9615
9626
|
hold: s,
|
|
9616
|
-
...c ? { preview: c } : {}
|
|
9627
|
+
...c ? { preview: c } : {},
|
|
9628
|
+
...e.remember ? { remember: !0 } : {}
|
|
9617
9629
|
}), n.logSink?.({
|
|
9618
9630
|
timestamp: Date.now(),
|
|
9619
9631
|
type: "middleware",
|
|
@@ -9705,7 +9717,7 @@ function yg(e, t = {}) {
|
|
|
9705
9717
|
type: "approval_request",
|
|
9706
9718
|
toolName: n.name,
|
|
9707
9719
|
args: n.args,
|
|
9708
|
-
resolve: o,
|
|
9720
|
+
resolve: (e) => o(typeof e == "object" && e ? e.approved : e),
|
|
9709
9721
|
hold: s
|
|
9710
9722
|
}), n.logSink?.({
|
|
9711
9723
|
timestamp: Date.now(),
|
|
@@ -17661,7 +17673,7 @@ function qC(e, n, r) {
|
|
|
17661
17673
|
prompt_tokens: 0,
|
|
17662
17674
|
completion_tokens: 0,
|
|
17663
17675
|
total_tokens: 0
|
|
17664
|
-
}, o = Iy(() =>
|
|
17676
|
+
}, o = Iy(() => Zt, () => e.conflictPolicy ?? "ask", () => U.agent?.debugLogs?.value), c = /* @__PURE__ */ W(0), l = db(e.storage);
|
|
17665
17677
|
l && (e.debug && l.onEvent((e) => console.log("[page-agent-sdk][storage]", e)), l.onEvent((e) => {
|
|
17666
17678
|
e.type === "quota" && U.agent?.debugLogs?.value?.push({
|
|
17667
17679
|
timestamp: Date.now(),
|
|
@@ -17683,7 +17695,7 @@ function qC(e, n, r) {
|
|
|
17683
17695
|
e.debug && !d && console.warn("[page-agent-sdk][summarization] 未构造 llmInvoke(apiKey 缺失?),摘要回退零成本索引摘要");
|
|
17684
17696
|
let b = /* @__PURE__ */ En([]), x = g_(e.vfs?.initialFiles, {
|
|
17685
17697
|
persist: l ? { save: (e) => {
|
|
17686
|
-
|
|
17698
|
+
Cn.persistSave({ vfs: e });
|
|
17687
17699
|
} } : void 0,
|
|
17688
17700
|
maxBytes: e.vfs?.maxBytes,
|
|
17689
17701
|
poolBytes: e.vfs?.poolBytes
|
|
@@ -17703,7 +17715,7 @@ function qC(e, n, r) {
|
|
|
17703
17715
|
data: { stage: "resume_notice" }
|
|
17704
17716
|
});
|
|
17705
17717
|
}), A = Cb(), ee = e.approval?.timeoutMs, j = ee !== void 0 && Number.isFinite(ee) && ee > 0 ? ee : ee !== void 0 && (!Number.isFinite(ee) || ee < 0) ? 0 : 3e4, te = (e) => {
|
|
17706
|
-
|
|
17718
|
+
Zt({
|
|
17707
17719
|
type: "error",
|
|
17708
17720
|
message: `确认请求(${e.toolName})${Math.round(e.waitedMs / 1e3)}s 无响应已自动拒绝 —— 当前路径无 UI 响应方;可传 approval.timeoutMs 调整(Infinity = 无限等)`,
|
|
17709
17721
|
severity: "observable",
|
|
@@ -17711,7 +17723,7 @@ function qC(e, n, r) {
|
|
|
17711
17723
|
context: e
|
|
17712
17724
|
});
|
|
17713
17725
|
}, M = yg((e) => {
|
|
17714
|
-
A.lastPlanConfirmation = e,
|
|
17726
|
+
A.lastPlanConfirmation = e, Cn.persistSave({ planConfirmation: e }), U.agent?.debugLogs?.value?.push({
|
|
17715
17727
|
timestamp: Date.now(),
|
|
17716
17728
|
type: "middleware",
|
|
17717
17729
|
data: {
|
|
@@ -17726,7 +17738,7 @@ function qC(e, n, r) {
|
|
|
17726
17738
|
}), re = Km({
|
|
17727
17739
|
getSchema: () => Te()?.schema,
|
|
17728
17740
|
getBind: () => Te()?.bind,
|
|
17729
|
-
onChange: (e) =>
|
|
17741
|
+
onChange: (e) => Zt({
|
|
17730
17742
|
type: "focus_change",
|
|
17731
17743
|
focuses: e
|
|
17732
17744
|
})
|
|
@@ -17876,7 +17888,7 @@ function qC(e, n, r) {
|
|
|
17876
17888
|
let Be = e.proposals ? jS(e.proposals, {
|
|
17877
17889
|
emit: (e) => {
|
|
17878
17890
|
try {
|
|
17879
|
-
|
|
17891
|
+
Zt(e);
|
|
17880
17892
|
} catch {}
|
|
17881
17893
|
},
|
|
17882
17894
|
log: (e, t) => {
|
|
@@ -17978,16 +17990,18 @@ function qC(e, n, r) {
|
|
|
17978
17990
|
e.debug && z.agentCompression && !p && console.warn("[page-agent-sdk][agentCompression] agentCompression 开启但 summaryLlm 不可用(或缺 apiKey / 模型不支持工具),压缩决策不启用,回退静态压缩");
|
|
17979
17991
|
let mt = z.memory, ht = z.subagent, gt = ht ? Nh() : void 0, _t = e.verify?.maxAttempts ?? 2, vt = !!(e.verify?.check || e.verify?.maxAttempts || e.verify?.adversarial), yt = e.capabilities?.verify === !1, bt = (z.verify || vt && !yt) && e.verify?.enabled !== !1 && _t > 0, xt = z.contextInspector;
|
|
17980
17992
|
vt && !bt && e.verify?.enabled !== !1 && console.warn("[page-agent-sdk][verify] 检测到 verify 配置(check/maxAttempts/adversarial)但未装载(capabilities.verify:false 显式关闭 或 maxAttempts≤0)");
|
|
17981
|
-
let St = e.subagent, Ct = St?.allowedTools ?? [], wt = e.permissions?.length ? mg(e.permissions) : void 0, Tt = e.approval?.preview === !0 && Ce ? (e, t) => e === "write" ? Ce(t) : null : void 0, Et = e.approval?.previewWrite || Tt ? (t, n) => e.approval?.previewWrite?.(t, n) ?? Tt?.(t, n) ?? null : void 0, Dt = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? hg({
|
|
17993
|
+
let St = e.subagent, Ct = St?.allowedTools ?? [], wt = e.permissions?.length ? mg(e.permissions) : void 0, Tt = e.approval?.preview === !0 && Ce ? (e, t) => e === "write" ? Ce(t) : null : void 0, Et = e.approval?.previewWrite || Tt ? (t, n) => e.approval?.previewWrite?.(t, n) ?? Tt?.(t, n) ?? null : void 0, Dt = /* @__PURE__ */ new Set(), Ot = e.approval && (e.approval.tools !== void 0 || e.approval.confirm || e.approval.remember === !0) ? hg({
|
|
17982
17994
|
...e.approval,
|
|
17995
|
+
remember: e.approval.remember === !0,
|
|
17996
|
+
grants: Dt,
|
|
17983
17997
|
timeoutMs: e.approval.timeoutMs ?? j,
|
|
17984
17998
|
onAutoReject: te,
|
|
17985
17999
|
previewWrite: Et
|
|
17986
|
-
}) : void 0,
|
|
18000
|
+
}) : void 0, kt = [
|
|
17987
18001
|
...wt ? [wt] : [],
|
|
17988
|
-
...
|
|
18002
|
+
...Ot ? [Ot] : [],
|
|
17989
18003
|
...ke ? [ke] : []
|
|
17990
|
-
],
|
|
18004
|
+
], At = !ht || St?.enabled === !1 ? void 0 : $h({
|
|
17991
18005
|
llm: St?.llm ?? e.llm,
|
|
17992
18006
|
allTools: () => U.agent?.allTools ?? H,
|
|
17993
18007
|
allowedTools: Ct.length ? Ct : void 0,
|
|
@@ -18003,7 +18017,7 @@ function qC(e, n, r) {
|
|
|
18003
18017
|
getFocuses: () => re.getActiveFocuses(),
|
|
18004
18018
|
getSchema: () => Te()?.schema ?? null,
|
|
18005
18019
|
tracker: gt,
|
|
18006
|
-
guardMiddleware:
|
|
18020
|
+
guardMiddleware: kt.length ? kt : void 0,
|
|
18007
18021
|
getVfsFiles: dt ? () => x.files : void 0,
|
|
18008
18022
|
enterDataScope: Se?.enterScope ? (e) => Se.enterScope(e) : void 0,
|
|
18009
18023
|
exitDataScope: Se?.exitScope ? (e) => Se.exitScope(e) : void 0,
|
|
@@ -18011,7 +18025,7 @@ function qC(e, n, r) {
|
|
|
18011
18025
|
a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
|
|
18012
18026
|
},
|
|
18013
18027
|
timeoutMs: St?.timeoutMs
|
|
18014
|
-
}),
|
|
18028
|
+
}), jt = de?.map((e) => {
|
|
18015
18029
|
if (!e._codeAsset) return e;
|
|
18016
18030
|
let t = e._codeAsset, n = Dv({
|
|
18017
18031
|
writablePaths: t.writablePaths,
|
|
@@ -18028,19 +18042,19 @@ function qC(e, n, r) {
|
|
|
18028
18042
|
...e,
|
|
18029
18043
|
middleware: r
|
|
18030
18044
|
};
|
|
18031
|
-
}),
|
|
18045
|
+
}), Mt = fe && ht ? Ov() : void 0, Nt = Mt ? Fv({
|
|
18032
18046
|
getBind: () => Te()?.bind,
|
|
18033
18047
|
writablePaths: pe,
|
|
18034
|
-
getLocked: () =>
|
|
18048
|
+
getLocked: () => Mt.locked(),
|
|
18035
18049
|
tools: H,
|
|
18036
18050
|
getCodeFieldPaths: () => Nv(Te()?.bind, I.map((e) => ({
|
|
18037
18051
|
writablePaths: e._codeAsset.writablePaths,
|
|
18038
18052
|
codeField: e._codeAsset.codeField
|
|
18039
18053
|
})))
|
|
18040
|
-
}) : void 0,
|
|
18054
|
+
}) : void 0, Pt = Se?.getSummarizedPaths && Se.clearSummarizedPaths ? Rv({
|
|
18041
18055
|
getSummarizedPaths: () => Se.getSummarizedPaths(),
|
|
18042
18056
|
clearSummarizedPaths: () => Se.clearSummarizedPaths()
|
|
18043
|
-
}) : void 0,
|
|
18057
|
+
}) : void 0, Ft = ht && jt !== void 0 ? ng(jt, {
|
|
18044
18058
|
llm: e.llm,
|
|
18045
18059
|
thinkingModeDefault: e.subagent?.thinkingMode,
|
|
18046
18060
|
staleReadInvalidation: e.staleReadInvalidation,
|
|
@@ -18050,7 +18064,7 @@ function qC(e, n, r) {
|
|
|
18050
18064
|
getSchema: () => Te()?.schema ?? null,
|
|
18051
18065
|
getBind: () => Te()?.bind,
|
|
18052
18066
|
tracker: gt,
|
|
18053
|
-
guardMiddleware:
|
|
18067
|
+
guardMiddleware: kt.length ? kt : void 0,
|
|
18054
18068
|
getVfsFiles: dt ? () => x.files : void 0,
|
|
18055
18069
|
enterDataScope: Se?.enterScope ? (e) => Se.enterScope(e) : void 0,
|
|
18056
18070
|
exitDataScope: Se?.exitScope ? (e) => Se.exitScope(e) : void 0,
|
|
@@ -18058,30 +18072,30 @@ function qC(e, n, r) {
|
|
|
18058
18072
|
a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
|
|
18059
18073
|
},
|
|
18060
18074
|
timeoutMs: e.subagent?.timeoutMs,
|
|
18061
|
-
...
|
|
18062
|
-
componentLock:
|
|
18075
|
+
...Mt ? {
|
|
18076
|
+
componentLock: Mt,
|
|
18063
18077
|
resolveComponents: (e) => kv(e, Cv(Te()?.bind, pe))
|
|
18064
18078
|
} : {}
|
|
18065
|
-
}) : void 0,
|
|
18079
|
+
}) : void 0, It = Ft ? Ft.controller : null, Lt = (t) => {
|
|
18066
18080
|
let n = t.thinkingMode ?? e.subagent?.thinkingMode, r = n ? wy(t.llm ?? e.llm) ? "instance-noop" : "applied" : "inherited";
|
|
18067
18081
|
return {
|
|
18068
18082
|
...t,
|
|
18069
18083
|
...n ? { thinkingMode: n } : {},
|
|
18070
18084
|
thinkingApplied: r
|
|
18071
18085
|
};
|
|
18072
|
-
},
|
|
18086
|
+
}, Rt = ["read", "fetch_document"], zt = H.filter((e) => Rt.includes(e.name)), Bt = bt ? Ag({
|
|
18073
18087
|
check: e.verify.check ?? Ig({
|
|
18074
18088
|
schemas: () => Te() ? { "": Te().schema } : {},
|
|
18075
18089
|
root: () => Te()?.bind
|
|
18076
18090
|
}),
|
|
18077
18091
|
adversarial: e.verify?.adversarial ? {
|
|
18078
18092
|
llm: e.llm,
|
|
18079
|
-
tools:
|
|
18093
|
+
tools: zt
|
|
18080
18094
|
} : void 0
|
|
18081
|
-
}) : void 0,
|
|
18095
|
+
}) : void 0, Vt = xt ? Xg({
|
|
18082
18096
|
contextWindow: m.contextWindow,
|
|
18083
18097
|
thresholdRatio: bb(e, m.contextWindow).summaryThresholdRatio
|
|
18084
|
-
}) : void 0,
|
|
18098
|
+
}) : void 0, Ht = OC({
|
|
18085
18099
|
...z,
|
|
18086
18100
|
humanConfirm: Ye,
|
|
18087
18101
|
screenshot: !!Pe,
|
|
@@ -18089,21 +18103,21 @@ function qC(e, n, r) {
|
|
|
18089
18103
|
hasActions: !!e.actions && Object.keys(e.actions).length > 0,
|
|
18090
18104
|
hasProposals: !!e.proposals,
|
|
18091
18105
|
viewImage: !!Ne,
|
|
18092
|
-
subagents: de?.map(
|
|
18093
|
-
}, _e && !!se, { promptSoftCap: Oh(m.contextWindow, h.promptSoftCapTokens) }),
|
|
18106
|
+
subagents: de?.map(Lt)
|
|
18107
|
+
}, _e && !!se, { promptSoftCap: Oh(m.contextWindow, h.promptSoftCapTokens) }), Ut = z.pageContext ? AC({
|
|
18094
18108
|
getPageInfo: () => typeof document < "u" && typeof location < "u" ? {
|
|
18095
18109
|
title: document.title || "",
|
|
18096
18110
|
url: location.href
|
|
18097
18111
|
} : null,
|
|
18098
18112
|
canReadPage: z.domInspect === !0
|
|
18099
|
-
}) : void 0,
|
|
18113
|
+
}) : void 0, Wt = {
|
|
18100
18114
|
epoch: 0,
|
|
18101
18115
|
notices: [],
|
|
18102
18116
|
readsInvalidated: 0
|
|
18103
|
-
},
|
|
18117
|
+
}, Gt = 0, Kt = {
|
|
18104
18118
|
name: "hostNotice",
|
|
18105
18119
|
beforeAgent: () => {
|
|
18106
|
-
|
|
18120
|
+
Gt = Wt.epoch;
|
|
18107
18121
|
},
|
|
18108
18122
|
wrapModelCall: async (e, t) => {
|
|
18109
18123
|
if (Le) {
|
|
@@ -18121,18 +18135,18 @@ function qC(e, n, r) {
|
|
|
18121
18135
|
});
|
|
18122
18136
|
}
|
|
18123
18137
|
}
|
|
18124
|
-
if (
|
|
18125
|
-
|
|
18126
|
-
let t =
|
|
18138
|
+
if (Wt.epoch > Gt) {
|
|
18139
|
+
Gt = Wt.epoch;
|
|
18140
|
+
let t = Wt.notices[Wt.notices.length - 1] ?? "", n = Ud(e.messages, t || void 0, Ge);
|
|
18127
18141
|
if (n.invalidatedCount > 0) {
|
|
18128
18142
|
for (let t = 0; t < n.messages.length; t++) e.messages[t] = n.messages[t];
|
|
18129
|
-
|
|
18143
|
+
Wt.readsInvalidated += n.invalidatedCount, U.agent?.debugLogs?.value?.push({
|
|
18130
18144
|
timestamp: Date.now(),
|
|
18131
18145
|
type: "middleware",
|
|
18132
18146
|
data: {
|
|
18133
18147
|
stage: "host_read_invalidated",
|
|
18134
18148
|
count: n.invalidatedCount,
|
|
18135
|
-
epoch:
|
|
18149
|
+
epoch: Wt.epoch,
|
|
18136
18150
|
reason: t || void 0
|
|
18137
18151
|
}
|
|
18138
18152
|
});
|
|
@@ -18140,24 +18154,24 @@ function qC(e, n, r) {
|
|
|
18140
18154
|
}
|
|
18141
18155
|
return t(e);
|
|
18142
18156
|
},
|
|
18143
|
-
augmentPrompt: () =>
|
|
18157
|
+
augmentPrompt: () => Wt.notices.length ? [
|
|
18144
18158
|
"【宿主页面已变更】",
|
|
18145
|
-
...
|
|
18159
|
+
...Wt.notices.filter(Boolean).map((e) => `· ${e}`),
|
|
18146
18160
|
z.domInspect === !0 ? "此前的页面读取/截图结果已过期,回答任何关于当前页面的问题前必须重新 read_page / get_dom 读取当前页面;不要凭此前的读取结果或记忆作答。" : "页面内容可能已变化,断言页面前先核实当前状态;不要凭此前的印象作答。"
|
|
18147
18161
|
].join("\n") : void 0,
|
|
18148
18162
|
afterAgent: () => {
|
|
18149
|
-
|
|
18163
|
+
Wt.notices.length = 0;
|
|
18150
18164
|
}
|
|
18151
|
-
},
|
|
18165
|
+
}, qt = Be ? {
|
|
18152
18166
|
name: "proposalNotice",
|
|
18153
18167
|
augmentPrompt: () => Be.state.notices.length ? ["【内容提案裁决结果】(以此为准,不要凭提案前状态作答)", ...Be.state.notices].join("\n") : void 0,
|
|
18154
18168
|
afterAgent: () => {
|
|
18155
18169
|
Be.state.notices.length = 0;
|
|
18156
18170
|
}
|
|
18157
|
-
} : null,
|
|
18171
|
+
} : null, Jt = se ? {
|
|
18158
18172
|
name: "dataHint",
|
|
18159
18173
|
augmentPrompt: () => d_(Te(), e.schemaHint) || void 0
|
|
18160
|
-
} : null,
|
|
18174
|
+
} : null, Yt = e.augmentSystem ? {
|
|
18161
18175
|
name: "augmentSystem",
|
|
18162
18176
|
augmentPrompt: (t) => {
|
|
18163
18177
|
try {
|
|
@@ -18170,47 +18184,47 @@ function qC(e, n, r) {
|
|
|
18170
18184
|
return;
|
|
18171
18185
|
}
|
|
18172
18186
|
}
|
|
18173
|
-
} : null,
|
|
18187
|
+
} : null, Xt = _b(e.onEvent), Zt = Xt.emit, Qt, $t = [], en = (e) => ({
|
|
18174
18188
|
name: e.name,
|
|
18175
18189
|
description: e.description,
|
|
18176
18190
|
content: typeof e.getContent == "function" ? e.getContent() : ""
|
|
18177
|
-
}),
|
|
18191
|
+
}), tn = (e) => ({
|
|
18178
18192
|
name: e.name,
|
|
18179
18193
|
description: e.description,
|
|
18180
18194
|
getContent: () => e.content
|
|
18181
|
-
}),
|
|
18195
|
+
}), nn = e.skillStorage === !1 ? null : IC({
|
|
18182
18196
|
...typeof e.skillStorage == "object" ? e.skillStorage : {},
|
|
18183
18197
|
id: e.skillStorage && typeof e.skillStorage == "object" && e.skillStorage.id ? e.skillStorage.id : `agent::${n}`
|
|
18184
|
-
}),
|
|
18185
|
-
let t =
|
|
18198
|
+
}), rn = () => {
|
|
18199
|
+
let t = Qt ? Qt.controller : null;
|
|
18186
18200
|
if (t) {
|
|
18187
|
-
let n = (e.skills || []).filter((e) =>
|
|
18188
|
-
t.set([...n,
|
|
18201
|
+
let n = (e.skills || []).filter((e) => !$t.some((t) => t.name === e.name));
|
|
18202
|
+
t.set([...n, ...$t]);
|
|
18189
18203
|
}
|
|
18190
18204
|
U.infoTick.value++;
|
|
18191
|
-
},
|
|
18192
|
-
if (
|
|
18193
|
-
let t = await
|
|
18205
|
+
}, an = async () => {
|
|
18206
|
+
if (nn) try {
|
|
18207
|
+
let t = await nn.list();
|
|
18194
18208
|
if (t.length) {
|
|
18195
|
-
|
|
18196
|
-
let n =
|
|
18209
|
+
$t = t.map(tn);
|
|
18210
|
+
let n = Qt ? Qt.controller : null;
|
|
18197
18211
|
if (n) {
|
|
18198
|
-
let t = (e.skills || []).filter((e) =>
|
|
18199
|
-
n.set([...t,
|
|
18212
|
+
let t = (e.skills || []).filter((e) => !$t.some((t) => t.name === e.name));
|
|
18213
|
+
n.set([...t, ...$t]);
|
|
18200
18214
|
}
|
|
18201
18215
|
U.infoTick.value++;
|
|
18202
18216
|
}
|
|
18203
18217
|
} catch {}
|
|
18204
|
-
},
|
|
18218
|
+
}, on = ft ? Mh({
|
|
18205
18219
|
...h,
|
|
18206
18220
|
llmInvoke: d,
|
|
18207
18221
|
getRegisteredData: () => Te() ? [{ description: Te().description ?? "主数据对象" }] : [],
|
|
18208
18222
|
preserveLastToolResults: _,
|
|
18209
18223
|
...pt ? {
|
|
18210
18224
|
decideInvoke: p,
|
|
18211
|
-
getSnapshot: () =>
|
|
18225
|
+
getSnapshot: () => Vt?.getSnapshot()
|
|
18212
18226
|
} : {}
|
|
18213
|
-
}) : void 0,
|
|
18227
|
+
}) : void 0, sn = ut ? sh([
|
|
18214
18228
|
...z.domInspect && !(e.skills || []).some((e) => e.name === "dom-inspect") ? [aC({
|
|
18215
18229
|
withScreenshot: !!Pe,
|
|
18216
18230
|
withDomEdit: z.domEdit,
|
|
@@ -18232,20 +18246,20 @@ function qC(e, n, r) {
|
|
|
18232
18246
|
H = ot(), U.agent && U.agent.setTools(H), U.infoTick.value++;
|
|
18233
18247
|
}
|
|
18234
18248
|
}) : void 0;
|
|
18235
|
-
|
|
18236
|
-
let
|
|
18249
|
+
Qt = sn;
|
|
18250
|
+
let cn = Sb([
|
|
18251
|
+
...Jt ? [Jt] : [],
|
|
18252
|
+
Ht,
|
|
18253
|
+
...Ut ? [Ut] : [],
|
|
18254
|
+
Kt,
|
|
18237
18255
|
...qt ? [qt] : [],
|
|
18238
|
-
Vt,
|
|
18239
|
-
...Ht ? [Ht] : [],
|
|
18240
|
-
Gt,
|
|
18241
|
-
...Kt ? [Kt] : [],
|
|
18242
18256
|
...ct ? [T] : [],
|
|
18243
18257
|
O,
|
|
18244
18258
|
k,
|
|
18245
18259
|
...st ? [C] : [],
|
|
18246
|
-
...
|
|
18260
|
+
...sn ? [sn] : [],
|
|
18247
18261
|
...dt ? [w_(x)] : [],
|
|
18248
|
-
...
|
|
18262
|
+
...on ? [on] : [],
|
|
18249
18263
|
...lt ? [ie] : [],
|
|
18250
18264
|
...Qe ? [re] : [],
|
|
18251
18265
|
...we ? [we] : [],
|
|
@@ -18253,52 +18267,52 @@ function qC(e, n, r) {
|
|
|
18253
18267
|
...wt ? [wt] : [],
|
|
18254
18268
|
...ge && R && L ? [Og(L)] : [],
|
|
18255
18269
|
...Ye ? [M] : [],
|
|
18256
|
-
...
|
|
18270
|
+
...Ot ? [Ot] : [],
|
|
18257
18271
|
...ke ? [ke] : [],
|
|
18258
|
-
...
|
|
18259
|
-
...
|
|
18260
|
-
...
|
|
18261
|
-
...Mt ? [Mt] : [],
|
|
18272
|
+
...Bt ? [Bt] : [],
|
|
18273
|
+
...At ? [At] : [],
|
|
18274
|
+
...Ft ? [Ft] : [],
|
|
18262
18275
|
...Nt ? [Nt] : [],
|
|
18276
|
+
...Pt ? [Pt] : [],
|
|
18263
18277
|
...Se && ht ? [Vv({
|
|
18264
18278
|
getBind: () => Te()?.bind,
|
|
18265
18279
|
getTools: () => U.agent?.allTools ?? H
|
|
18266
18280
|
})] : [],
|
|
18267
|
-
...
|
|
18268
|
-
...
|
|
18281
|
+
...Yt ? [Yt] : [],
|
|
18282
|
+
...Vt ? [Vt] : [],
|
|
18269
18283
|
...Ie ? [Ie] : [],
|
|
18270
18284
|
...e.middleware || [],
|
|
18271
18285
|
...B ? [gC(a, {
|
|
18272
18286
|
tokenBudget: e.tokenBudget,
|
|
18273
18287
|
timeBudgetMs: e.timeBudgetMs
|
|
18274
|
-
},
|
|
18275
|
-
GC(
|
|
18276
|
-
]),
|
|
18277
|
-
function
|
|
18288
|
+
}, Zt)] : [],
|
|
18289
|
+
GC(Zt, b, Te, a)
|
|
18290
|
+
]), ln = e.maxMemoryRounds ?? VC;
|
|
18291
|
+
function un(e) {
|
|
18278
18292
|
return (e) => {
|
|
18279
|
-
e.type !== "approval_request" &&
|
|
18293
|
+
e.type !== "approval_request" && Zt(Me(e));
|
|
18280
18294
|
};
|
|
18281
18295
|
}
|
|
18282
|
-
let
|
|
18283
|
-
function
|
|
18296
|
+
let dn = /* @__PURE__ */ W([]), fn = BC(), pn = /* @__PURE__ */ new Set();
|
|
18297
|
+
function mn(e) {
|
|
18284
18298
|
let t = new AbortController(), n = () => t.abort();
|
|
18285
|
-
return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })),
|
|
18299
|
+
return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), pn.add(t), {
|
|
18286
18300
|
controller: t,
|
|
18287
18301
|
untrack: () => {
|
|
18288
|
-
|
|
18302
|
+
pn.delete(t), e?.removeEventListener("abort", n);
|
|
18289
18303
|
}
|
|
18290
18304
|
};
|
|
18291
18305
|
}
|
|
18292
|
-
function
|
|
18293
|
-
for (let e of
|
|
18294
|
-
|
|
18306
|
+
function hn() {
|
|
18307
|
+
for (let e of pn) e.abort();
|
|
18308
|
+
pn.clear();
|
|
18295
18309
|
}
|
|
18296
|
-
let
|
|
18310
|
+
let gn = /* @__PURE__ */ W(null), U = {
|
|
18297
18311
|
agentId: n,
|
|
18298
18312
|
store: l,
|
|
18299
18313
|
messages: b,
|
|
18300
18314
|
vfsStore: x,
|
|
18301
|
-
listeners:
|
|
18315
|
+
listeners: Xt.listeners,
|
|
18302
18316
|
todosMw: C,
|
|
18303
18317
|
memoryMw: ae,
|
|
18304
18318
|
missionMw: T,
|
|
@@ -18313,18 +18327,18 @@ function qC(e, n, r) {
|
|
|
18313
18327
|
mcpFailed: [],
|
|
18314
18328
|
checkpoint: L,
|
|
18315
18329
|
dataOpsController: Se,
|
|
18316
|
-
skillsController:
|
|
18330
|
+
skillsController: Qt ? Qt.controller : null,
|
|
18317
18331
|
infoTick: c,
|
|
18318
18332
|
pendingConflict: o.pendingConflict,
|
|
18319
|
-
pendingQuote:
|
|
18320
|
-
sessions:
|
|
18321
|
-
refreshSessions: () =>
|
|
18333
|
+
pendingQuote: gn,
|
|
18334
|
+
sessions: dn,
|
|
18335
|
+
refreshSessions: () => Cn.refreshSessions(),
|
|
18322
18336
|
liveData: Te,
|
|
18323
18337
|
usage: a,
|
|
18324
|
-
emit:
|
|
18325
|
-
runSerial:
|
|
18326
|
-
trackActive:
|
|
18327
|
-
abortAllActive:
|
|
18338
|
+
emit: Zt,
|
|
18339
|
+
runSerial: fn,
|
|
18340
|
+
trackActive: mn,
|
|
18341
|
+
abortAllActive: hn,
|
|
18328
18342
|
unloadSkillTools(e) {
|
|
18329
18343
|
if (e) {
|
|
18330
18344
|
let t = it.length;
|
|
@@ -18347,21 +18361,21 @@ function qC(e, n, r) {
|
|
|
18347
18361
|
}
|
|
18348
18362
|
}
|
|
18349
18363
|
}
|
|
18350
|
-
|
|
18364
|
+
bn();
|
|
18351
18365
|
},
|
|
18352
18366
|
addSkill(e) {
|
|
18353
|
-
let t =
|
|
18354
|
-
t >= 0 ?
|
|
18367
|
+
let t = $t.findIndex((t) => t.name === e.name);
|
|
18368
|
+
t >= 0 ? $t[t] = e : $t.push(e), rn(), nn && nn.put(en(e));
|
|
18355
18369
|
},
|
|
18356
18370
|
removeSkill(e) {
|
|
18357
|
-
let t =
|
|
18358
|
-
return t < 0 ? !1 : (
|
|
18371
|
+
let t = $t.findIndex((t) => t.name === e);
|
|
18372
|
+
return t < 0 ? !1 : ($t.splice(t, 1), rn(), nn && nn.remove(e), !0);
|
|
18359
18373
|
},
|
|
18360
18374
|
listUserSkills() {
|
|
18361
|
-
return
|
|
18375
|
+
return $t.map((e) => e.name);
|
|
18362
18376
|
},
|
|
18363
18377
|
getUserSkill(e) {
|
|
18364
|
-
let t =
|
|
18378
|
+
let t = $t.find((t) => t.name === e);
|
|
18365
18379
|
if (t) return {
|
|
18366
18380
|
name: t.name,
|
|
18367
18381
|
description: t.description,
|
|
@@ -18369,7 +18383,7 @@ function qC(e, n, r) {
|
|
|
18369
18383
|
};
|
|
18370
18384
|
},
|
|
18371
18385
|
afterRound() {
|
|
18372
|
-
|
|
18386
|
+
xn(), Cn.persistRuntime();
|
|
18373
18387
|
},
|
|
18374
18388
|
clearCodeReuse() {
|
|
18375
18389
|
let e = x;
|
|
@@ -18380,9 +18394,9 @@ function qC(e, n, r) {
|
|
|
18380
18394
|
t ??= {}, t?.mission && ct && T.setMission(t.mission);
|
|
18381
18395
|
let n = e, r = (t.images ?? []).filter((e) => e && (e.dataUri || e.vfsRef || e.url));
|
|
18382
18396
|
if (r.length > 4) throw Error(`[page-agent-sdk] 单轮最多 4 张图片(收到 ${r.length})`);
|
|
18383
|
-
if (r.length && (await
|
|
18397
|
+
if (r.length && (await Sn.stowImages(r), await Sn.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
|
|
18384
18398
|
let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述(集成方识图子 agent / 自有 vision API)";
|
|
18385
|
-
throw
|
|
18399
|
+
throw Zt({
|
|
18386
18400
|
type: "error",
|
|
18387
18401
|
message: e,
|
|
18388
18402
|
severity: "recoverable",
|
|
@@ -18390,7 +18404,7 @@ function qC(e, n, r) {
|
|
|
18390
18404
|
}), Error(`[page-agent-sdk] ${e}`);
|
|
18391
18405
|
}
|
|
18392
18406
|
x?.setProtectedRefs?.(RC(b));
|
|
18393
|
-
let i = B ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c =
|
|
18407
|
+
let i = B ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = un(t.signal);
|
|
18394
18408
|
if (t.signal) {
|
|
18395
18409
|
let e = () => o.resolve("keep_external");
|
|
18396
18410
|
t.signal.aborted ? e() : t.signal.addEventListener("abort", e, { once: !0 });
|
|
@@ -18407,14 +18421,14 @@ function qC(e, n, r) {
|
|
|
18407
18421
|
...n ? { anchor: n } : {}
|
|
18408
18422
|
};
|
|
18409
18423
|
}
|
|
18410
|
-
let i = e ??
|
|
18424
|
+
let i = e ?? gn.value ?? void 0;
|
|
18411
18425
|
b.push({
|
|
18412
18426
|
role: "user",
|
|
18413
18427
|
content: n,
|
|
18414
18428
|
timestamp: Date.now(),
|
|
18415
18429
|
...r.length ? { images: r } : {},
|
|
18416
18430
|
...i ? { quote: i } : {}
|
|
18417
|
-
}), s = !0, !e &&
|
|
18431
|
+
}), s = !0, !e && gn.value && (gn.value = null);
|
|
18418
18432
|
}
|
|
18419
18433
|
try {
|
|
18420
18434
|
let e = await U.agent.invoke(b, t.signal, c);
|
|
@@ -18435,7 +18449,7 @@ function qC(e, n, r) {
|
|
|
18435
18449
|
}), U.afterRound(), l) try {
|
|
18436
18450
|
await l.flush();
|
|
18437
18451
|
} catch (e) {
|
|
18438
|
-
|
|
18452
|
+
Zt({
|
|
18439
18453
|
type: "error",
|
|
18440
18454
|
message: `落盘失败(不影响本轮回复):${e instanceof Error ? e.message : String(e)}`,
|
|
18441
18455
|
severity: "observable",
|
|
@@ -18451,7 +18465,7 @@ function qC(e, n, r) {
|
|
|
18451
18465
|
code: "MODEL_UNAVAILABLE",
|
|
18452
18466
|
message: e instanceof Error ? e.message : n.message
|
|
18453
18467
|
}), a < i && L?.canRestore()) {
|
|
18454
|
-
a += 1, L.restore(), s = !0,
|
|
18468
|
+
a += 1, L.restore(), s = !0, Zt({
|
|
18455
18469
|
type: "error",
|
|
18456
18470
|
message: `致命错误自动恢复(${a}/${i}):${n.message},已回退 checkpoint 重试`,
|
|
18457
18471
|
severity: "observable",
|
|
@@ -18463,7 +18477,7 @@ function qC(e, n, r) {
|
|
|
18463
18477
|
});
|
|
18464
18478
|
continue;
|
|
18465
18479
|
}
|
|
18466
|
-
throw
|
|
18480
|
+
throw Zt({
|
|
18467
18481
|
type: "error",
|
|
18468
18482
|
message: n.message,
|
|
18469
18483
|
severity: n.severity,
|
|
@@ -18476,7 +18490,7 @@ function qC(e, n, r) {
|
|
|
18476
18490
|
async batch(e, t, n) {
|
|
18477
18491
|
if (await U.initDone, !e.length) return [];
|
|
18478
18492
|
if (U.refCount <= 0) throw Error("page-agent-sdk: agent 已释放(unmount),拒绝排队中的 batch");
|
|
18479
|
-
let r = [], i =
|
|
18493
|
+
let r = [], i = un(n);
|
|
18480
18494
|
if (x?.setProtectedRefs?.(RC(b)), n) {
|
|
18481
18495
|
let e = () => o.resolve("keep_external");
|
|
18482
18496
|
n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
|
|
@@ -18508,7 +18522,7 @@ function qC(e, n, r) {
|
|
|
18508
18522
|
}), U.afterRound(), l) try {
|
|
18509
18523
|
await l.flush();
|
|
18510
18524
|
} catch (e) {
|
|
18511
|
-
|
|
18525
|
+
Zt({
|
|
18512
18526
|
type: "error",
|
|
18513
18527
|
message: `落盘失败(不影响本任务结果):${e instanceof Error ? e.message : String(e)}`,
|
|
18514
18528
|
severity: "observable",
|
|
@@ -18544,7 +18558,7 @@ function qC(e, n, r) {
|
|
|
18544
18558
|
}
|
|
18545
18559
|
cd(i);
|
|
18546
18560
|
let c = Zl(i, "fatal");
|
|
18547
|
-
|
|
18561
|
+
Zt({
|
|
18548
18562
|
type: "error",
|
|
18549
18563
|
message: `批量任务 ${a + 1}/${e.length} 失败:${c.message}`,
|
|
18550
18564
|
severity: "observable",
|
|
@@ -18568,16 +18582,18 @@ function qC(e, n, r) {
|
|
|
18568
18582
|
}
|
|
18569
18583
|
return r;
|
|
18570
18584
|
},
|
|
18571
|
-
switchSession: (e) =>
|
|
18572
|
-
exportSession: (e) =>
|
|
18573
|
-
importSession: (e) =>
|
|
18574
|
-
resetSession: () =>
|
|
18585
|
+
switchSession: (e) => (Dt.clear(), Cn.switchSession(e)),
|
|
18586
|
+
exportSession: (e) => Cn.exportSession(e),
|
|
18587
|
+
importSession: (e) => Cn.importSession(e),
|
|
18588
|
+
resetSession: () => {
|
|
18589
|
+
Dt.clear(), Cn.resetSession();
|
|
18590
|
+
},
|
|
18575
18591
|
stream: async (e, t, n) => {
|
|
18576
18592
|
if (!U.agent) throw Error("page-agent-sdk: agent 尚未初始化完成,请先 await mount()");
|
|
18577
18593
|
let r = [...e].reverse().find((e) => e.role === "user" && e.images?.length);
|
|
18578
|
-
if (r?.images?.length && (await
|
|
18594
|
+
if (r?.images?.length && (await Sn.stowImages(r.images), await Sn.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
|
|
18579
18595
|
let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述";
|
|
18580
|
-
throw
|
|
18596
|
+
throw Zt({
|
|
18581
18597
|
type: "error",
|
|
18582
18598
|
message: e,
|
|
18583
18599
|
severity: "recoverable",
|
|
@@ -18586,18 +18602,18 @@ function qC(e, n, r) {
|
|
|
18586
18602
|
}
|
|
18587
18603
|
x?.setProtectedRefs?.(RC(e));
|
|
18588
18604
|
let i = (e) => {
|
|
18589
|
-
t?.(Me(e)),
|
|
18605
|
+
t?.(Me(e)), Zt(Me(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && U.infoTick.value++;
|
|
18590
18606
|
};
|
|
18591
18607
|
if (n) {
|
|
18592
18608
|
let e = () => o.resolve("keep_external");
|
|
18593
18609
|
n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
|
|
18594
18610
|
}
|
|
18595
|
-
let { controller: a, untrack: s } =
|
|
18611
|
+
let { controller: a, untrack: s } = mn(n);
|
|
18596
18612
|
return U.agent.stream(e, i, a.signal).finally(s);
|
|
18597
18613
|
},
|
|
18598
18614
|
release() {
|
|
18599
18615
|
if (U.refCount--, U.refCount <= 0) {
|
|
18600
|
-
|
|
18616
|
+
hn(), Je = !0, l && (x.flush?.(), l.flush(), l.dispose()), nn && nn.dispose();
|
|
18601
18617
|
let e = U.mcpClosers.splice(0);
|
|
18602
18618
|
e.length && Promise.allSettled(e.map((e) => e())), HC.delete(n);
|
|
18603
18619
|
}
|
|
@@ -18625,7 +18641,7 @@ function qC(e, n, r) {
|
|
|
18625
18641
|
if ((e.provider ?? "openai") === "anthropic") throw Error("[page-agent-sdk][setLlm] 切换到 Anthropic 需传 BaseChatModel 实例(动态 import 无法同步);请先 const { ChatAnthropic } = await import(\"@langchain/anthropic\") 构造实例后传入");
|
|
18626
18642
|
n = ne(e);
|
|
18627
18643
|
}
|
|
18628
|
-
typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), Ey(n, { emit:
|
|
18644
|
+
typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), Ey(n, { emit: Zt }), y = t;
|
|
18629
18645
|
let r = wy(t) ? void 0 : t;
|
|
18630
18646
|
if (m = D({
|
|
18631
18647
|
model: r?.model ?? t.model ?? t.modelName,
|
|
@@ -18633,7 +18649,7 @@ function qC(e, n, r) {
|
|
|
18633
18649
|
maxOutputTokens: e.maxOutputTokens ?? r?.maxOutputTokens,
|
|
18634
18650
|
vision: r?.vision ?? t.vision
|
|
18635
18651
|
}), m.contextWindow < 2e5) throw Error(`[page-agent-sdk][setLlm] 新模型上下文窗口 ${m.contextWindow} 小于最小支持 ${S}(需 ≥200K 窗口模型)`);
|
|
18636
|
-
U.agent && (U.agent.setLlm(n), U.agent.setModelCaps?.(m)),
|
|
18652
|
+
U.agent && (U.agent.setLlm(n), U.agent.setModelCaps?.(m)), on?.setContextWindow?.(m.contextWindow), Vt?.setContextWindow?.(m.contextWindow), U.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
|
|
18637
18653
|
},
|
|
18638
18654
|
setMemory(e) {
|
|
18639
18655
|
ae.reset(e), typeof e == "function" && ae.refresh(), U.infoTick.value++;
|
|
@@ -18642,22 +18658,22 @@ function qC(e, n, r) {
|
|
|
18642
18658
|
return ae.refresh();
|
|
18643
18659
|
},
|
|
18644
18660
|
setSubagents(t) {
|
|
18645
|
-
if (!
|
|
18661
|
+
if (!It) {
|
|
18646
18662
|
e.debug && console.warn("[page-agent-sdk][setSubagents] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
|
|
18647
18663
|
return;
|
|
18648
18664
|
}
|
|
18649
|
-
|
|
18665
|
+
It.set(t), U.infoTick.value++;
|
|
18650
18666
|
},
|
|
18651
18667
|
addSubagent(t) {
|
|
18652
|
-
if (!
|
|
18668
|
+
if (!It) {
|
|
18653
18669
|
e.debug && console.warn("[page-agent-sdk][addSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
|
|
18654
18670
|
return;
|
|
18655
18671
|
}
|
|
18656
|
-
|
|
18672
|
+
It.add(t), U.infoTick.value++;
|
|
18657
18673
|
},
|
|
18658
18674
|
removeSubagent(t) {
|
|
18659
|
-
if (!
|
|
18660
|
-
let n =
|
|
18675
|
+
if (!It) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
|
|
18676
|
+
let n = It.remove(t);
|
|
18661
18677
|
return n && U.infoTick.value++, n;
|
|
18662
18678
|
},
|
|
18663
18679
|
getActiveSubagents() {
|
|
@@ -18678,7 +18694,7 @@ function qC(e, n, r) {
|
|
|
18678
18694
|
schema: e.schema,
|
|
18679
18695
|
source: Ae.get(e.name) || "user"
|
|
18680
18696
|
})),
|
|
18681
|
-
skills: (
|
|
18697
|
+
skills: (Qt ? Qt.controller.get() : e.skills ?? []).map((e) => ({
|
|
18682
18698
|
name: e.name,
|
|
18683
18699
|
description: e.description
|
|
18684
18700
|
})),
|
|
@@ -18694,14 +18710,18 @@ function qC(e, n, r) {
|
|
|
18694
18710
|
},
|
|
18695
18711
|
memory: ae.get(),
|
|
18696
18712
|
staleReadsInvalidated: U.agent?.getStaleReadsInvalidated?.() ?? 0,
|
|
18697
|
-
hostReadsInvalidated:
|
|
18713
|
+
hostReadsInvalidated: Wt.readsInvalidated,
|
|
18698
18714
|
...Be ? { proposals: Be.snapshot() } : {},
|
|
18699
18715
|
...r ? { hostWatch: { ...r } } : {},
|
|
18716
|
+
...e.approval ? { approvals: {
|
|
18717
|
+
remember: e.approval.remember === !0,
|
|
18718
|
+
grantedTools: [...Dt]
|
|
18719
|
+
} } : {},
|
|
18700
18720
|
llmRetries: U.agent?.getLlmRetries?.() ?? 0,
|
|
18701
18721
|
llmCallFailures: U.agent?.getLlmCallFailures?.() ?? 0,
|
|
18702
18722
|
gates: U.agent?.getGateStats?.(),
|
|
18703
18723
|
systemSegments: U.agent?.getLastSystemSegments?.() ?? [],
|
|
18704
|
-
middleware:
|
|
18724
|
+
middleware: cn.map((e) => e.name),
|
|
18705
18725
|
todos: (U.agent?.getState?.()?.todos ?? []).map((e) => ({
|
|
18706
18726
|
id: e.id,
|
|
18707
18727
|
content: e.content,
|
|
@@ -18719,23 +18739,23 @@ function qC(e, n, r) {
|
|
|
18719
18739
|
focuses: Qe ? re.getFocuses() : [],
|
|
18720
18740
|
actions: yC(e.actions ?? {}),
|
|
18721
18741
|
subagent: {
|
|
18722
|
-
enabled: !!
|
|
18742
|
+
enabled: !!At,
|
|
18723
18743
|
maxDepth: e.subagent?.maxDepth ?? 1,
|
|
18724
18744
|
maxParallel: e.subagent?.maxParallel ?? 4,
|
|
18725
18745
|
timeoutMs: e.subagent?.timeoutMs === void 0 ? 18e5 : e.subagent.timeoutMs > 0 ? e.subagent.timeoutMs : 0,
|
|
18726
18746
|
allowedTools: e.subagent?.allowedTools ?? [],
|
|
18727
|
-
subagents: (
|
|
18747
|
+
subagents: (It?.get() ?? []).map(Lt),
|
|
18728
18748
|
active: gt?.getActive() ?? [],
|
|
18729
18749
|
history: gt?.getHistory() ?? [],
|
|
18730
|
-
lockedComponents:
|
|
18750
|
+
lockedComponents: Mt?.locked() ?? {}
|
|
18731
18751
|
},
|
|
18732
18752
|
verify: {
|
|
18733
|
-
enabled: !!
|
|
18753
|
+
enabled: !!Bt,
|
|
18734
18754
|
maxAttempts: bt ? _t : 0,
|
|
18735
18755
|
adversarial: bt && !!e.verify?.adversarial
|
|
18736
18756
|
},
|
|
18737
18757
|
context: (() => {
|
|
18738
|
-
let e =
|
|
18758
|
+
let e = Vt?.getSnapshot();
|
|
18739
18759
|
if (e) {
|
|
18740
18760
|
let t = U.agent?.getState?.()?.lastCompression;
|
|
18741
18761
|
t && (e.compression = t);
|
|
@@ -18822,7 +18842,7 @@ function qC(e, n, r) {
|
|
|
18822
18842
|
},
|
|
18823
18843
|
setQuote(e, t, n) {
|
|
18824
18844
|
let r = bu(e ?? ""), i = Pu(n);
|
|
18825
|
-
|
|
18845
|
+
gn.value = r ? {
|
|
18826
18846
|
text: r,
|
|
18827
18847
|
...t ? { source: t } : {},
|
|
18828
18848
|
...i ? { anchor: i } : {}
|
|
@@ -18830,18 +18850,26 @@ function qC(e, n, r) {
|
|
|
18830
18850
|
},
|
|
18831
18851
|
notifyHostChange(e) {
|
|
18832
18852
|
let t = typeof e?.reason == "string" ? e.reason.trim().slice(0, 200) : "";
|
|
18833
|
-
|
|
18853
|
+
Wt.epoch += 1, t && !Wt.notices.includes(t) ? Wt.notices.push(t) : t || Wt.notices.push(""), Wt.notices.length > 5 && Wt.notices.splice(0, Wt.notices.length - 5), U.agent?.debugLogs?.value?.push({
|
|
18834
18854
|
timestamp: Date.now(),
|
|
18835
18855
|
type: "middleware",
|
|
18836
18856
|
data: {
|
|
18837
18857
|
stage: "host_change_notified",
|
|
18838
|
-
epoch:
|
|
18858
|
+
epoch: Wt.epoch,
|
|
18839
18859
|
reason: t || void 0
|
|
18840
18860
|
}
|
|
18841
18861
|
}), U.infoTick.value++;
|
|
18842
18862
|
},
|
|
18843
18863
|
clearQuote() {
|
|
18844
|
-
|
|
18864
|
+
gn.value = null;
|
|
18865
|
+
},
|
|
18866
|
+
revokeApprovalGrants() {
|
|
18867
|
+
let e = Dt.size > 0;
|
|
18868
|
+
Dt.clear(), e && (U.agent?.debugLogs?.value?.push({
|
|
18869
|
+
timestamp: Date.now(),
|
|
18870
|
+
type: "middleware",
|
|
18871
|
+
data: { stage: "approval_grants_revoked" }
|
|
18872
|
+
}), U.infoTick.value++);
|
|
18845
18873
|
},
|
|
18846
18874
|
resolveProposal(e, t, n) {
|
|
18847
18875
|
let r = Be ? Be.resolve(e, t, n) : !1;
|
|
@@ -18851,13 +18879,13 @@ function qC(e, n, r) {
|
|
|
18851
18879
|
return Be ? Be.snapshot() : null;
|
|
18852
18880
|
}
|
|
18853
18881
|
};
|
|
18854
|
-
async function
|
|
18882
|
+
async function _n() {
|
|
18855
18883
|
if (!l) return;
|
|
18856
18884
|
let t = async (e) => {
|
|
18857
18885
|
try {
|
|
18858
18886
|
return await l.load(n, e);
|
|
18859
18887
|
} catch (t) {
|
|
18860
|
-
|
|
18888
|
+
Zt({
|
|
18861
18889
|
type: "error",
|
|
18862
18890
|
message: `会话快照读取失败,已降级空会话:${t instanceof Error ? t.message : String(t)}`,
|
|
18863
18891
|
severity: "observable",
|
|
@@ -18870,7 +18898,7 @@ function qC(e, n, r) {
|
|
|
18870
18898
|
try {
|
|
18871
18899
|
return await l.listSessions(n);
|
|
18872
18900
|
} catch (e) {
|
|
18873
|
-
return
|
|
18901
|
+
return Zt({
|
|
18874
18902
|
type: "error",
|
|
18875
18903
|
message: `会话列表读取失败,已降级新建会话:${e instanceof Error ? e.message : String(e)}`,
|
|
18876
18904
|
severity: "observable",
|
|
@@ -18878,7 +18906,7 @@ function qC(e, n, r) {
|
|
|
18878
18906
|
}), [];
|
|
18879
18907
|
}
|
|
18880
18908
|
}, i = Symbol("storage-ready-timeout");
|
|
18881
|
-
await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"),
|
|
18909
|
+
await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Zt({
|
|
18882
18910
|
type: "error",
|
|
18883
18911
|
message: "存储初始化 5s 未就绪(IDB blocked?),已放行降级运行",
|
|
18884
18912
|
severity: "observable",
|
|
@@ -18888,7 +18916,7 @@ function qC(e, n, r) {
|
|
|
18888
18916
|
if (a.id) {
|
|
18889
18917
|
U.sessionId = a.id;
|
|
18890
18918
|
let e = await t(U.sessionId);
|
|
18891
|
-
e ? (U.applySnapshot(e),
|
|
18919
|
+
e ? (U.applySnapshot(e), Zt({
|
|
18892
18920
|
type: "session_restored",
|
|
18893
18921
|
sessionId: U.sessionId,
|
|
18894
18922
|
rounds: e.messages?.length ?? 0
|
|
@@ -18898,19 +18926,19 @@ function qC(e, n, r) {
|
|
|
18898
18926
|
if (e.debug && console.log("[page-agent-sdk][restore] listSessions", n, i.length, i.map((e) => e.sessionId)), i.length) {
|
|
18899
18927
|
U.sessionId = i[0].sessionId;
|
|
18900
18928
|
let n = await t(U.sessionId);
|
|
18901
|
-
n ? (U.applySnapshot(n),
|
|
18929
|
+
n ? (U.applySnapshot(n), Zt({
|
|
18902
18930
|
type: "session_restored",
|
|
18903
18931
|
sessionId: U.sessionId,
|
|
18904
18932
|
rounds: n.messages?.length ?? 0
|
|
18905
18933
|
}), e.debug && console.log("[page-agent-sdk][restore] 恢复会话", U.sessionId, `${n.messages?.length ?? 0} msgs`)) : e.debug && console.log("[page-agent-sdk][restore] 会话 meta 存在但快照为空", U.sessionId);
|
|
18906
18934
|
} else U.sessionId = await l.createSession(n, a.title), e.debug && console.log("[page-agent-sdk][restore] 新建会话(无历史)", U.sessionId);
|
|
18907
18935
|
} else U.sessionId = await l.createSession(n, a.title);
|
|
18908
|
-
e.memory &&
|
|
18936
|
+
e.memory && Cn.persistSave({ memory: ae.get() || (typeof e.memory == "string" ? e.memory : "") }), Cn.refreshSessions();
|
|
18909
18937
|
}
|
|
18910
|
-
async function
|
|
18911
|
-
await
|
|
18938
|
+
async function vn() {
|
|
18939
|
+
await an();
|
|
18912
18940
|
}
|
|
18913
|
-
function
|
|
18941
|
+
function yn(e) {
|
|
18914
18942
|
let t = {};
|
|
18915
18943
|
for (let n of RC(e)) {
|
|
18916
18944
|
let e = x.files[n];
|
|
@@ -18918,15 +18946,15 @@ function qC(e, n, r) {
|
|
|
18918
18946
|
}
|
|
18919
18947
|
return t;
|
|
18920
18948
|
}
|
|
18921
|
-
function
|
|
18949
|
+
function bn() {
|
|
18922
18950
|
let e = zC(x.files, RC(b));
|
|
18923
18951
|
for (let t of e) delete x.files[t];
|
|
18924
18952
|
}
|
|
18925
|
-
function
|
|
18926
|
-
let e = gh(b,
|
|
18953
|
+
function xn() {
|
|
18954
|
+
let e = gh(b, ln);
|
|
18927
18955
|
if (!e.trimmed) return;
|
|
18928
18956
|
let { older: t, summary: n } = e;
|
|
18929
|
-
if (
|
|
18957
|
+
if (Zt({
|
|
18930
18958
|
type: "context_trimmed",
|
|
18931
18959
|
dropped: t.map((e) => ({
|
|
18932
18960
|
round: e.round,
|
|
@@ -18934,33 +18962,33 @@ function qC(e, n, r) {
|
|
|
18934
18962
|
assistant: e.assistantMsgs.map((e) => e.content),
|
|
18935
18963
|
steps: e.assistantMsgs.flatMap((e) => e.steps ?? [])
|
|
18936
18964
|
})),
|
|
18937
|
-
vfsResults:
|
|
18965
|
+
vfsResults: yn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
|
|
18938
18966
|
summary: n.content,
|
|
18939
18967
|
reason: "max_memory_rounds"
|
|
18940
|
-
}), b.splice(e.deleteFrom, e.deleteCount, n),
|
|
18968
|
+
}), b.splice(e.deleteFrom, e.deleteCount, n), bn(), g && d) {
|
|
18941
18969
|
let n = e.summary, { prevSeg: r } = e;
|
|
18942
18970
|
(async () => {
|
|
18943
18971
|
try {
|
|
18944
18972
|
let e = await d(Ch(t, v)), i = b.indexOf(n);
|
|
18945
18973
|
if (i < 0) return;
|
|
18946
|
-
b[i].content = hh(t, r, e),
|
|
18974
|
+
b[i].content = hh(t, r, e), Cn.persistRuntime();
|
|
18947
18975
|
} catch {}
|
|
18948
18976
|
})();
|
|
18949
18977
|
}
|
|
18950
18978
|
}
|
|
18951
|
-
let
|
|
18979
|
+
let Sn = gu({
|
|
18952
18980
|
getConfig: () => e.images,
|
|
18953
18981
|
getVision: () => m.vision === !0,
|
|
18954
|
-
emit:
|
|
18982
|
+
emit: Zt,
|
|
18955
18983
|
getVfsStore: () => U.vfsStore,
|
|
18956
|
-
noteFailure: (e, t) =>
|
|
18957
|
-
}),
|
|
18984
|
+
noteFailure: (e, t) => Cn.notePersistFailure(e, t)
|
|
18985
|
+
}), Cn = Tb({
|
|
18958
18986
|
agentId: n,
|
|
18959
18987
|
options: e,
|
|
18960
|
-
emit:
|
|
18988
|
+
emit: Zt,
|
|
18961
18989
|
getStore: () => l,
|
|
18962
18990
|
core: U,
|
|
18963
|
-
sessionsRef:
|
|
18991
|
+
sessionsRef: dn,
|
|
18964
18992
|
sessionVars: A,
|
|
18965
18993
|
messages: b,
|
|
18966
18994
|
getUsage: () => a,
|
|
@@ -18970,7 +18998,7 @@ function qC(e, n, r) {
|
|
|
18970
18998
|
missionMw: T,
|
|
18971
18999
|
workingMemoryMw: ie,
|
|
18972
19000
|
focusMw: re,
|
|
18973
|
-
summarizationMw:
|
|
19001
|
+
summarizationMw: on,
|
|
18974
19002
|
resumeNoticeMw: k,
|
|
18975
19003
|
useMission: ct,
|
|
18976
19004
|
useWorkingMemory: lt,
|
|
@@ -18980,13 +19008,13 @@ function qC(e, n, r) {
|
|
|
18980
19008
|
vfsStore: x,
|
|
18981
19009
|
checkpointMgr: L,
|
|
18982
19010
|
conflictResolve: (e) => o.resolve(e),
|
|
18983
|
-
abortAllActive:
|
|
19011
|
+
abortAllActive: hn,
|
|
18984
19012
|
titleLlmInvoke: f
|
|
18985
19013
|
});
|
|
18986
19014
|
return U.initDone = (async () => {
|
|
18987
|
-
await
|
|
19015
|
+
await _n(), await vn(), e.mcp?.length && n_({
|
|
18988
19016
|
servers: e.mcp,
|
|
18989
|
-
emit:
|
|
19017
|
+
emit: Zt,
|
|
18990
19018
|
isReleased: () => Je,
|
|
18991
19019
|
core: {
|
|
18992
19020
|
mcpClosers: U.mcpClosers,
|
|
@@ -19009,11 +19037,11 @@ function qC(e, n, r) {
|
|
|
19009
19037
|
debug: e.debug
|
|
19010
19038
|
});
|
|
19011
19039
|
let t = wy(e.llm) ? e.llm : await P(e.llm);
|
|
19012
|
-
Ey(t, { emit:
|
|
19040
|
+
Ey(t, { emit: Zt }), U.agent = wp({
|
|
19013
19041
|
llm: t,
|
|
19014
19042
|
systemPrompt: be,
|
|
19015
19043
|
tools: H,
|
|
19016
|
-
middleware:
|
|
19044
|
+
middleware: cn,
|
|
19017
19045
|
maxToolRounds: e.maxToolRounds,
|
|
19018
19046
|
hasSubagent: ht,
|
|
19019
19047
|
pageAssertionGate: z.domInspect === !0,
|
|
@@ -19035,7 +19063,7 @@ function qC(e, n, r) {
|
|
|
19035
19063
|
y = e;
|
|
19036
19064
|
},
|
|
19037
19065
|
debug: e.debug
|
|
19038
|
-
}), oe.current = U.agent,
|
|
19066
|
+
}), oe.current = U.agent, Ft && Ft.setReconfigureHook(() => {
|
|
19039
19067
|
U.agent && U.agent.setTools(ot());
|
|
19040
19068
|
});
|
|
19041
19069
|
})(), U;
|
|
@@ -19186,6 +19214,7 @@ function JC(e, t) {
|
|
|
19186
19214
|
setQuote: c.setQuote,
|
|
19187
19215
|
clearQuote: c.clearQuote,
|
|
19188
19216
|
notifyHostChange: c.notifyHostChange,
|
|
19217
|
+
revokeApprovalGrants: c.revokeApprovalGrants,
|
|
19189
19218
|
resolveProposal: c.resolveProposal,
|
|
19190
19219
|
get proposals() {
|
|
19191
19220
|
return c.getProposals();
|
|
@@ -20798,7 +20827,8 @@ function nO(e = {}) {
|
|
|
20798
20827
|
toolName: e.toolName,
|
|
20799
20828
|
args: e.args,
|
|
20800
20829
|
resolve: e.resolve,
|
|
20801
|
-
...e.preview ? { preview: e.preview } : {}
|
|
20830
|
+
...e.preview ? { preview: e.preview } : {},
|
|
20831
|
+
...e.remember ? { remember: !0 } : {}
|
|
20802
20832
|
};
|
|
20803
20833
|
break;
|
|
20804
20834
|
}
|
|
@@ -21041,6 +21071,8 @@ var oO = {
|
|
|
21041
21071
|
recommendPrefix: " 推荐:",
|
|
21042
21072
|
approve: "允许",
|
|
21043
21073
|
deny: "拒绝",
|
|
21074
|
+
approveRemember: "允许并不再询问",
|
|
21075
|
+
approveRememberHint: "允许本次,且本会话内不再询问此工具的调用(切换会话或重置后恢复询问)",
|
|
21044
21076
|
toolConfirmPrefix: "需确认工具调用:",
|
|
21045
21077
|
viewArgs: "查看参数",
|
|
21046
21078
|
collapseArgs: "收起参数",
|
|
@@ -21277,6 +21309,8 @@ var oO = {
|
|
|
21277
21309
|
recommendPrefix: " Recommend:",
|
|
21278
21310
|
approve: "Allow",
|
|
21279
21311
|
deny: "Deny",
|
|
21312
|
+
approveRemember: "Allow & don't ask again",
|
|
21313
|
+
approveRememberHint: "Allow now and skip confirmation for this tool until the session ends (switch/reset restores asking)",
|
|
21280
21314
|
toolConfirmPrefix: "Confirm tool call:",
|
|
21281
21315
|
viewArgs: "View args",
|
|
21282
21316
|
collapseArgs: "Collapse args",
|
|
@@ -32023,7 +32057,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32023
32057
|
}, xF = {
|
|
32024
32058
|
key: 2,
|
|
32025
32059
|
class: "approval-plan-context"
|
|
32026
|
-
}, SF = { class: "approval-actions" }, CF = ["disabled"], wF =
|
|
32060
|
+
}, SF = { class: "approval-actions" }, CF = ["disabled", "title"], wF = ["disabled"], TF = 20, EF = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
32027
32061
|
__name: "ApprovalBar",
|
|
32028
32062
|
setup(e) {
|
|
32029
32063
|
let t = fO(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = t.planConfirmation, o = /* @__PURE__ */ W(!1);
|
|
@@ -32042,12 +32076,12 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32042
32076
|
} catch {
|
|
32043
32077
|
return String(e);
|
|
32044
32078
|
}
|
|
32045
|
-
}), u = mc(() => n.value?.preview?.items ?? []), d = mc(() => u.value.length >
|
|
32079
|
+
}), u = mc(() => n.value?.preview?.items ?? []), d = mc(() => u.value.length > TF), f = mc(() => {
|
|
32046
32080
|
let e = n.value?.preview;
|
|
32047
32081
|
return !!e && e.ok === !1;
|
|
32048
32082
|
});
|
|
32049
32083
|
return (e, p) => G(n) ? (J(), Y("div", eF, [s.value ? (J(), Y(q, { key: 0 }, [
|
|
32050
|
-
X("div", tF, [p[
|
|
32084
|
+
X("div", tF, [p[6] ||= X("span", { class: "approval-icon" }, "❓", -1), X("span", nF, H(G(i).humanConfirmTitle), 1)]),
|
|
32051
32085
|
G(n).args?.question ? (J(), Y("div", rF, H(G(n).args.question), 1)) : Z("", !0),
|
|
32052
32086
|
G(n).args?.context ? (J(), Y("div", iF, H(G(n).args.context), 1)) : Z("", !0),
|
|
32053
32087
|
G(n).args?.recommendation ? (J(), Y("div", aF, [Os(Jk, { icon: G(t).icons.recommend }, null, 8, ["icon"]), Ns(H(G(i).recommendPrefix) + H(G(n).args.recommendation), 1)])) : Z("", !0),
|
|
@@ -32066,7 +32100,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32066
32100
|
}, [Os(Xk, { text: G(i).approve }, null, 8, ["text"])]))])
|
|
32067
32101
|
], 64)) : (J(), Y(q, { key: 1 }, [
|
|
32068
32102
|
X("div", lF, [
|
|
32069
|
-
p[
|
|
32103
|
+
p[7] ||= X("span", { class: "approval-icon" }, "✋", -1),
|
|
32070
32104
|
X("span", uF, [Ns(H(G(i).toolConfirmPrefix), 1), X("code", null, H(G(n).toolName), 1)]),
|
|
32071
32105
|
l.value ? (J(), Y("button", {
|
|
32072
32106
|
key: 0,
|
|
@@ -32077,7 +32111,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32077
32111
|
l.value && o.value ? (J(), Y("pre", dF, H(l.value), 1)) : Z("", !0),
|
|
32078
32112
|
u.value.length || f.value ? (J(), Y("div", fF, [
|
|
32079
32113
|
f.value ? (J(), Y("div", pF, "⚠ " + H(G(n).preview.error), 1)) : Z("", !0),
|
|
32080
|
-
(J(!0), Y(q, null, Ca(u.value.slice(0,
|
|
32114
|
+
(J(!0), Y(q, null, Ca(u.value.slice(0, TF), (e, t) => (J(), Y("div", {
|
|
32081
32115
|
key: t,
|
|
32082
32116
|
class: "preview-item",
|
|
32083
32117
|
"data-test": `preview-item-${t}`
|
|
@@ -32086,31 +32120,45 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32086
32120
|
X("code", gF, H(e.jsonPath || "(主数据整体)"), 1),
|
|
32087
32121
|
X("span", _F, [
|
|
32088
32122
|
X("span", vF, H(e.oldSummary ?? "—"), 1),
|
|
32089
|
-
p[
|
|
32123
|
+
p[8] ||= X("span", { class: "preview-arrow" }, " → ", -1),
|
|
32090
32124
|
X("span", yF, H(e.newSummary ?? "—"), 1)
|
|
32091
32125
|
])
|
|
32092
32126
|
], 8, mF))), 128)),
|
|
32093
|
-
d.value ? (J(), Y("div", bF, "… 其余 " + H(u.value.length -
|
|
32127
|
+
d.value ? (J(), Y("div", bF, "… 其余 " + H(u.value.length - TF) + " 项", 1)) : Z("", !0)
|
|
32094
32128
|
])) : Z("", !0),
|
|
32095
32129
|
G(a) ? (J(), Y("div", xF, [Os(Jk, { icon: G(t).icons.recommend }, null, 8, ["icon"]), Ns(H(G(i).planConfirmedPrefix) + H(G(a).choice) + H(G(i).planConfirmedSuffix), 1)])) : Z("", !0),
|
|
32096
|
-
X("div", SF, [
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32130
|
+
X("div", SF, [
|
|
32131
|
+
X("button", {
|
|
32132
|
+
class: "approval-deny",
|
|
32133
|
+
onClick: p[3] ||= (e) => G(r)(!1)
|
|
32134
|
+
}, [Os(Xk, { text: G(i).deny }, null, 8, ["text"])]),
|
|
32135
|
+
G(n).remember ? (J(), Y("button", {
|
|
32136
|
+
key: 0,
|
|
32137
|
+
class: "approval-remember",
|
|
32138
|
+
disabled: f.value,
|
|
32139
|
+
"data-test": "approval-remember",
|
|
32140
|
+
title: G(i).approveRememberHint,
|
|
32141
|
+
onClick: p[4] ||= (e) => G(r)({
|
|
32142
|
+
approved: !0,
|
|
32143
|
+
remember: !0
|
|
32144
|
+
})
|
|
32145
|
+
}, [Os(Xk, { text: G(i).approveRemember }, null, 8, ["text"])], 8, CF)) : Z("", !0),
|
|
32146
|
+
X("button", {
|
|
32147
|
+
class: "approval-allow",
|
|
32148
|
+
disabled: f.value,
|
|
32149
|
+
"data-test": "approval-allow",
|
|
32150
|
+
onClick: p[5] ||= (e) => G(r)(!0)
|
|
32151
|
+
}, [Os(Xk, { text: G(i).approve }, null, 8, ["text"])], 8, wF)
|
|
32152
|
+
])
|
|
32105
32153
|
], 64))])) : Z("", !0);
|
|
32106
32154
|
}
|
|
32107
|
-
}), [["__scopeId", "data-v-
|
|
32155
|
+
}), [["__scopeId", "data-v-12f61337"]]), DF = {
|
|
32108
32156
|
key: 0,
|
|
32109
32157
|
class: "conflict-bar"
|
|
32110
|
-
},
|
|
32158
|
+
}, OF = { class: "conflict-head" }, kF = { class: "conflict-icon" }, AF = { class: "conflict-title" }, jF = { class: "conflict-detail" }, MF = {
|
|
32111
32159
|
key: 0,
|
|
32112
32160
|
class: "conflict-diff"
|
|
32113
|
-
},
|
|
32161
|
+
}, NF = { class: "conflict-diff-col" }, PF = { class: "conflict-diff-label" }, FF = { class: "conflict-diff-pre" }, IF = { class: "conflict-diff-col" }, LF = { class: "conflict-diff-label" }, RF = { class: "conflict-diff-pre" }, zF = { class: "conflict-actions" }, BF = ["title"], VF = ["title"], HF = ["title"], UF = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
32114
32162
|
__name: "ConflictBar",
|
|
32115
32163
|
props: {
|
|
32116
32164
|
pendingConflict: {},
|
|
@@ -32142,76 +32190,76 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32142
32190
|
return String(e);
|
|
32143
32191
|
}
|
|
32144
32192
|
});
|
|
32145
|
-
return (t, a) => e.pendingConflict ? (J(), Y("div",
|
|
32146
|
-
X("div",
|
|
32193
|
+
return (t, a) => e.pendingConflict ? (J(), Y("div", DF, [
|
|
32194
|
+
X("div", OF, [X("span", kF, [Os(Jk, { icon: e.icons.conflict }, null, 8, ["icon"])]), X("span", AF, [
|
|
32147
32195
|
Ns(H(e.messages.conflictTitlePrefix), 1),
|
|
32148
32196
|
X("code", null, H(e.pendingConflict.path), 1),
|
|
32149
32197
|
Ns(H(e.messages.conflictTitleSuffix), 1)
|
|
32150
32198
|
])]),
|
|
32151
|
-
X("div",
|
|
32199
|
+
X("div", jF, H(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
|
|
32152
32200
|
X("button", {
|
|
32153
32201
|
class: "conflict-toggle",
|
|
32154
32202
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
32155
32203
|
}, H(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + H(n.value ? " ▴" : " ▾"), 1),
|
|
32156
|
-
n.value ? (J(), Y("div",
|
|
32157
|
-
X("div",
|
|
32204
|
+
n.value ? (J(), Y("div", MF, [X("div", NF, [X("div", PF, H(e.messages.agentValueLabel), 1), X("pre", FF, H(r.value || e.messages.deleteNoValue), 1)]), X("div", IF, [X("div", LF, H(e.messages.currentValueLabel), 1), X("pre", RF, H(i.value), 1)])])) : Z("", !0),
|
|
32205
|
+
X("div", zF, [
|
|
32158
32206
|
X("button", {
|
|
32159
32207
|
class: "conflict-keep",
|
|
32160
32208
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
32161
32209
|
title: e.messages.keepExternalTitle
|
|
32162
|
-
}, [Os(Xk, { text: e.messages.keepExternal }, null, 8, ["text"])], 8,
|
|
32210
|
+
}, [Os(Xk, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, BF),
|
|
32163
32211
|
X("button", {
|
|
32164
32212
|
class: "conflict-overwrite",
|
|
32165
32213
|
onClick: a[2] ||= (t) => e.onResolve?.("overwrite"),
|
|
32166
32214
|
title: e.messages.overwriteTitle
|
|
32167
|
-
}, [Os(Xk, { text: e.messages.overwrite }, null, 8, ["text"])], 8,
|
|
32215
|
+
}, [Os(Xk, { text: e.messages.overwrite }, null, 8, ["text"])], 8, VF),
|
|
32168
32216
|
X("button", {
|
|
32169
32217
|
class: "conflict-restore",
|
|
32170
32218
|
onClick: a[3] ||= (t) => e.onResolve?.("restore"),
|
|
32171
32219
|
title: e.messages.restoreTitle
|
|
32172
|
-
}, [Os(Xk, { text: e.messages.restore }, null, 8, ["text"])], 8,
|
|
32220
|
+
}, [Os(Xk, { text: e.messages.restore }, null, 8, ["text"])], 8, HF)
|
|
32173
32221
|
])
|
|
32174
32222
|
])) : Z("", !0);
|
|
32175
32223
|
}
|
|
32176
|
-
}), [["__scopeId", "data-v-36dda58c"]]),
|
|
32224
|
+
}), [["__scopeId", "data-v-36dda58c"]]), WF = { class: "chat-footer" }, GF = ["title"], KF = {
|
|
32177
32225
|
key: 0,
|
|
32178
32226
|
class: "drop-hint"
|
|
32179
|
-
},
|
|
32227
|
+
}, qF = {
|
|
32180
32228
|
key: 1,
|
|
32181
32229
|
class: "quick-actions",
|
|
32182
32230
|
"data-test": "quick-actions"
|
|
32183
|
-
},
|
|
32231
|
+
}, JF = [
|
|
32184
32232
|
"disabled",
|
|
32185
32233
|
"data-test",
|
|
32186
32234
|
"title",
|
|
32187
32235
|
"onClick"
|
|
32188
|
-
],
|
|
32236
|
+
], YF = {
|
|
32189
32237
|
key: 2,
|
|
32190
32238
|
class: "chip-stack"
|
|
32191
|
-
},
|
|
32239
|
+
}, XF = {
|
|
32192
32240
|
key: 0,
|
|
32193
32241
|
class: "focus-chips"
|
|
32194
|
-
},
|
|
32242
|
+
}, ZF = ["title", "onClick"], QF = { class: "focus-chip-icon" }, $F = { class: "focus-chip-path" }, eI = ["title", "onClick"], tI = {
|
|
32195
32243
|
key: 1,
|
|
32196
32244
|
class: "quote-chips",
|
|
32197
32245
|
"data-test": "quote-chips"
|
|
32198
|
-
},
|
|
32246
|
+
}, nI = ["title"], rI = { class: "quote-chip-text" }, iI = ["title"], aI = {
|
|
32199
32247
|
key: 2,
|
|
32200
32248
|
class: "img-chips",
|
|
32201
32249
|
"data-test": "img-chips"
|
|
32202
|
-
},
|
|
32250
|
+
}, oI = ["title"], sI = ["src", "alt"], cI = ["onClick"], lI = {
|
|
32203
32251
|
key: 3,
|
|
32204
32252
|
class: "img-error",
|
|
32205
32253
|
"data-test": "img-error"
|
|
32206
|
-
},
|
|
32254
|
+
}, uI = {
|
|
32207
32255
|
key: 3,
|
|
32208
32256
|
class: "gate-hint",
|
|
32209
32257
|
"data-test": "gate-hint"
|
|
32210
|
-
},
|
|
32258
|
+
}, dI = [
|
|
32211
32259
|
"placeholder",
|
|
32212
32260
|
"rows",
|
|
32213
32261
|
"disabled"
|
|
32214
|
-
],
|
|
32262
|
+
], fI = { class: "input-actions" }, pI = { class: "send-hint" }, mI = ["title", "disabled"], hI = {
|
|
32215
32263
|
key: 1,
|
|
32216
32264
|
width: "15",
|
|
32217
32265
|
height: "15",
|
|
@@ -32221,13 +32269,13 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32221
32269
|
"stroke-width": "2",
|
|
32222
32270
|
"stroke-linecap": "round",
|
|
32223
32271
|
"stroke-linejoin": "round"
|
|
32224
|
-
},
|
|
32272
|
+
}, gI = ["disabled", "title"], _I = {
|
|
32225
32273
|
key: 0,
|
|
32226
32274
|
width: "16",
|
|
32227
32275
|
height: "16",
|
|
32228
32276
|
viewBox: "0 0 24 24",
|
|
32229
32277
|
fill: "currentColor"
|
|
32230
|
-
},
|
|
32278
|
+
}, vI = {
|
|
32231
32279
|
key: 2,
|
|
32232
32280
|
width: "18",
|
|
32233
32281
|
height: "18",
|
|
@@ -32235,7 +32283,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32235
32283
|
fill: "none",
|
|
32236
32284
|
stroke: "currentColor",
|
|
32237
32285
|
"stroke-width": "2"
|
|
32238
|
-
},
|
|
32286
|
+
}, yI = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
32239
32287
|
__name: "ChatInput",
|
|
32240
32288
|
props: {
|
|
32241
32289
|
placeholder: {},
|
|
@@ -32286,19 +32334,19 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32286
32334
|
t.onDropElement && (window.addEventListener("dragstart", ne, !0), window.addEventListener("dragend", re, !0));
|
|
32287
32335
|
}), ga(() => {
|
|
32288
32336
|
window.removeEventListener("dragstart", ne, !0), window.removeEventListener("dragend", re, !0), M && clearTimeout(M);
|
|
32289
|
-
}), (t, n) => (J(), Y("div",
|
|
32337
|
+
}), (t, n) => (J(), Y("div", WF, [G(o) ? (J(), Y("button", {
|
|
32290
32338
|
key: 0,
|
|
32291
32339
|
class: "undo-foot-btn",
|
|
32292
32340
|
title: G(f).undoTitle,
|
|
32293
32341
|
onClick: n[0] ||= (...e) => G(s) && G(s)(...e)
|
|
32294
|
-
}, H(G(f).undo), 9,
|
|
32342
|
+
}, H(G(f).undo), 9, GF)) : Z("", !0), X("div", {
|
|
32295
32343
|
class: Je(["chat-input-wrap", { "drag-over": D.value }]),
|
|
32296
32344
|
onPointerdownCapture: T,
|
|
32297
32345
|
onDragover: n[5] ||= Fl((e) => D.value = !0, ["prevent"]),
|
|
32298
32346
|
onDragleave: n[6] ||= (e) => D.value = !1,
|
|
32299
32347
|
onDrop: Fl(A, ["prevent"])
|
|
32300
32348
|
}, [
|
|
32301
|
-
D.value ? (J(), Y("div",
|
|
32349
|
+
D.value ? (J(), Y("div", KF, [n[7] ||= X("svg", {
|
|
32302
32350
|
class: "drop-hint-icon",
|
|
32303
32351
|
viewBox: "0 0 24 24",
|
|
32304
32352
|
fill: "none",
|
|
@@ -32321,7 +32369,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32321
32369
|
}),
|
|
32322
32370
|
X("path", { d: "m21 15-4.35-4.35a1.5 1.5 0 0 0-2.12 0L5 20" })
|
|
32323
32371
|
], -1), Ns(" " + H(G(f).imageDropHint), 1)])) : Z("", !0),
|
|
32324
|
-
e.quickActions?.length ? (J(), Y("div",
|
|
32372
|
+
e.quickActions?.length ? (J(), Y("div", qF, [(J(!0), Y(q, null, Ca(e.quickActions, (t, n) => (J(), Y("button", {
|
|
32325
32373
|
key: n,
|
|
32326
32374
|
type: "button",
|
|
32327
32375
|
class: "quick-action-chip",
|
|
@@ -32329,39 +32377,39 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32329
32377
|
"data-test": `quick-action-${n}`,
|
|
32330
32378
|
title: t.prompt,
|
|
32331
32379
|
onClick: (e) => j(t)
|
|
32332
|
-
}, H(t.icon ? `${t.icon} ` : "") + H(t.label), 9,
|
|
32333
|
-
G(c).length || G(y).length || G(p) || G(S) ? (J(), Y("div",
|
|
32334
|
-
G(c).length ? (J(), Y("div",
|
|
32380
|
+
}, H(t.icon ? `${t.icon} ` : "") + H(t.label), 9, JF))), 128))])) : Z("", !0),
|
|
32381
|
+
G(c).length || G(y).length || G(p) || G(S) ? (J(), Y("div", YF, [
|
|
32382
|
+
G(c).length ? (J(), Y("div", XF, [(J(!0), Y(q, null, Ca(G(c), (e) => (J(), Y("span", {
|
|
32335
32383
|
key: e.path,
|
|
32336
32384
|
class: "focus-chip",
|
|
32337
32385
|
title: G(f).focusChipTitlePrefix + e.path + G(f).focusChipTitleHint,
|
|
32338
32386
|
onClick: (t) => G(u)(e)
|
|
32339
32387
|
}, [
|
|
32340
|
-
X("span",
|
|
32341
|
-
X("code",
|
|
32388
|
+
X("span", QF, [Os(Jk, { icon: G(d).focus }, null, 8, ["icon"])]),
|
|
32389
|
+
X("code", $F, H(e.path), 1),
|
|
32342
32390
|
X("button", {
|
|
32343
32391
|
type: "button",
|
|
32344
32392
|
class: "focus-chip-x",
|
|
32345
32393
|
"data-test": "focus-clear",
|
|
32346
32394
|
title: G(f).removeFocus,
|
|
32347
32395
|
onClick: Fl((t) => G(l)(e.path), ["stop"])
|
|
32348
|
-
}, "✕", 8,
|
|
32349
|
-
], 8,
|
|
32350
|
-
G(p) ? (J(), Y("div",
|
|
32396
|
+
}, "✕", 8, eI)
|
|
32397
|
+
], 8, ZF))), 128))])) : Z("", !0),
|
|
32398
|
+
G(p) ? (J(), Y("div", tI, [X("span", {
|
|
32351
32399
|
class: "quote-chip",
|
|
32352
32400
|
title: w(G(p))
|
|
32353
32401
|
}, [
|
|
32354
32402
|
n[8] ||= X("span", { class: "quote-chip-icon" }, "❝", -1),
|
|
32355
|
-
X("span",
|
|
32403
|
+
X("span", rI, H(G(p).text), 1),
|
|
32356
32404
|
X("button", {
|
|
32357
32405
|
type: "button",
|
|
32358
32406
|
class: "focus-chip-x",
|
|
32359
32407
|
"data-test": "quote-clear",
|
|
32360
32408
|
title: G(f).quoteRemove,
|
|
32361
32409
|
onClick: n[1] ||= Fl((e) => G(m)(), ["stop"])
|
|
32362
|
-
}, "✕", 8,
|
|
32363
|
-
], 8,
|
|
32364
|
-
G(y).length ? (J(), Y("div",
|
|
32410
|
+
}, "✕", 8, iI)
|
|
32411
|
+
], 8, nI)])) : Z("", !0),
|
|
32412
|
+
G(y).length ? (J(), Y("div", aI, [(J(!0), Y(q, null, Ca(G(y), (e) => (J(), Y("span", {
|
|
32365
32413
|
key: e.id,
|
|
32366
32414
|
class: "img-chip",
|
|
32367
32415
|
title: e.name || G(f).imageAlt
|
|
@@ -32369,15 +32417,15 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32369
32417
|
class: "img-chip-thumb",
|
|
32370
32418
|
src: e.dataUri,
|
|
32371
32419
|
alt: e.name || G(f).imageAlt
|
|
32372
|
-
}, null, 8,
|
|
32420
|
+
}, null, 8, sI), X("button", {
|
|
32373
32421
|
type: "button",
|
|
32374
32422
|
class: "img-chip-x",
|
|
32375
32423
|
"data-test": "img-chip-x",
|
|
32376
32424
|
onClick: (t) => G(x)(e.id)
|
|
32377
|
-
}, "✕", 8,
|
|
32378
|
-
G(S) ? (J(), Y("div",
|
|
32425
|
+
}, "✕", 8, cI)], 8, oI))), 128))])) : Z("", !0),
|
|
32426
|
+
G(S) ? (J(), Y("div", lI, H(G(S)), 1)) : Z("", !0)
|
|
32379
32427
|
])) : Z("", !0),
|
|
32380
|
-
e.gatePending ? (J(), Y("div",
|
|
32428
|
+
e.gatePending ? (J(), Y("div", uI, H(G(f).inputGateHint), 1)) : Z("", !0),
|
|
32381
32429
|
fi(X("textarea", {
|
|
32382
32430
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ zn(r) ? r.value = e : null,
|
|
32383
32431
|
class: "chat-input",
|
|
@@ -32386,9 +32434,9 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32386
32434
|
disabled: e.gatePending,
|
|
32387
32435
|
onKeydown: n[3] ||= (...e) => G(a) && G(a)(...e),
|
|
32388
32436
|
onPaste: ee
|
|
32389
|
-
}, null, 40,
|
|
32390
|
-
X("div",
|
|
32391
|
-
X("span",
|
|
32437
|
+
}, null, 40, dI), [[Ml, G(r)]]),
|
|
32438
|
+
X("div", fI, [
|
|
32439
|
+
X("span", pI, H(G(f).sendHint), 1),
|
|
32392
32440
|
X("button", {
|
|
32393
32441
|
class: "attach-btn",
|
|
32394
32442
|
title: G(f).attachImageTitle,
|
|
@@ -32398,7 +32446,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32398
32446
|
}, [G(d).attachImage ? (J(), xs(Jk, {
|
|
32399
32447
|
key: 0,
|
|
32400
32448
|
icon: G(d).attachImage
|
|
32401
|
-
}, null, 8, ["icon"])) : (J(), Y("svg",
|
|
32449
|
+
}, null, 8, ["icon"])) : (J(), Y("svg", hI, [...n[9] ||= [X("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" }, null, -1)]]))], 8, mI),
|
|
32402
32450
|
X("input", {
|
|
32403
32451
|
ref_key: "fileInput",
|
|
32404
32452
|
ref: E,
|
|
@@ -32414,7 +32462,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32414
32462
|
disabled: !G(g).loading && !G(r).trim() && !G(y).length && !G(C) || e.gatePending && !G(g).loading,
|
|
32415
32463
|
title: G(g).loading ? G(f).stopTitle : G(f).sendTitle,
|
|
32416
32464
|
onClick: n[4] ||= (e) => G(g).loading ? G(_)() : G(i)()
|
|
32417
|
-
}, [G(g).loading ? (J(), Y("svg",
|
|
32465
|
+
}, [G(g).loading ? (J(), Y("svg", _I, [...n[10] ||= [X("rect", {
|
|
32418
32466
|
x: "6",
|
|
32419
32467
|
y: "6",
|
|
32420
32468
|
width: "12",
|
|
@@ -32423,187 +32471,187 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
32423
32471
|
}, null, -1)]])) : G(d).send ? (J(), xs(Jk, {
|
|
32424
32472
|
key: 1,
|
|
32425
32473
|
icon: G(d).send
|
|
32426
|
-
}, null, 8, ["icon"])) : (J(), Y("svg",
|
|
32474
|
+
}, null, 8, ["icon"])) : (J(), Y("svg", vI, [...n[11] ||= [X("line", {
|
|
32427
32475
|
x1: "22",
|
|
32428
32476
|
y1: "2",
|
|
32429
32477
|
x2: "11",
|
|
32430
32478
|
y2: "13"
|
|
32431
|
-
}, null, -1), X("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
32479
|
+
}, null, -1), X("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, gI)
|
|
32432
32480
|
])
|
|
32433
32481
|
], 34)]));
|
|
32434
32482
|
}
|
|
32435
|
-
}), [["__scopeId", "data-v-1580c76b"]]),
|
|
32483
|
+
}), [["__scopeId", "data-v-1580c76b"]]), bI = {
|
|
32436
32484
|
key: 0,
|
|
32437
32485
|
class: "debug-drawer"
|
|
32438
|
-
},
|
|
32486
|
+
}, xI = { class: "drawer-header" }, SI = { class: "tab-group" }, CI = { class: "header-actions" }, wI = ["title"], TI = ["title"], EI = ["title"], DI = {
|
|
32439
32487
|
key: 0,
|
|
32440
32488
|
class: "drawer-filters"
|
|
32441
|
-
},
|
|
32489
|
+
}, OI = ["onClick"], kI = { class: "chip-count" }, AI = { class: "chip-count" }, jI = {
|
|
32442
32490
|
key: 0,
|
|
32443
32491
|
class: "context-panel"
|
|
32444
|
-
},
|
|
32492
|
+
}, MI = {
|
|
32445
32493
|
key: 0,
|
|
32446
32494
|
class: "trace-empty"
|
|
32447
|
-
},
|
|
32495
|
+
}, NI = { class: "ctx-overview" }, PI = { class: "ctx-occupancy" }, FI = ["title"], II = ["title"], LI = { class: "ctx-pct" }, RI = { class: "ctx-kv-row" }, zI = { class: "ctx-kv" }, BI = {
|
|
32448
32496
|
key: 0,
|
|
32449
32497
|
class: "ctx-kv"
|
|
32450
|
-
},
|
|
32498
|
+
}, VI = {
|
|
32451
32499
|
key: 1,
|
|
32452
32500
|
class: "ctx-kv"
|
|
32453
|
-
},
|
|
32501
|
+
}, HI = { class: "ctx-section-title" }, UI = ["title"], WI = { class: "ctx-cat-bar" }, GI = { class: "ctx-cat-tokens" }, KI = {
|
|
32454
32502
|
key: 0,
|
|
32455
32503
|
class: "ctx-compression"
|
|
32456
|
-
},
|
|
32504
|
+
}, qI = { class: "ctx-section-title" }, JI = { class: "ctx-kv-row" }, YI = { class: "ctx-kv" }, XI = { class: "ctx-kv" }, ZI = { class: "ctx-kv" }, QI = {
|
|
32457
32505
|
key: 0,
|
|
32458
32506
|
class: "ctx-kv"
|
|
32459
|
-
},
|
|
32507
|
+
}, $I = {
|
|
32460
32508
|
key: 1,
|
|
32461
32509
|
class: "subagent-panel"
|
|
32462
|
-
},
|
|
32510
|
+
}, eL = {
|
|
32463
32511
|
key: 0,
|
|
32464
32512
|
class: "sub-section"
|
|
32465
|
-
},
|
|
32513
|
+
}, tL = { class: "sub-section-title" }, nL = {
|
|
32466
32514
|
key: 1,
|
|
32467
32515
|
class: "trace-empty"
|
|
32468
|
-
},
|
|
32516
|
+
}, rL = {
|
|
32469
32517
|
key: 0,
|
|
32470
32518
|
class: "sub-section"
|
|
32471
|
-
},
|
|
32519
|
+
}, iL = { class: "sub-section-title" }, aL = { class: "sub-head" }, oL = { class: "sub-label" }, sL = { class: "sub-steps-badge" }, cL = { class: "sub-task" }, lL = {
|
|
32472
32520
|
key: 1,
|
|
32473
32521
|
class: "sub-section"
|
|
32474
|
-
},
|
|
32522
|
+
}, uL = { class: "sub-section-title" }, dL = { class: "sub-head" }, fL = { class: "sub-label" }, pL = {
|
|
32475
32523
|
key: 0,
|
|
32476
32524
|
class: "sub-dur"
|
|
32477
|
-
},
|
|
32525
|
+
}, mL = ["onClick"], hL = { class: "sub-task" }, gL = {
|
|
32478
32526
|
key: 0,
|
|
32479
32527
|
class: "sub-result"
|
|
32480
|
-
},
|
|
32528
|
+
}, _L = {
|
|
32481
32529
|
key: 1,
|
|
32482
32530
|
class: "sub-steps-list"
|
|
32483
|
-
},
|
|
32531
|
+
}, vL = { class: "sub-step-kind" }, yL = { class: "sub-step-name" }, bL = { class: "sub-step-ts" }, xL = {
|
|
32484
32532
|
key: 0,
|
|
32485
32533
|
class: "empty"
|
|
32486
|
-
},
|
|
32534
|
+
}, SL = ["onClick"], CL = { class: "log-group-title" }, wL = { class: "log-group-meta" }, TL = {
|
|
32487
32535
|
key: 0,
|
|
32488
32536
|
class: "lg-badge"
|
|
32489
|
-
},
|
|
32537
|
+
}, EL = {
|
|
32490
32538
|
key: 1,
|
|
32491
32539
|
class: "lg-badge"
|
|
32492
|
-
},
|
|
32540
|
+
}, DL = {
|
|
32493
32541
|
key: 2,
|
|
32494
32542
|
class: "lg-badge err"
|
|
32495
|
-
},
|
|
32543
|
+
}, OL = { class: "log-group-body" }, kL = { class: "log-head" }, AL = {
|
|
32496
32544
|
key: 0,
|
|
32497
32545
|
class: "log-source"
|
|
32498
|
-
},
|
|
32546
|
+
}, jL = { class: "log-time" }, ML = { class: "log-body" }, NL = { class: "kv-grid" }, PL = { class: "kv" }, FL = { class: "k" }, IL = { class: "v" }, LL = { class: "kv" }, RL = { class: "k" }, zL = { class: "v" }, BL = { class: "kv" }, VL = { class: "v" }, HL = { class: "kv" }, UL = { class: "k" }, WL = { class: "v" }, GL = { class: "section-label" }, KL = { class: "chip-row" }, qL = { class: "section-label" }, JL = { class: "msg-list" }, YL = { class: "msg-text" }, XL = { class: "badge-row" }, ZL = { class: "badge" }, QL = {
|
|
32499
32547
|
key: 0,
|
|
32500
32548
|
class: "badge muted"
|
|
32501
|
-
},
|
|
32549
|
+
}, $L = { class: "badge muted" }, eR = {
|
|
32502
32550
|
key: 1,
|
|
32503
32551
|
class: "badge muted"
|
|
32504
|
-
},
|
|
32552
|
+
}, tR = ["onClick"], nR = ["title", "onClick"], rR = ["onClick"], iR = ["title", "onClick"], aR = { class: "msg-detail" }, oR = {
|
|
32505
32553
|
key: 0,
|
|
32506
32554
|
class: "msg-text"
|
|
32507
|
-
},
|
|
32555
|
+
}, sR = { class: "tc-inline-name" }, cR = { class: "tc-inline-args" }, lR = {
|
|
32508
32556
|
key: 1,
|
|
32509
32557
|
class: "tc-id"
|
|
32510
|
-
},
|
|
32558
|
+
}, uR = {
|
|
32511
32559
|
key: 1,
|
|
32512
32560
|
class: "log-raw"
|
|
32513
|
-
},
|
|
32561
|
+
}, dR = { class: "badge-row" }, fR = { class: "badge" }, pR = {
|
|
32514
32562
|
key: 0,
|
|
32515
32563
|
class: "badge warn"
|
|
32516
|
-
},
|
|
32564
|
+
}, mR = {
|
|
32517
32565
|
key: 0,
|
|
32518
32566
|
class: "resp-content"
|
|
32519
|
-
},
|
|
32567
|
+
}, hR = {
|
|
32520
32568
|
key: 1,
|
|
32521
32569
|
class: "tc-list"
|
|
32522
|
-
},
|
|
32570
|
+
}, gR = { class: "tc-name" }, _R = { class: "tc-args" }, vR = {
|
|
32523
32571
|
key: 2,
|
|
32524
32572
|
class: "usage-row"
|
|
32525
|
-
},
|
|
32573
|
+
}, yR = { class: "usage" }, bR = { class: "usage" }, xR = { class: "usage" }, SR = {
|
|
32526
32574
|
key: 0,
|
|
32527
32575
|
class: "usage"
|
|
32528
|
-
},
|
|
32576
|
+
}, CR = { class: "tc-name" }, wR = {
|
|
32529
32577
|
key: 0,
|
|
32530
32578
|
class: "tc-dur"
|
|
32531
|
-
},
|
|
32579
|
+
}, TR = ["title", "onClick"], ER = { class: "tc-args" }, DR = { class: "tc-result-sep" }, OR = { class: "tc-args tc-result" }, kR = {
|
|
32532
32580
|
key: 1,
|
|
32533
32581
|
class: "tc-card inline"
|
|
32534
|
-
},
|
|
32582
|
+
}, AR = { class: "tc-name" }, jR = {
|
|
32535
32583
|
key: 0,
|
|
32536
32584
|
class: "tc-dur running"
|
|
32537
|
-
},
|
|
32585
|
+
}, MR = { class: "tc-args" }, NR = {
|
|
32538
32586
|
key: 4,
|
|
32539
32587
|
class: "err-box"
|
|
32540
|
-
},
|
|
32588
|
+
}, PR = { class: "log-footer" }, FR = ["onClick"], IR = ["onClick"], LR = {
|
|
32541
32589
|
key: 0,
|
|
32542
32590
|
class: "log-raw"
|
|
32543
|
-
},
|
|
32591
|
+
}, RR = {
|
|
32544
32592
|
key: 3,
|
|
32545
32593
|
class: "info-body"
|
|
32546
|
-
},
|
|
32594
|
+
}, zR = {
|
|
32547
32595
|
key: 0,
|
|
32548
32596
|
class: "empty"
|
|
32549
|
-
},
|
|
32597
|
+
}, BR = { class: "info-section" }, VR = { class: "info-title" }, HR = { class: "kv-grid" }, UR = { class: "kv" }, WR = { class: "v" }, GR = { class: "kv" }, KR = { class: "k" }, qR = { class: "v" }, JR = { class: "kv" }, YR = { class: "k" }, XR = { class: "v" }, ZR = { class: "kv" }, QR = { class: "k" }, $R = { class: "v" }, ez = {
|
|
32550
32598
|
class: "kv",
|
|
32551
32599
|
style: { "margin-top": "6px" }
|
|
32552
|
-
},
|
|
32600
|
+
}, tz = { class: "k" }, nz = {
|
|
32553
32601
|
class: "v",
|
|
32554
32602
|
style: { "font-size": "11px" }
|
|
32555
|
-
},
|
|
32603
|
+
}, rz = { class: "info-section" }, iz = { class: "info-title" }, az = { class: "info-name" }, oz = { class: "info-desc" }, sz = {
|
|
32556
32604
|
key: 0,
|
|
32557
32605
|
class: "info-section"
|
|
32558
|
-
},
|
|
32606
|
+
}, cz = { class: "info-title" }, lz = { class: "info-hint" }, uz = ["onClick"], dz = { class: "info-desc" }, fz = {
|
|
32559
32607
|
key: 0,
|
|
32560
32608
|
class: "skill-content"
|
|
32561
|
-
},
|
|
32609
|
+
}, pz = {
|
|
32562
32610
|
key: 0,
|
|
32563
32611
|
class: "skill-loading"
|
|
32564
|
-
},
|
|
32612
|
+
}, mz = {
|
|
32565
32613
|
key: 1,
|
|
32566
32614
|
class: "skill-error"
|
|
32567
|
-
},
|
|
32615
|
+
}, hz = {
|
|
32568
32616
|
key: 2,
|
|
32569
32617
|
class: "skill-pre"
|
|
32570
|
-
},
|
|
32618
|
+
}, gz = {
|
|
32571
32619
|
key: 1,
|
|
32572
32620
|
class: "info-section"
|
|
32573
|
-
},
|
|
32621
|
+
}, _z = { class: "info-title" }, vz = { class: "info-item" }, yz = { class: "info-name" }, bz = { class: "info-desc" }, xz = { class: "info-section" }, Sz = { class: "info-title" }, Cz = { class: "kv-grid" }, wz = { class: "kv" }, Tz = { class: "k" }, Ez = { class: "v" }, Dz = { class: "kv" }, Oz = { class: "k" }, kz = { class: "v" }, Az = { class: "kv" }, jz = { class: "k" }, Mz = { class: "v" }, Nz = { class: "kv" }, Pz = { class: "k" }, Fz = {
|
|
32574
32622
|
class: "v",
|
|
32575
32623
|
style: { "font-size": "11px" }
|
|
32576
|
-
},
|
|
32624
|
+
}, Iz = {
|
|
32577
32625
|
key: 2,
|
|
32578
32626
|
class: "info-section"
|
|
32579
|
-
},
|
|
32627
|
+
}, Lz = { class: "info-title" }, Rz = { class: "info-name" }, zz = { class: "src-tag mcp" }, Bz = { class: "info-desc" }, Vz = {
|
|
32580
32628
|
key: 3,
|
|
32581
32629
|
class: "info-section"
|
|
32582
|
-
},
|
|
32630
|
+
}, Hz = { class: "info-title" }, Uz = { class: "kv-grid" }, Wz = { class: "kv" }, Gz = { class: "k" }, Kz = { class: "v" }, qz = { class: "kv" }, Jz = { class: "k" }, Yz = { class: "v" }, Xz = { class: "kv" }, Zz = { class: "k" }, Qz = { class: "v" }, $z = {
|
|
32583
32631
|
key: 0,
|
|
32584
32632
|
class: "kv"
|
|
32585
|
-
},
|
|
32633
|
+
}, eB = { class: "k" }, tB = {
|
|
32586
32634
|
class: "v",
|
|
32587
32635
|
style: { "font-size": "11px" }
|
|
32588
|
-
},
|
|
32636
|
+
}, nB = {
|
|
32589
32637
|
key: 4,
|
|
32590
32638
|
class: "info-section"
|
|
32591
|
-
},
|
|
32639
|
+
}, rB = { class: "info-title" }, iB = {
|
|
32592
32640
|
key: 5,
|
|
32593
32641
|
class: "info-section"
|
|
32594
|
-
},
|
|
32642
|
+
}, aB = { class: "info-title" }, oB = { class: "info-pre" }, sB = {
|
|
32595
32643
|
key: 6,
|
|
32596
32644
|
class: "info-section"
|
|
32597
|
-
},
|
|
32645
|
+
}, cB = { class: "info-title" }, lB = { class: "info-kv" }, uB = { class: "kv" }, dB = { class: "k" }, fB = { class: "v" }, pB = { class: "kv" }, mB = { class: "k" }, hB = { class: "v" }, gB = { class: "kv" }, _B = { class: "k" }, vB = { class: "v" }, yB = { class: "kv" }, bB = { class: "k" }, xB = { class: "v" }, SB = { class: "kv" }, CB = { class: "k" }, wB = {
|
|
32598
32646
|
class: "v",
|
|
32599
32647
|
style: { "font-size": "11px" }
|
|
32600
|
-
},
|
|
32648
|
+
}, TB = {
|
|
32601
32649
|
key: 0,
|
|
32602
32650
|
class: "kv"
|
|
32603
|
-
},
|
|
32651
|
+
}, EB = { class: "k" }, DB = {
|
|
32604
32652
|
class: "v",
|
|
32605
32653
|
style: { "font-size": "11px" }
|
|
32606
|
-
},
|
|
32654
|
+
}, OB = 400, kB = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
32607
32655
|
__name: "DebugDrawer",
|
|
32608
32656
|
props: {
|
|
32609
32657
|
logs: { default: () => [] },
|
|
@@ -33007,8 +33055,8 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33007
33055
|
return `${e.windowRatio == null ? `keepRounds=${e.keepRounds ?? "?"}` : `windowRatio=${e.windowRatio}`} · ${e.summarize.mode}${y.value.debugSummaryMode} · ${y.value.debugCtxRecalled}${e.recallTopK ?? "?"}${e.reason ? " · " + e.reason : ""}`;
|
|
33008
33056
|
}
|
|
33009
33057
|
return (t, n) => (J(), xs(Ni, { to: "body" }, [Os(Mc, { name: "drawer" }, {
|
|
33010
|
-
default: ui(() => [e.visible ? (J(), Y("div",
|
|
33011
|
-
X("div",
|
|
33058
|
+
default: ui(() => [e.visible ? (J(), Y("div", bI, [X("div", { class: Je(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
33059
|
+
X("div", xI, [X("div", SI, [
|
|
33012
33060
|
X("button", {
|
|
33013
33061
|
class: Je(["tab-btn", { active: ue.value === "logs" }]),
|
|
33014
33062
|
onClick: n[0] ||= (e) => pe("logs")
|
|
@@ -33028,33 +33076,33 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33028
33076
|
class: Je(["tab-btn", { active: ue.value === "info" }]),
|
|
33029
33077
|
onClick: n[3] ||= (e) => pe("info")
|
|
33030
33078
|
}, "🧬 " + H(y.value.debugTabInfo), 3)) : Z("", !0)
|
|
33031
|
-
]), X("div",
|
|
33079
|
+
]), X("div", CI, [
|
|
33032
33080
|
X("button", {
|
|
33033
33081
|
class: "hd-btn",
|
|
33034
33082
|
title: y.value.debugCopyReport,
|
|
33035
33083
|
onClick: v
|
|
33036
|
-
}, H(g.value === "report" ? "✓" : "💾"), 9,
|
|
33084
|
+
}, H(g.value === "report" ? "✓" : "💾"), 9, wI),
|
|
33037
33085
|
ue.value === "logs" ? (J(), Y("button", {
|
|
33038
33086
|
key: 0,
|
|
33039
33087
|
class: "hd-btn",
|
|
33040
33088
|
title: y.value.debugClearLogs,
|
|
33041
33089
|
onClick: le
|
|
33042
|
-
}, "🗑️", 8,
|
|
33090
|
+
}, "🗑️", 8, TI)) : Z("", !0),
|
|
33043
33091
|
X("button", {
|
|
33044
33092
|
class: "hd-btn",
|
|
33045
33093
|
title: y.value.close,
|
|
33046
33094
|
onClick: ce
|
|
33047
|
-
}, "✕", 8,
|
|
33095
|
+
}, "✕", 8, EI)
|
|
33048
33096
|
])]),
|
|
33049
|
-
ue.value === "logs" ? (J(), Y("div",
|
|
33097
|
+
ue.value === "logs" ? (J(), Y("div", DI, [(J(!0), Y(q, null, Ca(b.value, (e, t) => (J(), Y("button", {
|
|
33050
33098
|
key: t,
|
|
33051
33099
|
class: Je(["filter-chip", { active: i.value === t }]),
|
|
33052
33100
|
style: Ue({ "--chip-color": e.color }),
|
|
33053
33101
|
onClick: (e) => i.value = t
|
|
33054
|
-
}, [Ns(H(e.icon) + " " + H(e.label) + " ", 1), X("span",
|
|
33102
|
+
}, [Ns(H(e.icon) + " " + H(e.label) + " ", 1), X("span", kI, H(C.value[t] || 0), 1)], 14, OI))), 128)), X("button", {
|
|
33055
33103
|
class: Je(["filter-chip all", { active: i.value === "all" }]),
|
|
33056
33104
|
onClick: n[4] ||= (e) => i.value = "all"
|
|
33057
|
-
}, [Ns(H(y.value.debugFilterAll) + " ", 1), X("span",
|
|
33105
|
+
}, [Ns(H(y.value.debugFilterAll) + " ", 1), X("span", AI, H(C.value.all || 0), 1)], 2)])) : Z("", !0),
|
|
33058
33106
|
X("div", {
|
|
33059
33107
|
class: "drawer-body",
|
|
33060
33108
|
ref_key: "drawerBodyEl",
|
|
@@ -33068,8 +33116,8 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33068
33116
|
ref_key: "drawerContentsEl",
|
|
33069
33117
|
ref: c
|
|
33070
33118
|
}, [
|
|
33071
|
-
ue.value === "context" ? (J(), Y("div",
|
|
33072
|
-
X("div",
|
|
33119
|
+
ue.value === "context" ? (J(), Y("div", jI, [z.value ? (J(), Y(q, { key: 1 }, [z.value ? (J(), Y(q, { key: 0 }, [
|
|
33120
|
+
X("div", NI, [X("div", PI, [X("div", {
|
|
33073
33121
|
class: "ctx-bar-track",
|
|
33074
33122
|
title: `${y.value.debugCtxOccupancy} ${Math.round(z.value.occupancy * 100)}%`
|
|
33075
33123
|
}, [X("div", {
|
|
@@ -33080,12 +33128,12 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33080
33128
|
class: "ctx-threshold-mark",
|
|
33081
33129
|
style: Ue({ left: Math.min(z.value.thresholdRatio * 100, 100) + "%" }),
|
|
33082
33130
|
title: y.value.debugCtxThreshold
|
|
33083
|
-
}, null, 12,
|
|
33084
|
-
X("span",
|
|
33085
|
-
z.value.contextWindow ? (J(), Y("span",
|
|
33086
|
-
z.value.thresholdRatio > 0 ? (J(), Y("span",
|
|
33131
|
+
}, null, 12, II)) : Z("", !0)], 8, FI), X("span", LI, H(Math.round(z.value.occupancy * 100)) + "%", 1)]), X("div", RI, [
|
|
33132
|
+
X("span", zI, H(y.value.debugCtxTokens) + " " + H(z.value.totalTokens) + " token", 1),
|
|
33133
|
+
z.value.contextWindow ? (J(), Y("span", BI, H(y.value.debugCtxWindow) + " " + H(z.value.contextWindow), 1)) : Z("", !0),
|
|
33134
|
+
z.value.thresholdRatio > 0 ? (J(), Y("span", VI, H(y.value.debugCtxThresholdPct) + " " + H(Math.round(z.value.thresholdRatio * 100)) + "%", 1)) : Z("", !0)
|
|
33087
33135
|
])]),
|
|
33088
|
-
X("div",
|
|
33136
|
+
X("div", HI, H(y.value.debugCtxCategories), 1),
|
|
33089
33137
|
(J(!0), Y(q, null, Ca(z.value.categories, (e) => (J(), Y("div", {
|
|
33090
33138
|
key: e.key,
|
|
33091
33139
|
class: "ctx-cat"
|
|
@@ -33093,62 +33141,62 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33093
33141
|
X("span", {
|
|
33094
33142
|
class: "ctx-cat-label",
|
|
33095
33143
|
title: e.label
|
|
33096
|
-
}, H(e.label), 9,
|
|
33097
|
-
X("div",
|
|
33144
|
+
}, H(e.label), 9, UI),
|
|
33145
|
+
X("div", WI, [X("div", {
|
|
33098
33146
|
class: "ctx-cat-fill",
|
|
33099
33147
|
style: Ue({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
33100
33148
|
}, null, 4)]),
|
|
33101
|
-
X("span",
|
|
33149
|
+
X("span", GI, [Ns(H(e.tokens) + " ", 1), X("i", null, "(" + H(Math.round(e.pct * 100)) + "%)", 1)])
|
|
33102
33150
|
]))), 128)),
|
|
33103
|
-
z.value.compression ? (J(), Y("div",
|
|
33104
|
-
X("span",
|
|
33105
|
-
X("span",
|
|
33106
|
-
X("span",
|
|
33107
|
-
z.value.compression.decision ? (J(), Y("span",
|
|
33151
|
+
z.value.compression ? (J(), Y("div", KI, [X("div", qI, H(y.value.debugCtxLastCompression), 1), X("div", JI, [
|
|
33152
|
+
X("span", YI, H(y.value.debugCtxSummarized) + " " + H(z.value.compression.roundsSummarized) + "/" + H(z.value.compression.roundsTotal) + H(y.value.debugCtxRoundsSuffix), 1),
|
|
33153
|
+
X("span", XI, H(y.value.debugCtxRecalled) + " " + H(z.value.compression.roundsRecalled), 1),
|
|
33154
|
+
X("span", ZI, H(z.value.compression.strategy), 1),
|
|
33155
|
+
z.value.compression.decision ? (J(), Y("span", QI, "🤖 " + H(y.value.debugCtxAgentDecision) + H(Se(z.value.compression.decision)), 1)) : Z("", !0)
|
|
33108
33156
|
])])) : Z("", !0)
|
|
33109
|
-
], 64)) : Z("", !0)], 64)) : (J(), Y("div",
|
|
33110
|
-
ue.value === "subagent" ? (J(), Y("div",
|
|
33157
|
+
], 64)) : Z("", !0)], 64)) : (J(), Y("div", MI, H(y.value.debugCtxEmpty), 1))])) : Z("", !0),
|
|
33158
|
+
ue.value === "subagent" ? (J(), Y("div", $I, [ye.value.length ? (J(), Y("div", eL, [X("div", tL, "🔒 " + H(y.value.debugLocksTitle) + " (" + H(ye.value.length) + ")", 1), (J(!0), Y(q, null, Ca(ye.value, ([e, t]) => (J(), Y("div", {
|
|
33111
33159
|
key: "lock-" + e,
|
|
33112
33160
|
class: "sub-task"
|
|
33113
|
-
}, "🔒 " + H(e) + " ← " + H(t), 1))), 128))])) : Z("", !0), !ve.value.length && !B.value.length ? (J(), Y("div",
|
|
33161
|
+
}, "🔒 " + H(e) + " ← " + H(t), 1))), 128))])) : Z("", !0), !ve.value.length && !B.value.length ? (J(), Y("div", nL, H(y.value.debugSubagentEmpty), 1)) : (J(), Y(q, { key: 2 }, [ve.value.length ? (J(), Y("div", rL, [X("div", iL, "▶ " + H(y.value.debugSubRunningTitle) + " (" + H(ve.value.length) + ")", 1), (J(!0), Y(q, null, Ca(ve.value, (e, t) => (J(), Y("div", {
|
|
33114
33162
|
key: "a" + t,
|
|
33115
33163
|
class: Je(["sub-card", e.status])
|
|
33116
|
-
}, [X("div",
|
|
33164
|
+
}, [X("div", aL, [
|
|
33117
33165
|
X("span", {
|
|
33118
33166
|
class: "sub-status",
|
|
33119
33167
|
style: Ue({ background: be.value[e.status] && be.value[e.status].color || "#9ca3af" })
|
|
33120
33168
|
}, H(be.value[e.status] && be.value[e.status].label || e.status), 5),
|
|
33121
|
-
X("span",
|
|
33122
|
-
X("span",
|
|
33123
|
-
]), X("div",
|
|
33169
|
+
X("span", oL, H(e.label), 1),
|
|
33170
|
+
X("span", sL, H(e.steps.length) + H(y.value.debugStepsCountSuffix), 1)
|
|
33171
|
+
]), X("div", cL, H(L(e.task, 80)), 1)], 2))), 128))])) : Z("", !0), B.value.length ? (J(), Y("div", lL, [X("div", uL, "🕐 " + H(y.value.debugSubHistoryTitle) + " (" + H(B.value.length) + ")", 1), (J(!0), Y(q, null, Ca(B.value, (e, t) => (J(), Y("div", {
|
|
33124
33172
|
key: "h" + t,
|
|
33125
33173
|
class: Je(["sub-card", e.status])
|
|
33126
33174
|
}, [
|
|
33127
|
-
X("div",
|
|
33175
|
+
X("div", dL, [
|
|
33128
33176
|
X("span", {
|
|
33129
33177
|
class: "sub-status",
|
|
33130
33178
|
style: Ue({ background: be.value[e.status] && be.value[e.status].color || "#9ca3af" })
|
|
33131
33179
|
}, H(be.value[e.status] && be.value[e.status].label || e.status), 5),
|
|
33132
|
-
X("span",
|
|
33133
|
-
e.durationMs == null ? Z("", !0) : (J(), Y("span",
|
|
33180
|
+
X("span", fL, H(e.label), 1),
|
|
33181
|
+
e.durationMs == null ? Z("", !0) : (J(), Y("span", pL, H(R(e.durationMs)), 1)),
|
|
33134
33182
|
e.steps.length ? (J(), Y("button", {
|
|
33135
33183
|
key: 1,
|
|
33136
33184
|
class: "sub-toggle",
|
|
33137
33185
|
onClick: (e) => xe(t)
|
|
33138
|
-
}, H(V.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9,
|
|
33186
|
+
}, H(V.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, mL)) : Z("", !0)
|
|
33139
33187
|
]),
|
|
33140
|
-
X("div",
|
|
33141
|
-
e.resultPreview ? (J(), Y("div",
|
|
33142
|
-
V.value.has(t) && e.steps.length ? (J(), Y("div",
|
|
33188
|
+
X("div", hL, H(L(e.task, 80)), 1),
|
|
33189
|
+
e.resultPreview ? (J(), Y("div", gL, H(e.resultPreview), 1)) : Z("", !0),
|
|
33190
|
+
V.value.has(t) && e.steps.length ? (J(), Y("div", _L, [(J(!0), Y(q, null, Ca(e.steps, (e, t) => (J(), Y("div", {
|
|
33143
33191
|
key: t,
|
|
33144
33192
|
class: "sub-step"
|
|
33145
33193
|
}, [
|
|
33146
|
-
X("span",
|
|
33147
|
-
X("span",
|
|
33148
|
-
X("span",
|
|
33194
|
+
X("span", vL, H(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
33195
|
+
X("span", yL, H(e.name), 1),
|
|
33196
|
+
X("span", bL, H(N(e.ts)), 1)
|
|
33149
33197
|
]))), 128))])) : Z("", !0)
|
|
33150
33198
|
], 2))), 128))])) : Z("", !0)], 64))])) : Z("", !0),
|
|
33151
|
-
ue.value === "logs" ? (J(), Y(q, { key: 2 }, [S.value.length === 0 ? (J(), Y("div",
|
|
33199
|
+
ue.value === "logs" ? (J(), Y(q, { key: 2 }, [S.value.length === 0 ? (J(), Y("div", xL, H(y.value.debugLogsEmpty), 1)) : Z("", !0), (J(!0), Y(q, null, Ca(k.value, (e) => (J(), Y("div", {
|
|
33152
33200
|
key: e.key,
|
|
33153
33201
|
class: "log-group"
|
|
33154
33202
|
}, [X("div", {
|
|
@@ -33156,185 +33204,185 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33156
33204
|
onClick: (t) => M(e.key)
|
|
33157
33205
|
}, [
|
|
33158
33206
|
X("span", { class: Je(["log-group-arrow", { open: te(e.key) }]) }, "▶", 2),
|
|
33159
|
-
X("span",
|
|
33160
|
-
X("span",
|
|
33207
|
+
X("span", CL, H(ne(e)), 1),
|
|
33208
|
+
X("span", wL, [
|
|
33161
33209
|
Ns(H(N(e.firstTs)), 1),
|
|
33162
33210
|
e.lastTs > e.firstTs ? (J(), Y(q, { key: 0 }, [Ns(" ~ " + H(N(e.lastTs)), 1)], 64)) : Z("", !0),
|
|
33163
33211
|
Ns(" · " + H(R(e.lastTs - e.firstTs)), 1)
|
|
33164
33212
|
]),
|
|
33165
|
-
e.toolCount ? (J(), Y("span",
|
|
33166
|
-
e.tokens == null ? Z("", !0) : (J(), Y("span",
|
|
33167
|
-
e.errorCount ? (J(), Y("span",
|
|
33168
|
-
], 10,
|
|
33213
|
+
e.toolCount ? (J(), Y("span", TL, "🔧 " + H(e.toolCount), 1)) : Z("", !0),
|
|
33214
|
+
e.tokens == null ? Z("", !0) : (J(), Y("span", EL, "Σ " + H(e.tokens) + " tok", 1)),
|
|
33215
|
+
e.errorCount ? (J(), Y("span", DL, "❌ " + H(e.errorCount), 1)) : Z("", !0)
|
|
33216
|
+
], 10, SL), fi(X("div", OL, [(J(!0), Y(q, null, Ca(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => (J(), Y("div", {
|
|
33169
33217
|
key: i,
|
|
33170
33218
|
class: "log-item"
|
|
33171
33219
|
}, [
|
|
33172
|
-
X("div",
|
|
33220
|
+
X("div", kL, [
|
|
33173
33221
|
X("span", {
|
|
33174
33222
|
class: "log-type",
|
|
33175
33223
|
style: Ue({ background: b.value[e.type].color })
|
|
33176
33224
|
}, H(b.value[e.type].icon) + " " + H(b.value[e.type].label), 5),
|
|
33177
|
-
e.source ? (J(), Y("span",
|
|
33178
|
-
X("span",
|
|
33225
|
+
e.source ? (J(), Y("span", AL, "↳ " + H(e.source), 1)) : Z("", !0),
|
|
33226
|
+
X("span", jL, H(N(e.timestamp)), 1)
|
|
33179
33227
|
]),
|
|
33180
|
-
X("div",
|
|
33181
|
-
X("div",
|
|
33182
|
-
X("div",
|
|
33183
|
-
X("div",
|
|
33184
|
-
X("div",
|
|
33185
|
-
X("div",
|
|
33228
|
+
X("div", ML, [e.type === "context" ? (J(), Y(q, { key: 0 }, [
|
|
33229
|
+
X("div", NL, [
|
|
33230
|
+
X("div", PL, [X("span", FL, H(y.value.debugModel), 1), X("span", IL, H(e.data.model), 1)]),
|
|
33231
|
+
X("div", LL, [X("span", RL, H(y.value.debugTemperature), 1), X("span", zL, H(e.data.temperature), 1)]),
|
|
33232
|
+
X("div", BL, [n[5] ||= X("span", { class: "k" }, "MaxTokens", -1), X("span", VL, H(e.data.maxTokens), 1)]),
|
|
33233
|
+
X("div", HL, [X("span", UL, H(y.value.debugMessageCount), 1), X("span", WL, H(e.data.totalMessages), 1)])
|
|
33186
33234
|
]),
|
|
33187
|
-
X("div",
|
|
33188
|
-
X("div",
|
|
33235
|
+
X("div", GL, H(y.value.debugToolsLabel) + " (" + H(e.data.tools?.length || 0) + ")", 1),
|
|
33236
|
+
X("div", KL, [(J(!0), Y(q, null, Ca(e.data.tools, (e) => (J(), Y("span", {
|
|
33189
33237
|
key: e,
|
|
33190
33238
|
class: "tool-chip"
|
|
33191
33239
|
}, H(e), 1))), 128))]),
|
|
33192
|
-
X("div",
|
|
33193
|
-
X("div",
|
|
33240
|
+
X("div", qL, H(y.value.debugContextMessages), 1),
|
|
33241
|
+
X("div", JL, [(J(!0), Y(q, null, Ca(e.data.messages, (e, t) => (J(), Y("div", {
|
|
33194
33242
|
key: t,
|
|
33195
33243
|
class: "msg-row"
|
|
33196
33244
|
}, [X("span", {
|
|
33197
33245
|
class: "msg-role",
|
|
33198
33246
|
style: Ue({ background: se(e.type).color })
|
|
33199
|
-
}, H(se(e.type).label), 5), X("span",
|
|
33200
|
-
], 64)) : e.type === "llm_request" ? (J(), Y(q, { key: 1 }, [X("div",
|
|
33201
|
-
X("span",
|
|
33202
|
-
e.data.model ? (J(), Y("span",
|
|
33203
|
-
X("span",
|
|
33204
|
-
e.data.tools?.length ? (J(), Y("span",
|
|
33247
|
+
}, H(se(e.type).label), 5), X("span", YL, H(e.content), 1)]))), 128))])
|
|
33248
|
+
], 64)) : e.type === "llm_request" ? (J(), Y(q, { key: 1 }, [X("div", XL, [
|
|
33249
|
+
X("span", ZL, H(y.value.debugRoundPrefix) + H(e.data.round) + H(y.value.debugRoundSuffix), 1),
|
|
33250
|
+
e.data.model ? (J(), Y("span", QL, H(e.data.model), 1)) : Z("", !0),
|
|
33251
|
+
X("span", $L, [Ns(H((e.data.messages || []).length) + H(y.value.debugMsgCountSuffix), 1), r != null && r < (e.data.messages || []).length ? (J(), Y(q, { key: 0 }, [Ns("(+" + H((e.data.messages || []).length - r) + ")", 1)], 64)) : Z("", !0)]),
|
|
33252
|
+
e.data.tools?.length ? (J(), Y("span", eR, H(e.data.tools.length) + H(y.value.debugToolCountSuffix), 1)) : Z("", !0),
|
|
33205
33253
|
r != null && r > 0 ? (J(), Y("button", {
|
|
33206
33254
|
key: 2,
|
|
33207
33255
|
class: "view-toggle only-new-btn",
|
|
33208
33256
|
onClick: (e) => h(i)
|
|
33209
|
-
}, H(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9,
|
|
33257
|
+
}, H(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, tR)) : Z("", !0),
|
|
33210
33258
|
X("button", {
|
|
33211
33259
|
class: "view-toggle copy-btn",
|
|
33212
33260
|
title: y.value.copy,
|
|
33213
33261
|
onClick: (t) => _(ae(e.data.messages), "req" + i)
|
|
33214
|
-
}, H(g.value === "req" + i ? "✓" : "📋"), 9,
|
|
33262
|
+
}, H(g.value === "req" + i ? "✓" : "📋"), 9, nR),
|
|
33215
33263
|
X("button", {
|
|
33216
33264
|
class: "view-toggle",
|
|
33217
33265
|
onClick: (e) => ie(i)
|
|
33218
|
-
}, H(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9,
|
|
33219
|
-
]), d.value.has(i) ? (J(), Y("pre",
|
|
33266
|
+
}, H(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, rR)
|
|
33267
|
+
]), d.value.has(i) ? (J(), Y("pre", uR, [X("code", null, H(ae(e.data.messages)), 1)])) : (J(!0), Y(q, { key: 0 }, Ca([re(e, r, m.value.has(i))], (e) => (J(), Y("div", {
|
|
33220
33268
|
key: e.base,
|
|
33221
33269
|
class: "msg-list"
|
|
33222
33270
|
}, [(J(!0), Y(q, null, Ca(e.list, (t, n) => (J(), Y("div", {
|
|
33223
33271
|
key: n,
|
|
33224
|
-
class: Je(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length >
|
|
33225
|
-
title: String(t.content ?? "").length >
|
|
33226
|
-
onClick: (r) => String(t.content ?? "").length >
|
|
33272
|
+
class: Je(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length > OB }]),
|
|
33273
|
+
title: String(t.content ?? "").length > OB ? f.value.has(i + ":" + (e.base + n)) ? y.value.collapse : y.value.expand : void 0,
|
|
33274
|
+
onClick: (r) => String(t.content ?? "").length > OB && p(i + ":" + (e.base + n))
|
|
33227
33275
|
}, [X("span", {
|
|
33228
33276
|
class: "msg-role",
|
|
33229
33277
|
style: Ue({ background: se(t.role).color })
|
|
33230
|
-
}, H(se(t.role).label), 5), X("div",
|
|
33231
|
-
t.content ? (J(), Y("span",
|
|
33278
|
+
}, H(se(t.role).label), 5), X("div", aR, [
|
|
33279
|
+
t.content ? (J(), Y("span", oR, H(t.content), 1)) : Z("", !0),
|
|
33232
33280
|
(J(!0), Y(q, null, Ca(t.tool_calls || [], (e, t) => (J(), Y("div", {
|
|
33233
33281
|
key: t,
|
|
33234
33282
|
class: "tc-inline"
|
|
33235
|
-
}, [X("span",
|
|
33236
|
-
t.tool_call_id ? (J(), Y("span",
|
|
33237
|
-
])], 10,
|
|
33238
|
-
X("div",
|
|
33239
|
-
e.data.content ? (J(), Y("div",
|
|
33240
|
-
e.data.toolCalls?.length ? (J(), Y("div",
|
|
33283
|
+
}, [X("span", sR, "🔧 " + H(e.function?.name || e.name), 1), X("code", cR, H(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
33284
|
+
t.tool_call_id ? (J(), Y("span", lR, "↳ tool_call_id: " + H(t.tool_call_id), 1)) : Z("", !0)
|
|
33285
|
+
])], 10, iR))), 128))]))), 128))], 64)) : e.type === "llm_response" ? (J(), Y(q, { key: 2 }, [
|
|
33286
|
+
X("div", dR, [X("span", fR, H(y.value.debugRoundPrefix) + H(e.data.round) + H(y.value.debugRoundSuffix), 1), e.data.toolCalls?.length ? (J(), Y("span", pR, "🔧 " + H(e.data.toolCalls.length) + H(y.value.debugToolCallsSuffix), 1)) : Z("", !0)]),
|
|
33287
|
+
e.data.content ? (J(), Y("div", mR, H(e.data.content), 1)) : Z("", !0),
|
|
33288
|
+
e.data.toolCalls?.length ? (J(), Y("div", hR, [(J(!0), Y(q, null, Ca(e.data.toolCalls, (e, t) => (J(), Y("div", {
|
|
33241
33289
|
key: t,
|
|
33242
33290
|
class: "tc-card"
|
|
33243
|
-
}, [X("div",
|
|
33244
|
-
e.data.usage ? (J(), Y("div",
|
|
33245
|
-
X("span",
|
|
33246
|
-
X("span",
|
|
33247
|
-
X("span",
|
|
33248
|
-
e.data.usage.reasoning_tokens ? (J(), Y("span",
|
|
33291
|
+
}, [X("div", gR, "🔧 " + H(e.name), 1), X("pre", _R, H(ae(e.args)), 1)]))), 128))])) : Z("", !0),
|
|
33292
|
+
e.data.usage ? (J(), Y("div", vR, [
|
|
33293
|
+
X("span", yR, "prompt: " + H(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
33294
|
+
X("span", bR, "completion: " + H(e.data.usage.completion_tokens ?? "-"), 1),
|
|
33295
|
+
X("span", xR, "total: " + H(e.data.usage.total_tokens ?? "-"), 1),
|
|
33296
|
+
e.data.usage.reasoning_tokens ? (J(), Y("span", SR, "reasoning: " + H(e.data.usage.reasoning_tokens) + "(" + H(Math.round(e.data.usage.reasoning_tokens / Math.max(1, e.data.usage.completion_tokens ?? 0) * 100)) + "%)", 1)) : Z("", !0)
|
|
33249
33297
|
])) : Z("", !0)
|
|
33250
33298
|
], 64)) : e.type === "tool_call" || e.type === "tool_result" ? (J(), Y(q, { key: 3 }, [t ? (J(), Y("div", {
|
|
33251
33299
|
key: 0,
|
|
33252
33300
|
class: Je(["tc-card inline paired", { error: e.data.status === "error" }])
|
|
33253
33301
|
}, [
|
|
33254
|
-
X("div",
|
|
33302
|
+
X("div", CR, [
|
|
33255
33303
|
Ns(H(e.data.status === "error" ? "❌" : "✅") + " " + H(e.data.name) + " ", 1),
|
|
33256
|
-
e.data.durationMs == null ? Z("", !0) : (J(), Y("span",
|
|
33304
|
+
e.data.durationMs == null ? Z("", !0) : (J(), Y("span", wR, H(R(e.data.durationMs)), 1)),
|
|
33257
33305
|
X("button", {
|
|
33258
33306
|
class: "view-toggle copy-btn",
|
|
33259
33307
|
title: y.value.copy,
|
|
33260
33308
|
onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
|
|
33261
|
-
}, H(g.value === "res" + i ? "✓" : "📋"), 9,
|
|
33309
|
+
}, H(g.value === "res" + i ? "✓" : "📋"), 9, TR)
|
|
33262
33310
|
]),
|
|
33263
|
-
X("pre",
|
|
33264
|
-
X("div",
|
|
33265
|
-
X("pre",
|
|
33266
|
-
], 2)) : (J(), Y("div",
|
|
33267
|
-
X("div",
|
|
33311
|
+
X("pre", ER, H(ae(t.data.args)), 1),
|
|
33312
|
+
X("div", DR, "↓ " + H(y.value.resultLabel), 1),
|
|
33313
|
+
X("pre", OR, H(e.data.result), 1)
|
|
33314
|
+
], 2)) : (J(), Y("div", kR, [X("div", AR, [Ns(H(e.type === "tool_call" ? "🔧" : "✅") + " " + H(e.data.name) + " ", 1), e.type === "tool_call" ? (J(), Y("span", jR, H(y.value.statusRunning) + "…", 1)) : Z("", !0)]), X("pre", MR, H(e.type === "tool_call" ? ae(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (J(), Y("div", NR, H(e.data.tool ? `[${e.data.tool}] ` : "") + H(e.data.error), 1)) : Z("", !0)]),
|
|
33315
|
+
X("div", PR, [X("button", {
|
|
33268
33316
|
class: "raw-toggle",
|
|
33269
33317
|
onClick: (e) => P(i)
|
|
33270
|
-
}, H(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9,
|
|
33318
|
+
}, H(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, FR), X("button", {
|
|
33271
33319
|
class: "raw-toggle",
|
|
33272
33320
|
onClick: (t) => G(rO)(ae(e.data))
|
|
33273
|
-
}, H(y.value.copy), 9,
|
|
33274
|
-
a.value.has(i) ? (J(), Y("pre",
|
|
33275
|
-
]))), 128))], 512), [[Xc, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (J(), Y("div",
|
|
33276
|
-
X("div",
|
|
33277
|
-
X("div",
|
|
33278
|
-
X("div",
|
|
33279
|
-
X("div",
|
|
33280
|
-
X("div",
|
|
33281
|
-
X("div",
|
|
33282
|
-
X("div",
|
|
33321
|
+
}, H(y.value.copy), 9, IR)]),
|
|
33322
|
+
a.value.has(i) ? (J(), Y("pre", LR, [X("code", null, H(ae(e.data)), 1)])) : Z("", !0)
|
|
33323
|
+
]))), 128))], 512), [[Xc, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (J(), Y("div", RR, [F.value ? (J(), Y(q, { key: 1 }, [
|
|
33324
|
+
X("div", BR, [
|
|
33325
|
+
X("div", VR, H(y.value.debugInfoBasic), 1),
|
|
33326
|
+
X("div", HR, [
|
|
33327
|
+
X("div", UR, [n[6] ||= X("span", { class: "k" }, "ID", -1), X("span", WR, H(F.value.id), 1)]),
|
|
33328
|
+
X("div", GR, [X("span", KR, H(y.value.debugModel), 1), X("span", qR, H(F.value.model || "-"), 1)]),
|
|
33329
|
+
X("div", JR, [X("span", YR, H(y.value.debugToolCount), 1), X("span", XR, H(F.value.tools.length), 1)]),
|
|
33330
|
+
X("div", ZR, [X("span", QR, H(y.value.debugMiddleware), 1), X("span", $R, H(F.value.middleware.length), 1)])
|
|
33283
33331
|
]),
|
|
33284
|
-
X("div",
|
|
33332
|
+
X("div", ez, [X("span", tz, H(y.value.debugMiddlewareStack), 1), X("span", nz, H(F.value.middleware.join(" → ") || "-"), 1)])
|
|
33285
33333
|
]),
|
|
33286
|
-
X("div",
|
|
33334
|
+
X("div", rz, [X("div", iz, "🔧 " + H(y.value.debugToolsLabel) + " (" + H(F.value.tools.length) + ")", 1), (J(!0), Y(q, null, Ca(F.value.tools, (e) => (J(), Y("div", {
|
|
33287
33335
|
key: e.name,
|
|
33288
33336
|
class: "info-item"
|
|
33289
|
-
}, [X("div",
|
|
33337
|
+
}, [X("div", az, [Ns(H(e.name), 1), e.source ? (J(), Y("span", {
|
|
33290
33338
|
key: 0,
|
|
33291
33339
|
class: Je(["src-tag", ge(e.source)])
|
|
33292
|
-
}, H(e.source), 3)) : Z("", !0)]), X("div",
|
|
33293
|
-
F.value.skills.length ? (J(), Y("div",
|
|
33340
|
+
}, H(e.source), 3)) : Z("", !0)]), X("div", oz, H(e.description), 1)]))), 128))]),
|
|
33341
|
+
F.value.skills.length ? (J(), Y("div", sz, [X("div", cz, [Ns("📘 " + H(y.value.debugSkillsTitle) + " (" + H(F.value.skills.length) + ")", 1), X("span", lz, H(y.value.debugSkillsHint), 1)]), (J(!0), Y(q, null, Ca(F.value.skills, (e) => (J(), Y("div", {
|
|
33294
33342
|
key: e.name,
|
|
33295
33343
|
class: "info-item"
|
|
33296
33344
|
}, [
|
|
33297
33345
|
X("div", {
|
|
33298
33346
|
class: "info-name skill-toggle",
|
|
33299
33347
|
onClick: (t) => de(e.name)
|
|
33300
|
-
}, [X("span", { class: Je(["skill-arrow", { open: !!I.value[e.name] }]) }, "▶", 2), Ns(" " + H(e.name), 1)], 8,
|
|
33301
|
-
X("div",
|
|
33302
|
-
I.value[e.name] ? (J(), Y("div",
|
|
33348
|
+
}, [X("span", { class: Je(["skill-arrow", { open: !!I.value[e.name] }]) }, "▶", 2), Ns(" " + H(e.name), 1)], 8, uz),
|
|
33349
|
+
X("div", dz, H(e.description), 1),
|
|
33350
|
+
I.value[e.name] ? (J(), Y("div", fz, [I.value[e.name].loading ? (J(), Y("div", pz, H(y.value.debugLoading), 1)) : I.value[e.name].error ? (J(), Y("div", mz, H(I.value[e.name].error), 1)) : I.value[e.name].content ? (J(), Y("pre", hz, H(I.value[e.name].content), 1)) : Z("", !0)])) : Z("", !0)
|
|
33303
33351
|
]))), 128))])) : Z("", !0),
|
|
33304
|
-
F.value.data ? (J(), Y("div",
|
|
33305
|
-
X("div",
|
|
33306
|
-
X("div",
|
|
33307
|
-
X("div",
|
|
33308
|
-
X("div",
|
|
33309
|
-
X("div",
|
|
33352
|
+
F.value.data ? (J(), Y("div", gz, [X("div", _z, "📊 " + H(y.value.debugDataTitle), 1), X("div", vz, [X("div", yz, H(F.value.data.description || y.value.debugDataFallback), 1), X("div", bz, H(y.value.debugSchemaPrefix) + H(F.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Z("", !0),
|
|
33353
|
+
X("div", xz, [X("div", Sz, "🧬 " + H(y.value.debugSubagentTitle), 1), X("div", Cz, [
|
|
33354
|
+
X("div", wz, [X("span", Tz, H(y.value.debugEnabled), 1), X("span", Ez, H(F.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
33355
|
+
X("div", Dz, [X("span", Oz, H(y.value.debugMaxDepth), 1), X("span", kz, H(F.value.subagent.maxDepth), 1)]),
|
|
33356
|
+
X("div", Az, [X("span", jz, H(y.value.debugMaxParallel), 1), X("span", Mz, H(F.value.subagent.maxParallel), 1)]),
|
|
33357
|
+
X("div", Nz, [X("span", Pz, H(y.value.debugExtraTools), 1), X("span", Fz, H(F.value.subagent.allowedTools.length ? F.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
|
|
33310
33358
|
])]),
|
|
33311
|
-
F.value.mcp?.servers?.length ? (J(), Y("div",
|
|
33359
|
+
F.value.mcp?.servers?.length ? (J(), Y("div", Iz, [X("div", Lz, "🔌 MCP (" + H(F.value.mcp.servers.length) + ")", 1), (J(!0), Y(q, null, Ca(F.value.mcp.servers, (e) => (J(), Y("div", {
|
|
33312
33360
|
key: e.name,
|
|
33313
33361
|
class: "info-item"
|
|
33314
|
-
}, [X("div",
|
|
33315
|
-
F.value.verify ? (J(), Y("div",
|
|
33316
|
-
X("div",
|
|
33317
|
-
X("div",
|
|
33318
|
-
X("div",
|
|
33319
|
-
F.value.verify.adversarial ? (J(), Y("div",
|
|
33362
|
+
}, [X("div", Rz, [Ns(H(e.name) + " ", 1), X("span", zz, H(e.toolCount) + H(y.value.debugToolCountSuffix), 1)]), X("div", Bz, H(e.url), 1)]))), 128))])) : Z("", !0),
|
|
33363
|
+
F.value.verify ? (J(), Y("div", Vz, [X("div", Hz, "✅ " + H(y.value.debugVerifyTitle), 1), X("div", Uz, [
|
|
33364
|
+
X("div", Wz, [X("span", Gz, H(y.value.debugEnabled), 1), X("span", Kz, H(F.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
33365
|
+
X("div", qz, [X("span", Jz, H(y.value.debugMaxAttempts), 1), X("span", Yz, H(F.value.verify.maxAttempts), 1)]),
|
|
33366
|
+
X("div", Xz, [X("span", Zz, H(y.value.debugAdversarial), 1), X("span", Qz, H(F.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
|
|
33367
|
+
F.value.verify.adversarial ? (J(), Y("div", $z, [X("span", eB, H(y.value.debugAdversarialModel), 1), X("span", tB, H(F.value.model || "-") + H(y.value.debugSameAsMain), 1)])) : Z("", !0)
|
|
33320
33368
|
])])) : Z("", !0),
|
|
33321
|
-
F.value.todos.length ? (J(), Y("div",
|
|
33369
|
+
F.value.todos.length ? (J(), Y("div", nB, [X("div", rB, "📋 " + H(y.value.debugTodosTitle) + " (" + H(F.value.todos.length) + ")", 1), (J(!0), Y(q, null, Ca(F.value.todos, (e, t) => (J(), Y("div", {
|
|
33322
33370
|
key: t,
|
|
33323
33371
|
class: "info-todo"
|
|
33324
33372
|
}, [X("span", {
|
|
33325
33373
|
class: "todo-tag",
|
|
33326
33374
|
style: Ue({ background: me.value[e.status] && me.value[e.status].color || "#9ca3af" })
|
|
33327
33375
|
}, H(he(e.status)), 5), X("span", null, H(e.content), 1)]))), 128))])) : Z("", !0),
|
|
33328
|
-
F.value.memory ? (J(), Y("div",
|
|
33329
|
-
F.value.lastCompression ? (J(), Y("div",
|
|
33330
|
-
X("div",
|
|
33331
|
-
X("div",
|
|
33332
|
-
X("div",
|
|
33333
|
-
X("div",
|
|
33334
|
-
X("div",
|
|
33335
|
-
F.value.lastCompression.decision ? (J(), Y("div",
|
|
33376
|
+
F.value.memory ? (J(), Y("div", iB, [X("div", aB, "📝 " + H(y.value.debugMemoryTitle), 1), X("pre", oB, H(F.value.memory), 1)])) : Z("", !0),
|
|
33377
|
+
F.value.lastCompression ? (J(), Y("div", sB, [X("div", cB, "🗜️ " + H(y.value.debugLastCompTitle), 1), X("div", lB, [
|
|
33378
|
+
X("div", uB, [X("span", dB, H(y.value.debugTriggered), 1), X("span", fB, H(F.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
|
|
33379
|
+
X("div", pB, [X("span", mB, H(y.value.debugRoundsSummarized), 1), X("span", hB, H(F.value.lastCompression.roundsSummarized) + " / " + H(F.value.lastCompression.roundsTotal), 1)]),
|
|
33380
|
+
X("div", gB, [X("span", _B, H(y.value.debugCtxRecalled), 1), X("span", vB, H(F.value.lastCompression.roundsRecalled) + H(y.value.debugCountSuffix), 1)]),
|
|
33381
|
+
X("div", yB, [X("span", bB, H(y.value.debugMessageCount), 1), X("span", xB, H(F.value.lastCompression.originalMessages) + " → " + H(F.value.lastCompression.compressedMessages), 1)]),
|
|
33382
|
+
X("div", SB, [X("span", CB, H(y.value.debugStrategy), 1), X("span", wB, H(F.value.lastCompression.strategy), 1)]),
|
|
33383
|
+
F.value.lastCompression.decision ? (J(), Y("div", TB, [X("span", EB, H(y.value.debugDecision), 1), X("span", DB, "🤖 " + H(Se(F.value.lastCompression.decision)), 1)])) : Z("", !0)
|
|
33336
33384
|
])])) : Z("", !0)
|
|
33337
|
-
], 64)) : (J(), Y("div",
|
|
33385
|
+
], 64)) : (J(), Y("div", zR, H(y.value.debugNoInfo), 1))])) : Z("", !0)
|
|
33338
33386
|
], 512)], 512)], 512)
|
|
33339
33387
|
], 2), X("div", {
|
|
33340
33388
|
class: "drawer-mask",
|
|
@@ -33343,7 +33391,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33343
33391
|
_: 1
|
|
33344
33392
|
})]));
|
|
33345
33393
|
}
|
|
33346
|
-
}), [["__scopeId", "data-v-6d9e98b4"]]),
|
|
33394
|
+
}), [["__scopeId", "data-v-6d9e98b4"]]), AB = ["title"], jB = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
33347
33395
|
__name: "SelectionMenu",
|
|
33348
33396
|
emits: ["quote"],
|
|
33349
33397
|
setup(e, { emit: t }) {
|
|
@@ -33429,18 +33477,18 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33429
33477
|
title: G(r).selectionMenuTitle,
|
|
33430
33478
|
onMousedown: t[0] ||= Fl(() => {}, ["prevent"]),
|
|
33431
33479
|
onClick: _
|
|
33432
|
-
}, "❝ " + H(G(r).selectionMenuLabel), 41,
|
|
33480
|
+
}, "❝ " + H(G(r).selectionMenuLabel), 41, AB)], 4), [[Xc, i.value]])]));
|
|
33433
33481
|
}
|
|
33434
|
-
}), [["__scopeId", "data-v-19e6dbb4"]]),
|
|
33482
|
+
}), [["__scopeId", "data-v-19e6dbb4"]]), MB = { class: "skill-panel" }, NB = { class: "skill-header" }, PB = { class: "skill-title" }, FB = ["title"], IB = { class: "skill-section" }, LB = { class: "section-title" }, RB = ["title"], zB = { class: "field" }, BB = { class: "field-label" }, VB = ["disabled", "placeholder"], HB = { class: "field" }, UB = { class: "field-label" }, WB = ["placeholder"], GB = { class: "field field-textarea" }, KB = { class: "field-label" }, qB = ["placeholder"], JB = {
|
|
33435
33483
|
key: 0,
|
|
33436
33484
|
class: "skill-error"
|
|
33437
|
-
},
|
|
33485
|
+
}, YB = { class: "skill-section" }, XB = { class: "section-title" }, ZB = {
|
|
33438
33486
|
key: 0,
|
|
33439
33487
|
class: "empty-hint"
|
|
33440
|
-
},
|
|
33488
|
+
}, QB = {
|
|
33441
33489
|
key: 1,
|
|
33442
33490
|
class: "skill-list"
|
|
33443
|
-
},
|
|
33491
|
+
}, $B = { class: "skill-actions" }, eV = ["title", "onClick"], tV = ["title", "onClick"], nV = { class: "skill-hint" }, rV = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
33444
33492
|
__name: "SkillPanel",
|
|
33445
33493
|
props: {
|
|
33446
33494
|
visible: { type: Boolean },
|
|
@@ -33495,55 +33543,55 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33495
33543
|
key: 0,
|
|
33496
33544
|
class: "skill-mask",
|
|
33497
33545
|
onClick: n[4] ||= Fl((e) => r("close"), ["self"])
|
|
33498
|
-
}, [X("div",
|
|
33499
|
-
X("div",
|
|
33546
|
+
}, [X("div", MB, [
|
|
33547
|
+
X("div", NB, [X("span", PB, H(e.messages.skillPanelTitle), 1), X("button", {
|
|
33500
33548
|
class: "skill-close",
|
|
33501
33549
|
title: e.messages.close,
|
|
33502
33550
|
onClick: n[0] ||= (e) => r("close")
|
|
33503
|
-
}, "✕", 8,
|
|
33504
|
-
X("div",
|
|
33505
|
-
X("div",
|
|
33551
|
+
}, "✕", 8, FB)]),
|
|
33552
|
+
X("div", IB, [
|
|
33553
|
+
X("div", LB, [Ns(H(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (J(), Y("button", {
|
|
33506
33554
|
key: 0,
|
|
33507
33555
|
class: "btn btn-ghost btn-cancel",
|
|
33508
33556
|
title: e.messages.skillCancelEdit,
|
|
33509
33557
|
onClick: h
|
|
33510
|
-
}, H(e.messages.skillCancelEdit), 9,
|
|
33511
|
-
X("label",
|
|
33558
|
+
}, H(e.messages.skillCancelEdit), 9, RB)) : Z("", !0)]),
|
|
33559
|
+
X("label", zB, [X("span", BB, H(e.messages.skillNameLabel), 1), fi(X("input", {
|
|
33512
33560
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
33513
33561
|
disabled: !!u.value,
|
|
33514
33562
|
placeholder: e.messages.skillNamePlaceholder,
|
|
33515
33563
|
class: "field-input"
|
|
33516
|
-
}, null, 8,
|
|
33517
|
-
X("label",
|
|
33564
|
+
}, null, 8, VB), [[Ml, i.value]])]),
|
|
33565
|
+
X("label", HB, [X("span", UB, H(e.messages.skillDescLabel), 1), fi(X("input", {
|
|
33518
33566
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
33519
33567
|
placeholder: e.messages.skillDescPlaceholder,
|
|
33520
33568
|
class: "field-input"
|
|
33521
|
-
}, null, 8,
|
|
33522
|
-
X("label",
|
|
33569
|
+
}, null, 8, WB), [[Ml, a.value]])]),
|
|
33570
|
+
X("label", GB, [X("span", KB, H(e.messages.skillContentLabel), 1), fi(X("textarea", {
|
|
33523
33571
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
33524
33572
|
placeholder: e.messages.skillContentPlaceholder,
|
|
33525
33573
|
rows: "6",
|
|
33526
33574
|
class: "field-input"
|
|
33527
|
-
}, null, 8,
|
|
33528
|
-
s.value ? (J(), Y("div",
|
|
33575
|
+
}, null, 8, qB), [[Ml, o.value]])]),
|
|
33576
|
+
s.value ? (J(), Y("div", JB, H(s.value), 1)) : Z("", !0),
|
|
33529
33577
|
X("button", {
|
|
33530
33578
|
class: "btn btn-primary",
|
|
33531
33579
|
onClick: f
|
|
33532
33580
|
}, H(u.value ? e.messages.skillSave : e.messages.skillAdd), 1)
|
|
33533
33581
|
]),
|
|
33534
|
-
X("div",
|
|
33582
|
+
X("div", YB, [X("div", XB, H(e.messages.skillCreatedTitle) + "(" + H(c.value.length) + ")", 1), c.value.length ? (J(), Y("ul", QB, [(J(!0), Y(q, null, Ca(c.value, (t) => (J(), Y("li", {
|
|
33535
33583
|
key: t,
|
|
33536
33584
|
class: "skill-item"
|
|
33537
|
-
}, [X("span", { class: Je(["skill-name", { active: u.value === t }]) }, H(t), 3), X("span",
|
|
33585
|
+
}, [X("span", { class: Je(["skill-name", { active: u.value === t }]) }, H(t), 3), X("span", $B, [X("button", {
|
|
33538
33586
|
class: "btn btn-ghost btn-edit",
|
|
33539
33587
|
title: e.messages.skillEditTitle,
|
|
33540
33588
|
onClick: (e) => m(t)
|
|
33541
|
-
}, H(e.messages.skillEditBtn), 9,
|
|
33589
|
+
}, H(e.messages.skillEditBtn), 9, eV), X("button", {
|
|
33542
33590
|
class: "btn btn-ghost btn-del",
|
|
33543
33591
|
title: e.messages.skillDeleteTitle,
|
|
33544
33592
|
onClick: (e) => p(t)
|
|
33545
|
-
}, H(e.messages.skillDeleteBtn), 9,
|
|
33546
|
-
X("div",
|
|
33593
|
+
}, H(e.messages.skillDeleteBtn), 9, tV)])]))), 128))])) : (J(), Y("div", ZB, H(e.messages.skillEmpty), 1))]),
|
|
33594
|
+
X("div", nV, [
|
|
33547
33595
|
Ns(" 💡 " + H(e.messages.skillHintA) + " ", 1),
|
|
33548
33596
|
n[5] ||= X("code", null, "load_skill(name)", -1),
|
|
33549
33597
|
Ns(" " + H(e.messages.skillHintB) + " ", 1),
|
|
@@ -33554,7 +33602,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33554
33602
|
_: 1
|
|
33555
33603
|
})]));
|
|
33556
33604
|
}
|
|
33557
|
-
}), [["__scopeId", "data-v-fcd21121"]]),
|
|
33605
|
+
}), [["__scopeId", "data-v-fcd21121"]]), iV = ["aria-valuenow"], aV = "page-agent-sdk:drawerWidth", oV = 320, sV = 960, cV = 420, lV = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
33558
33606
|
__name: "ChatDialog",
|
|
33559
33607
|
props: {
|
|
33560
33608
|
fetchResponse: {},
|
|
@@ -33677,16 +33725,16 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33677
33725
|
function v() {
|
|
33678
33726
|
if (typeof localStorage > "u") return null;
|
|
33679
33727
|
try {
|
|
33680
|
-
let e = Number(localStorage.getItem(
|
|
33681
|
-
return Number.isFinite(e) && e >=
|
|
33728
|
+
let e = Number(localStorage.getItem(aV));
|
|
33729
|
+
return Number.isFinite(e) && e >= oV ? e : null;
|
|
33682
33730
|
} catch {
|
|
33683
33731
|
return null;
|
|
33684
33732
|
}
|
|
33685
33733
|
}
|
|
33686
33734
|
let y = /* @__PURE__ */ W(v()), b = /* @__PURE__ */ W(!1);
|
|
33687
33735
|
function x(e) {
|
|
33688
|
-
let t = typeof window < "u" ? window.innerWidth :
|
|
33689
|
-
return Math.min(Math.max(e,
|
|
33736
|
+
let t = typeof window < "u" ? window.innerWidth : sV, n = Math.max(Math.min(sV, t * .9), oV);
|
|
33737
|
+
return Math.min(Math.max(e, oV), n);
|
|
33690
33738
|
}
|
|
33691
33739
|
let S = mc(() => y.value == null ? typeof n.drawerWidth == "number" ? n.drawerWidth : null : y.value), C = mc(() => {
|
|
33692
33740
|
if (!n.drawer || n.drawerWidth == null) return n.drawer && y.value != null ? `${y.value}px` : null;
|
|
@@ -33716,12 +33764,12 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33716
33764
|
}
|
|
33717
33765
|
function A() {
|
|
33718
33766
|
if (!(y.value == null || typeof localStorage > "u")) try {
|
|
33719
|
-
localStorage.setItem(
|
|
33767
|
+
localStorage.setItem(aV, String(y.value));
|
|
33720
33768
|
} catch {}
|
|
33721
33769
|
}
|
|
33722
33770
|
function ee(e) {
|
|
33723
33771
|
if (!T.value) return;
|
|
33724
|
-
let t = e.shiftKey ? 64 : 16, n = S.value ?? (typeof window < "u" ? Math.min(
|
|
33772
|
+
let t = e.shiftKey ? 64 : 16, n = S.value ?? (typeof window < "u" ? Math.min(cV, window.innerWidth * .9) : cV);
|
|
33725
33773
|
if (e.key === "ArrowLeft") y.value = x(n + t);
|
|
33726
33774
|
else if (e.key === "ArrowRight") y.value = x(n - t);
|
|
33727
33775
|
else return;
|
|
@@ -33754,7 +33802,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33754
33802
|
onPointerup: k,
|
|
33755
33803
|
onPointercancel: k,
|
|
33756
33804
|
onKeydown: ee
|
|
33757
|
-
}, null, 40,
|
|
33805
|
+
}, null, 40, iV)) : Z("", !0),
|
|
33758
33806
|
g("header") ? wa(t.$slots, "header", {
|
|
33759
33807
|
key: 1,
|
|
33760
33808
|
chat: G(i)
|
|
@@ -33838,11 +33886,11 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33838
33886
|
g("approval") ? wa(t.$slots, "approval", {
|
|
33839
33887
|
key: 2,
|
|
33840
33888
|
chat: G(i)
|
|
33841
|
-
}, () => [Os(
|
|
33889
|
+
}, () => [Os(EF)], !0) : Z("", !0),
|
|
33842
33890
|
g("conflict") ? wa(t.$slots, "conflict", {
|
|
33843
33891
|
key: 3,
|
|
33844
33892
|
chat: G(i)
|
|
33845
|
-
}, () => [Os(
|
|
33893
|
+
}, () => [Os(UF, {
|
|
33846
33894
|
"pending-conflict": e.pendingConflict,
|
|
33847
33895
|
"on-resolve": e.onResolveConflict,
|
|
33848
33896
|
icons: G(i).icons,
|
|
@@ -33858,7 +33906,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33858
33906
|
key: 3,
|
|
33859
33907
|
name: "cs-slide"
|
|
33860
33908
|
}, {
|
|
33861
|
-
default: ui(() => [wa(t.$slots, "footer", { chat: G(i) }, () => [Os(
|
|
33909
|
+
default: ui(() => [wa(t.$slots, "footer", { chat: G(i) }, () => [Os(yI, {
|
|
33862
33910
|
placeholder: e.placeholder || G(i).messages.inputPlaceholder,
|
|
33863
33911
|
"input-rows": e.inputRows,
|
|
33864
33912
|
"gate-pending": f.value,
|
|
@@ -33878,7 +33926,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33878
33926
|
g("debug") ? wa(t.$slots, "debug", {
|
|
33879
33927
|
key: 4,
|
|
33880
33928
|
chat: G(i)
|
|
33881
|
-
}, () => [Os(
|
|
33929
|
+
}, () => [Os(kB, {
|
|
33882
33930
|
visible: G(o),
|
|
33883
33931
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ zn(o) ? o.value = e : null,
|
|
33884
33932
|
logs: e.debugLogs,
|
|
@@ -33904,7 +33952,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33904
33952
|
g("skill") ? wa(t.$slots, "skill", {
|
|
33905
33953
|
key: 5,
|
|
33906
33954
|
chat: G(i)
|
|
33907
|
-
}, () => [Os(
|
|
33955
|
+
}, () => [Os(rV, {
|
|
33908
33956
|
visible: G(s),
|
|
33909
33957
|
"on-add-skill": e.onAddSkill,
|
|
33910
33958
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -33921,7 +33969,7 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33921
33969
|
"messages",
|
|
33922
33970
|
"onClose"
|
|
33923
33971
|
])], !0) : Z("", !0),
|
|
33924
|
-
e.selectionMenu ? (J(), xs(
|
|
33972
|
+
e.selectionMenu ? (J(), xs(jB, {
|
|
33925
33973
|
key: 6,
|
|
33926
33974
|
onQuote: n[6] ||= (t) => e.onSelectionQuote?.(t)
|
|
33927
33975
|
})) : Z("", !0)
|
|
@@ -33930,13 +33978,13 @@ var $N = ["innerHTML"], eP = /* @__PURE__ */ Zi({
|
|
|
33930
33978
|
}), [["__scopeId", "data-v-f232f961"]]);
|
|
33931
33979
|
//#endregion
|
|
33932
33980
|
//#region src/core/sdk/mountChatDialog.ts
|
|
33933
|
-
function
|
|
33981
|
+
function uV(e) {
|
|
33934
33982
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = () => {
|
|
33935
33983
|
let e = i.querySelector?.(".chat-dialog"), t = i.querySelector?.(".chat-mask");
|
|
33936
33984
|
e && e.classList.remove("cs-hidden"), t && t.classList.remove("cs-hidden");
|
|
33937
33985
|
}, o = t.agent.debugLogs;
|
|
33938
33986
|
return r = Vl(/* @__PURE__ */ Zi({ setup() {
|
|
33939
|
-
return () => hc(
|
|
33987
|
+
return () => hc(lV, {
|
|
33940
33988
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
33941
33989
|
fetchResponse: e.streaming ? void 0 : (e, n) => t.stream(e, () => {}, n),
|
|
33942
33990
|
title: n.title,
|
|
@@ -34086,7 +34134,7 @@ function lV(e) {
|
|
|
34086
34134
|
}
|
|
34087
34135
|
//#endregion
|
|
34088
34136
|
//#region src/core/sdk/ragSubagent.ts
|
|
34089
|
-
function
|
|
34137
|
+
function dV(e, t, n, r, i) {
|
|
34090
34138
|
let a = [];
|
|
34091
34139
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
34092
34140
|
let o = [];
|
|
@@ -34101,7 +34149,7 @@ function uV(e, t, n, r, i) {
|
|
|
34101
34149
|
|
|
34102
34150
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
34103
34151
|
}
|
|
34104
|
-
function
|
|
34152
|
+
function fV(e, t, n, r, i) {
|
|
34105
34153
|
let a = [], o = [];
|
|
34106
34154
|
return e && (a.push("- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查"), o.push("- 静态文档(组件库文档 / UI 规范):vfs_grep")), t && (a.push(`- ${r}:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用`), o.push(`- 语义相似(「瀑布流组件」「倒计时」「拼团」):${r}`)), n && (a.push(`- ${i}:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档`), o.push(`- 已知文档 id / URL:${i}`)), a.push("- fetch_document:公网 URL —— 查公开资料"), o.push("- 公开 URL(设计规范网站 / 第三方文档):fetch_document"), `# 知识检索策略(RAG)
|
|
34107
34155
|
|
|
@@ -34118,12 +34166,12 @@ ${a.join("\n")}
|
|
|
34118
34166
|
## 何时用何源
|
|
34119
34167
|
${o.join("\n")}`;
|
|
34120
34168
|
}
|
|
34121
|
-
var
|
|
34169
|
+
var pV = {
|
|
34122
34170
|
name: "rag-search",
|
|
34123
34171
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
34124
|
-
getContent: () =>
|
|
34172
|
+
getContent: () => fV(!0, !0, !0, "search_docs", "load_doc")
|
|
34125
34173
|
};
|
|
34126
|
-
function
|
|
34174
|
+
function mV(e, n, r) {
|
|
34127
34175
|
let i = s(async ({ query: e, topK: t }) => {
|
|
34128
34176
|
try {
|
|
34129
34177
|
let i = await n(e, { topK: t ?? r });
|
|
@@ -34141,7 +34189,7 @@ function pV(e, n, r) {
|
|
|
34141
34189
|
});
|
|
34142
34190
|
return Wu([i]), i;
|
|
34143
34191
|
}
|
|
34144
|
-
function
|
|
34192
|
+
function hV(e, n) {
|
|
34145
34193
|
let r = s(async ({ source: e }) => {
|
|
34146
34194
|
try {
|
|
34147
34195
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -34156,19 +34204,19 @@ function mV(e, n) {
|
|
|
34156
34204
|
});
|
|
34157
34205
|
return Wu([r]), r;
|
|
34158
34206
|
}
|
|
34159
|
-
function
|
|
34207
|
+
function gV(e) {
|
|
34160
34208
|
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;
|
|
34161
34209
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
34162
34210
|
let p = [];
|
|
34163
|
-
t && p.push(
|
|
34211
|
+
t && p.push(mV(s, t, o)), n && p.push(hV(c, n)), f && p.push(...f);
|
|
34164
34212
|
let m = r ? [
|
|
34165
34213
|
"vfs_grep",
|
|
34166
34214
|
"vfs_read",
|
|
34167
34215
|
"vfs_json_read"
|
|
34168
|
-
] : void 0, h =
|
|
34216
|
+
] : void 0, h = dV(r, !!t, !!n, s, c), g = {
|
|
34169
34217
|
name: "rag-search",
|
|
34170
|
-
description:
|
|
34171
|
-
getContent: () =>
|
|
34218
|
+
description: pV.description,
|
|
34219
|
+
getContent: () => fV(r, !!t, !!n, s, c)
|
|
34172
34220
|
};
|
|
34173
34221
|
return {
|
|
34174
34222
|
id: i,
|
|
@@ -34183,7 +34231,7 @@ function hV(e) {
|
|
|
34183
34231
|
}
|
|
34184
34232
|
//#endregion
|
|
34185
34233
|
//#region src/core/sdk/evalToolkit.ts
|
|
34186
|
-
function
|
|
34234
|
+
function _V(e = {}) {
|
|
34187
34235
|
let t = e.quietMs ?? 9e4, n = e.confirmSamples ?? 3, r = e.baselineMessageCount ?? 0, i = 0;
|
|
34188
34236
|
return {
|
|
34189
34237
|
push(e) {
|
|
@@ -34194,12 +34242,12 @@ function gV(e = {}) {
|
|
|
34194
34242
|
}
|
|
34195
34243
|
};
|
|
34196
34244
|
}
|
|
34197
|
-
var
|
|
34198
|
-
function
|
|
34245
|
+
var vV = /* @__PURE__ */ new Set(["elapsedSec"]);
|
|
34246
|
+
function yV(e, t, n = {}) {
|
|
34199
34247
|
let r = n.tokenAbs ?? 2e3, i = n.tokenPct ?? 15, a = n.toolCountAbs ?? 3, o = [], s = 0, c = 0, l = 0, u = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
|
|
34200
34248
|
for (let n of u) {
|
|
34201
34249
|
let u = Number(e?.[n] ?? 0), d = Number(t?.[n] ?? 0), f = u - d, p = d > 0 ? Math.round(f / d * 100) : 0, m = "";
|
|
34202
|
-
|
|
34250
|
+
vV.has(n) || (n === "toolCount" ? Math.abs(f) > a : Math.abs(f) > r && Math.abs(p) >= i) && (m = f > 0 ? "up" : "down", m === "up" ? (s++, c++) : l++), o.push({
|
|
34203
34251
|
key: n,
|
|
34204
34252
|
prev: d,
|
|
34205
34253
|
cur: u,
|
|
@@ -34214,7 +34262,7 @@ function vV(e, t, n = {}) {
|
|
|
34214
34262
|
fields: o
|
|
34215
34263
|
};
|
|
34216
34264
|
}
|
|
34217
|
-
function
|
|
34265
|
+
function bV(e) {
|
|
34218
34266
|
let { sdk: t } = e, n = () => {
|
|
34219
34267
|
let e = t.debugLogs.value ?? [], n = e.length ? e[e.length - 1].timestamp : 0;
|
|
34220
34268
|
return {
|
|
@@ -34227,7 +34275,7 @@ function yV(e) {
|
|
|
34227
34275
|
};
|
|
34228
34276
|
return {
|
|
34229
34277
|
async waitForIdle(e = {}) {
|
|
34230
|
-
let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a, ...o } = e, s =
|
|
34278
|
+
let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a, ...o } = e, s = _V(o), c = Date.now();
|
|
34231
34279
|
for (;;) {
|
|
34232
34280
|
let e = n(), o = s.push(e);
|
|
34233
34281
|
if (a?.(e), o === "done") return e;
|
|
@@ -34257,20 +34305,20 @@ function yV(e) {
|
|
|
34257
34305
|
}
|
|
34258
34306
|
//#endregion
|
|
34259
34307
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
34260
|
-
var
|
|
34308
|
+
var xV = { class: "code-preview-modal" }, SV = { class: "preview-header" }, CV = { class: "preview-title" }, wV = { class: "preview-tabs" }, TV = ["disabled"], EV = { class: "preview-actions" }, DV = ["title"], OV = {
|
|
34261
34309
|
key: 0,
|
|
34262
34310
|
viewBox: "0 0 16 16",
|
|
34263
34311
|
fill: "none",
|
|
34264
34312
|
"aria-hidden": "true"
|
|
34265
|
-
},
|
|
34313
|
+
}, kV = {
|
|
34266
34314
|
key: 1,
|
|
34267
34315
|
viewBox: "0 0 16 16",
|
|
34268
34316
|
fill: "none",
|
|
34269
34317
|
"aria-hidden": "true"
|
|
34270
|
-
},
|
|
34318
|
+
}, AV = ["title"], jV = ["title"], MV = { class: "preview-body" }, NV = ["srcdoc"], PV = {
|
|
34271
34319
|
key: 1,
|
|
34272
34320
|
class: "preview-source"
|
|
34273
|
-
},
|
|
34321
|
+
}, FV = /*#__PURE__*/ qk(/* @__PURE__ */ Zi({
|
|
34274
34322
|
__name: "CodePreview",
|
|
34275
34323
|
props: {
|
|
34276
34324
|
code: {},
|
|
@@ -34337,28 +34385,28 @@ app.mount('#app');
|
|
|
34337
34385
|
return (t, n) => (J(), Y("div", {
|
|
34338
34386
|
class: "code-preview-overlay",
|
|
34339
34387
|
onClick: n[3] ||= Fl((e) => r("close"), ["self"])
|
|
34340
|
-
}, [X("div",
|
|
34341
|
-
X("span",
|
|
34342
|
-
X("div",
|
|
34388
|
+
}, [X("div", xV, [X("div", SV, [
|
|
34389
|
+
X("span", CV, H(e.messages.codePreviewTitlePrefix) + H(e.lang), 1),
|
|
34390
|
+
X("div", wV, [X("button", {
|
|
34343
34391
|
class: Je({ active: a.value === "preview" }),
|
|
34344
34392
|
disabled: !s.value,
|
|
34345
34393
|
onClick: n[0] ||= (e) => a.value = "preview"
|
|
34346
|
-
}, H(e.messages.codePreviewTab), 11,
|
|
34394
|
+
}, H(e.messages.codePreviewTab), 11, TV), X("button", {
|
|
34347
34395
|
class: Je({ active: a.value === "source" }),
|
|
34348
34396
|
onClick: n[1] ||= (e) => a.value = "source"
|
|
34349
34397
|
}, H(e.messages.codeSourceTab), 3)]),
|
|
34350
|
-
X("div",
|
|
34398
|
+
X("div", EV, [
|
|
34351
34399
|
X("button", {
|
|
34352
34400
|
class: Je(["icon-btn", { done: o.value }]),
|
|
34353
34401
|
title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
|
|
34354
34402
|
onClick: u
|
|
34355
|
-
}, [o.value ? (J(), Y("svg",
|
|
34403
|
+
}, [o.value ? (J(), Y("svg", OV, [...n[4] ||= [X("path", {
|
|
34356
34404
|
d: "M3 8.5l3 3 7-7",
|
|
34357
34405
|
stroke: "currentColor",
|
|
34358
34406
|
"stroke-width": "1.6",
|
|
34359
34407
|
"stroke-linecap": "round",
|
|
34360
34408
|
"stroke-linejoin": "round"
|
|
34361
|
-
}, null, -1)]])) : (J(), Y("svg",
|
|
34409
|
+
}, null, -1)]])) : (J(), Y("svg", kV, [...n[5] ||= [X("rect", {
|
|
34362
34410
|
x: "5.5",
|
|
34363
34411
|
y: "5.5",
|
|
34364
34412
|
width: "8",
|
|
@@ -34370,7 +34418,7 @@ app.mount('#app');
|
|
|
34370
34418
|
d: "M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3.5A1.5 1.5 0 0 0 2 3v5.5A1.5 1.5 0 0 0 3.5 10H4",
|
|
34371
34419
|
stroke: "currentColor",
|
|
34372
34420
|
"stroke-width": "1.3"
|
|
34373
|
-
}, null, -1)]]))], 10,
|
|
34421
|
+
}, null, -1)]]))], 10, DV),
|
|
34374
34422
|
X("button", {
|
|
34375
34423
|
class: "icon-btn",
|
|
34376
34424
|
title: e.messages.codeOpenTitle,
|
|
@@ -34390,7 +34438,7 @@ app.mount('#app');
|
|
|
34390
34438
|
"stroke-width": "1.3",
|
|
34391
34439
|
"stroke-linecap": "round",
|
|
34392
34440
|
"stroke-linejoin": "round"
|
|
34393
|
-
})], -1)]], 8,
|
|
34441
|
+
})], -1)]], 8, AV),
|
|
34394
34442
|
X("button", {
|
|
34395
34443
|
class: "icon-btn",
|
|
34396
34444
|
title: e.messages.close,
|
|
@@ -34404,22 +34452,22 @@ app.mount('#app');
|
|
|
34404
34452
|
stroke: "currentColor",
|
|
34405
34453
|
"stroke-width": "1.4",
|
|
34406
34454
|
"stroke-linecap": "round"
|
|
34407
|
-
})], -1)]], 8,
|
|
34455
|
+
})], -1)]], 8, jV)
|
|
34408
34456
|
])
|
|
34409
|
-
]), X("div",
|
|
34457
|
+
]), X("div", MV, [a.value === "preview" && s.value ? (J(), Y("iframe", {
|
|
34410
34458
|
key: 0,
|
|
34411
34459
|
ref_key: "iframeRef",
|
|
34412
34460
|
ref: i,
|
|
34413
34461
|
class: "preview-iframe",
|
|
34414
34462
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
34415
34463
|
srcdoc: c.value
|
|
34416
|
-
}, null, 8,
|
|
34464
|
+
}, null, 8, NV)) : (J(), Y("pre", PV, [X("code", null, H(e.code), 1)]))])])]));
|
|
34417
34465
|
}
|
|
34418
34466
|
}), [["__scopeId", "data-v-27eac25e"]]);
|
|
34419
34467
|
//#endregion
|
|
34420
34468
|
//#region src/core/index.ts
|
|
34421
|
-
function
|
|
34422
|
-
return JC(e,
|
|
34469
|
+
function IV(e) {
|
|
34470
|
+
return JC(e, uV);
|
|
34423
34471
|
}
|
|
34424
34472
|
//#endregion
|
|
34425
|
-
export {
|
|
34473
|
+
export { EF as ApprovalBar, hb as CAPABILITIES, vb as CONTEXT_PRESETS, lV as ChatDialog, wA as ChatHeader, yI as ChatInput, FV as CodePreview, xy as CompressDecisionSchema, UF as ConflictBar, qS as DEFAULT_COMPUTED_STYLES, iO as DEFAULT_DIALOG_ICONS, Eh as DEFAULT_PROMPT_SOFT_CAP, r_ as DEFAULT_SYSTEM_PROMPT, i_ as DEFAULT_SYSTEM_PROMPT_EN, kB as DebugDrawer, FA as FocusBar, HN as HLJS_BLOCK_MAX_CHARS, uv as HTML_VOID_TAGS, gg as HUMAN_CONFIRM_TOOL_NAME, Jk as IconGlyph, nu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, sO as MESSAGES_EN_US, oO as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, sd as MODEL_UNAVAILABLE_GUIDANCE, eP as MessageContent, UP as MessageList, NP as MessageRow, $P as QueuedBar, Th as SOFT_CAP_MIN_WINDOW, _h as STOP_WORDS, rV as SkillPanel, _m as UNSAFE_KEYS, yC as actionsToInspectInfo, vC as actionsToTools, Ql as agentError, Yg as analyzeContext, jm as applyPatchToClone, Pm as applyPatchToLive, Q_ as applyPatchesToBind, ES as applyProposalOps, Ip as arrayMinLength, Zl as asAgentError, ty as buildCollectorJs, QS as buildCssPath, d_ as buildDataPrompt, qv as buildDiagnosticsReport, dy as buildHtmlFragmentSkill, ny as buildSandboxSrcdoc, f_ as buildSystemPrompt, Iu as captureSelectionQuote, uO as chatContextKey, Z_ as commitSetToBind, cy as composeStructureThenRender, pu as compressImage, t_ as connectMcp, P as constructLlmFromConfig, ne as constructOpenLlmSync, rO as copyText, TS as countOccurrences, wp as createAgent, hg as createApprovalMiddleware, dO as createChatContext, IV as createChatSdk, Dg as createCheckpointManager, Og as createCheckpointMiddleware, Iy as createConflictManager, Xg as createContextInspectorMiddleware, hy as createCraftNoteCheck, lv as createDataOps, bV as createEvalHarness, py as createHtmlFormatCheck, sy as createHtmlRenderCheck, _y as createHtmlSubagent, yg as createHumanConfirmMiddleware, vg as createHumanConfirmTool, _V as createIdleDetector, ib as createMemoryBackend, cg as createMemoryMiddleware, y as createProxyLlm, gV as createRagSubagent, pd as createSandboxRunner, _b as createSdkEvents, BC as createSerialRunner, cb as createSessionStore, lb as createSessionStoreWithBackend, IC as createSkillStore, $h as createSubagentMiddleware, Nh as createSubagentTracker, ng as createSubagentsMiddleware, OC as createUsageHintsMiddleware, Ag as createVerifyMiddleware, g_ as createVfs, ob as createWebStorageBackend, Ig as createWriteBackCheck, cd as decorateModelUnavailable, Sm as deepClone, SC as defineDataToolset, qm as defineSkill, vy as defineTool, xm as deleteByPath, Sy as deriveTitle, Xp as describeSchemaNode, sp as detectGarbledToolCall, _f as detectTransitionalReply, Rm as diffObjects, yV as diffReport, rC as domInfoTool, cC as domInspectSkill, nC as domSearchTool, LS as domToStructure, KS as domTools, xC as domToolsStatic, Lp as elementSchemaCandidates, XS as ensureDomListenerRecorder, yh as estimateMessageTokens, Sh as estimateRoundTokens, O as estimateTokens, ae as extractReasoningDelta, lm as extractSchemaHint, Zg as extractText, ie as extractTextDelta, oe as extractUsage, NS as fetchDocTools, bC as fetchTools, Lm as findStrippedKeys, Zp as formatConstraints, ql as formatZodIssues, $ as getByPath, RS as getDomTool, tC as getElementInfo, dC as getEnvSummary, ZS as getRecordedListeners, ay as getSandboxLifecycle, Op as getSchemaAtPath, Tp as getSchemaTopKeys, DS as hashContent, km as hashValue, fy as htmlFragmentSkill, im as htmlOrchestratorPrompt, Ch as indexSummarize, mC as inspectEnvTool, hC as inspectTools, wy as isChatModel, ad as isContextLengthError, Ik as isIconHtml, od as isModelUnavailableError, Ep as isPathAllowed, Xy as isQuotaError, vm as isUnsafePath, Cd as jpEval, Yl as jsonParseError, Em as limitDepth, CS as lineDiff, E as lowCapsHint, JN as markedToHtml, Gv as maskUrlCredentials, wm as maybeParseValue, zv as measureWriteScale, Nm as moveByPath, M as normalizeBaseUrl, ey as normalizeRenderResult, ce as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, rm as presets, Wp as projectBySchema, Up as projectBySchemaDeep, Tm as projectFields, wh as recallRounds, oy as renderInSandbox, YN as renderMarkdownHtml, Qp as renderSchemaHint, $p as renderSchemaOverview, nm as renderSchemaShallow, gb as resolveCapabilities, bb as resolveContextOptions, fb as resolveDialogConfig, aO as resolveDialogIcons, lO as resolveDialogMessages, Fy as resolveLlm, D as resolveModelCaps, Oh as resolvePromptSoftCap, Np as resolveSchemaPath, db as resolveStorage, Im as restoreInPlace, Fm as restoreLive, Xl as routeError, Dd as runSandboxedScript, ym as safeMerge, uC as safeSerialize, Dm as safeStringify, cp as sanitizeGarbledContent, Bk as sanitizeIconHtml, Uk as sanitizeMessageHtml, Fp as schemaHasRefinement, $S as searchDom, Td as searchJson, CC as selectBuiltinTools, bm as setByPath, kh as shouldTriggerCompression, Jv as stringifyDiagnosticsReport, te as stripStainlessFetch, am as systemPromptHelpers, w as tableMaxOutputTokens, vh as tokenize, Q as toolError, Dp as unwrapSchema, nO as useChat, fO as useChatContext, Pp as validateAtPath, fv as validateHtmlFormat, Y_ as validateRootValueLocally, X_ as validateWriteLocally, Am as watchFieldsHash, e as z, Jl as zodError };
|