page-agent-sdk 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/page-agent-sdk.headless.js +5 -3
- package/dist/page-agent-sdk.iife.js +20 -20
- package/dist/page-agent-sdk.js +671 -665
- package/dist/page-agent-sdk.legacy.js +568 -561
- package/dist/page-agent-sdk.umd.cjs +33 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
package/dist/page-agent-sdk.js
CHANGED
|
@@ -20,7 +20,7 @@ function v(e) {
|
|
|
20
20
|
return !!(e == null || typeof e == "string" || e instanceof ArrayBuffer || ArrayBuffer.isView(e) || typeof Blob < "u" && e instanceof Blob || e instanceof URLSearchParams || e instanceof FormData);
|
|
21
21
|
}
|
|
22
22
|
function y(e) {
|
|
23
|
-
let t = e.model || "
|
|
23
|
+
let t = e.model || "deepseek-v4-flash", r = e.temperature, i = e.maxTokens, a = e.baseUrl;
|
|
24
24
|
if (e.mode === "direct") {
|
|
25
25
|
let o = !1;
|
|
26
26
|
try {
|
|
@@ -5996,7 +5996,7 @@ function yf(e) {
|
|
|
5996
5996
|
return Array.isArray(r) && r.length && r[0] && typeof r[0].jsonPath == "string" ? r[0].jsonPath : "";
|
|
5997
5997
|
}
|
|
5998
5998
|
function bf(e) {
|
|
5999
|
-
let { apiKey: t, baseUrl: r, model: c = "
|
|
5999
|
+
let { apiKey: t, baseUrl: r, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = Eu, streamMaxMs: x = Ou, toolTimeoutMs: S, maxParallelTools: D = 1, maxVerifyAttempts: ee = 0, roundTokenBudget: te = 0, onLog: A, onLlmChange: ne, imageContentFormat: re = "openai", staleReadInvalidation: ie = !0, debug: P = !1 } = e, F = g ?? ff;
|
|
6000
6000
|
(!Number.isFinite(F) || F < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${F} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), F = 1);
|
|
6001
6001
|
let I = C({
|
|
6002
6002
|
model: c,
|
|
@@ -7636,6 +7636,7 @@ function Wp(e) {
|
|
|
7636
7636
|
"## 当前精修目标",
|
|
7637
7637
|
t.map((e) => `· ${e.path}${e.label ? `(${e.label})` : ""}`).join("\n"),
|
|
7638
7638
|
`仅操作上述 ${t.length} 个聚焦子树${t.length > 1 ? "之一" : ""},用户未指明目标的指令默认作用于聚焦组件(「增加/修改/删除 X」类指令优先理解为对聚焦组件本身的改动 —— 如为其加页签/子项,写焦点路径的子路径;仅用户明确要求新建独立组件时才需解除焦点);不要改动其他组件;${a}`,
|
|
7639
|
+
"用户用指示代词提问(「这是啥/这个/它是干什么的」等)时,所指默认是聚焦目标 —— 先 read 聚焦子树,再围绕聚焦组件回答,勿泛答整页",
|
|
7639
7640
|
"read 不带路径时默认只返回聚焦子树;需要全量主数据时显式列顶层键(read({jsonPaths:[...]}) )"
|
|
7640
7641
|
], r = e.getSchema();
|
|
7641
7642
|
if (r) {
|
|
@@ -17522,6 +17523,7 @@ function nw(e = {}) {
|
|
|
17522
17523
|
content: "",
|
|
17523
17524
|
timestamp: Date.now(),
|
|
17524
17525
|
reasoning: "",
|
|
17526
|
+
reasoningTotal: 0,
|
|
17525
17527
|
steps: []
|
|
17526
17528
|
}), r = !1;
|
|
17527
17529
|
s.messages.push(t);
|
|
@@ -17532,7 +17534,7 @@ function nw(e = {}) {
|
|
|
17532
17534
|
e.round > 1 && (t.content || t.reasoning) && (r = !0);
|
|
17533
17535
|
break;
|
|
17534
17536
|
case "reasoning":
|
|
17535
|
-
r &&= (t.reasoning += "\n", !1), t.reasoning = (t.reasoning + e.delta).slice(-4e3);
|
|
17537
|
+
r &&= (t.reasoning += "\n", !1), t.reasoningTotal += e.delta.length, t.reasoning = (t.reasoning + e.delta).slice(-4e3);
|
|
17536
17538
|
break;
|
|
17537
17539
|
case "text":
|
|
17538
17540
|
r &&= (t.content += "\n", !1), t.content += e.delta;
|
|
@@ -19501,12 +19503,13 @@ var WT = ["innerHTML"], GT = {
|
|
|
19501
19503
|
running: {
|
|
19502
19504
|
type: Boolean,
|
|
19503
19505
|
default: !1
|
|
19504
|
-
}
|
|
19506
|
+
},
|
|
19507
|
+
total: { default: void 0 }
|
|
19505
19508
|
},
|
|
19506
19509
|
emits: ["toggle"],
|
|
19507
19510
|
setup(e) {
|
|
19508
19511
|
let t = e, n = sc(() => {
|
|
19509
|
-
let e = t.text.length;
|
|
19512
|
+
let e = t.total ?? t.text.length;
|
|
19510
19513
|
if (e < 1e3) return String(e);
|
|
19511
19514
|
let n = e / 1e3;
|
|
19512
19515
|
return `${n >= 100 ? Math.round(n) : +n.toFixed(1)}k`;
|
|
@@ -19524,10 +19527,10 @@ var WT = ["innerHTML"], GT = {
|
|
|
19524
19527
|
Z("span", IE, W(e.expanded ? "收起" : "展开"), 1)
|
|
19525
19528
|
]), e.expanded ? (Y(), X("div", LE, W(e.text), 1)) : Q("", !0)], 2)) : Q("", !0);
|
|
19526
19529
|
}
|
|
19527
|
-
}), [["__scopeId", "data-v-
|
|
19530
|
+
}), [["__scopeId", "data-v-7ff8ea75"]]), zE = ["open"], BE = { class: "sub-reason-head" }, VE = {
|
|
19528
19531
|
key: 0,
|
|
19529
19532
|
class: "sub-reason-trunc"
|
|
19530
|
-
}, HE = ["title"],
|
|
19533
|
+
}, HE = { class: "sub-reason-toggle" }, UE = ["title"], WE = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
19531
19534
|
__name: "SubReasonDetails",
|
|
19532
19535
|
props: {
|
|
19533
19536
|
subReason: {},
|
|
@@ -19561,52 +19564,53 @@ var WT = ["innerHTML"], GT = {
|
|
|
19561
19564
|
Z("span", { class: Be(["status-dot sm", e.status === "running" ? "running" : "ok"]) }, null, 2),
|
|
19562
19565
|
Z("span", { class: Be(["sub-reason-label", { pulsing: e.status === "running" }]) }, W(e.status === "running" ? `${e.messages.thinkingCountPrefix}${a.value}${e.messages.charCountSuffix}` : e.messages.reasoningTitle), 3),
|
|
19563
19566
|
o.value ? (Y(), X("span", VE, W(e.messages.truncatedNotePrefix) + W(e.subReason.length) + W(e.messages.truncatedNoteSuffix), 1)) : Q("", !0),
|
|
19567
|
+
Z("span", HE, W(r.value ? e.messages.collapse : e.messages.expand), 1),
|
|
19564
19568
|
Z("button", {
|
|
19565
19569
|
type: "button",
|
|
19566
19570
|
class: Be(["sub-reason-copy", { copied: s.value }]),
|
|
19567
19571
|
title: o.value ? e.messages.copyThinkingTruncTitle : e.messages.copyThinking,
|
|
19568
19572
|
onClick: Ol(c, ["stop", "prevent"])
|
|
19569
|
-
}, W(s.value ? e.messages.copied : e.messages.copy), 11,
|
|
19573
|
+
}, W(s.value ? e.messages.copied : e.messages.copy), 11, UE)
|
|
19570
19574
|
]), Z("div", {
|
|
19571
19575
|
ref_key: "bodyRef",
|
|
19572
19576
|
ref: n,
|
|
19573
19577
|
class: "sub-reason-body"
|
|
19574
19578
|
}, W(o.value ? "…(前面已截断)\n" : "") + W(e.subReason), 513)], 40, zE));
|
|
19575
19579
|
}
|
|
19576
|
-
}), [["__scopeId", "data-v-
|
|
19580
|
+
}), [["__scopeId", "data-v-ee8bc184"]]), GE = {
|
|
19577
19581
|
key: 0,
|
|
19578
19582
|
class: "steps-block"
|
|
19579
|
-
},
|
|
19583
|
+
}, KE = { class: "step-head" }, qE = { class: "step-name" }, JE = ["title"], YE = {
|
|
19580
19584
|
key: 1,
|
|
19581
19585
|
class: "step-count"
|
|
19582
|
-
},
|
|
19586
|
+
}, XE = {
|
|
19583
19587
|
key: 2,
|
|
19584
19588
|
class: "step-duration"
|
|
19585
|
-
},
|
|
19589
|
+
}, ZE = ["onClick"], QE = {
|
|
19586
19590
|
key: 0,
|
|
19587
19591
|
class: "step-detail"
|
|
19588
|
-
},
|
|
19592
|
+
}, $E = {
|
|
19589
19593
|
key: 0,
|
|
19590
19594
|
class: "step-detail-call-label"
|
|
19591
|
-
},
|
|
19595
|
+
}, eD = {
|
|
19592
19596
|
key: 1,
|
|
19593
19597
|
class: "step-detail-section"
|
|
19594
|
-
},
|
|
19598
|
+
}, tD = { class: "step-detail-head" }, nD = ["onClick"], rD = { class: "step-detail-pre" }, iD = {
|
|
19595
19599
|
key: 2,
|
|
19596
19600
|
class: "step-detail-section"
|
|
19597
|
-
},
|
|
19601
|
+
}, aD = { class: "step-detail-head" }, oD = ["onClick"], sD = {
|
|
19598
19602
|
key: 3,
|
|
19599
19603
|
class: "step-detail-empty"
|
|
19600
|
-
},
|
|
19604
|
+
}, cD = {
|
|
19601
19605
|
key: 2,
|
|
19602
19606
|
class: "step-children"
|
|
19603
|
-
},
|
|
19607
|
+
}, lD = { class: "step-children-label" }, uD = { class: "step-name" }, dD = {
|
|
19604
19608
|
key: 0,
|
|
19605
19609
|
class: "step-count"
|
|
19606
|
-
},
|
|
19610
|
+
}, fD = {
|
|
19607
19611
|
key: 1,
|
|
19608
19612
|
class: "step-status running"
|
|
19609
|
-
},
|
|
19613
|
+
}, pD = 2e3, mD = 4e3, hD = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
19610
19614
|
__name: "MessageSteps",
|
|
19611
19615
|
props: {
|
|
19612
19616
|
steps: {},
|
|
@@ -19685,8 +19689,8 @@ var WT = ["innerHTML"], GT = {
|
|
|
19685
19689
|
} catch {
|
|
19686
19690
|
n = String(e);
|
|
19687
19691
|
}
|
|
19688
|
-
return n.length >
|
|
19689
|
-
text: n.slice(0,
|
|
19692
|
+
return n.length > pD ? {
|
|
19693
|
+
text: n.slice(0, pD) + t.messages.displayTruncatedSuffix,
|
|
19690
19694
|
truncated: !0
|
|
19691
19695
|
} : {
|
|
19692
19696
|
text: n,
|
|
@@ -19706,8 +19710,8 @@ var WT = ["innerHTML"], GT = {
|
|
|
19706
19710
|
truncated: !1
|
|
19707
19711
|
};
|
|
19708
19712
|
let n = m(e);
|
|
19709
|
-
return n.length >
|
|
19710
|
-
text: n.slice(0,
|
|
19713
|
+
return n.length > mD ? {
|
|
19714
|
+
text: n.slice(0, mD) + t.messages.displayTruncatedSuffix,
|
|
19711
19715
|
truncated: !0
|
|
19712
19716
|
} : {
|
|
19713
19717
|
text: n,
|
|
@@ -19727,45 +19731,45 @@ var WT = ["innerHTML"], GT = {
|
|
|
19727
19731
|
}
|
|
19728
19732
|
rw(e);
|
|
19729
19733
|
}
|
|
19730
|
-
return (t, s) => e.steps.length ? (Y(), X("div",
|
|
19734
|
+
return (t, s) => e.steps.length ? (Y(), X("div", GE, [(Y(!0), X(J, null, ga(i.value, (t, i) => (Y(), X("div", {
|
|
19731
19735
|
key: i,
|
|
19732
19736
|
class: Be(["step-item", t.status])
|
|
19733
19737
|
}, [
|
|
19734
|
-
Z("div",
|
|
19738
|
+
Z("div", KE, [
|
|
19735
19739
|
Z("span", { class: Be(["status-dot", t.status]) }, null, 2),
|
|
19736
|
-
Z("span",
|
|
19740
|
+
Z("span", qE, W(t.name), 1),
|
|
19737
19741
|
a(t.name) ? (Y(), X("span", {
|
|
19738
19742
|
key: 0,
|
|
19739
19743
|
class: "subagent-badge",
|
|
19740
19744
|
title: e.messages.subagentBadgeTitle
|
|
19741
|
-
}, [xs(JT, { icon: e.icons.subagent }, null, 8, ["icon"]), Es(" " + W(e.messages.subagentBadge), 1)], 8,
|
|
19742
|
-
t.count > 1 ? (Y(), X("span",
|
|
19745
|
+
}, [xs(JT, { icon: e.icons.subagent }, null, 8, ["icon"]), Es(" " + W(e.messages.subagentBadge), 1)], 8, JE)) : Q("", !0),
|
|
19746
|
+
t.count > 1 ? (Y(), X("span", YE, "×" + W(t.count), 1)) : Q("", !0),
|
|
19743
19747
|
Z("span", { class: Be(["step-status", t.status]) }, [xs(XT, { text: n(t.status) }, null, 8, ["text"])], 2),
|
|
19744
|
-
t.durationMs != null && t.status !== "running" ? (Y(), X("span",
|
|
19748
|
+
t.durationMs != null && t.status !== "running" ? (Y(), X("span", XE, W(o(t.durationMs)), 1)) : Q("", !0),
|
|
19745
19749
|
f(t.calls) ? (Y(), X("button", {
|
|
19746
19750
|
key: 3,
|
|
19747
19751
|
type: "button",
|
|
19748
19752
|
class: Be(["step-detail-toggle", { open: u.has(i) }]),
|
|
19749
19753
|
onClick: (e) => d(i)
|
|
19750
|
-
}, W(u.has(i) ? e.messages.collapse : e.messages.expand), 11,
|
|
19754
|
+
}, W(u.has(i) ? e.messages.collapse : e.messages.expand), 11, ZE)) : Q("", !0)
|
|
19751
19755
|
]),
|
|
19752
|
-
u.has(i) && t.calls?.length ? (Y(), X("div",
|
|
19756
|
+
u.has(i) && t.calls?.length ? (Y(), X("div", QE, [(Y(!0), X(J, null, ga(t.calls, (n, r) => (Y(), X("div", {
|
|
19753
19757
|
key: r,
|
|
19754
19758
|
class: "step-detail-call"
|
|
19755
19759
|
}, [
|
|
19756
|
-
t.count > 1 ? (Y(), X("div",
|
|
19757
|
-
p(n.args).text ? (Y(), X("div",
|
|
19760
|
+
t.count > 1 ? (Y(), X("div", $E, W(e.messages.nthCallPrefix) + W(r + 1) + W(e.messages.nthCallSuffix), 1)) : Q("", !0),
|
|
19761
|
+
p(n.args).text ? (Y(), X("div", eD, [Z("div", tD, [Es(W(e.messages.argsLabel), 1), Z("button", {
|
|
19758
19762
|
type: "button",
|
|
19759
19763
|
class: "step-detail-copy",
|
|
19760
19764
|
onClick: (e) => g(p(n.args).text, p(n.args).truncated, n.args)
|
|
19761
|
-
}, W(e.messages.copy), 9,
|
|
19762
|
-
n.status !== "running" && h(n.result).text ? (Y(), X("div",
|
|
19765
|
+
}, W(e.messages.copy), 9, nD)]), Z("pre", rD, W(p(n.args).text), 1)])) : Q("", !0),
|
|
19766
|
+
n.status !== "running" && h(n.result).text ? (Y(), X("div", iD, [Z("div", aD, [Es(W(e.messages.resultLabel), 1), Z("button", {
|
|
19763
19767
|
type: "button",
|
|
19764
19768
|
class: "step-detail-copy",
|
|
19765
19769
|
onClick: (e) => g(h(n.result).text, h(n.result).truncated, n.result)
|
|
19766
|
-
}, W(e.messages.copy), 9,
|
|
19770
|
+
}, W(e.messages.copy), 9, oD)]), Z("pre", { class: Be(["step-detail-pre", { err: n.status === "error" }]) }, W(h(n.result).text), 3)])) : n.status !== "running" && !h(n.result).text ? (Y(), X("div", sD, W(e.messages.noResult), 1)) : Q("", !0)
|
|
19767
19771
|
]))), 128))])) : Q("", !0),
|
|
19768
|
-
t.subReason ? (Y(), ms(
|
|
19772
|
+
t.subReason ? (Y(), ms(WE, {
|
|
19769
19773
|
key: 1,
|
|
19770
19774
|
"sub-reason": t.subReason,
|
|
19771
19775
|
"sub-reason-full": t.subReasonFull,
|
|
@@ -19777,21 +19781,21 @@ var WT = ["innerHTML"], GT = {
|
|
|
19777
19781
|
"status",
|
|
19778
19782
|
"messages"
|
|
19779
19783
|
])) : Q("", !0),
|
|
19780
|
-
t.children && t.children.length ? (Y(), X("div",
|
|
19784
|
+
t.children && t.children.length ? (Y(), X("div", cD, [Z("div", lD, [xs(JT, { icon: e.icons.subagentProgress }, null, 8, ["icon"]), Es(" " + W(e.messages.subagentProgress), 1)]), (Y(!0), X(J, null, ga(r(t.children), (e, t) => (Y(), X("div", {
|
|
19781
19785
|
key: t,
|
|
19782
19786
|
class: Be(["step-child", e.status])
|
|
19783
19787
|
}, [
|
|
19784
19788
|
Z("span", { class: Be(["status-dot sm", e.status]) }, null, 2),
|
|
19785
|
-
Z("span",
|
|
19786
|
-
e.count > 1 ? (Y(), X("span",
|
|
19787
|
-
e.status === "running" ? (Y(), X("span",
|
|
19789
|
+
Z("span", uD, W(e.name), 1),
|
|
19790
|
+
e.count > 1 ? (Y(), X("span", dD, "×" + W(e.count), 1)) : Q("", !0),
|
|
19791
|
+
e.status === "running" ? (Y(), X("span", fD, "…")) : Q("", !0)
|
|
19788
19792
|
], 2))), 128))])) : Q("", !0)
|
|
19789
19793
|
], 2))), 128))])) : Q("", !0);
|
|
19790
19794
|
}
|
|
19791
19795
|
}), [["__scopeId", "data-v-09c0a586"]]);
|
|
19792
19796
|
//#endregion
|
|
19793
19797
|
//#region node_modules/marked/lib/marked.esm.js
|
|
19794
|
-
function
|
|
19798
|
+
function gD() {
|
|
19795
19799
|
return {
|
|
19796
19800
|
async: !1,
|
|
19797
19801
|
breaks: !1,
|
|
@@ -19805,35 +19809,35 @@ function hD() {
|
|
|
19805
19809
|
walkTokens: null
|
|
19806
19810
|
};
|
|
19807
19811
|
}
|
|
19808
|
-
var
|
|
19809
|
-
function
|
|
19810
|
-
|
|
19812
|
+
var _D = gD();
|
|
19813
|
+
function vD(e) {
|
|
19814
|
+
_D = e;
|
|
19811
19815
|
}
|
|
19812
|
-
var
|
|
19813
|
-
function
|
|
19816
|
+
var yD = { exec: () => null };
|
|
19817
|
+
function bD(e) {
|
|
19814
19818
|
let t = [];
|
|
19815
19819
|
return (n) => {
|
|
19816
19820
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
19817
19821
|
return i || (i = e(r), t[r] = i), i;
|
|
19818
19822
|
};
|
|
19819
19823
|
}
|
|
19820
|
-
function
|
|
19824
|
+
function xD(e, t = "") {
|
|
19821
19825
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
19822
19826
|
replace: (e, t) => {
|
|
19823
19827
|
let i = typeof t == "string" ? t : t.source;
|
|
19824
|
-
return i = i.replace(
|
|
19828
|
+
return i = i.replace(CD.caret, "$1"), n = n.replace(e, i), r;
|
|
19825
19829
|
},
|
|
19826
19830
|
getRegex: () => new RegExp(n, t)
|
|
19827
19831
|
};
|
|
19828
19832
|
return r;
|
|
19829
19833
|
}
|
|
19830
|
-
var
|
|
19834
|
+
var SD = ((e = "") => {
|
|
19831
19835
|
try {
|
|
19832
19836
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
19833
19837
|
} catch {
|
|
19834
19838
|
return !1;
|
|
19835
19839
|
}
|
|
19836
|
-
})(),
|
|
19840
|
+
})(), CD = {
|
|
19837
19841
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
19838
19842
|
outputLinkReplace: /\\([\[\]])/g,
|
|
19839
19843
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -19884,121 +19888,121 @@ var xD = ((e = "") => {
|
|
|
19884
19888
|
notSpaceStart: /^\S*/,
|
|
19885
19889
|
endingNewline: /\n$/,
|
|
19886
19890
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
19887
|
-
nextBulletRegex:
|
|
19888
|
-
hrRegex:
|
|
19889
|
-
fencesBeginRegex:
|
|
19890
|
-
headingBeginRegex:
|
|
19891
|
-
htmlBeginRegex:
|
|
19892
|
-
blockquoteBeginRegex:
|
|
19893
|
-
},
|
|
19894
|
-
blockquote:
|
|
19895
|
-
code:
|
|
19896
|
-
def:
|
|
19897
|
-
fences:
|
|
19898
|
-
heading:
|
|
19899
|
-
hr:
|
|
19900
|
-
html:
|
|
19901
|
-
lheading: AD,
|
|
19902
|
-
list: ID,
|
|
19903
|
-
newline: CD,
|
|
19904
|
-
paragraph: VD,
|
|
19905
|
-
table: vD,
|
|
19906
|
-
text: ND
|
|
19907
|
-
}, WD = bD("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ED).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", LD).getRegex(), GD = {
|
|
19908
|
-
...UD,
|
|
19891
|
+
nextBulletRegex: bD((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
19892
|
+
hrRegex: bD((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
19893
|
+
fencesBeginRegex: bD((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
19894
|
+
headingBeginRegex: bD((e) => RegExp(`^ {0,${e}}#`)),
|
|
19895
|
+
htmlBeginRegex: bD((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
19896
|
+
blockquoteBeginRegex: bD((e) => RegExp(`^ {0,${e}}>`))
|
|
19897
|
+
}, wD = /^(?:[ \t]*(?:\n|$))+/, TD = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ED = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, DD = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, OD = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, kD = / {0,3}(?:[*+-]|\d{1,9}[.)])/, AD = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, jD = xD(AD).replace(/bull/g, kD).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), MD = xD(AD).replace(/bull/g, kD).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ND = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, PD = /^[^\n]+/, FD = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ID = xD(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", FD).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), LD = xD(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, kD).getRegex(), RD = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", zD = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, BD = xD("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", zD).replace("tag", RD).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), VD = (e) => xD(ND).replace("hr", DD).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", RD).getRegex(), HD = VD(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), UD = VD(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), WD = {
|
|
19898
|
+
blockquote: xD(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", UD).getRegex(),
|
|
19899
|
+
code: TD,
|
|
19900
|
+
def: ID,
|
|
19901
|
+
fences: ED,
|
|
19902
|
+
heading: OD,
|
|
19903
|
+
hr: DD,
|
|
19904
|
+
html: BD,
|
|
19909
19905
|
lheading: jD,
|
|
19910
|
-
|
|
19911
|
-
|
|
19912
|
-
|
|
19913
|
-
|
|
19914
|
-
|
|
19906
|
+
list: LD,
|
|
19907
|
+
newline: wD,
|
|
19908
|
+
paragraph: HD,
|
|
19909
|
+
table: yD,
|
|
19910
|
+
text: PD
|
|
19911
|
+
}, GD = xD("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", DD).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", RD).getRegex(), KD = {
|
|
19912
|
+
...WD,
|
|
19913
|
+
lheading: MD,
|
|
19914
|
+
table: GD,
|
|
19915
|
+
paragraph: xD(ND).replace("hr", DD).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", GD).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", RD).getRegex()
|
|
19916
|
+
}, qD = {
|
|
19917
|
+
...WD,
|
|
19918
|
+
html: xD("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", zD).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
19915
19919
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
19916
19920
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
19917
|
-
fences:
|
|
19921
|
+
fences: yD,
|
|
19918
19922
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
19919
|
-
paragraph:
|
|
19920
|
-
},
|
|
19921
|
-
_backpedal:
|
|
19922
|
-
anyPunctuation:
|
|
19923
|
-
autolink:
|
|
19924
|
-
blockSkip:
|
|
19925
|
-
br:
|
|
19926
|
-
code:
|
|
19927
|
-
del:
|
|
19928
|
-
delLDelim:
|
|
19929
|
-
delRDelim:
|
|
19930
|
-
emStrongLDelim: oO,
|
|
19931
|
-
emStrongRDelimAst: lO,
|
|
19932
|
-
emStrongRDelimUnd: dO,
|
|
19933
|
-
escape: qD,
|
|
19934
|
-
link: yO,
|
|
19935
|
-
nolink: xO,
|
|
19936
|
-
punctuation: eO,
|
|
19937
|
-
reflink: bO,
|
|
19938
|
-
reflinkSearch: SO,
|
|
19939
|
-
tag: _O,
|
|
19940
|
-
text: XD,
|
|
19941
|
-
url: vD
|
|
19942
|
-
}, TO = {
|
|
19943
|
-
...wO,
|
|
19944
|
-
link: bD(/^!?\[(label)\]\((.*?)\)/).replace("label", vO).getRegex(),
|
|
19945
|
-
reflink: bD(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vO).getRegex()
|
|
19946
|
-
}, EO = {
|
|
19947
|
-
...wO,
|
|
19948
|
-
emStrongRDelimAst: uO,
|
|
19923
|
+
paragraph: xD(ND).replace("hr", DD).replace("heading", " *#{1,6} *[^\n]").replace("lheading", jD).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
19924
|
+
}, JD = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, YD = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, XD = /^( {2,}|\\)\n(?!\s*$)/, ZD = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, QD = /[\p{P}\p{S}]/u, $D = /[\s\p{P}\p{S}]/u, eO = /[^\s\p{P}\p{S}]/u, tO = xD(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, $D).getRegex(), nO = /(?!~)[\p{P}\p{S}]/u, rO = /(?!~)[\s\p{P}\p{S}]/u, iO = /(?:[^\s\p{P}\p{S}]|~)/u, aO = xD(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", SD ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), oO = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, sO = xD(oO, "u").replace(/punct/g, QD).getRegex(), cO = xD(oO, "u").replace(/punct/g, nO).getRegex(), lO = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", uO = xD(lO, "gu").replace(/notPunctSpace/g, eO).replace(/punctSpace/g, $D).replace(/punct/g, QD).getRegex(), dO = xD(lO, "gu").replace(/notPunctSpace/g, iO).replace(/punctSpace/g, rO).replace(/punct/g, nO).getRegex(), fO = xD("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, eO).replace(/punctSpace/g, $D).replace(/punct/g, QD).getRegex(), pO = xD(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, QD).getRegex(), mO = xD("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, eO).replace(/punctSpace/g, $D).replace(/punct/g, QD).getRegex(), hO = xD(/\\(punct)/, "gu").replace(/punct/g, QD).getRegex(), gO = xD(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), _O = xD(zD).replace("(?:-->|$)", "-->").getRegex(), vO = xD("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", _O).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), yO = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, bO = xD(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", yO).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xO = xD(/^!?\[(label)\]\[(ref)\]/).replace("label", yO).replace("ref", FD).getRegex(), SO = xD(/^!?\[(ref)\](?:\[\])?/).replace("ref", FD).getRegex(), CO = xD("reflink|nolink(?!\\()", "g").replace("reflink", xO).replace("nolink", SO).getRegex(), wO = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, TO = {
|
|
19925
|
+
_backpedal: yD,
|
|
19926
|
+
anyPunctuation: hO,
|
|
19927
|
+
autolink: gO,
|
|
19928
|
+
blockSkip: aO,
|
|
19929
|
+
br: XD,
|
|
19930
|
+
code: YD,
|
|
19931
|
+
del: yD,
|
|
19932
|
+
delLDelim: yD,
|
|
19933
|
+
delRDelim: yD,
|
|
19949
19934
|
emStrongLDelim: sO,
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
|
|
19935
|
+
emStrongRDelimAst: uO,
|
|
19936
|
+
emStrongRDelimUnd: fO,
|
|
19937
|
+
escape: JD,
|
|
19938
|
+
link: bO,
|
|
19939
|
+
nolink: SO,
|
|
19940
|
+
punctuation: tO,
|
|
19941
|
+
reflink: xO,
|
|
19942
|
+
reflinkSearch: CO,
|
|
19943
|
+
tag: vO,
|
|
19944
|
+
text: ZD,
|
|
19945
|
+
url: yD
|
|
19946
|
+
}, EO = {
|
|
19947
|
+
...TO,
|
|
19948
|
+
link: xD(/^!?\[(label)\]\((.*?)\)/).replace("label", yO).getRegex(),
|
|
19949
|
+
reflink: xD(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", yO).getRegex()
|
|
19950
|
+
}, DO = {
|
|
19951
|
+
...TO,
|
|
19952
|
+
emStrongRDelimAst: dO,
|
|
19953
|
+
emStrongLDelim: cO,
|
|
19954
|
+
delLDelim: pO,
|
|
19955
|
+
delRDelim: mO,
|
|
19956
|
+
url: xD(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", wO).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
19953
19957
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
19954
19958
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
19955
|
-
text:
|
|
19956
|
-
}, DO = {
|
|
19957
|
-
...EO,
|
|
19958
|
-
br: bD(YD).replace("{2,}", "*").getRegex(),
|
|
19959
|
-
text: bD(EO.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
19959
|
+
text: xD(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", wO).getRegex()
|
|
19960
19960
|
}, OO = {
|
|
19961
|
-
|
|
19962
|
-
|
|
19963
|
-
|
|
19961
|
+
...DO,
|
|
19962
|
+
br: xD(XD).replace("{2,}", "*").getRegex(),
|
|
19963
|
+
text: xD(DO.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
19964
19964
|
}, kO = {
|
|
19965
|
-
normal:
|
|
19966
|
-
gfm:
|
|
19967
|
-
|
|
19968
|
-
pedantic: TO
|
|
19965
|
+
normal: WD,
|
|
19966
|
+
gfm: KD,
|
|
19967
|
+
pedantic: qD
|
|
19969
19968
|
}, AO = {
|
|
19969
|
+
normal: TO,
|
|
19970
|
+
gfm: DO,
|
|
19971
|
+
breaks: OO,
|
|
19972
|
+
pedantic: EO
|
|
19973
|
+
}, jO = {
|
|
19970
19974
|
"&": "&",
|
|
19971
19975
|
"<": "<",
|
|
19972
19976
|
">": ">",
|
|
19973
19977
|
"\"": """,
|
|
19974
19978
|
"'": "'"
|
|
19975
|
-
},
|
|
19976
|
-
function
|
|
19979
|
+
}, MO = (e) => jO[e];
|
|
19980
|
+
function NO(e, t) {
|
|
19977
19981
|
if (t) {
|
|
19978
|
-
if (
|
|
19979
|
-
} else if (
|
|
19982
|
+
if (CD.escapeTest.test(e)) return e.replace(CD.escapeReplace, MO);
|
|
19983
|
+
} else if (CD.escapeTestNoEncode.test(e)) return e.replace(CD.escapeReplaceNoEncode, MO);
|
|
19980
19984
|
return e;
|
|
19981
19985
|
}
|
|
19982
|
-
function
|
|
19986
|
+
function PO(e) {
|
|
19983
19987
|
try {
|
|
19984
|
-
e = encodeURI(e).replace(
|
|
19988
|
+
e = encodeURI(e).replace(CD.percentDecode, "%");
|
|
19985
19989
|
} catch {
|
|
19986
19990
|
return null;
|
|
19987
19991
|
}
|
|
19988
19992
|
return e;
|
|
19989
19993
|
}
|
|
19990
|
-
function
|
|
19991
|
-
let n = e.replace(
|
|
19994
|
+
function FO(e, t) {
|
|
19995
|
+
let n = e.replace(CD.findPipe, (e, t, n) => {
|
|
19992
19996
|
let r = !1, i = t;
|
|
19993
19997
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
19994
19998
|
return r ? "|" : " |";
|
|
19995
|
-
}).split(
|
|
19999
|
+
}).split(CD.splitPipe), r = 0;
|
|
19996
20000
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
19997
20001
|
else for (; n.length < t;) n.push("");
|
|
19998
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
20002
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(CD.slashPipe, "|");
|
|
19999
20003
|
return n;
|
|
20000
20004
|
}
|
|
20001
|
-
function
|
|
20005
|
+
function IO(e, t, n) {
|
|
20002
20006
|
let r = e.length;
|
|
20003
20007
|
if (r === 0) return "";
|
|
20004
20008
|
let i = 0;
|
|
@@ -20010,12 +20014,12 @@ function FO(e, t, n) {
|
|
|
20010
20014
|
}
|
|
20011
20015
|
return e.slice(0, r - i);
|
|
20012
20016
|
}
|
|
20013
|
-
function
|
|
20017
|
+
function LO(e) {
|
|
20014
20018
|
let t = e.split("\n"), n = t.length - 1;
|
|
20015
|
-
for (; n >= 0 &&
|
|
20019
|
+
for (; n >= 0 && CD.blankLine.test(t[n]);) n--;
|
|
20016
20020
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
20017
20021
|
}
|
|
20018
|
-
function
|
|
20022
|
+
function RO(e, t) {
|
|
20019
20023
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
20020
20024
|
let n = 0;
|
|
20021
20025
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -20023,7 +20027,7 @@ function LO(e, t) {
|
|
|
20023
20027
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
20024
20028
|
return n > 0 ? -2 : -1;
|
|
20025
20029
|
}
|
|
20026
|
-
function
|
|
20030
|
+
function zO(e, t = 0) {
|
|
20027
20031
|
let n = t, r = "";
|
|
20028
20032
|
for (let t of e) if (t === " ") {
|
|
20029
20033
|
let e = 4 - n % 4;
|
|
@@ -20031,7 +20035,7 @@ function RO(e, t = 0) {
|
|
|
20031
20035
|
} else r += t, n++;
|
|
20032
20036
|
return r;
|
|
20033
20037
|
}
|
|
20034
|
-
function
|
|
20038
|
+
function BO(e, t, n, r, i) {
|
|
20035
20039
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
20036
20040
|
r.state.inLink = !0;
|
|
20037
20041
|
let c = {
|
|
@@ -20044,7 +20048,7 @@ function zO(e, t, n, r, i) {
|
|
|
20044
20048
|
};
|
|
20045
20049
|
return r.state.inLink = !1, c;
|
|
20046
20050
|
}
|
|
20047
|
-
function
|
|
20051
|
+
function VO(e, t, n) {
|
|
20048
20052
|
let r = e.match(n.other.indentCodeCompensation);
|
|
20049
20053
|
if (r === null) return t;
|
|
20050
20054
|
let i = r[1];
|
|
@@ -20055,12 +20059,12 @@ function BO(e, t, n) {
|
|
|
20055
20059
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
20056
20060
|
}).join("\n");
|
|
20057
20061
|
}
|
|
20058
|
-
var
|
|
20062
|
+
var HO = class {
|
|
20059
20063
|
options;
|
|
20060
20064
|
rules;
|
|
20061
20065
|
lexer;
|
|
20062
20066
|
constructor(e) {
|
|
20063
|
-
this.options = e ||
|
|
20067
|
+
this.options = e || _D;
|
|
20064
20068
|
}
|
|
20065
20069
|
space(e) {
|
|
20066
20070
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -20072,7 +20076,7 @@ var VO = class {
|
|
|
20072
20076
|
code(e) {
|
|
20073
20077
|
let t = this.rules.block.code.exec(e);
|
|
20074
20078
|
if (t) {
|
|
20075
|
-
let e = this.options.pedantic ? t[0] :
|
|
20079
|
+
let e = this.options.pedantic ? t[0] : LO(t[0]);
|
|
20076
20080
|
return {
|
|
20077
20081
|
type: "code",
|
|
20078
20082
|
raw: e,
|
|
@@ -20084,7 +20088,7 @@ var VO = class {
|
|
|
20084
20088
|
fences(e) {
|
|
20085
20089
|
let t = this.rules.block.fences.exec(e);
|
|
20086
20090
|
if (t) {
|
|
20087
|
-
let e = t[0], n =
|
|
20091
|
+
let e = t[0], n = VO(e, t[3] || "", this.rules);
|
|
20088
20092
|
return {
|
|
20089
20093
|
type: "code",
|
|
20090
20094
|
raw: e,
|
|
@@ -20098,12 +20102,12 @@ var VO = class {
|
|
|
20098
20102
|
if (t) {
|
|
20099
20103
|
let e = t[2].trim();
|
|
20100
20104
|
if (this.rules.other.endingHash.test(e)) {
|
|
20101
|
-
let t =
|
|
20105
|
+
let t = IO(e, "#");
|
|
20102
20106
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
20103
20107
|
}
|
|
20104
20108
|
return {
|
|
20105
20109
|
type: "heading",
|
|
20106
|
-
raw:
|
|
20110
|
+
raw: IO(t[0], "\n"),
|
|
20107
20111
|
depth: t[1].length,
|
|
20108
20112
|
text: e,
|
|
20109
20113
|
tokens: this.lexer.inline(e)
|
|
@@ -20114,13 +20118,13 @@ var VO = class {
|
|
|
20114
20118
|
let t = this.rules.block.hr.exec(e);
|
|
20115
20119
|
if (t) return {
|
|
20116
20120
|
type: "hr",
|
|
20117
|
-
raw:
|
|
20121
|
+
raw: IO(t[0], "\n")
|
|
20118
20122
|
};
|
|
20119
20123
|
}
|
|
20120
20124
|
blockquote(e) {
|
|
20121
20125
|
let t = this.rules.block.blockquote.exec(e);
|
|
20122
20126
|
if (t) {
|
|
20123
|
-
let e =
|
|
20127
|
+
let e = IO(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
20124
20128
|
for (; e.length > 0;) {
|
|
20125
20129
|
let t = !1, a = [], o;
|
|
20126
20130
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -20170,7 +20174,7 @@ ${c}` : c;
|
|
|
20170
20174
|
let n = !1, r = "", s = "";
|
|
20171
20175
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
20172
20176
|
r = t[0], e = e.substring(r.length);
|
|
20173
|
-
let c =
|
|
20177
|
+
let c = zO(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
20174
20178
|
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
20175
20179
|
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
|
|
20176
20180
|
for (; e;) {
|
|
@@ -20236,7 +20240,7 @@ ${c}` : c;
|
|
|
20236
20240
|
html(e) {
|
|
20237
20241
|
let t = this.rules.block.html.exec(e);
|
|
20238
20242
|
if (t) {
|
|
20239
|
-
let e =
|
|
20243
|
+
let e = LO(t[0]);
|
|
20240
20244
|
return {
|
|
20241
20245
|
type: "html",
|
|
20242
20246
|
block: !0,
|
|
@@ -20253,7 +20257,7 @@ ${c}` : c;
|
|
|
20253
20257
|
return {
|
|
20254
20258
|
type: "def",
|
|
20255
20259
|
tag: e,
|
|
20256
|
-
raw:
|
|
20260
|
+
raw: IO(t[0], "\n"),
|
|
20257
20261
|
href: n,
|
|
20258
20262
|
title: r
|
|
20259
20263
|
};
|
|
@@ -20262,9 +20266,9 @@ ${c}` : c;
|
|
|
20262
20266
|
table(e) {
|
|
20263
20267
|
let t = this.rules.block.table.exec(e);
|
|
20264
20268
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
20265
|
-
let n =
|
|
20269
|
+
let n = FO(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
20266
20270
|
type: "table",
|
|
20267
|
-
raw:
|
|
20271
|
+
raw: IO(t[0], "\n"),
|
|
20268
20272
|
header: [],
|
|
20269
20273
|
align: [],
|
|
20270
20274
|
rows: []
|
|
@@ -20277,7 +20281,7 @@ ${c}` : c;
|
|
|
20277
20281
|
header: !0,
|
|
20278
20282
|
align: a.align[e]
|
|
20279
20283
|
});
|
|
20280
|
-
for (let e of i) a.rows.push(
|
|
20284
|
+
for (let e of i) a.rows.push(FO(e, a.header.length).map((e, t) => ({
|
|
20281
20285
|
text: e,
|
|
20282
20286
|
tokens: this.lexer.inline(e),
|
|
20283
20287
|
header: !1,
|
|
@@ -20292,7 +20296,7 @@ ${c}` : c;
|
|
|
20292
20296
|
let e = t[1].trim();
|
|
20293
20297
|
return {
|
|
20294
20298
|
type: "heading",
|
|
20295
|
-
raw:
|
|
20299
|
+
raw: IO(t[0], "\n"),
|
|
20296
20300
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
20297
20301
|
text: e,
|
|
20298
20302
|
tokens: this.lexer.inline(e)
|
|
@@ -20345,10 +20349,10 @@ ${c}` : c;
|
|
|
20345
20349
|
let e = t[2].trim();
|
|
20346
20350
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
20347
20351
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
20348
|
-
let t =
|
|
20352
|
+
let t = IO(e.slice(0, -1), "\\");
|
|
20349
20353
|
if ((e.length - t.length) % 2 == 0) return;
|
|
20350
20354
|
} else {
|
|
20351
|
-
let e =
|
|
20355
|
+
let e = RO(t[2], "()");
|
|
20352
20356
|
if (e === -2) return;
|
|
20353
20357
|
if (e > -1) {
|
|
20354
20358
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -20360,7 +20364,7 @@ ${c}` : c;
|
|
|
20360
20364
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
20361
20365
|
e && (n = e[1], r = e[3]);
|
|
20362
20366
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
20363
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
20367
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), BO(t, {
|
|
20364
20368
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
20365
20369
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
20366
20370
|
}, t[0], this.lexer, this.rules);
|
|
@@ -20378,7 +20382,7 @@ ${c}` : c;
|
|
|
20378
20382
|
text: e
|
|
20379
20383
|
};
|
|
20380
20384
|
}
|
|
20381
|
-
return
|
|
20385
|
+
return BO(n, e, n[0], this.lexer, this.rules);
|
|
20382
20386
|
}
|
|
20383
20387
|
}
|
|
20384
20388
|
emStrong(e, t, n = "") {
|
|
@@ -20510,29 +20514,29 @@ ${c}` : c;
|
|
|
20510
20514
|
};
|
|
20511
20515
|
}
|
|
20512
20516
|
}
|
|
20513
|
-
},
|
|
20517
|
+
}, UO = class e {
|
|
20514
20518
|
tokens;
|
|
20515
20519
|
options;
|
|
20516
20520
|
state;
|
|
20517
20521
|
inlineQueue;
|
|
20518
20522
|
tokenizer;
|
|
20519
20523
|
constructor(e) {
|
|
20520
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
20524
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || _D, this.options.tokenizer = this.options.tokenizer || new HO(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
20521
20525
|
inLink: !1,
|
|
20522
20526
|
inRawBlock: !1,
|
|
20523
20527
|
top: !0
|
|
20524
20528
|
};
|
|
20525
20529
|
let t = {
|
|
20526
|
-
other:
|
|
20527
|
-
block:
|
|
20528
|
-
inline:
|
|
20530
|
+
other: CD,
|
|
20531
|
+
block: kO.normal,
|
|
20532
|
+
inline: AO.normal
|
|
20529
20533
|
};
|
|
20530
|
-
this.options.pedantic ? (t.block =
|
|
20534
|
+
this.options.pedantic ? (t.block = kO.pedantic, t.inline = AO.pedantic) : this.options.gfm && (t.block = kO.gfm, this.options.breaks ? t.inline = AO.breaks : t.inline = AO.gfm), this.tokenizer.rules = t;
|
|
20531
20535
|
}
|
|
20532
20536
|
static get rules() {
|
|
20533
20537
|
return {
|
|
20534
|
-
block:
|
|
20535
|
-
inline:
|
|
20538
|
+
block: kO,
|
|
20539
|
+
inline: AO
|
|
20536
20540
|
};
|
|
20537
20541
|
}
|
|
20538
20542
|
static lex(t, n) {
|
|
@@ -20542,7 +20546,7 @@ ${c}` : c;
|
|
|
20542
20546
|
return new e(n).inlineTokens(t);
|
|
20543
20547
|
}
|
|
20544
20548
|
lex(e) {
|
|
20545
|
-
e = e.replace(
|
|
20549
|
+
e = e.replace(CD.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
20546
20550
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
20547
20551
|
let t = this.inlineQueue[e];
|
|
20548
20552
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -20550,7 +20554,7 @@ ${c}` : c;
|
|
|
20550
20554
|
return this.inlineQueue = [], this.tokens;
|
|
20551
20555
|
}
|
|
20552
20556
|
blockTokens(e, t = [], n = !1) {
|
|
20553
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
20557
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(CD.tabCharGlobal, " ").replace(CD.spaceLine, ""));
|
|
20554
20558
|
let r = Infinity;
|
|
20555
20559
|
for (; e;) {
|
|
20556
20560
|
if (e.length < r) r = e.length;
|
|
@@ -20732,18 +20736,18 @@ ${c}` : c;
|
|
|
20732
20736
|
if (this.options.silent) console.error(t);
|
|
20733
20737
|
else throw Error(t);
|
|
20734
20738
|
}
|
|
20735
|
-
},
|
|
20739
|
+
}, WO = class {
|
|
20736
20740
|
options;
|
|
20737
20741
|
parser;
|
|
20738
20742
|
constructor(e) {
|
|
20739
|
-
this.options = e ||
|
|
20743
|
+
this.options = e || _D;
|
|
20740
20744
|
}
|
|
20741
20745
|
space(e) {
|
|
20742
20746
|
return "";
|
|
20743
20747
|
}
|
|
20744
20748
|
code({ text: e, lang: t, escaped: n }) {
|
|
20745
|
-
let r = (t || "").match(
|
|
20746
|
-
return r ? "<pre><code class=\"language-" +
|
|
20749
|
+
let r = (t || "").match(CD.notSpaceStart)?.[0], i = e.replace(CD.endingNewline, "") + "\n";
|
|
20750
|
+
return r ? "<pre><code class=\"language-" + NO(r) + "\">" + (n ? i : NO(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : NO(i, !0)) + "</code></pre>\n";
|
|
20747
20751
|
}
|
|
20748
20752
|
blockquote({ tokens: e }) {
|
|
20749
20753
|
return `<blockquote>
|
|
@@ -20813,7 +20817,7 @@ ${e}</tr>
|
|
|
20813
20817
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
20814
20818
|
}
|
|
20815
20819
|
codespan({ text: e }) {
|
|
20816
|
-
return `<code>${
|
|
20820
|
+
return `<code>${NO(e, !0)}</code>`;
|
|
20817
20821
|
}
|
|
20818
20822
|
br(e) {
|
|
20819
20823
|
return "<br>";
|
|
@@ -20822,24 +20826,24 @@ ${e}</tr>
|
|
|
20822
20826
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
20823
20827
|
}
|
|
20824
20828
|
link({ href: e, title: t, tokens: n }) {
|
|
20825
|
-
let r = this.parser.parseInline(n), i =
|
|
20829
|
+
let r = this.parser.parseInline(n), i = PO(e);
|
|
20826
20830
|
if (i === null) return r;
|
|
20827
20831
|
e = i;
|
|
20828
20832
|
let a = "<a href=\"" + e + "\"";
|
|
20829
|
-
return t && (a += " title=\"" +
|
|
20833
|
+
return t && (a += " title=\"" + NO(t) + "\""), a += ">" + r + "</a>", a;
|
|
20830
20834
|
}
|
|
20831
20835
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
20832
20836
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
20833
|
-
let i =
|
|
20834
|
-
if (i === null) return
|
|
20837
|
+
let i = PO(e);
|
|
20838
|
+
if (i === null) return NO(n);
|
|
20835
20839
|
e = i;
|
|
20836
|
-
let a = `<img src="${e}" alt="${
|
|
20837
|
-
return t && (a += ` title="${
|
|
20840
|
+
let a = `<img src="${e}" alt="${NO(n)}"`;
|
|
20841
|
+
return t && (a += ` title="${NO(t)}"`), a += ">", a;
|
|
20838
20842
|
}
|
|
20839
20843
|
text(e) {
|
|
20840
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
20844
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : NO(e.text);
|
|
20841
20845
|
}
|
|
20842
|
-
},
|
|
20846
|
+
}, GO = class {
|
|
20843
20847
|
strong({ text: e }) {
|
|
20844
20848
|
return e;
|
|
20845
20849
|
}
|
|
@@ -20870,12 +20874,12 @@ ${e}</tr>
|
|
|
20870
20874
|
checkbox({ raw: e }) {
|
|
20871
20875
|
return e;
|
|
20872
20876
|
}
|
|
20873
|
-
},
|
|
20877
|
+
}, KO = class e {
|
|
20874
20878
|
options;
|
|
20875
20879
|
renderer;
|
|
20876
20880
|
textRenderer;
|
|
20877
20881
|
constructor(e) {
|
|
20878
|
-
this.options = e ||
|
|
20882
|
+
this.options = e || _D, this.options.renderer = this.options.renderer || new WO(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new GO();
|
|
20879
20883
|
}
|
|
20880
20884
|
static parse(t, n) {
|
|
20881
20885
|
return new e(n).parse(t);
|
|
@@ -21021,11 +21025,11 @@ ${e}</tr>
|
|
|
21021
21025
|
}
|
|
21022
21026
|
return n;
|
|
21023
21027
|
}
|
|
21024
|
-
},
|
|
21028
|
+
}, qO = class {
|
|
21025
21029
|
options;
|
|
21026
21030
|
block;
|
|
21027
21031
|
constructor(e) {
|
|
21028
|
-
this.options = e ||
|
|
21032
|
+
this.options = e || _D;
|
|
21029
21033
|
}
|
|
21030
21034
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
21031
21035
|
"preprocess",
|
|
@@ -21051,22 +21055,22 @@ ${e}</tr>
|
|
|
21051
21055
|
return e;
|
|
21052
21056
|
}
|
|
21053
21057
|
provideLexer(e = this.block) {
|
|
21054
|
-
return e ?
|
|
21058
|
+
return e ? UO.lex : UO.lexInline;
|
|
21055
21059
|
}
|
|
21056
21060
|
provideParser(e = this.block) {
|
|
21057
|
-
return e ?
|
|
21061
|
+
return e ? KO.parse : KO.parseInline;
|
|
21058
21062
|
}
|
|
21059
|
-
},
|
|
21060
|
-
defaults =
|
|
21063
|
+
}, JO = new class {
|
|
21064
|
+
defaults = gD();
|
|
21061
21065
|
options = this.setOptions;
|
|
21062
21066
|
parse = this.parseMarkdown(!0);
|
|
21063
21067
|
parseInline = this.parseMarkdown(!1);
|
|
21064
|
-
Parser =
|
|
21065
|
-
Renderer =
|
|
21066
|
-
TextRenderer =
|
|
21067
|
-
Lexer =
|
|
21068
|
-
Tokenizer =
|
|
21069
|
-
Hooks =
|
|
21068
|
+
Parser = KO;
|
|
21069
|
+
Renderer = WO;
|
|
21070
|
+
TextRenderer = GO;
|
|
21071
|
+
Lexer = UO;
|
|
21072
|
+
Tokenizer = HO;
|
|
21073
|
+
Hooks = qO;
|
|
21070
21074
|
constructor(...e) {
|
|
21071
21075
|
this.use(...e);
|
|
21072
21076
|
}
|
|
@@ -21117,7 +21121,7 @@ ${e}</tr>
|
|
|
21117
21121
|
}
|
|
21118
21122
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
21119
21123
|
}), n.extensions = t), e.renderer) {
|
|
21120
|
-
let t = this.defaults.renderer || new
|
|
21124
|
+
let t = this.defaults.renderer || new WO(this.defaults);
|
|
21121
21125
|
for (let n in e.renderer) {
|
|
21122
21126
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
21123
21127
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -21130,7 +21134,7 @@ ${e}</tr>
|
|
|
21130
21134
|
n.renderer = t;
|
|
21131
21135
|
}
|
|
21132
21136
|
if (e.tokenizer) {
|
|
21133
|
-
let t = this.defaults.tokenizer || new
|
|
21137
|
+
let t = this.defaults.tokenizer || new HO(this.defaults);
|
|
21134
21138
|
for (let n in e.tokenizer) {
|
|
21135
21139
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
21136
21140
|
if ([
|
|
@@ -21147,13 +21151,13 @@ ${e}</tr>
|
|
|
21147
21151
|
n.tokenizer = t;
|
|
21148
21152
|
}
|
|
21149
21153
|
if (e.hooks) {
|
|
21150
|
-
let t = this.defaults.hooks || new
|
|
21154
|
+
let t = this.defaults.hooks || new qO();
|
|
21151
21155
|
for (let n in e.hooks) {
|
|
21152
21156
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
21153
21157
|
if (["options", "block"].includes(n)) continue;
|
|
21154
21158
|
let r = n, i = e.hooks[r], a = t[r];
|
|
21155
|
-
|
|
21156
|
-
if (this.defaults.async &&
|
|
21159
|
+
qO.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
21160
|
+
if (this.defaults.async && qO.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
21157
21161
|
let n = await i.call(t, e);
|
|
21158
21162
|
return a.call(t, n);
|
|
21159
21163
|
})();
|
|
@@ -21190,10 +21194,10 @@ ${e}</tr>
|
|
|
21190
21194
|
}, this;
|
|
21191
21195
|
}
|
|
21192
21196
|
lexer(e, t) {
|
|
21193
|
-
return
|
|
21197
|
+
return UO.lex(e, t ?? this.defaults);
|
|
21194
21198
|
}
|
|
21195
21199
|
parser(e, t) {
|
|
21196
|
-
return
|
|
21200
|
+
return KO.parse(e, t ?? this.defaults);
|
|
21197
21201
|
}
|
|
21198
21202
|
parseMarkdown(e) {
|
|
21199
21203
|
return (t, n) => {
|
|
@@ -21205,16 +21209,16 @@ ${e}</tr>
|
|
|
21205
21209
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
21206
21210
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
21207
21211
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
21208
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
21212
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? UO.lex : UO.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
21209
21213
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
21210
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
21214
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? KO.parse : KO.parseInline)(a, i);
|
|
21211
21215
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
21212
21216
|
})().catch(a);
|
|
21213
21217
|
try {
|
|
21214
21218
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
21215
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
21219
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? UO.lex : UO.lexInline)(t, i);
|
|
21216
21220
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
21217
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
21221
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? KO.parse : KO.parseInline)(n, i);
|
|
21218
21222
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
21219
21223
|
} catch (e) {
|
|
21220
21224
|
return a(e);
|
|
@@ -21224,7 +21228,7 @@ ${e}</tr>
|
|
|
21224
21228
|
onError(e, t) {
|
|
21225
21229
|
return (n) => {
|
|
21226
21230
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
21227
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
21231
|
+
let e = "<p>An error occurred:</p><pre>" + NO(n.message + "", !0) + "</pre>";
|
|
21228
21232
|
return t ? Promise.resolve(e) : e;
|
|
21229
21233
|
}
|
|
21230
21234
|
if (t) return Promise.reject(n);
|
|
@@ -21232,19 +21236,19 @@ ${e}</tr>
|
|
|
21232
21236
|
};
|
|
21233
21237
|
}
|
|
21234
21238
|
}();
|
|
21235
|
-
function
|
|
21236
|
-
return
|
|
21237
|
-
}
|
|
21238
|
-
|
|
21239
|
-
return
|
|
21240
|
-
},
|
|
21241
|
-
return
|
|
21242
|
-
},
|
|
21243
|
-
return
|
|
21244
|
-
},
|
|
21239
|
+
function YO(e, t) {
|
|
21240
|
+
return JO.parse(e, t);
|
|
21241
|
+
}
|
|
21242
|
+
YO.options = YO.setOptions = function(e) {
|
|
21243
|
+
return JO.setOptions(e), YO.defaults = JO.defaults, vD(YO.defaults), YO;
|
|
21244
|
+
}, YO.getDefaults = gD, YO.defaults = _D, YO.use = function(...e) {
|
|
21245
|
+
return JO.use(...e), YO.defaults = JO.defaults, vD(YO.defaults), YO;
|
|
21246
|
+
}, YO.walkTokens = function(e, t) {
|
|
21247
|
+
return JO.walkTokens(e, t);
|
|
21248
|
+
}, YO.parseInline = JO.parseInline, YO.Parser = KO, YO.parser = KO.parse, YO.Renderer = WO, YO.TextRenderer = GO, YO.Lexer = UO, YO.lexer = UO.lex, YO.Tokenizer = HO, YO.Hooks = qO, YO.parse = YO, YO.options, YO.setOptions, YO.use, YO.walkTokens, YO.parseInline, KO.parse, UO.lex;
|
|
21245
21249
|
//#endregion
|
|
21246
21250
|
//#region node_modules/highlight.js/lib/core.js
|
|
21247
|
-
var
|
|
21251
|
+
var XO = /* @__PURE__ */ h(((e, t) => {
|
|
21248
21252
|
function n(e) {
|
|
21249
21253
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
21250
21254
|
throw Error("map is read-only");
|
|
@@ -22085,7 +22089,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
22085
22089
|
return Object.assign(e, F), e;
|
|
22086
22090
|
}, ke = Oe({});
|
|
22087
22091
|
ke.newInstance = () => Oe({}), t.exports = ke, ke.HighlightJS = ke, ke.default = ke;
|
|
22088
|
-
})),
|
|
22092
|
+
})), ZO = /* @__PURE__ */ h(((e, t) => {
|
|
22089
22093
|
function n(e) {
|
|
22090
22094
|
let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
|
|
22091
22095
|
className: "symbol",
|
|
@@ -22250,7 +22254,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
22250
22254
|
};
|
|
22251
22255
|
}
|
|
22252
22256
|
t.exports = n;
|
|
22253
|
-
})),
|
|
22257
|
+
})), QO = /* @__PURE__ */ h(((e, t) => {
|
|
22254
22258
|
function n(e) {
|
|
22255
22259
|
let t = e.regex, n = {}, r = {
|
|
22256
22260
|
begin: /\$\{/,
|
|
@@ -22418,7 +22422,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
22418
22422
|
};
|
|
22419
22423
|
}
|
|
22420
22424
|
t.exports = n;
|
|
22421
|
-
})),
|
|
22425
|
+
})), $O = /* @__PURE__ */ h(((e, t) => {
|
|
22422
22426
|
function n(e) {
|
|
22423
22427
|
let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
|
|
22424
22428
|
className: "type",
|
|
@@ -22593,7 +22597,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
22593
22597
|
};
|
|
22594
22598
|
}
|
|
22595
22599
|
t.exports = n;
|
|
22596
|
-
})),
|
|
22600
|
+
})), ek = /* @__PURE__ */ h(((e, t) => {
|
|
22597
22601
|
function n(e) {
|
|
22598
22602
|
let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(?!struct)(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
|
|
22599
22603
|
className: "type",
|
|
@@ -22817,7 +22821,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
22817
22821
|
};
|
|
22818
22822
|
}
|
|
22819
22823
|
t.exports = n;
|
|
22820
|
-
})),
|
|
22824
|
+
})), tk = /* @__PURE__ */ h(((e, t) => {
|
|
22821
22825
|
function n(e) {
|
|
22822
22826
|
let t = [
|
|
22823
22827
|
"bool",
|
|
@@ -23076,7 +23080,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23076
23080
|
};
|
|
23077
23081
|
}
|
|
23078
23082
|
t.exports = n;
|
|
23079
|
-
})),
|
|
23083
|
+
})), nk = /* @__PURE__ */ h(((e, t) => {
|
|
23080
23084
|
var n = (e) => ({
|
|
23081
23085
|
IMPORTANT: {
|
|
23082
23086
|
scope: "meta",
|
|
@@ -23215,7 +23219,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23215
23219
|
};
|
|
23216
23220
|
}
|
|
23217
23221
|
t.exports = u;
|
|
23218
|
-
})),
|
|
23222
|
+
})), rk = /* @__PURE__ */ h(((e, t) => {
|
|
23219
23223
|
function n(e) {
|
|
23220
23224
|
let t = e.regex, n = {
|
|
23221
23225
|
begin: /<\/?[A-Za-z_]/,
|
|
@@ -23395,7 +23399,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23395
23399
|
};
|
|
23396
23400
|
}
|
|
23397
23401
|
t.exports = n;
|
|
23398
|
-
})),
|
|
23402
|
+
})), ik = /* @__PURE__ */ h(((e, t) => {
|
|
23399
23403
|
function n(e) {
|
|
23400
23404
|
let t = e.regex;
|
|
23401
23405
|
return {
|
|
@@ -23433,7 +23437,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23433
23437
|
};
|
|
23434
23438
|
}
|
|
23435
23439
|
t.exports = n;
|
|
23436
|
-
})),
|
|
23440
|
+
})), ak = /* @__PURE__ */ h(((e, t) => {
|
|
23437
23441
|
function n(e) {
|
|
23438
23442
|
let t = e.regex, n = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", r = t.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/), i = t.concat(r, /(::\w+)*/), a = {
|
|
23439
23443
|
"variable.constant": [
|
|
@@ -23694,7 +23698,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23694
23698
|
};
|
|
23695
23699
|
}
|
|
23696
23700
|
t.exports = n;
|
|
23697
|
-
})),
|
|
23701
|
+
})), ok = /* @__PURE__ */ h(((e, t) => {
|
|
23698
23702
|
function n(e) {
|
|
23699
23703
|
let t = {
|
|
23700
23704
|
keyword: [
|
|
@@ -23833,7 +23837,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23833
23837
|
};
|
|
23834
23838
|
}
|
|
23835
23839
|
t.exports = n;
|
|
23836
|
-
})),
|
|
23840
|
+
})), sk = /* @__PURE__ */ h(((e, t) => {
|
|
23837
23841
|
function n(e) {
|
|
23838
23842
|
let t = e.regex;
|
|
23839
23843
|
return {
|
|
@@ -23899,7 +23903,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23899
23903
|
};
|
|
23900
23904
|
}
|
|
23901
23905
|
t.exports = n;
|
|
23902
|
-
})),
|
|
23906
|
+
})), ck = /* @__PURE__ */ h(((e, t) => {
|
|
23903
23907
|
function n(e) {
|
|
23904
23908
|
let t = e.regex, n = {
|
|
23905
23909
|
className: "number",
|
|
@@ -23986,7 +23990,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
23986
23990
|
};
|
|
23987
23991
|
}
|
|
23988
23992
|
t.exports = n;
|
|
23989
|
-
})),
|
|
23993
|
+
})), lk = /* @__PURE__ */ h(((e, t) => {
|
|
23990
23994
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
23991
23995
|
className: "number",
|
|
23992
23996
|
variants: [
|
|
@@ -24154,7 +24158,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
24154
24158
|
};
|
|
24155
24159
|
}
|
|
24156
24160
|
t.exports = s;
|
|
24157
|
-
})),
|
|
24161
|
+
})), uk = /* @__PURE__ */ h(((e, t) => {
|
|
24158
24162
|
var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
|
|
24159
24163
|
"true",
|
|
24160
24164
|
"false",
|
|
@@ -24589,7 +24593,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
24589
24593
|
};
|
|
24590
24594
|
}
|
|
24591
24595
|
t.exports = u;
|
|
24592
|
-
})),
|
|
24596
|
+
})), dk = /* @__PURE__ */ h(((e, t) => {
|
|
24593
24597
|
function n(e) {
|
|
24594
24598
|
let t = {
|
|
24595
24599
|
className: "attr",
|
|
@@ -24624,7 +24628,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
24624
24628
|
};
|
|
24625
24629
|
}
|
|
24626
24630
|
t.exports = n;
|
|
24627
|
-
})),
|
|
24631
|
+
})), fk = /* @__PURE__ */ h(((e, t) => {
|
|
24628
24632
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
24629
24633
|
className: "number",
|
|
24630
24634
|
variants: [
|
|
@@ -24824,7 +24828,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
24824
24828
|
};
|
|
24825
24829
|
}
|
|
24826
24830
|
t.exports = o;
|
|
24827
|
-
})),
|
|
24831
|
+
})), pk = /* @__PURE__ */ h(((e, t) => {
|
|
24828
24832
|
var n = (e) => ({
|
|
24829
24833
|
IMPORTANT: {
|
|
24830
24834
|
scope: "meta",
|
|
@@ -25015,7 +25019,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25015
25019
|
};
|
|
25016
25020
|
}
|
|
25017
25021
|
t.exports = d;
|
|
25018
|
-
})),
|
|
25022
|
+
})), mk = /* @__PURE__ */ h(((e, t) => {
|
|
25019
25023
|
function n(e) {
|
|
25020
25024
|
let t = "\\[=*\\[", n = "\\]=*\\]", r = {
|
|
25021
25025
|
begin: t,
|
|
@@ -25060,7 +25064,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25060
25064
|
};
|
|
25061
25065
|
}
|
|
25062
25066
|
t.exports = n;
|
|
25063
|
-
})),
|
|
25067
|
+
})), hk = /* @__PURE__ */ h(((e, t) => {
|
|
25064
25068
|
function n(e) {
|
|
25065
25069
|
let t = {
|
|
25066
25070
|
className: "variable",
|
|
@@ -25116,7 +25120,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25116
25120
|
};
|
|
25117
25121
|
}
|
|
25118
25122
|
t.exports = n;
|
|
25119
|
-
})),
|
|
25123
|
+
})), gk = /* @__PURE__ */ h(((e, t) => {
|
|
25120
25124
|
function n(e) {
|
|
25121
25125
|
let t = e.regex, n = /* @__PURE__ */ "abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0".split("."), r = /[dualxmsipngr]{0,12}/, i = {
|
|
25122
25126
|
$pattern: /[\w.]+/,
|
|
@@ -25307,7 +25311,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25307
25311
|
};
|
|
25308
25312
|
}
|
|
25309
25313
|
t.exports = n;
|
|
25310
|
-
})),
|
|
25314
|
+
})), _k = /* @__PURE__ */ h(((e, t) => {
|
|
25311
25315
|
function n(e) {
|
|
25312
25316
|
let t = {
|
|
25313
25317
|
className: "built_in",
|
|
@@ -25423,7 +25427,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25423
25427
|
};
|
|
25424
25428
|
}
|
|
25425
25429
|
t.exports = n;
|
|
25426
|
-
})),
|
|
25430
|
+
})), vk = /* @__PURE__ */ h(((e, t) => {
|
|
25427
25431
|
function n(e) {
|
|
25428
25432
|
let t = e.regex, n = /(?![A-Za-z0-9])(?![$])/, r = t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, n), i = t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, n), a = t.concat(/[A-Z]+/, n), o = {
|
|
25429
25433
|
scope: "variable",
|
|
@@ -25716,7 +25720,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25716
25720
|
};
|
|
25717
25721
|
}
|
|
25718
25722
|
t.exports = n;
|
|
25719
|
-
})),
|
|
25723
|
+
})), yk = /* @__PURE__ */ h(((e, t) => {
|
|
25720
25724
|
function n(e) {
|
|
25721
25725
|
return {
|
|
25722
25726
|
name: "PHP template",
|
|
@@ -25758,7 +25762,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25758
25762
|
};
|
|
25759
25763
|
}
|
|
25760
25764
|
t.exports = n;
|
|
25761
|
-
})),
|
|
25765
|
+
})), bk = /* @__PURE__ */ h(((e, t) => {
|
|
25762
25766
|
function n(e) {
|
|
25763
25767
|
return {
|
|
25764
25768
|
name: "Plain text",
|
|
@@ -25767,7 +25771,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
25767
25771
|
};
|
|
25768
25772
|
}
|
|
25769
25773
|
t.exports = n;
|
|
25770
|
-
})),
|
|
25774
|
+
})), xk = /* @__PURE__ */ h(((e, t) => {
|
|
25771
25775
|
function n(e) {
|
|
25772
25776
|
let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
|
|
25773
25777
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
@@ -26004,7 +26008,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26004
26008
|
};
|
|
26005
26009
|
}
|
|
26006
26010
|
t.exports = n;
|
|
26007
|
-
})),
|
|
26011
|
+
})), Sk = /* @__PURE__ */ h(((e, t) => {
|
|
26008
26012
|
function n(e) {
|
|
26009
26013
|
return {
|
|
26010
26014
|
aliases: ["pycon"],
|
|
@@ -26022,7 +26026,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26022
26026
|
};
|
|
26023
26027
|
}
|
|
26024
26028
|
t.exports = n;
|
|
26025
|
-
})),
|
|
26029
|
+
})), Ck = /* @__PURE__ */ h(((e, t) => {
|
|
26026
26030
|
function n(e) {
|
|
26027
26031
|
let t = e.regex, n = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/, r = t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/, /(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/), i = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/, a = t.either(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/);
|
|
26028
26032
|
return {
|
|
@@ -26161,7 +26165,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26161
26165
|
};
|
|
26162
26166
|
}
|
|
26163
26167
|
t.exports = n;
|
|
26164
|
-
})),
|
|
26168
|
+
})), wk = /* @__PURE__ */ h(((e, t) => {
|
|
26165
26169
|
function n(e) {
|
|
26166
26170
|
let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
|
|
26167
26171
|
className: "title.function.invoke",
|
|
@@ -26329,7 +26333,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26329
26333
|
};
|
|
26330
26334
|
}
|
|
26331
26335
|
t.exports = n;
|
|
26332
|
-
})),
|
|
26336
|
+
})), Tk = /* @__PURE__ */ h(((e, t) => {
|
|
26333
26337
|
var n = (e) => ({
|
|
26334
26338
|
IMPORTANT: {
|
|
26335
26339
|
scope: "meta",
|
|
@@ -26478,7 +26482,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26478
26482
|
};
|
|
26479
26483
|
}
|
|
26480
26484
|
t.exports = u;
|
|
26481
|
-
})),
|
|
26485
|
+
})), Ek = /* @__PURE__ */ h(((e, t) => {
|
|
26482
26486
|
function n(e) {
|
|
26483
26487
|
return {
|
|
26484
26488
|
name: "Shell Session",
|
|
@@ -26494,7 +26498,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26494
26498
|
};
|
|
26495
26499
|
}
|
|
26496
26500
|
t.exports = n;
|
|
26497
|
-
})),
|
|
26501
|
+
})), Dk = /* @__PURE__ */ h(((e, t) => {
|
|
26498
26502
|
function n(e) {
|
|
26499
26503
|
let t = e.regex, n = e.COMMENT("--", "$"), r = {
|
|
26500
26504
|
scope: "string",
|
|
@@ -26611,7 +26615,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
26611
26615
|
};
|
|
26612
26616
|
}
|
|
26613
26617
|
t.exports = n;
|
|
26614
|
-
})),
|
|
26618
|
+
})), Ok = /* @__PURE__ */ h(((e, t) => {
|
|
26615
26619
|
function n(e) {
|
|
26616
26620
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
26617
26621
|
}
|
|
@@ -27184,7 +27188,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
27184
27188
|
};
|
|
27185
27189
|
}
|
|
27186
27190
|
t.exports = T;
|
|
27187
|
-
})),
|
|
27191
|
+
})), kk = /* @__PURE__ */ h(((e, t) => {
|
|
27188
27192
|
function n(e) {
|
|
27189
27193
|
let t = "true false yes no null", n = {
|
|
27190
27194
|
className: "attr",
|
|
@@ -27327,7 +27331,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
27327
27331
|
};
|
|
27328
27332
|
}
|
|
27329
27333
|
t.exports = n;
|
|
27330
|
-
})),
|
|
27334
|
+
})), Ak = /* @__PURE__ */ h(((e, t) => {
|
|
27331
27335
|
var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
|
|
27332
27336
|
"true",
|
|
27333
27337
|
"false",
|
|
@@ -27847,7 +27851,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
27847
27851
|
}), a;
|
|
27848
27852
|
}
|
|
27849
27853
|
t.exports = d;
|
|
27850
|
-
})),
|
|
27854
|
+
})), jk = /* @__PURE__ */ h(((e, t) => {
|
|
27851
27855
|
function n(e) {
|
|
27852
27856
|
let t = e.regex, n = {
|
|
27853
27857
|
className: "string",
|
|
@@ -27915,7 +27919,7 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
27915
27919
|
};
|
|
27916
27920
|
}
|
|
27917
27921
|
t.exports = n;
|
|
27918
|
-
})),
|
|
27922
|
+
})), Mk = /* @__PURE__ */ h(((e, t) => {
|
|
27919
27923
|
function n(e) {
|
|
27920
27924
|
e.regex;
|
|
27921
27925
|
let t = e.COMMENT(/\(;/, /;\)/);
|
|
@@ -27977,65 +27981,65 @@ var YO = /* @__PURE__ */ h(((e, t) => {
|
|
|
27977
27981
|
};
|
|
27978
27982
|
}
|
|
27979
27983
|
t.exports = n;
|
|
27980
|
-
})),
|
|
27981
|
-
var n =
|
|
27982
|
-
n.registerLanguage("xml",
|
|
27984
|
+
})), Nk = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
|
|
27985
|
+
var n = XO();
|
|
27986
|
+
n.registerLanguage("xml", ZO()), n.registerLanguage("bash", QO()), n.registerLanguage("c", $O()), n.registerLanguage("cpp", ek()), n.registerLanguage("csharp", tk()), n.registerLanguage("css", nk()), n.registerLanguage("markdown", rk()), n.registerLanguage("diff", ik()), n.registerLanguage("ruby", ak()), n.registerLanguage("go", ok()), n.registerLanguage("graphql", sk()), n.registerLanguage("ini", ck()), n.registerLanguage("java", lk()), n.registerLanguage("javascript", uk()), n.registerLanguage("json", dk()), n.registerLanguage("kotlin", fk()), n.registerLanguage("less", pk()), n.registerLanguage("lua", mk()), n.registerLanguage("makefile", hk()), n.registerLanguage("perl", gk()), n.registerLanguage("objectivec", _k()), n.registerLanguage("php", vk()), n.registerLanguage("php-template", yk()), n.registerLanguage("plaintext", bk()), n.registerLanguage("python", xk()), n.registerLanguage("python-repl", Sk()), n.registerLanguage("r", Ck()), n.registerLanguage("rust", wk()), n.registerLanguage("scss", Tk()), n.registerLanguage("shell", Ek()), n.registerLanguage("sql", Dk()), n.registerLanguage("swift", Ok()), n.registerLanguage("yaml", kk()), n.registerLanguage("typescript", Ak()), n.registerLanguage("vbnet", jk()), n.registerLanguage("wasm", Mk()), n.HighlightJS = n, n.default = n, t.exports = n;
|
|
27983
27987
|
})))())).default;
|
|
27984
27988
|
//#endregion
|
|
27985
27989
|
//#region src/core/composables/useMarkdown.ts
|
|
27986
|
-
|
|
27990
|
+
YO.setOptions({
|
|
27987
27991
|
breaks: !0,
|
|
27988
27992
|
gfm: !0
|
|
27989
27993
|
});
|
|
27990
|
-
var
|
|
27991
|
-
|
|
27994
|
+
var Pk = 2e4, Fk = new YO.Renderer();
|
|
27995
|
+
Fk.code = ({ text: e, lang: t }) => {
|
|
27992
27996
|
let n = (t || "").trim() || "plaintext", r = "";
|
|
27993
|
-
if (e.length > 2e4) r =
|
|
27997
|
+
if (e.length > 2e4) r = Lk(e);
|
|
27994
27998
|
else try {
|
|
27995
|
-
r =
|
|
27999
|
+
r = Nk.highlight(e, {
|
|
27996
28000
|
language: n,
|
|
27997
28001
|
ignoreIllegals: !0
|
|
27998
28002
|
}).value;
|
|
27999
28003
|
} catch {
|
|
28000
|
-
r =
|
|
28004
|
+
r = Lk(e);
|
|
28001
28005
|
}
|
|
28002
|
-
let i = encodeURIComponent(e), a =
|
|
28006
|
+
let i = encodeURIComponent(e), a = Ik(n);
|
|
28003
28007
|
return `<pre class="code-block" data-lang="${a}" data-code="${i}"><code class="hljs language-${a}">${r}</code></pre>`;
|
|
28004
28008
|
};
|
|
28005
|
-
function
|
|
28009
|
+
function Ik(e) {
|
|
28006
28010
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
28007
28011
|
}
|
|
28008
|
-
function
|
|
28012
|
+
function Lk(e) {
|
|
28009
28013
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
28010
28014
|
}
|
|
28011
|
-
var
|
|
28015
|
+
var Rk = { ADD_ATTR: [
|
|
28012
28016
|
"data-code",
|
|
28013
28017
|
"data-lang",
|
|
28014
28018
|
"target",
|
|
28015
28019
|
"rel"
|
|
28016
28020
|
] };
|
|
28017
|
-
function Rk(e) {
|
|
28018
|
-
return FT.sanitize(e, Lk);
|
|
28019
|
-
}
|
|
28020
28021
|
function zk(e) {
|
|
28021
|
-
return
|
|
28022
|
+
return FT.sanitize(e, Rk);
|
|
28022
28023
|
}
|
|
28023
28024
|
function Bk(e) {
|
|
28024
|
-
return
|
|
28025
|
+
return YO.parse(e || "", { renderer: Fk });
|
|
28026
|
+
}
|
|
28027
|
+
function Vk(e) {
|
|
28028
|
+
return zk(Bk(e));
|
|
28025
28029
|
}
|
|
28026
|
-
var
|
|
28027
|
-
function
|
|
28028
|
-
let t = /* @__PURE__ */ Nn(
|
|
28030
|
+
var Hk = 100, Uk = 2e3;
|
|
28031
|
+
function Wk(e) {
|
|
28032
|
+
let t = /* @__PURE__ */ Nn(Vk(e())), n = 0, r = null;
|
|
28029
28033
|
function i() {
|
|
28030
|
-
r = null, n = Date.now(), t.value =
|
|
28034
|
+
r = null, n = Date.now(), t.value = Vk(e());
|
|
28031
28035
|
}
|
|
28032
28036
|
return di(e, () => {
|
|
28033
28037
|
let a = e();
|
|
28034
|
-
if (a.length <=
|
|
28035
|
-
r &&= (clearTimeout(r), null), n = Date.now(), t.value =
|
|
28038
|
+
if (a.length <= Uk) {
|
|
28039
|
+
r &&= (clearTimeout(r), null), n = Date.now(), t.value = Vk(a);
|
|
28036
28040
|
return;
|
|
28037
28041
|
}
|
|
28038
|
-
let o = n +
|
|
28042
|
+
let o = n + Hk - Date.now();
|
|
28039
28043
|
o <= 0 ? (r &&= (clearTimeout(r), null), i()) : r ||= setTimeout(i, o);
|
|
28040
28044
|
}), at(() => {
|
|
28041
28045
|
r &&= (clearTimeout(r), null);
|
|
@@ -28053,14 +28057,14 @@ function Uk(e) {
|
|
|
28053
28057
|
}
|
|
28054
28058
|
//#endregion
|
|
28055
28059
|
//#region src/core/components/MessageContent.vue?vue&type=script&setup=true&lang.ts
|
|
28056
|
-
var
|
|
28060
|
+
var Gk = ["innerHTML"], Kk = /* @__PURE__ */ Wi({
|
|
28057
28061
|
__name: "MessageContent",
|
|
28058
28062
|
props: {
|
|
28059
28063
|
content: {},
|
|
28060
28064
|
messages: { default: () => ow }
|
|
28061
28065
|
},
|
|
28062
28066
|
setup(e) {
|
|
28063
|
-
let t = e, { html: n, codeBlocks: r } =
|
|
28067
|
+
let t = e, { html: n, codeBlocks: r } = Wk(() => t.content), i = /* @__PURE__ */ Mn(null);
|
|
28064
28068
|
function a(e, t) {
|
|
28065
28069
|
let n = {
|
|
28066
28070
|
html: "html",
|
|
@@ -28114,12 +28118,12 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28114
28118
|
ref_key: "containerRef",
|
|
28115
28119
|
ref: i,
|
|
28116
28120
|
innerHTML: K(n)
|
|
28117
|
-
}, null, 8,
|
|
28121
|
+
}, null, 8, Gk));
|
|
28118
28122
|
}
|
|
28119
|
-
}),
|
|
28123
|
+
}), qk = { class: "typing-text" }, Jk = {
|
|
28120
28124
|
key: 0,
|
|
28121
28125
|
class: "stream-cursor"
|
|
28122
|
-
},
|
|
28126
|
+
}, Yk = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28123
28127
|
__name: "MessageBubble",
|
|
28124
28128
|
props: {
|
|
28125
28129
|
content: {},
|
|
@@ -28130,29 +28134,29 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28130
28134
|
messages: { default: () => ({ ...ow }) }
|
|
28131
28135
|
},
|
|
28132
28136
|
setup(e) {
|
|
28133
|
-
return (t, n) => (Y(), X(J, null, [Z("div", { class: Be(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: Be(["typing-dot", { pulse: e.showTyping }]) }, null, 2), Z("span",
|
|
28137
|
+
return (t, n) => (Y(), X(J, null, [Z("div", { class: Be(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: Be(["typing-dot", { pulse: e.showTyping }]) }, null, 2), Z("span", qk, [xs(XT, { text: e.messages.thinking }, null, 8, ["text"])])], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), ms(Kk, {
|
|
28134
28138
|
key: 0,
|
|
28135
28139
|
content: e.content,
|
|
28136
28140
|
messages: e.messages
|
|
28137
|
-
}, null, 8, ["content", "messages"])) : (Y(), X(J, { key: 1 }, [Es(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span",
|
|
28141
|
+
}, null, 8, ["content", "messages"])) : (Y(), X(J, { key: 1 }, [Es(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", Jk)) : Q("", !0)], 64));
|
|
28138
28142
|
}
|
|
28139
|
-
}), [["__scopeId", "data-v-4b4111d8"]]),
|
|
28143
|
+
}), [["__scopeId", "data-v-4b4111d8"]]), Xk = { class: "message-time" }, Zk = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28140
28144
|
__name: "MessageTime",
|
|
28141
28145
|
props: { time: {} },
|
|
28142
28146
|
setup(e) {
|
|
28143
|
-
return (t, n) => (Y(), X("div",
|
|
28147
|
+
return (t, n) => (Y(), X("div", Xk, W(e.time), 1));
|
|
28144
28148
|
}
|
|
28145
|
-
}), [["__scopeId", "data-v-4a976e4a"]]),
|
|
28149
|
+
}), [["__scopeId", "data-v-4a976e4a"]]), Qk = { class: "msg-actions" }, $k = ["title"], eA = {
|
|
28146
28150
|
key: 0,
|
|
28147
28151
|
viewBox: "0 0 16 16",
|
|
28148
28152
|
fill: "none",
|
|
28149
28153
|
"aria-hidden": "true"
|
|
28150
|
-
},
|
|
28154
|
+
}, tA = {
|
|
28151
28155
|
key: 1,
|
|
28152
28156
|
viewBox: "0 0 16 16",
|
|
28153
28157
|
fill: "none",
|
|
28154
28158
|
"aria-hidden": "true"
|
|
28155
|
-
},
|
|
28159
|
+
}, nA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28156
28160
|
__name: "MessageActions",
|
|
28157
28161
|
props: {
|
|
28158
28162
|
copied: { type: Boolean },
|
|
@@ -28160,17 +28164,17 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28160
28164
|
},
|
|
28161
28165
|
emits: ["copy", "regenerate"],
|
|
28162
28166
|
setup(e) {
|
|
28163
|
-
return (t, n) => (Y(), X("div",
|
|
28167
|
+
return (t, n) => (Y(), X("div", Qk, [Z("button", {
|
|
28164
28168
|
class: Be(["msg-action-btn", { done: e.copied }]),
|
|
28165
28169
|
title: e.copied ? e.messages.copied : e.messages.copy,
|
|
28166
28170
|
onClick: n[0] ||= (e) => t.$emit("copy")
|
|
28167
|
-
}, [e.copied ? (Y(), X("svg",
|
|
28171
|
+
}, [e.copied ? (Y(), X("svg", eA, [...n[2] ||= [Z("path", {
|
|
28168
28172
|
d: "M3 8.5l3 3 7-7",
|
|
28169
28173
|
stroke: "currentColor",
|
|
28170
28174
|
"stroke-width": "1.6",
|
|
28171
28175
|
"stroke-linecap": "round",
|
|
28172
28176
|
"stroke-linejoin": "round"
|
|
28173
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
28177
|
+
}, null, -1)]])) : (Y(), X("svg", tA, [...n[3] ||= [Z("rect", {
|
|
28174
28178
|
x: "5.5",
|
|
28175
28179
|
y: "5.5",
|
|
28176
28180
|
width: "8",
|
|
@@ -28182,7 +28186,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28182
28186
|
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",
|
|
28183
28187
|
stroke: "currentColor",
|
|
28184
28188
|
"stroke-width": "1.3"
|
|
28185
|
-
}, null, -1)]])), Z("span", null, W(e.copied ? e.messages.copied : e.messages.copy), 1)], 10,
|
|
28189
|
+
}, null, -1)]])), Z("span", null, W(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, $k), Z("button", {
|
|
28186
28190
|
class: "msg-action-btn",
|
|
28187
28191
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
28188
28192
|
}, [n[4] ||= Z("svg", {
|
|
@@ -28202,19 +28206,19 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28202
28206
|
"stroke-linejoin": "round"
|
|
28203
28207
|
})], -1), Z("span", null, W(e.messages.regenerate), 1)])]));
|
|
28204
28208
|
}
|
|
28205
|
-
}), [["__scopeId", "data-v-dc051a49"]]),
|
|
28209
|
+
}), [["__scopeId", "data-v-dc051a49"]]), rA = {
|
|
28206
28210
|
key: 1,
|
|
28207
28211
|
class: "avatar-icon",
|
|
28208
28212
|
viewBox: "0 0 1024 1024",
|
|
28209
28213
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28210
28214
|
"aria-hidden": "true"
|
|
28211
|
-
},
|
|
28215
|
+
}, iA = {
|
|
28212
28216
|
key: 2,
|
|
28213
28217
|
class: "avatar-icon",
|
|
28214
28218
|
viewBox: "0 0 1024 1024",
|
|
28215
28219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28216
28220
|
"aria-hidden": "true"
|
|
28217
|
-
},
|
|
28221
|
+
}, aA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28218
28222
|
__name: "AvatarIcon",
|
|
28219
28223
|
props: {
|
|
28220
28224
|
role: {},
|
|
@@ -28225,18 +28229,18 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28225
28229
|
key: 0,
|
|
28226
28230
|
icon: e.glyph,
|
|
28227
28231
|
class: "avatar-glyph"
|
|
28228
|
-
}, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg",
|
|
28232
|
+
}, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg", rA, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", iA, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
|
|
28229
28233
|
}
|
|
28230
|
-
}), [["__scopeId", "data-v-a0b508ea"]]),
|
|
28234
|
+
}), [["__scopeId", "data-v-a0b508ea"]]), oA = ["data-msg-idx"], sA = {
|
|
28231
28235
|
key: 0,
|
|
28232
28236
|
class: "message-avatar"
|
|
28233
|
-
},
|
|
28237
|
+
}, cA = { class: "message-content" }, lA = {
|
|
28234
28238
|
key: 2,
|
|
28235
28239
|
class: "msg-focuses"
|
|
28236
|
-
},
|
|
28240
|
+
}, uA = ["title", "onClick"], dA = ["data-img-count"], fA = ["href", "title"], pA = ["src", "alt"], mA = {
|
|
28237
28241
|
key: 1,
|
|
28238
28242
|
class: "msg-image-lost"
|
|
28239
|
-
},
|
|
28243
|
+
}, hA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28240
28244
|
__name: "MessageRow",
|
|
28241
28245
|
props: {
|
|
28242
28246
|
message: {},
|
|
@@ -28256,28 +28260,30 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28256
28260
|
"regenerate"
|
|
28257
28261
|
],
|
|
28258
28262
|
setup(e) {
|
|
28259
|
-
let t = e, n = fw(), r = sc(() => t.message.role === "assistant"), i = sc(() => r.value && "reasoning" in t.message ? t.message.reasoning ?? "" : ""), a = sc(() => r.value && "steps" in t.message ? t.message.steps ?? [] : []),
|
|
28260
|
-
return (t,
|
|
28263
|
+
let t = e, n = fw(), r = sc(() => t.message.role === "assistant"), i = sc(() => r.value && "reasoning" in t.message ? t.message.reasoning ?? "" : ""), a = sc(() => r.value && "reasoningTotal" in t.message ? t.message.reasoningTotal : void 0), o = sc(() => r.value && "steps" in t.message ? t.message.steps ?? [] : []), s = sc(() => r.value && !!t.message.content && !t.loading && t.isLast), c = sc(() => r.value && t.loading && t.isLast && !!t.message.content);
|
|
28264
|
+
return (t, l) => (Y(), X("div", {
|
|
28261
28265
|
class: Be(["message-row", e.message.role]),
|
|
28262
28266
|
"data-msg-idx": e.index
|
|
28263
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
28267
|
+
}, [e.showAvatar ? (Y(), X("div", sA, [xs(aA, {
|
|
28264
28268
|
role: e.message.role,
|
|
28265
28269
|
glyph: e.message.role === "user" ? K(n).icons.userAvatar : K(n).icons.assistantAvatar
|
|
28266
|
-
}, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div",
|
|
28270
|
+
}, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div", cA, [
|
|
28267
28271
|
r.value ? (Y(), ms(RE, {
|
|
28268
28272
|
key: 0,
|
|
28269
28273
|
text: i.value,
|
|
28274
|
+
total: a.value,
|
|
28270
28275
|
expanded: e.reasoningExpanded,
|
|
28271
28276
|
running: e.loading && e.isLast,
|
|
28272
|
-
onToggle:
|
|
28277
|
+
onToggle: l[0] ||= (e) => t.$emit("toggle-reasoning")
|
|
28273
28278
|
}, null, 8, [
|
|
28274
28279
|
"text",
|
|
28280
|
+
"total",
|
|
28275
28281
|
"expanded",
|
|
28276
28282
|
"running"
|
|
28277
28283
|
])) : Q("", !0),
|
|
28278
|
-
r.value ? (Y(), ms(
|
|
28284
|
+
r.value ? (Y(), ms(hD, {
|
|
28279
28285
|
key: 1,
|
|
28280
|
-
steps:
|
|
28286
|
+
steps: o.value,
|
|
28281
28287
|
icons: K(n).icons,
|
|
28282
28288
|
messages: K(n).messages
|
|
28283
28289
|
}, null, 8, [
|
|
@@ -28285,12 +28291,12 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28285
28291
|
"icons",
|
|
28286
28292
|
"messages"
|
|
28287
28293
|
])) : Q("", !0),
|
|
28288
|
-
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div",
|
|
28294
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", lA, [(Y(!0), X(J, null, ga(e.message.focuses, (e) => (Y(), X("span", {
|
|
28289
28295
|
key: e.path,
|
|
28290
28296
|
class: "msg-focus-chip",
|
|
28291
28297
|
title: K(n).messages.historyFocusChipTitlePrefix + e.path,
|
|
28292
28298
|
onClick: (t) => K(n).focusChipClick(e)
|
|
28293
|
-
}, [xs(JT, { icon: K(n).icons.focus }, null, 8, ["icon"]), Es(" " + W(e.path), 1)], 8,
|
|
28299
|
+
}, [xs(JT, { icon: K(n).icons.focus }, null, 8, ["icon"]), Es(" " + W(e.path), 1)], 8, uA))), 128))])) : Q("", !0),
|
|
28294
28300
|
e.message.role === "user" && e.message.images?.length ? (Y(), X("div", {
|
|
28295
28301
|
key: 3,
|
|
28296
28302
|
class: "msg-images",
|
|
@@ -28307,15 +28313,15 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28307
28313
|
class: "msg-image-thumb",
|
|
28308
28314
|
src: e.thumb || e.dataUri,
|
|
28309
28315
|
alt: e.name || K(n).messages.imageAlt
|
|
28310
|
-
}, null, 8,
|
|
28311
|
-
!r.value || e.message.content || e.isPendingAssistant ? (Y(), ms(
|
|
28316
|
+
}, null, 8, pA)) : (Y(), X("span", mA, "🖼️"))], 8, fA))), 128))], 8, dA)) : Q("", !0),
|
|
28317
|
+
!r.value || e.message.content || e.isPendingAssistant ? (Y(), ms(Yk, {
|
|
28312
28318
|
key: 4,
|
|
28313
28319
|
messages: K(n).messages,
|
|
28314
28320
|
content: e.message.content,
|
|
28315
28321
|
role: e.message.role,
|
|
28316
28322
|
"is-pending-assistant": e.isPendingAssistant,
|
|
28317
28323
|
"show-typing": e.showTyping,
|
|
28318
|
-
"show-cursor":
|
|
28324
|
+
"show-cursor": c.value
|
|
28319
28325
|
}, null, 8, [
|
|
28320
28326
|
"messages",
|
|
28321
28327
|
"content",
|
|
@@ -28324,29 +28330,29 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28324
28330
|
"show-typing",
|
|
28325
28331
|
"show-cursor"
|
|
28326
28332
|
])) : Q("", !0),
|
|
28327
|
-
xs(
|
|
28328
|
-
|
|
28333
|
+
xs(Zk, { time: e.time }, null, 8, ["time"]),
|
|
28334
|
+
s.value ? (Y(), ms(nA, {
|
|
28329
28335
|
key: 5,
|
|
28330
28336
|
messages: K(n).messages,
|
|
28331
28337
|
copied: e.copied,
|
|
28332
|
-
onCopy:
|
|
28333
|
-
onRegenerate:
|
|
28338
|
+
onCopy: l[1] ||= (e) => t.$emit("copy"),
|
|
28339
|
+
onRegenerate: l[2] ||= (e) => t.$emit("regenerate")
|
|
28334
28340
|
}, null, 8, ["messages", "copied"])) : Q("", !0)
|
|
28335
|
-
])], 10,
|
|
28341
|
+
])], 10, oA));
|
|
28336
28342
|
}
|
|
28337
|
-
}), [["__scopeId", "data-v-
|
|
28343
|
+
}), [["__scopeId", "data-v-dc92d354"]]), gA = { class: "chat-body" }, _A = {
|
|
28338
28344
|
key: 0,
|
|
28339
28345
|
class: "empty-state"
|
|
28340
|
-
},
|
|
28346
|
+
}, vA = { class: "empty-icon" }, yA = {
|
|
28341
28347
|
key: 1,
|
|
28342
28348
|
class: "message-row assistant"
|
|
28343
|
-
},
|
|
28349
|
+
}, bA = {
|
|
28344
28350
|
key: 0,
|
|
28345
28351
|
class: "message-avatar"
|
|
28346
|
-
},
|
|
28352
|
+
}, xA = { class: "message-content" }, SA = {
|
|
28347
28353
|
key: 2,
|
|
28348
28354
|
class: "error-bar"
|
|
28349
|
-
},
|
|
28355
|
+
}, CA = { class: "error-text" }, wA = ["title"], TA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28350
28356
|
__name: "MessageList",
|
|
28351
28357
|
props: {
|
|
28352
28358
|
showAvatar: { type: Boolean },
|
|
@@ -28354,9 +28360,9 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28354
28360
|
},
|
|
28355
28361
|
setup(e) {
|
|
28356
28362
|
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u, messages: d } = fw(), { state: f, retry: p, regenerate: m } = t, h = sc(() => f.messages.length > 0), g = sc(() => f.messages.some((e) => e.role === "user")), _ = sc(() => f.messages[f.messages.length - 1]?.role === "assistant");
|
|
28357
|
-
return (t, v) => (Y(), X("div",
|
|
28358
|
-
h.value ? Q("", !0) : (Y(), X("div",
|
|
28359
|
-
(Y(!0), X(J, null, ga(K(f).messages, (t, c) => (Y(), ms(
|
|
28363
|
+
return (t, v) => (Y(), X("div", gA, [
|
|
28364
|
+
h.value ? Q("", !0) : (Y(), X("div", _A, [Z("div", vA, [xs(JT, { icon: K(u).empty }, null, 8, ["icon"])]), Z("p", null, [xs(XT, { text: K(d).emptyGreeting }, null, 8, ["text"])])])),
|
|
28365
|
+
(Y(!0), X(J, null, ga(K(f).messages, (t, c) => (Y(), ms(hA, {
|
|
28360
28366
|
key: c,
|
|
28361
28367
|
message: t,
|
|
28362
28368
|
index: c,
|
|
@@ -28386,10 +28392,10 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28386
28392
|
"onCopy",
|
|
28387
28393
|
"onRegenerate"
|
|
28388
28394
|
]))), 128)),
|
|
28389
|
-
K(f).loading && !_.value ? (Y(), X("div",
|
|
28395
|
+
K(f).loading && !_.value ? (Y(), X("div", yA, [e.showAvatar ? (Y(), X("div", bA, [xs(aA, {
|
|
28390
28396
|
role: "assistant",
|
|
28391
28397
|
glyph: K(u).assistantAvatar
|
|
28392
|
-
}, null, 8, ["glyph"])])) : Q("", !0), Z("div",
|
|
28398
|
+
}, null, 8, ["glyph"])])) : Q("", !0), Z("div", xA, [xs(Yk, {
|
|
28393
28399
|
content: "",
|
|
28394
28400
|
role: "assistant",
|
|
28395
28401
|
"is-pending-assistant": !0,
|
|
@@ -28397,8 +28403,8 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28397
28403
|
"show-cursor": !1,
|
|
28398
28404
|
messages: K(d)
|
|
28399
28405
|
}, null, 8, ["show-typing", "messages"])])])) : Q("", !0),
|
|
28400
|
-
K(f).error ? (Y(), X("div",
|
|
28401
|
-
Z("span",
|
|
28406
|
+
K(f).error ? (Y(), X("div", SA, [
|
|
28407
|
+
Z("span", CA, W(K(f).error), 1),
|
|
28402
28408
|
g.value ? (Y(), X("button", {
|
|
28403
28409
|
key: 0,
|
|
28404
28410
|
class: "retry-btn",
|
|
@@ -28409,61 +28415,61 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28409
28415
|
class: "undo-btn",
|
|
28410
28416
|
title: K(d).undoTitle,
|
|
28411
28417
|
onClick: v[1] ||= (...e) => K(l) && K(l)(...e)
|
|
28412
|
-
}, [xs(XT, { text: K(d).undo }, null, 8, ["text"])], 8,
|
|
28418
|
+
}, [xs(XT, { text: K(d).undo }, null, 8, ["text"])], 8, wA)) : Q("", !0)
|
|
28413
28419
|
])) : Q("", !0)
|
|
28414
28420
|
]));
|
|
28415
28421
|
}
|
|
28416
|
-
}), [["__scopeId", "data-v-113939bc"]]),
|
|
28422
|
+
}), [["__scopeId", "data-v-113939bc"]]), EA = {
|
|
28417
28423
|
key: 0,
|
|
28418
28424
|
class: "queued-bar"
|
|
28419
|
-
},
|
|
28425
|
+
}, DA = { class: "queued-head" }, OA = { class: "queued-icon" }, kA = { class: "queued-title" }, AA = { class: "queued-count" }, jA = { class: "queued-idx" }, MA = { class: "queued-text" }, NA = ["title", "onClick"], PA = ["title", "onClick"], FA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28420
28426
|
__name: "QueuedBar",
|
|
28421
28427
|
setup(e) {
|
|
28422
28428
|
let { chat: t, editQueued: n, icons: r, messages: i } = fw(), { queuedTasks: a, removeQueuedTask: o } = t;
|
|
28423
|
-
return (e, t) => K(a).length ? (Y(), X("div",
|
|
28424
|
-
Z("span",
|
|
28425
|
-
Z("span",
|
|
28426
|
-
Z("span",
|
|
28429
|
+
return (e, t) => K(a).length ? (Y(), X("div", EA, [Z("div", DA, [
|
|
28430
|
+
Z("span", OA, [xs(JT, { icon: K(r).queued }, null, 8, ["icon"])]),
|
|
28431
|
+
Z("span", kA, W(K(i).queuedTitle), 1),
|
|
28432
|
+
Z("span", AA, W(K(a).length), 1)
|
|
28427
28433
|
]), (Y(!0), X(J, null, ga(K(a), (e, t) => (Y(), X("div", {
|
|
28428
28434
|
key: t,
|
|
28429
28435
|
class: "queued-item"
|
|
28430
28436
|
}, [
|
|
28431
|
-
Z("span",
|
|
28432
|
-
Z("span",
|
|
28437
|
+
Z("span", jA, W(t + 1), 1),
|
|
28438
|
+
Z("span", MA, W(e), 1),
|
|
28433
28439
|
Z("button", {
|
|
28434
28440
|
class: "queued-act",
|
|
28435
28441
|
title: K(i).queuedEditTitle,
|
|
28436
28442
|
onClick: (e) => K(n)(t)
|
|
28437
|
-
}, [xs(JT, { icon: K(r).queuedEdit }, null, 8, ["icon"])], 8,
|
|
28443
|
+
}, [xs(JT, { icon: K(r).queuedEdit }, null, 8, ["icon"])], 8, NA),
|
|
28438
28444
|
Z("button", {
|
|
28439
28445
|
class: "queued-act queued-del",
|
|
28440
28446
|
title: K(i).removeQueuedTitle,
|
|
28441
28447
|
onClick: (e) => K(o)(t)
|
|
28442
|
-
}, "✕", 8,
|
|
28448
|
+
}, "✕", 8, PA)
|
|
28443
28449
|
]))), 128))])) : Q("", !0);
|
|
28444
28450
|
}
|
|
28445
|
-
}), [["__scopeId", "data-v-02414fc9"]]),
|
|
28451
|
+
}), [["__scopeId", "data-v-02414fc9"]]), IA = {
|
|
28446
28452
|
key: 0,
|
|
28447
28453
|
class: "approval-bar"
|
|
28448
|
-
},
|
|
28454
|
+
}, LA = { class: "approval-head" }, RA = { class: "approval-title" }, zA = {
|
|
28449
28455
|
key: 0,
|
|
28450
28456
|
class: "approval-question"
|
|
28451
|
-
},
|
|
28457
|
+
}, BA = {
|
|
28452
28458
|
key: 1,
|
|
28453
28459
|
class: "approval-context"
|
|
28454
|
-
},
|
|
28460
|
+
}, VA = {
|
|
28455
28461
|
key: 2,
|
|
28456
28462
|
class: "approval-recommend"
|
|
28457
|
-
},
|
|
28463
|
+
}, HA = {
|
|
28458
28464
|
key: 3,
|
|
28459
28465
|
class: "approval-options"
|
|
28460
|
-
},
|
|
28466
|
+
}, UA = ["onClick"], WA = { class: "approval-actions" }, GA = { class: "approval-head" }, KA = { class: "approval-title" }, qA = {
|
|
28461
28467
|
key: 0,
|
|
28462
28468
|
class: "approval-args"
|
|
28463
|
-
},
|
|
28469
|
+
}, JA = {
|
|
28464
28470
|
key: 1,
|
|
28465
28471
|
class: "approval-plan-context"
|
|
28466
|
-
},
|
|
28472
|
+
}, YA = { class: "approval-actions" }, XA = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28467
28473
|
__name: "ApprovalBar",
|
|
28468
28474
|
setup(e) {
|
|
28469
28475
|
let t = fw(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = t.planConfirmation, o = /* @__PURE__ */ Mn(!1);
|
|
@@ -28483,17 +28489,17 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28483
28489
|
return String(e);
|
|
28484
28490
|
}
|
|
28485
28491
|
});
|
|
28486
|
-
return (e, u) => K(n) ? (Y(), X("div",
|
|
28487
|
-
Z("div",
|
|
28488
|
-
K(n).args?.question ? (Y(), X("div",
|
|
28489
|
-
K(n).args?.context ? (Y(), X("div",
|
|
28490
|
-
K(n).args?.recommendation ? (Y(), X("div",
|
|
28491
|
-
c.value.length ? (Y(), X("div",
|
|
28492
|
+
return (e, u) => K(n) ? (Y(), X("div", IA, [s.value ? (Y(), X(J, { key: 0 }, [
|
|
28493
|
+
Z("div", LA, [u[5] ||= Z("span", { class: "approval-icon" }, "❓", -1), Z("span", RA, W(K(i).humanConfirmTitle), 1)]),
|
|
28494
|
+
K(n).args?.question ? (Y(), X("div", zA, W(K(n).args.question), 1)) : Q("", !0),
|
|
28495
|
+
K(n).args?.context ? (Y(), X("div", BA, W(K(n).args.context), 1)) : Q("", !0),
|
|
28496
|
+
K(n).args?.recommendation ? (Y(), X("div", VA, [xs(JT, { icon: K(t).icons.recommend }, null, 8, ["icon"]), Es(W(K(i).recommendPrefix) + W(K(n).args.recommendation), 1)])) : Q("", !0),
|
|
28497
|
+
c.value.length ? (Y(), X("div", HA, [(Y(!0), X(J, null, ga(c.value, (e) => (Y(), X("button", {
|
|
28492
28498
|
key: e,
|
|
28493
28499
|
class: "approval-opt",
|
|
28494
28500
|
onClick: (t) => K(r)(e)
|
|
28495
|
-
}, W(e), 9,
|
|
28496
|
-
Z("div",
|
|
28501
|
+
}, W(e), 9, UA))), 128))])) : Q("", !0),
|
|
28502
|
+
Z("div", WA, [Z("button", {
|
|
28497
28503
|
class: "approval-deny",
|
|
28498
28504
|
onClick: u[0] ||= (e) => K(r)(!1)
|
|
28499
28505
|
}, [xs(XT, { text: K(i).deny }, null, 8, ["text"])]), c.value.length ? Q("", !0) : (Y(), X("button", {
|
|
@@ -28502,18 +28508,18 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28502
28508
|
onClick: u[1] ||= (e) => K(r)(!0)
|
|
28503
28509
|
}, [xs(XT, { text: K(i).approve }, null, 8, ["text"])]))])
|
|
28504
28510
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
28505
|
-
Z("div",
|
|
28511
|
+
Z("div", GA, [
|
|
28506
28512
|
u[6] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
28507
|
-
Z("span",
|
|
28513
|
+
Z("span", KA, [Es(W(K(i).toolConfirmPrefix), 1), Z("code", null, W(K(n).toolName), 1)]),
|
|
28508
28514
|
l.value ? (Y(), X("button", {
|
|
28509
28515
|
key: 0,
|
|
28510
28516
|
class: "approval-toggle",
|
|
28511
28517
|
onClick: u[2] ||= (e) => o.value = !o.value
|
|
28512
28518
|
}, W(o.value ? K(i).collapseArgs : K(i).viewArgs) + W(o.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
28513
28519
|
]),
|
|
28514
|
-
l.value && o.value ? (Y(), X("pre",
|
|
28515
|
-
K(a) ? (Y(), X("div",
|
|
28516
|
-
Z("div",
|
|
28520
|
+
l.value && o.value ? (Y(), X("pre", qA, W(l.value), 1)) : Q("", !0),
|
|
28521
|
+
K(a) ? (Y(), X("div", JA, [xs(JT, { icon: K(t).icons.recommend }, null, 8, ["icon"]), Es(W(K(i).planConfirmedPrefix) + W(K(a).choice) + W(K(i).planConfirmedSuffix), 1)])) : Q("", !0),
|
|
28522
|
+
Z("div", YA, [Z("button", {
|
|
28517
28523
|
class: "approval-deny",
|
|
28518
28524
|
onClick: u[3] ||= (e) => K(r)(!1)
|
|
28519
28525
|
}, [xs(XT, { text: K(i).deny }, null, 8, ["text"])]), Z("button", {
|
|
@@ -28522,13 +28528,13 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28522
28528
|
}, [xs(XT, { text: K(i).approve }, null, 8, ["text"])])])
|
|
28523
28529
|
], 64))])) : Q("", !0);
|
|
28524
28530
|
}
|
|
28525
|
-
}), [["__scopeId", "data-v-4b13623e"]]),
|
|
28531
|
+
}), [["__scopeId", "data-v-4b13623e"]]), ZA = {
|
|
28526
28532
|
key: 0,
|
|
28527
28533
|
class: "conflict-bar"
|
|
28528
|
-
},
|
|
28534
|
+
}, QA = { class: "conflict-head" }, $A = { class: "conflict-icon" }, ej = { class: "conflict-title" }, tj = { class: "conflict-detail" }, nj = {
|
|
28529
28535
|
key: 0,
|
|
28530
28536
|
class: "conflict-diff"
|
|
28531
|
-
},
|
|
28537
|
+
}, rj = { class: "conflict-diff-col" }, ij = { class: "conflict-diff-label" }, aj = { class: "conflict-diff-pre" }, oj = { class: "conflict-diff-col" }, sj = { class: "conflict-diff-label" }, cj = { class: "conflict-diff-pre" }, lj = { class: "conflict-actions" }, uj = ["title"], dj = ["title"], fj = ["title"], pj = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28532
28538
|
__name: "ConflictBar",
|
|
28533
28539
|
props: {
|
|
28534
28540
|
pendingConflict: {},
|
|
@@ -28560,55 +28566,55 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28560
28566
|
return String(e);
|
|
28561
28567
|
}
|
|
28562
28568
|
});
|
|
28563
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
28564
|
-
Z("div",
|
|
28569
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", ZA, [
|
|
28570
|
+
Z("div", QA, [Z("span", $A, [xs(JT, { icon: e.icons.conflict }, null, 8, ["icon"])]), Z("span", ej, [
|
|
28565
28571
|
Es(W(e.messages.conflictTitlePrefix), 1),
|
|
28566
28572
|
Z("code", null, W(e.pendingConflict.path), 1),
|
|
28567
28573
|
Es(W(e.messages.conflictTitleSuffix), 1)
|
|
28568
28574
|
])]),
|
|
28569
|
-
Z("div",
|
|
28575
|
+
Z("div", tj, W(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
|
|
28570
28576
|
Z("button", {
|
|
28571
28577
|
class: "conflict-toggle",
|
|
28572
28578
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
28573
28579
|
}, W(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + W(n.value ? " ▴" : " ▾"), 1),
|
|
28574
|
-
n.value ? (Y(), X("div",
|
|
28575
|
-
Z("div",
|
|
28580
|
+
n.value ? (Y(), X("div", nj, [Z("div", rj, [Z("div", ij, W(e.messages.agentValueLabel), 1), Z("pre", aj, W(r.value || e.messages.deleteNoValue), 1)]), Z("div", oj, [Z("div", sj, W(e.messages.currentValueLabel), 1), Z("pre", cj, W(i.value), 1)])])) : Q("", !0),
|
|
28581
|
+
Z("div", lj, [
|
|
28576
28582
|
Z("button", {
|
|
28577
28583
|
class: "conflict-keep",
|
|
28578
28584
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
28579
28585
|
title: e.messages.keepExternalTitle
|
|
28580
|
-
}, [xs(XT, { text: e.messages.keepExternal }, null, 8, ["text"])], 8,
|
|
28586
|
+
}, [xs(XT, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, uj),
|
|
28581
28587
|
Z("button", {
|
|
28582
28588
|
class: "conflict-overwrite",
|
|
28583
28589
|
onClick: a[2] ||= (t) => e.onResolve?.("overwrite"),
|
|
28584
28590
|
title: e.messages.overwriteTitle
|
|
28585
|
-
}, [xs(XT, { text: e.messages.overwrite }, null, 8, ["text"])], 8,
|
|
28591
|
+
}, [xs(XT, { text: e.messages.overwrite }, null, 8, ["text"])], 8, dj),
|
|
28586
28592
|
Z("button", {
|
|
28587
28593
|
class: "conflict-restore",
|
|
28588
28594
|
onClick: a[3] ||= (t) => e.onResolve?.("restore"),
|
|
28589
28595
|
title: e.messages.restoreTitle
|
|
28590
|
-
}, [xs(XT, { text: e.messages.restore }, null, 8, ["text"])], 8,
|
|
28596
|
+
}, [xs(XT, { text: e.messages.restore }, null, 8, ["text"])], 8, fj)
|
|
28591
28597
|
])
|
|
28592
28598
|
])) : Q("", !0);
|
|
28593
28599
|
}
|
|
28594
|
-
}), [["__scopeId", "data-v-36dda58c"]]),
|
|
28600
|
+
}), [["__scopeId", "data-v-36dda58c"]]), mj = { class: "chat-footer" }, hj = ["title"], gj = {
|
|
28595
28601
|
key: 0,
|
|
28596
28602
|
class: "drop-hint"
|
|
28597
|
-
},
|
|
28603
|
+
}, _j = {
|
|
28598
28604
|
key: 1,
|
|
28599
28605
|
class: "chip-stack"
|
|
28600
|
-
},
|
|
28606
|
+
}, vj = {
|
|
28601
28607
|
key: 0,
|
|
28602
28608
|
class: "focus-chips"
|
|
28603
|
-
},
|
|
28609
|
+
}, yj = ["title", "onClick"], bj = { class: "focus-chip-icon" }, xj = { class: "focus-chip-path" }, Sj = ["title", "onClick"], Cj = {
|
|
28604
28610
|
key: 1,
|
|
28605
28611
|
class: "img-chips",
|
|
28606
28612
|
"data-test": "img-chips"
|
|
28607
|
-
},
|
|
28613
|
+
}, wj = ["title"], Tj = ["src", "alt"], Ej = ["onClick"], Dj = {
|
|
28608
28614
|
key: 2,
|
|
28609
28615
|
class: "img-error",
|
|
28610
28616
|
"data-test": "img-error"
|
|
28611
|
-
},
|
|
28617
|
+
}, Oj = ["placeholder", "rows"], kj = { class: "input-actions" }, Aj = { class: "send-hint" }, jj = ["title"], Mj = {
|
|
28612
28618
|
key: 1,
|
|
28613
28619
|
width: "15",
|
|
28614
28620
|
height: "15",
|
|
@@ -28618,13 +28624,13 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28618
28624
|
"stroke-width": "2",
|
|
28619
28625
|
"stroke-linecap": "round",
|
|
28620
28626
|
"stroke-linejoin": "round"
|
|
28621
|
-
},
|
|
28627
|
+
}, Nj = ["disabled", "title"], Pj = {
|
|
28622
28628
|
key: 0,
|
|
28623
28629
|
width: "16",
|
|
28624
28630
|
height: "16",
|
|
28625
28631
|
viewBox: "0 0 24 24",
|
|
28626
28632
|
fill: "currentColor"
|
|
28627
|
-
},
|
|
28633
|
+
}, Fj = {
|
|
28628
28634
|
key: 2,
|
|
28629
28635
|
width: "18",
|
|
28630
28636
|
height: "18",
|
|
@@ -28632,7 +28638,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28632
28638
|
fill: "none",
|
|
28633
28639
|
stroke: "currentColor",
|
|
28634
28640
|
"stroke-width": "2"
|
|
28635
|
-
},
|
|
28641
|
+
}, Ij = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28636
28642
|
__name: "ChatInput",
|
|
28637
28643
|
props: {
|
|
28638
28644
|
placeholder: {},
|
|
@@ -28656,36 +28662,36 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28656
28662
|
}
|
|
28657
28663
|
n.length && h(n);
|
|
28658
28664
|
};
|
|
28659
|
-
return (t, h) => (Y(), X("div",
|
|
28665
|
+
return (t, h) => (Y(), X("div", mj, [K(a) ? (Y(), X("button", {
|
|
28660
28666
|
key: 0,
|
|
28661
28667
|
class: "undo-foot-btn",
|
|
28662
28668
|
title: K(d).undoTitle,
|
|
28663
28669
|
onClick: h[0] ||= (...e) => K(o) && K(o)(...e)
|
|
28664
|
-
}, W(K(d).undo), 9,
|
|
28670
|
+
}, W(K(d).undo), 9, hj)) : Q("", !0), Z("div", {
|
|
28665
28671
|
class: Be(["chat-input-wrap", { "drag-over": b.value }]),
|
|
28666
28672
|
onDragover: h[4] ||= Ol((e) => b.value = !0, ["prevent"]),
|
|
28667
28673
|
onDragleave: h[5] ||= (e) => b.value = !1,
|
|
28668
28674
|
onDrop: Ol(C, ["prevent"])
|
|
28669
28675
|
}, [
|
|
28670
|
-
b.value ? (Y(), X("div",
|
|
28671
|
-
K(s).length || K(m).length || K(_) ? (Y(), X("div",
|
|
28672
|
-
K(s).length ? (Y(), X("div",
|
|
28676
|
+
b.value ? (Y(), X("div", gj, W(K(d).imageDropHint), 1)) : Q("", !0),
|
|
28677
|
+
K(s).length || K(m).length || K(_) ? (Y(), X("div", _j, [
|
|
28678
|
+
K(s).length ? (Y(), X("div", vj, [(Y(!0), X(J, null, ga(K(s), (e) => (Y(), X("span", {
|
|
28673
28679
|
key: e.path,
|
|
28674
28680
|
class: "focus-chip",
|
|
28675
28681
|
title: K(d).focusChipTitlePrefix + e.path + K(d).focusChipTitleHint,
|
|
28676
28682
|
onClick: (t) => K(l)(e)
|
|
28677
28683
|
}, [
|
|
28678
|
-
Z("span",
|
|
28679
|
-
Z("code",
|
|
28684
|
+
Z("span", bj, [xs(JT, { icon: K(u).focus }, null, 8, ["icon"])]),
|
|
28685
|
+
Z("code", xj, W(e.path), 1),
|
|
28680
28686
|
Z("button", {
|
|
28681
28687
|
type: "button",
|
|
28682
28688
|
class: "focus-chip-x",
|
|
28683
28689
|
"data-test": "focus-clear",
|
|
28684
28690
|
title: K(d).removeFocus,
|
|
28685
28691
|
onClick: Ol((t) => K(c)(e.path), ["stop"])
|
|
28686
|
-
}, "✕", 8,
|
|
28687
|
-
], 8,
|
|
28688
|
-
K(m).length ? (Y(), X("div",
|
|
28692
|
+
}, "✕", 8, Sj)
|
|
28693
|
+
], 8, yj))), 128))])) : Q("", !0),
|
|
28694
|
+
K(m).length ? (Y(), X("div", Cj, [(Y(!0), X(J, null, ga(K(m), (e) => (Y(), X("span", {
|
|
28689
28695
|
key: e.id,
|
|
28690
28696
|
class: "img-chip",
|
|
28691
28697
|
title: e.name || K(d).imageAlt
|
|
@@ -28693,13 +28699,13 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28693
28699
|
class: "img-chip-thumb",
|
|
28694
28700
|
src: e.dataUri,
|
|
28695
28701
|
alt: e.name || K(d).imageAlt
|
|
28696
|
-
}, null, 8,
|
|
28702
|
+
}, null, 8, Tj), Z("button", {
|
|
28697
28703
|
type: "button",
|
|
28698
28704
|
class: "img-chip-x",
|
|
28699
28705
|
"data-test": "img-chip-x",
|
|
28700
28706
|
onClick: (t) => K(g)(e.id)
|
|
28701
|
-
}, "✕", 8,
|
|
28702
|
-
K(_) ? (Y(), X("div",
|
|
28707
|
+
}, "✕", 8, Ej)], 8, wj))), 128))])) : Q("", !0),
|
|
28708
|
+
K(_) ? (Y(), X("div", Dj, W(K(_)), 1)) : Q("", !0)
|
|
28703
28709
|
])) : Q("", !0),
|
|
28704
28710
|
ai(Z("textarea", {
|
|
28705
28711
|
"onUpdate:modelValue": h[1] ||= (e) => /* @__PURE__ */ jn(n) ? n.value = e : null,
|
|
@@ -28708,9 +28714,9 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28708
28714
|
rows: e.inputRows,
|
|
28709
28715
|
onKeydown: h[2] ||= (...e) => K(i) && K(i)(...e),
|
|
28710
28716
|
onPaste: w
|
|
28711
|
-
}, null, 40,
|
|
28712
|
-
Z("div",
|
|
28713
|
-
Z("span",
|
|
28717
|
+
}, null, 40, Oj), [[Tl, K(n)]]),
|
|
28718
|
+
Z("div", kj, [
|
|
28719
|
+
Z("span", Aj, W(K(d).sendHint), 1),
|
|
28714
28720
|
Z("button", {
|
|
28715
28721
|
class: "attach-btn",
|
|
28716
28722
|
title: K(d).attachImageTitle,
|
|
@@ -28719,7 +28725,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28719
28725
|
}, [K(u).attachImage ? (Y(), ms(JT, {
|
|
28720
28726
|
key: 0,
|
|
28721
28727
|
icon: K(u).attachImage
|
|
28722
|
-
}, null, 8, ["icon"])) : (Y(), X("svg",
|
|
28728
|
+
}, null, 8, ["icon"])) : (Y(), X("svg", Mj, [...h[6] ||= [Z("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, jj),
|
|
28723
28729
|
Z("input", {
|
|
28724
28730
|
ref_key: "fileInput",
|
|
28725
28731
|
ref: y,
|
|
@@ -28735,7 +28741,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28735
28741
|
disabled: !K(f).loading && !K(n).trim() && !K(m).length && !K(v),
|
|
28736
28742
|
title: K(f).loading ? K(d).stopTitle : K(d).sendTitle,
|
|
28737
28743
|
onClick: h[3] ||= (e) => K(f).loading ? K(p)() : K(r)()
|
|
28738
|
-
}, [K(f).loading ? (Y(), X("svg",
|
|
28744
|
+
}, [K(f).loading ? (Y(), X("svg", Pj, [...h[7] ||= [Z("rect", {
|
|
28739
28745
|
x: "6",
|
|
28740
28746
|
y: "6",
|
|
28741
28747
|
width: "12",
|
|
@@ -28744,187 +28750,187 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
28744
28750
|
}, null, -1)]])) : K(u).send ? (Y(), ms(JT, {
|
|
28745
28751
|
key: 1,
|
|
28746
28752
|
icon: K(u).send
|
|
28747
|
-
}, null, 8, ["icon"])) : (Y(), X("svg",
|
|
28753
|
+
}, null, 8, ["icon"])) : (Y(), X("svg", Fj, [...h[8] ||= [Z("line", {
|
|
28748
28754
|
x1: "22",
|
|
28749
28755
|
y1: "2",
|
|
28750
28756
|
x2: "11",
|
|
28751
28757
|
y2: "13"
|
|
28752
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
28758
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, Nj)
|
|
28753
28759
|
])
|
|
28754
28760
|
], 34)]));
|
|
28755
28761
|
}
|
|
28756
|
-
}), [["__scopeId", "data-v-5ceb07ef"]]),
|
|
28762
|
+
}), [["__scopeId", "data-v-5ceb07ef"]]), Lj = {
|
|
28757
28763
|
key: 0,
|
|
28758
28764
|
class: "debug-drawer"
|
|
28759
|
-
},
|
|
28765
|
+
}, Rj = { class: "drawer-header" }, zj = { class: "tab-group" }, Bj = { class: "header-actions" }, Vj = ["title"], Hj = ["title"], Uj = ["title"], Wj = {
|
|
28760
28766
|
key: 0,
|
|
28761
28767
|
class: "drawer-filters"
|
|
28762
|
-
},
|
|
28768
|
+
}, Gj = ["onClick"], Kj = { class: "chip-count" }, qj = { class: "chip-count" }, Jj = {
|
|
28763
28769
|
key: 0,
|
|
28764
28770
|
class: "context-panel"
|
|
28765
|
-
},
|
|
28771
|
+
}, Yj = {
|
|
28766
28772
|
key: 0,
|
|
28767
28773
|
class: "trace-empty"
|
|
28768
|
-
},
|
|
28774
|
+
}, Xj = { class: "ctx-overview" }, Zj = { class: "ctx-occupancy" }, Qj = ["title"], $j = ["title"], eM = { class: "ctx-pct" }, tM = { class: "ctx-kv-row" }, nM = { class: "ctx-kv" }, rM = {
|
|
28769
28775
|
key: 0,
|
|
28770
28776
|
class: "ctx-kv"
|
|
28771
|
-
},
|
|
28777
|
+
}, iM = {
|
|
28772
28778
|
key: 1,
|
|
28773
28779
|
class: "ctx-kv"
|
|
28774
|
-
},
|
|
28780
|
+
}, aM = { class: "ctx-section-title" }, oM = ["title"], sM = { class: "ctx-cat-bar" }, cM = { class: "ctx-cat-tokens" }, lM = {
|
|
28775
28781
|
key: 0,
|
|
28776
28782
|
class: "ctx-compression"
|
|
28777
|
-
},
|
|
28783
|
+
}, uM = { class: "ctx-section-title" }, dM = { class: "ctx-kv-row" }, fM = { class: "ctx-kv" }, pM = { class: "ctx-kv" }, mM = { class: "ctx-kv" }, hM = {
|
|
28778
28784
|
key: 0,
|
|
28779
28785
|
class: "ctx-kv"
|
|
28780
|
-
},
|
|
28786
|
+
}, gM = {
|
|
28781
28787
|
key: 1,
|
|
28782
28788
|
class: "subagent-panel"
|
|
28783
|
-
},
|
|
28789
|
+
}, _M = {
|
|
28784
28790
|
key: 0,
|
|
28785
28791
|
class: "sub-section"
|
|
28786
|
-
},
|
|
28792
|
+
}, vM = { class: "sub-section-title" }, yM = {
|
|
28787
28793
|
key: 1,
|
|
28788
28794
|
class: "trace-empty"
|
|
28789
|
-
},
|
|
28795
|
+
}, bM = {
|
|
28790
28796
|
key: 0,
|
|
28791
28797
|
class: "sub-section"
|
|
28792
|
-
},
|
|
28798
|
+
}, xM = { class: "sub-section-title" }, SM = { class: "sub-head" }, CM = { class: "sub-label" }, wM = { class: "sub-steps-badge" }, TM = { class: "sub-task" }, EM = {
|
|
28793
28799
|
key: 1,
|
|
28794
28800
|
class: "sub-section"
|
|
28795
|
-
},
|
|
28801
|
+
}, DM = { class: "sub-section-title" }, OM = { class: "sub-head" }, kM = { class: "sub-label" }, AM = {
|
|
28796
28802
|
key: 0,
|
|
28797
28803
|
class: "sub-dur"
|
|
28798
|
-
},
|
|
28804
|
+
}, jM = ["onClick"], MM = { class: "sub-task" }, NM = {
|
|
28799
28805
|
key: 0,
|
|
28800
28806
|
class: "sub-result"
|
|
28801
|
-
},
|
|
28807
|
+
}, PM = {
|
|
28802
28808
|
key: 1,
|
|
28803
28809
|
class: "sub-steps-list"
|
|
28804
|
-
},
|
|
28810
|
+
}, FM = { class: "sub-step-kind" }, IM = { class: "sub-step-name" }, LM = { class: "sub-step-ts" }, RM = {
|
|
28805
28811
|
key: 0,
|
|
28806
28812
|
class: "empty"
|
|
28807
|
-
},
|
|
28813
|
+
}, zM = ["onClick"], BM = { class: "log-group-title" }, VM = { class: "log-group-meta" }, HM = {
|
|
28808
28814
|
key: 0,
|
|
28809
28815
|
class: "lg-badge"
|
|
28810
|
-
},
|
|
28816
|
+
}, UM = {
|
|
28811
28817
|
key: 1,
|
|
28812
28818
|
class: "lg-badge"
|
|
28813
|
-
},
|
|
28819
|
+
}, WM = {
|
|
28814
28820
|
key: 2,
|
|
28815
28821
|
class: "lg-badge err"
|
|
28816
|
-
},
|
|
28822
|
+
}, GM = { class: "log-group-body" }, KM = { class: "log-head" }, qM = {
|
|
28817
28823
|
key: 0,
|
|
28818
28824
|
class: "log-source"
|
|
28819
|
-
},
|
|
28825
|
+
}, JM = { class: "log-time" }, YM = { class: "log-body" }, XM = { class: "kv-grid" }, ZM = { class: "kv" }, QM = { class: "k" }, $M = { class: "v" }, eN = { class: "kv" }, tN = { class: "k" }, nN = { class: "v" }, rN = { class: "kv" }, iN = { class: "v" }, aN = { class: "kv" }, oN = { class: "k" }, sN = { class: "v" }, cN = { class: "section-label" }, lN = { class: "chip-row" }, uN = { class: "section-label" }, dN = { class: "msg-list" }, fN = { class: "msg-text" }, pN = { class: "badge-row" }, mN = { class: "badge" }, hN = {
|
|
28820
28826
|
key: 0,
|
|
28821
28827
|
class: "badge muted"
|
|
28822
|
-
},
|
|
28828
|
+
}, gN = { class: "badge muted" }, _N = {
|
|
28823
28829
|
key: 1,
|
|
28824
28830
|
class: "badge muted"
|
|
28825
|
-
},
|
|
28831
|
+
}, vN = ["onClick"], yN = ["title", "onClick"], bN = ["onClick"], xN = ["title", "onClick"], SN = { class: "msg-detail" }, CN = {
|
|
28826
28832
|
key: 0,
|
|
28827
28833
|
class: "msg-text"
|
|
28828
|
-
},
|
|
28834
|
+
}, wN = { class: "tc-inline-name" }, TN = { class: "tc-inline-args" }, EN = {
|
|
28829
28835
|
key: 1,
|
|
28830
28836
|
class: "tc-id"
|
|
28831
|
-
},
|
|
28837
|
+
}, DN = {
|
|
28832
28838
|
key: 1,
|
|
28833
28839
|
class: "log-raw"
|
|
28834
|
-
},
|
|
28840
|
+
}, ON = { class: "badge-row" }, kN = { class: "badge" }, AN = {
|
|
28835
28841
|
key: 0,
|
|
28836
28842
|
class: "badge warn"
|
|
28837
|
-
},
|
|
28843
|
+
}, jN = {
|
|
28838
28844
|
key: 0,
|
|
28839
28845
|
class: "resp-content"
|
|
28840
|
-
},
|
|
28846
|
+
}, MN = {
|
|
28841
28847
|
key: 1,
|
|
28842
28848
|
class: "tc-list"
|
|
28843
|
-
},
|
|
28849
|
+
}, NN = { class: "tc-name" }, PN = { class: "tc-args" }, FN = {
|
|
28844
28850
|
key: 2,
|
|
28845
28851
|
class: "usage-row"
|
|
28846
|
-
},
|
|
28852
|
+
}, IN = { class: "usage" }, LN = { class: "usage" }, RN = { class: "usage" }, zN = {
|
|
28847
28853
|
key: 0,
|
|
28848
28854
|
class: "usage"
|
|
28849
|
-
},
|
|
28855
|
+
}, BN = { class: "tc-name" }, VN = {
|
|
28850
28856
|
key: 0,
|
|
28851
28857
|
class: "tc-dur"
|
|
28852
|
-
},
|
|
28858
|
+
}, HN = ["title", "onClick"], UN = { class: "tc-args" }, WN = { class: "tc-result-sep" }, GN = { class: "tc-args tc-result" }, KN = {
|
|
28853
28859
|
key: 1,
|
|
28854
28860
|
class: "tc-card inline"
|
|
28855
|
-
},
|
|
28861
|
+
}, qN = { class: "tc-name" }, JN = {
|
|
28856
28862
|
key: 0,
|
|
28857
28863
|
class: "tc-dur running"
|
|
28858
|
-
},
|
|
28864
|
+
}, YN = { class: "tc-args" }, XN = {
|
|
28859
28865
|
key: 4,
|
|
28860
28866
|
class: "err-box"
|
|
28861
|
-
},
|
|
28867
|
+
}, ZN = { class: "log-footer" }, QN = ["onClick"], $N = ["onClick"], eP = {
|
|
28862
28868
|
key: 0,
|
|
28863
28869
|
class: "log-raw"
|
|
28864
|
-
},
|
|
28870
|
+
}, tP = {
|
|
28865
28871
|
key: 3,
|
|
28866
28872
|
class: "info-body"
|
|
28867
|
-
},
|
|
28873
|
+
}, nP = {
|
|
28868
28874
|
key: 0,
|
|
28869
28875
|
class: "empty"
|
|
28870
|
-
},
|
|
28876
|
+
}, rP = { class: "info-section" }, iP = { class: "info-title" }, aP = { class: "kv-grid" }, oP = { class: "kv" }, sP = { class: "v" }, cP = { class: "kv" }, lP = { class: "k" }, uP = { class: "v" }, dP = { class: "kv" }, fP = { class: "k" }, pP = { class: "v" }, mP = { class: "kv" }, hP = { class: "k" }, gP = { class: "v" }, _P = {
|
|
28871
28877
|
class: "kv",
|
|
28872
28878
|
style: { "margin-top": "6px" }
|
|
28873
|
-
},
|
|
28879
|
+
}, vP = { class: "k" }, yP = {
|
|
28874
28880
|
class: "v",
|
|
28875
28881
|
style: { "font-size": "11px" }
|
|
28876
|
-
},
|
|
28882
|
+
}, bP = { class: "info-section" }, xP = { class: "info-title" }, SP = { class: "info-name" }, CP = { class: "info-desc" }, wP = {
|
|
28877
28883
|
key: 0,
|
|
28878
28884
|
class: "info-section"
|
|
28879
|
-
},
|
|
28885
|
+
}, TP = { class: "info-title" }, EP = { class: "info-hint" }, DP = ["onClick"], OP = { class: "info-desc" }, kP = {
|
|
28880
28886
|
key: 0,
|
|
28881
28887
|
class: "skill-content"
|
|
28882
|
-
},
|
|
28888
|
+
}, AP = {
|
|
28883
28889
|
key: 0,
|
|
28884
28890
|
class: "skill-loading"
|
|
28885
|
-
},
|
|
28891
|
+
}, jP = {
|
|
28886
28892
|
key: 1,
|
|
28887
28893
|
class: "skill-error"
|
|
28888
|
-
},
|
|
28894
|
+
}, MP = {
|
|
28889
28895
|
key: 2,
|
|
28890
28896
|
class: "skill-pre"
|
|
28891
|
-
},
|
|
28897
|
+
}, NP = {
|
|
28892
28898
|
key: 1,
|
|
28893
28899
|
class: "info-section"
|
|
28894
|
-
},
|
|
28900
|
+
}, PP = { class: "info-title" }, FP = { class: "info-item" }, IP = { class: "info-name" }, LP = { class: "info-desc" }, RP = { class: "info-section" }, zP = { class: "info-title" }, BP = { class: "kv-grid" }, VP = { class: "kv" }, HP = { class: "k" }, UP = { class: "v" }, WP = { class: "kv" }, GP = { class: "k" }, KP = { class: "v" }, qP = { class: "kv" }, JP = { class: "k" }, YP = { class: "v" }, XP = { class: "kv" }, ZP = { class: "k" }, QP = {
|
|
28895
28901
|
class: "v",
|
|
28896
28902
|
style: { "font-size": "11px" }
|
|
28897
|
-
},
|
|
28903
|
+
}, $P = {
|
|
28898
28904
|
key: 2,
|
|
28899
28905
|
class: "info-section"
|
|
28900
|
-
},
|
|
28906
|
+
}, eF = { class: "info-title" }, tF = { class: "info-name" }, nF = { class: "src-tag mcp" }, rF = { class: "info-desc" }, iF = {
|
|
28901
28907
|
key: 3,
|
|
28902
28908
|
class: "info-section"
|
|
28903
|
-
},
|
|
28909
|
+
}, aF = { class: "info-title" }, oF = { class: "kv-grid" }, sF = { class: "kv" }, cF = { class: "k" }, lF = { class: "v" }, uF = { class: "kv" }, dF = { class: "k" }, fF = { class: "v" }, pF = { class: "kv" }, mF = { class: "k" }, hF = { class: "v" }, gF = {
|
|
28904
28910
|
key: 0,
|
|
28905
28911
|
class: "kv"
|
|
28906
|
-
},
|
|
28912
|
+
}, _F = { class: "k" }, vF = {
|
|
28907
28913
|
class: "v",
|
|
28908
28914
|
style: { "font-size": "11px" }
|
|
28909
|
-
},
|
|
28915
|
+
}, yF = {
|
|
28910
28916
|
key: 4,
|
|
28911
28917
|
class: "info-section"
|
|
28912
|
-
},
|
|
28918
|
+
}, bF = { class: "info-title" }, xF = {
|
|
28913
28919
|
key: 5,
|
|
28914
28920
|
class: "info-section"
|
|
28915
|
-
},
|
|
28921
|
+
}, SF = { class: "info-title" }, CF = { class: "info-pre" }, wF = {
|
|
28916
28922
|
key: 6,
|
|
28917
28923
|
class: "info-section"
|
|
28918
|
-
},
|
|
28924
|
+
}, TF = { class: "info-title" }, EF = { class: "info-kv" }, DF = { class: "kv" }, OF = { class: "k" }, kF = { class: "v" }, AF = { class: "kv" }, jF = { class: "k" }, MF = { class: "v" }, NF = { class: "kv" }, PF = { class: "k" }, FF = { class: "v" }, IF = { class: "kv" }, LF = { class: "k" }, RF = { class: "v" }, zF = { class: "kv" }, BF = { class: "k" }, VF = {
|
|
28919
28925
|
class: "v",
|
|
28920
28926
|
style: { "font-size": "11px" }
|
|
28921
|
-
},
|
|
28927
|
+
}, HF = {
|
|
28922
28928
|
key: 0,
|
|
28923
28929
|
class: "kv"
|
|
28924
|
-
},
|
|
28930
|
+
}, UF = { class: "k" }, WF = {
|
|
28925
28931
|
class: "v",
|
|
28926
28932
|
style: { "font-size": "11px" }
|
|
28927
|
-
},
|
|
28933
|
+
}, GF = 400, KF = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
28928
28934
|
__name: "DebugDrawer",
|
|
28929
28935
|
props: {
|
|
28930
28936
|
logs: { default: () => [] },
|
|
@@ -29328,8 +29334,8 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29328
29334
|
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 : ""}`;
|
|
29329
29335
|
}
|
|
29330
29336
|
return (t, n) => (Y(), ms(Ei, { to: "body" }, [xs(Tc, { name: "drawer" }, {
|
|
29331
|
-
default: ri(() => [e.visible ? (Y(), X("div",
|
|
29332
|
-
Z("div",
|
|
29337
|
+
default: ri(() => [e.visible ? (Y(), X("div", Lj, [Z("div", { class: Be(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
29338
|
+
Z("div", Rj, [Z("div", zj, [
|
|
29333
29339
|
Z("button", {
|
|
29334
29340
|
class: Be(["tab-btn", { active: ce.value === "logs" }]),
|
|
29335
29341
|
onClick: n[0] ||= (e) => le("logs")
|
|
@@ -29349,33 +29355,33 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29349
29355
|
class: Be(["tab-btn", { active: ce.value === "info" }]),
|
|
29350
29356
|
onClick: n[3] ||= (e) => le("info")
|
|
29351
29357
|
}, "🧬 " + W(y.value.debugTabInfo), 3)) : Q("", !0)
|
|
29352
|
-
]), Z("div",
|
|
29358
|
+
]), Z("div", Bj, [
|
|
29353
29359
|
Z("button", {
|
|
29354
29360
|
class: "hd-btn",
|
|
29355
29361
|
title: y.value.debugCopyReport,
|
|
29356
29362
|
onClick: v
|
|
29357
|
-
}, W(g.value === "report" ? "✓" : "💾"), 9,
|
|
29363
|
+
}, W(g.value === "report" ? "✓" : "💾"), 9, Vj),
|
|
29358
29364
|
ce.value === "logs" ? (Y(), X("button", {
|
|
29359
29365
|
key: 0,
|
|
29360
29366
|
class: "hd-btn",
|
|
29361
29367
|
title: y.value.debugClearLogs,
|
|
29362
29368
|
onClick: se
|
|
29363
|
-
}, "🗑️", 8,
|
|
29369
|
+
}, "🗑️", 8, Hj)) : Q("", !0),
|
|
29364
29370
|
Z("button", {
|
|
29365
29371
|
class: "hd-btn",
|
|
29366
29372
|
title: y.value.close,
|
|
29367
29373
|
onClick: oe
|
|
29368
|
-
}, "✕", 8,
|
|
29374
|
+
}, "✕", 8, Uj)
|
|
29369
29375
|
])]),
|
|
29370
|
-
ce.value === "logs" ? (Y(), X("div",
|
|
29376
|
+
ce.value === "logs" ? (Y(), X("div", Wj, [(Y(!0), X(J, null, ga(b.value, (e, t) => (Y(), X("button", {
|
|
29371
29377
|
key: t,
|
|
29372
29378
|
class: Be(["filter-chip", { active: i.value === t }]),
|
|
29373
29379
|
style: Fe({ "--chip-color": e.color }),
|
|
29374
29380
|
onClick: (e) => i.value = t
|
|
29375
|
-
}, [Es(W(e.icon) + " " + W(e.label) + " ", 1), Z("span",
|
|
29381
|
+
}, [Es(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", Kj, W(C.value[t] || 0), 1)], 14, Gj))), 128)), Z("button", {
|
|
29376
29382
|
class: Be(["filter-chip all", { active: i.value === "all" }]),
|
|
29377
29383
|
onClick: n[4] ||= (e) => i.value = "all"
|
|
29378
|
-
}, [Es(W(y.value.debugFilterAll) + " ", 1), Z("span",
|
|
29384
|
+
}, [Es(W(y.value.debugFilterAll) + " ", 1), Z("span", qj, W(C.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
29379
29385
|
Z("div", {
|
|
29380
29386
|
class: "drawer-body",
|
|
29381
29387
|
ref_key: "drawerBodyEl",
|
|
@@ -29389,8 +29395,8 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29389
29395
|
ref_key: "drawerContentsEl",
|
|
29390
29396
|
ref: c
|
|
29391
29397
|
}, [
|
|
29392
|
-
ce.value === "context" ? (Y(), X("div",
|
|
29393
|
-
Z("div",
|
|
29398
|
+
ce.value === "context" ? (Y(), X("div", Jj, [U.value ? (Y(), X(J, { key: 1 }, [U.value ? (Y(), X(J, { key: 0 }, [
|
|
29399
|
+
Z("div", Xj, [Z("div", Zj, [Z("div", {
|
|
29394
29400
|
class: "ctx-bar-track",
|
|
29395
29401
|
title: `${y.value.debugCtxOccupancy} ${Math.round(U.value.occupancy * 100)}%`
|
|
29396
29402
|
}, [Z("div", {
|
|
@@ -29401,12 +29407,12 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29401
29407
|
class: "ctx-threshold-mark",
|
|
29402
29408
|
style: Fe({ left: Math.min(U.value.thresholdRatio * 100, 100) + "%" }),
|
|
29403
29409
|
title: y.value.debugCtxThreshold
|
|
29404
|
-
}, null, 12,
|
|
29405
|
-
Z("span",
|
|
29406
|
-
U.value.contextWindow ? (Y(), X("span",
|
|
29407
|
-
U.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
29410
|
+
}, null, 12, $j)) : Q("", !0)], 8, Qj), Z("span", eM, W(Math.round(U.value.occupancy * 100)) + "%", 1)]), Z("div", tM, [
|
|
29411
|
+
Z("span", nM, W(y.value.debugCtxTokens) + " " + W(U.value.totalTokens) + " token", 1),
|
|
29412
|
+
U.value.contextWindow ? (Y(), X("span", rM, W(y.value.debugCtxWindow) + " " + W(U.value.contextWindow), 1)) : Q("", !0),
|
|
29413
|
+
U.value.thresholdRatio > 0 ? (Y(), X("span", iM, W(y.value.debugCtxThresholdPct) + " " + W(Math.round(U.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
29408
29414
|
])]),
|
|
29409
|
-
Z("div",
|
|
29415
|
+
Z("div", aM, W(y.value.debugCtxCategories), 1),
|
|
29410
29416
|
(Y(!0), X(J, null, ga(U.value.categories, (e) => (Y(), X("div", {
|
|
29411
29417
|
key: e.key,
|
|
29412
29418
|
class: "ctx-cat"
|
|
@@ -29414,62 +29420,62 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29414
29420
|
Z("span", {
|
|
29415
29421
|
class: "ctx-cat-label",
|
|
29416
29422
|
title: e.label
|
|
29417
|
-
}, W(e.label), 9,
|
|
29418
|
-
Z("div",
|
|
29423
|
+
}, W(e.label), 9, oM),
|
|
29424
|
+
Z("div", sM, [Z("div", {
|
|
29419
29425
|
class: "ctx-cat-fill",
|
|
29420
29426
|
style: Fe({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
29421
29427
|
}, null, 4)]),
|
|
29422
|
-
Z("span",
|
|
29428
|
+
Z("span", cM, [Es(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
|
|
29423
29429
|
]))), 128)),
|
|
29424
|
-
U.value.compression ? (Y(), X("div",
|
|
29425
|
-
Z("span",
|
|
29426
|
-
Z("span",
|
|
29427
|
-
Z("span",
|
|
29428
|
-
U.value.compression.decision ? (Y(), X("span",
|
|
29430
|
+
U.value.compression ? (Y(), X("div", lM, [Z("div", uM, W(y.value.debugCtxLastCompression), 1), Z("div", dM, [
|
|
29431
|
+
Z("span", fM, W(y.value.debugCtxSummarized) + " " + W(U.value.compression.roundsSummarized) + "/" + W(U.value.compression.roundsTotal) + W(y.value.debugCtxRoundsSuffix), 1),
|
|
29432
|
+
Z("span", pM, W(y.value.debugCtxRecalled) + " " + W(U.value.compression.roundsRecalled), 1),
|
|
29433
|
+
Z("span", mM, W(U.value.compression.strategy), 1),
|
|
29434
|
+
U.value.compression.decision ? (Y(), X("span", hM, "🤖 " + W(y.value.debugCtxAgentDecision) + W(be(U.value.compression.decision)), 1)) : Q("", !0)
|
|
29429
29435
|
])])) : Q("", !0)
|
|
29430
|
-
], 64)) : Q("", !0)], 64)) : (Y(), X("div",
|
|
29431
|
-
ce.value === "subagent" ? (Y(), X("div",
|
|
29436
|
+
], 64)) : Q("", !0)], 64)) : (Y(), X("div", Yj, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
|
|
29437
|
+
ce.value === "subagent" ? (Y(), X("div", gM, [ge.value.length ? (Y(), X("div", _M, [Z("div", vM, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(ge.value.length) + ")", 1), (Y(!0), X(J, null, ga(ge.value, ([e, t]) => (Y(), X("div", {
|
|
29432
29438
|
key: "lock-" + e,
|
|
29433
29439
|
class: "sub-task"
|
|
29434
|
-
}, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !me.value.length && !he.value.length ? (Y(), X("div",
|
|
29440
|
+
}, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !me.value.length && !he.value.length ? (Y(), X("div", yM, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [me.value.length ? (Y(), X("div", bM, [Z("div", xM, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(me.value.length) + ")", 1), (Y(!0), X(J, null, ga(me.value, (e, t) => (Y(), X("div", {
|
|
29435
29441
|
key: "a" + t,
|
|
29436
29442
|
class: Be(["sub-card", e.status])
|
|
29437
|
-
}, [Z("div",
|
|
29443
|
+
}, [Z("div", SM, [
|
|
29438
29444
|
Z("span", {
|
|
29439
29445
|
class: "sub-status",
|
|
29440
29446
|
style: Fe({ background: _e.value[e.status] && _e.value[e.status].color || "#9ca3af" })
|
|
29441
29447
|
}, W(_e.value[e.status] && _e.value[e.status].label || e.status), 5),
|
|
29442
|
-
Z("span",
|
|
29443
|
-
Z("span",
|
|
29444
|
-
]), Z("div",
|
|
29448
|
+
Z("span", CM, W(e.label), 1),
|
|
29449
|
+
Z("span", wM, W(e.steps.length) + W(y.value.debugStepsCountSuffix), 1)
|
|
29450
|
+
]), Z("div", TM, W(de(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), he.value.length ? (Y(), X("div", EM, [Z("div", DM, "🕐 " + W(y.value.debugSubHistoryTitle) + " (" + W(he.value.length) + ")", 1), (Y(!0), X(J, null, ga(he.value, (e, t) => (Y(), X("div", {
|
|
29445
29451
|
key: "h" + t,
|
|
29446
29452
|
class: Be(["sub-card", e.status])
|
|
29447
29453
|
}, [
|
|
29448
|
-
Z("div",
|
|
29454
|
+
Z("div", OM, [
|
|
29449
29455
|
Z("span", {
|
|
29450
29456
|
class: "sub-status",
|
|
29451
29457
|
style: Fe({ background: _e.value[e.status] && _e.value[e.status].color || "#9ca3af" })
|
|
29452
29458
|
}, W(_e.value[e.status] && _e.value[e.status].label || e.status), 5),
|
|
29453
|
-
Z("span",
|
|
29454
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
29459
|
+
Z("span", kM, W(e.label), 1),
|
|
29460
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", AM, W(fe(e.durationMs)), 1)),
|
|
29455
29461
|
e.steps.length ? (Y(), X("button", {
|
|
29456
29462
|
key: 1,
|
|
29457
29463
|
class: "sub-toggle",
|
|
29458
29464
|
onClick: (e) => ye(t)
|
|
29459
|
-
}, W(ve.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9,
|
|
29465
|
+
}, W(ve.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, jM)) : Q("", !0)
|
|
29460
29466
|
]),
|
|
29461
|
-
Z("div",
|
|
29462
|
-
e.resultPreview ? (Y(), X("div",
|
|
29463
|
-
ve.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
29467
|
+
Z("div", MM, W(de(e.task, 80)), 1),
|
|
29468
|
+
e.resultPreview ? (Y(), X("div", NM, W(e.resultPreview), 1)) : Q("", !0),
|
|
29469
|
+
ve.value.has(t) && e.steps.length ? (Y(), X("div", PM, [(Y(!0), X(J, null, ga(e.steps, (e, t) => (Y(), X("div", {
|
|
29464
29470
|
key: t,
|
|
29465
29471
|
class: "sub-step"
|
|
29466
29472
|
}, [
|
|
29467
|
-
Z("span",
|
|
29468
|
-
Z("span",
|
|
29469
|
-
Z("span",
|
|
29473
|
+
Z("span", FM, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
29474
|
+
Z("span", IM, W(e.name), 1),
|
|
29475
|
+
Z("span", LM, W(N(e.ts)), 1)
|
|
29470
29476
|
]))), 128))])) : Q("", !0)
|
|
29471
29477
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
29472
|
-
ce.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div",
|
|
29478
|
+
ce.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", RM, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, ga(O.value, (e) => (Y(), X("div", {
|
|
29473
29479
|
key: e.key,
|
|
29474
29480
|
class: "log-group"
|
|
29475
29481
|
}, [Z("div", {
|
|
@@ -29477,185 +29483,185 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29477
29483
|
onClick: (t) => M(e.key)
|
|
29478
29484
|
}, [
|
|
29479
29485
|
Z("span", { class: Be(["log-group-arrow", { open: j(e.key) }]) }, "▶", 2),
|
|
29480
|
-
Z("span",
|
|
29481
|
-
Z("span",
|
|
29486
|
+
Z("span", BM, W(ne(e)), 1),
|
|
29487
|
+
Z("span", VM, [
|
|
29482
29488
|
Es(W(N(e.firstTs)), 1),
|
|
29483
29489
|
e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Es(" ~ " + W(N(e.lastTs)), 1)], 64)) : Q("", !0),
|
|
29484
29490
|
Es(" · " + W(fe(e.lastTs - e.firstTs)), 1)
|
|
29485
29491
|
]),
|
|
29486
|
-
e.toolCount ? (Y(), X("span",
|
|
29487
|
-
e.tokens == null ? Q("", !0) : (Y(), X("span",
|
|
29488
|
-
e.errorCount ? (Y(), X("span",
|
|
29489
|
-
], 10,
|
|
29492
|
+
e.toolCount ? (Y(), X("span", HM, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
|
|
29493
|
+
e.tokens == null ? Q("", !0) : (Y(), X("span", UM, "Σ " + W(e.tokens) + " tok", 1)),
|
|
29494
|
+
e.errorCount ? (Y(), X("span", WM, "❌ " + W(e.errorCount), 1)) : Q("", !0)
|
|
29495
|
+
], 10, zM), ai(Z("div", GM, [(Y(!0), X(J, null, ga(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => (Y(), X("div", {
|
|
29490
29496
|
key: i,
|
|
29491
29497
|
class: "log-item"
|
|
29492
29498
|
}, [
|
|
29493
|
-
Z("div",
|
|
29499
|
+
Z("div", KM, [
|
|
29494
29500
|
Z("span", {
|
|
29495
29501
|
class: "log-type",
|
|
29496
29502
|
style: Fe({ background: b.value[e.type].color })
|
|
29497
29503
|
}, W(b.value[e.type].icon) + " " + W(b.value[e.type].label), 5),
|
|
29498
|
-
e.source ? (Y(), X("span",
|
|
29499
|
-
Z("span",
|
|
29504
|
+
e.source ? (Y(), X("span", qM, "↳ " + W(e.source), 1)) : Q("", !0),
|
|
29505
|
+
Z("span", JM, W(N(e.timestamp)), 1)
|
|
29500
29506
|
]),
|
|
29501
|
-
Z("div",
|
|
29502
|
-
Z("div",
|
|
29503
|
-
Z("div",
|
|
29504
|
-
Z("div",
|
|
29505
|
-
Z("div",
|
|
29506
|
-
Z("div",
|
|
29507
|
+
Z("div", YM, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
29508
|
+
Z("div", XM, [
|
|
29509
|
+
Z("div", ZM, [Z("span", QM, W(y.value.debugModel), 1), Z("span", $M, W(e.data.model), 1)]),
|
|
29510
|
+
Z("div", eN, [Z("span", tN, W(y.value.debugTemperature), 1), Z("span", nN, W(e.data.temperature), 1)]),
|
|
29511
|
+
Z("div", rN, [n[5] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", iN, W(e.data.maxTokens), 1)]),
|
|
29512
|
+
Z("div", aN, [Z("span", oN, W(y.value.debugMessageCount), 1), Z("span", sN, W(e.data.totalMessages), 1)])
|
|
29507
29513
|
]),
|
|
29508
|
-
Z("div",
|
|
29509
|
-
Z("div",
|
|
29514
|
+
Z("div", cN, W(y.value.debugToolsLabel) + " (" + W(e.data.tools?.length || 0) + ")", 1),
|
|
29515
|
+
Z("div", lN, [(Y(!0), X(J, null, ga(e.data.tools, (e) => (Y(), X("span", {
|
|
29510
29516
|
key: e,
|
|
29511
29517
|
class: "tool-chip"
|
|
29512
29518
|
}, W(e), 1))), 128))]),
|
|
29513
|
-
Z("div",
|
|
29514
|
-
Z("div",
|
|
29519
|
+
Z("div", uN, W(y.value.debugContextMessages), 1),
|
|
29520
|
+
Z("div", dN, [(Y(!0), X(J, null, ga(e.data.messages, (e, t) => (Y(), X("div", {
|
|
29515
29521
|
key: t,
|
|
29516
29522
|
class: "msg-row"
|
|
29517
29523
|
}, [Z("span", {
|
|
29518
29524
|
class: "msg-role",
|
|
29519
29525
|
style: Fe({ background: ae(e.type).color })
|
|
29520
|
-
}, W(ae(e.type).label), 5), Z("span",
|
|
29521
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
29522
|
-
Z("span",
|
|
29523
|
-
e.data.model ? (Y(), X("span",
|
|
29524
|
-
Z("span",
|
|
29525
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
29526
|
+
}, W(ae(e.type).label), 5), Z("span", fN, W(e.content), 1)]))), 128))])
|
|
29527
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", pN, [
|
|
29528
|
+
Z("span", mN, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
|
|
29529
|
+
e.data.model ? (Y(), X("span", hN, W(e.data.model), 1)) : Q("", !0),
|
|
29530
|
+
Z("span", gN, [Es(W((e.data.messages || []).length) + W(y.value.debugMsgCountSuffix), 1), r != null && r < (e.data.messages || []).length ? (Y(), X(J, { key: 0 }, [Es("(+" + W((e.data.messages || []).length - r) + ")", 1)], 64)) : Q("", !0)]),
|
|
29531
|
+
e.data.tools?.length ? (Y(), X("span", _N, W(e.data.tools.length) + W(y.value.debugToolCountSuffix), 1)) : Q("", !0),
|
|
29526
29532
|
r != null && r > 0 ? (Y(), X("button", {
|
|
29527
29533
|
key: 2,
|
|
29528
29534
|
class: "view-toggle only-new-btn",
|
|
29529
29535
|
onClick: (e) => h(i)
|
|
29530
|
-
}, W(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9,
|
|
29536
|
+
}, W(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, vN)) : Q("", !0),
|
|
29531
29537
|
Z("button", {
|
|
29532
29538
|
class: "view-toggle copy-btn",
|
|
29533
29539
|
title: y.value.copy,
|
|
29534
29540
|
onClick: (t) => _(F(e.data.messages), "req" + i)
|
|
29535
|
-
}, W(g.value === "req" + i ? "✓" : "📋"), 9,
|
|
29541
|
+
}, W(g.value === "req" + i ? "✓" : "📋"), 9, yN),
|
|
29536
29542
|
Z("button", {
|
|
29537
29543
|
class: "view-toggle",
|
|
29538
29544
|
onClick: (e) => P(i)
|
|
29539
|
-
}, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9,
|
|
29540
|
-
]), d.value.has(i) ? (Y(), X("pre",
|
|
29545
|
+
}, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, bN)
|
|
29546
|
+
]), d.value.has(i) ? (Y(), X("pre", DN, [Z("code", null, W(F(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, ga([re(e, r, m.value.has(i))], (e) => (Y(), X("div", {
|
|
29541
29547
|
key: e.base,
|
|
29542
29548
|
class: "msg-list"
|
|
29543
29549
|
}, [(Y(!0), X(J, null, ga(e.list, (t, n) => (Y(), X("div", {
|
|
29544
29550
|
key: n,
|
|
29545
|
-
class: Be(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length >
|
|
29546
|
-
title: String(t.content ?? "").length >
|
|
29547
|
-
onClick: (r) => String(t.content ?? "").length >
|
|
29551
|
+
class: Be(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length > GF }]),
|
|
29552
|
+
title: String(t.content ?? "").length > GF ? f.value.has(i + ":" + (e.base + n)) ? y.value.collapse : y.value.expand : void 0,
|
|
29553
|
+
onClick: (r) => String(t.content ?? "").length > GF && p(i + ":" + (e.base + n))
|
|
29548
29554
|
}, [Z("span", {
|
|
29549
29555
|
class: "msg-role",
|
|
29550
29556
|
style: Fe({ background: ae(t.role).color })
|
|
29551
|
-
}, W(ae(t.role).label), 5), Z("div",
|
|
29552
|
-
t.content ? (Y(), X("span",
|
|
29557
|
+
}, W(ae(t.role).label), 5), Z("div", SN, [
|
|
29558
|
+
t.content ? (Y(), X("span", CN, W(t.content), 1)) : Q("", !0),
|
|
29553
29559
|
(Y(!0), X(J, null, ga(t.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
29554
29560
|
key: t,
|
|
29555
29561
|
class: "tc-inline"
|
|
29556
|
-
}, [Z("span",
|
|
29557
|
-
t.tool_call_id ? (Y(), X("span",
|
|
29558
|
-
])], 10,
|
|
29559
|
-
Z("div",
|
|
29560
|
-
e.data.content ? (Y(), X("div",
|
|
29561
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
29562
|
+
}, [Z("span", wN, "🔧 " + W(e.function?.name || e.name), 1), Z("code", TN, W(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
29563
|
+
t.tool_call_id ? (Y(), X("span", EN, "↳ tool_call_id: " + W(t.tool_call_id), 1)) : Q("", !0)
|
|
29564
|
+
])], 10, xN))), 128))]))), 128))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
29565
|
+
Z("div", ON, [Z("span", kN, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1), e.data.toolCalls?.length ? (Y(), X("span", AN, "🔧 " + W(e.data.toolCalls.length) + W(y.value.debugToolCallsSuffix), 1)) : Q("", !0)]),
|
|
29566
|
+
e.data.content ? (Y(), X("div", jN, W(e.data.content), 1)) : Q("", !0),
|
|
29567
|
+
e.data.toolCalls?.length ? (Y(), X("div", MN, [(Y(!0), X(J, null, ga(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
29562
29568
|
key: t,
|
|
29563
29569
|
class: "tc-card"
|
|
29564
|
-
}, [Z("div",
|
|
29565
|
-
e.data.usage ? (Y(), X("div",
|
|
29566
|
-
Z("span",
|
|
29567
|
-
Z("span",
|
|
29568
|
-
Z("span",
|
|
29569
|
-
e.data.usage.reasoning_tokens ? (Y(), X("span",
|
|
29570
|
+
}, [Z("div", NN, "🔧 " + W(e.name), 1), Z("pre", PN, W(F(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
29571
|
+
e.data.usage ? (Y(), X("div", FN, [
|
|
29572
|
+
Z("span", IN, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
29573
|
+
Z("span", LN, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
|
|
29574
|
+
Z("span", RN, "total: " + W(e.data.usage.total_tokens ?? "-"), 1),
|
|
29575
|
+
e.data.usage.reasoning_tokens ? (Y(), X("span", zN, "reasoning: " + W(e.data.usage.reasoning_tokens) + "(" + W(Math.round(e.data.usage.reasoning_tokens / Math.max(1, e.data.usage.completion_tokens ?? 0) * 100)) + "%)", 1)) : Q("", !0)
|
|
29570
29576
|
])) : Q("", !0)
|
|
29571
29577
|
], 64)) : e.type === "tool_call" || e.type === "tool_result" ? (Y(), X(J, { key: 3 }, [t ? (Y(), X("div", {
|
|
29572
29578
|
key: 0,
|
|
29573
29579
|
class: Be(["tc-card inline paired", { error: e.data.status === "error" }])
|
|
29574
29580
|
}, [
|
|
29575
|
-
Z("div",
|
|
29581
|
+
Z("div", BN, [
|
|
29576
29582
|
Es(W(e.data.status === "error" ? "❌" : "✅") + " " + W(e.data.name) + " ", 1),
|
|
29577
|
-
e.data.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
29583
|
+
e.data.durationMs == null ? Q("", !0) : (Y(), X("span", VN, W(fe(e.data.durationMs)), 1)),
|
|
29578
29584
|
Z("button", {
|
|
29579
29585
|
class: "view-toggle copy-btn",
|
|
29580
29586
|
title: y.value.copy,
|
|
29581
29587
|
onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
|
|
29582
|
-
}, W(g.value === "res" + i ? "✓" : "📋"), 9,
|
|
29588
|
+
}, W(g.value === "res" + i ? "✓" : "📋"), 9, HN)
|
|
29583
29589
|
]),
|
|
29584
|
-
Z("pre",
|
|
29585
|
-
Z("div",
|
|
29586
|
-
Z("pre",
|
|
29587
|
-
], 2)) : (Y(), X("div",
|
|
29588
|
-
Z("div",
|
|
29590
|
+
Z("pre", UN, W(F(t.data.args)), 1),
|
|
29591
|
+
Z("div", WN, "↓ " + W(y.value.resultLabel), 1),
|
|
29592
|
+
Z("pre", GN, W(e.data.result), 1)
|
|
29593
|
+
], 2)) : (Y(), X("div", KN, [Z("div", qN, [Es(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", JN, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", YN, W(e.type === "tool_call" ? F(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", XN, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
|
|
29594
|
+
Z("div", ZN, [Z("button", {
|
|
29589
29595
|
class: "raw-toggle",
|
|
29590
29596
|
onClick: (e) => ie(i)
|
|
29591
|
-
}, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9,
|
|
29597
|
+
}, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, QN), Z("button", {
|
|
29592
29598
|
class: "raw-toggle",
|
|
29593
29599
|
onClick: (t) => K(rw)(F(e.data))
|
|
29594
|
-
}, W(y.value.copy), 9,
|
|
29595
|
-
a.value.has(i) ? (Y(), X("pre",
|
|
29596
|
-
]))), 128))], 512), [[Uc, j(e.key)]])]))), 128))], 64)) : ce.value === "info" ? (Y(), X("div",
|
|
29597
|
-
Z("div",
|
|
29598
|
-
Z("div",
|
|
29599
|
-
Z("div",
|
|
29600
|
-
Z("div",
|
|
29601
|
-
Z("div",
|
|
29602
|
-
Z("div",
|
|
29603
|
-
Z("div",
|
|
29600
|
+
}, W(y.value.copy), 9, $N)]),
|
|
29601
|
+
a.value.has(i) ? (Y(), X("pre", eP, [Z("code", null, W(F(e.data)), 1)])) : Q("", !0)
|
|
29602
|
+
]))), 128))], 512), [[Uc, j(e.key)]])]))), 128))], 64)) : ce.value === "info" ? (Y(), X("div", tP, [L.value ? (Y(), X(J, { key: 1 }, [
|
|
29603
|
+
Z("div", rP, [
|
|
29604
|
+
Z("div", iP, W(y.value.debugInfoBasic), 1),
|
|
29605
|
+
Z("div", aP, [
|
|
29606
|
+
Z("div", oP, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", sP, W(L.value.id), 1)]),
|
|
29607
|
+
Z("div", cP, [Z("span", lP, W(y.value.debugModel), 1), Z("span", uP, W(L.value.model || "-"), 1)]),
|
|
29608
|
+
Z("div", dP, [Z("span", fP, W(y.value.debugToolCount), 1), Z("span", pP, W(L.value.tools.length), 1)]),
|
|
29609
|
+
Z("div", mP, [Z("span", hP, W(y.value.debugMiddleware), 1), Z("span", gP, W(L.value.middleware.length), 1)])
|
|
29604
29610
|
]),
|
|
29605
|
-
Z("div",
|
|
29611
|
+
Z("div", _P, [Z("span", vP, W(y.value.debugMiddlewareStack), 1), Z("span", yP, W(L.value.middleware.join(" → ") || "-"), 1)])
|
|
29606
29612
|
]),
|
|
29607
|
-
Z("div",
|
|
29613
|
+
Z("div", bP, [Z("div", xP, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(L.value.tools.length) + ")", 1), (Y(!0), X(J, null, ga(L.value.tools, (e) => (Y(), X("div", {
|
|
29608
29614
|
key: e.name,
|
|
29609
29615
|
class: "info-item"
|
|
29610
|
-
}, [Z("div",
|
|
29616
|
+
}, [Z("div", SP, [Es(W(e.name), 1), e.source ? (Y(), X("span", {
|
|
29611
29617
|
key: 0,
|
|
29612
29618
|
class: Be(["src-tag", H(e.source)])
|
|
29613
|
-
}, W(e.source), 3)) : Q("", !0)]), Z("div",
|
|
29614
|
-
L.value.skills.length ? (Y(), X("div",
|
|
29619
|
+
}, W(e.source), 3)) : Q("", !0)]), Z("div", CP, W(e.description), 1)]))), 128))]),
|
|
29620
|
+
L.value.skills.length ? (Y(), X("div", wP, [Z("div", TP, [Es("📘 " + W(y.value.debugSkillsTitle) + " (" + W(L.value.skills.length) + ")", 1), Z("span", EP, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, ga(L.value.skills, (e) => (Y(), X("div", {
|
|
29615
29621
|
key: e.name,
|
|
29616
29622
|
class: "info-item"
|
|
29617
29623
|
}, [
|
|
29618
29624
|
Z("div", {
|
|
29619
29625
|
class: "info-name skill-toggle",
|
|
29620
29626
|
onClick: (t) => z(e.name)
|
|
29621
|
-
}, [Z("span", { class: Be(["skill-arrow", { open: !!R.value[e.name] }]) }, "▶", 2), Es(" " + W(e.name), 1)], 8,
|
|
29622
|
-
Z("div",
|
|
29623
|
-
R.value[e.name] ? (Y(), X("div",
|
|
29627
|
+
}, [Z("span", { class: Be(["skill-arrow", { open: !!R.value[e.name] }]) }, "▶", 2), Es(" " + W(e.name), 1)], 8, DP),
|
|
29628
|
+
Z("div", OP, W(e.description), 1),
|
|
29629
|
+
R.value[e.name] ? (Y(), X("div", kP, [R.value[e.name].loading ? (Y(), X("div", AP, W(y.value.debugLoading), 1)) : R.value[e.name].error ? (Y(), X("div", jP, W(R.value[e.name].error), 1)) : R.value[e.name].content ? (Y(), X("pre", MP, W(R.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
29624
29630
|
]))), 128))])) : Q("", !0),
|
|
29625
|
-
L.value.data ? (Y(), X("div",
|
|
29626
|
-
Z("div",
|
|
29627
|
-
Z("div",
|
|
29628
|
-
Z("div",
|
|
29629
|
-
Z("div",
|
|
29630
|
-
Z("div",
|
|
29631
|
+
L.value.data ? (Y(), X("div", NP, [Z("div", PP, "📊 " + W(y.value.debugDataTitle), 1), Z("div", FP, [Z("div", IP, W(L.value.data.description || y.value.debugDataFallback), 1), Z("div", LP, W(y.value.debugSchemaPrefix) + W(L.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
|
|
29632
|
+
Z("div", RP, [Z("div", zP, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", BP, [
|
|
29633
|
+
Z("div", VP, [Z("span", HP, W(y.value.debugEnabled), 1), Z("span", UP, W(L.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
29634
|
+
Z("div", WP, [Z("span", GP, W(y.value.debugMaxDepth), 1), Z("span", KP, W(L.value.subagent.maxDepth), 1)]),
|
|
29635
|
+
Z("div", qP, [Z("span", JP, W(y.value.debugMaxParallel), 1), Z("span", YP, W(L.value.subagent.maxParallel), 1)]),
|
|
29636
|
+
Z("div", XP, [Z("span", ZP, W(y.value.debugExtraTools), 1), Z("span", QP, W(L.value.subagent.allowedTools.length ? L.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
|
|
29631
29637
|
])]),
|
|
29632
|
-
L.value.mcp?.servers?.length ? (Y(), X("div",
|
|
29638
|
+
L.value.mcp?.servers?.length ? (Y(), X("div", $P, [Z("div", eF, "🔌 MCP (" + W(L.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, ga(L.value.mcp.servers, (e) => (Y(), X("div", {
|
|
29633
29639
|
key: e.name,
|
|
29634
29640
|
class: "info-item"
|
|
29635
|
-
}, [Z("div",
|
|
29636
|
-
L.value.verify ? (Y(), X("div",
|
|
29637
|
-
Z("div",
|
|
29638
|
-
Z("div",
|
|
29639
|
-
Z("div",
|
|
29640
|
-
L.value.verify.adversarial ? (Y(), X("div",
|
|
29641
|
+
}, [Z("div", tF, [Es(W(e.name) + " ", 1), Z("span", nF, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", rF, W(e.url), 1)]))), 128))])) : Q("", !0),
|
|
29642
|
+
L.value.verify ? (Y(), X("div", iF, [Z("div", aF, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", oF, [
|
|
29643
|
+
Z("div", sF, [Z("span", cF, W(y.value.debugEnabled), 1), Z("span", lF, W(L.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
29644
|
+
Z("div", uF, [Z("span", dF, W(y.value.debugMaxAttempts), 1), Z("span", fF, W(L.value.verify.maxAttempts), 1)]),
|
|
29645
|
+
Z("div", pF, [Z("span", mF, W(y.value.debugAdversarial), 1), Z("span", hF, W(L.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
|
|
29646
|
+
L.value.verify.adversarial ? (Y(), X("div", gF, [Z("span", _F, W(y.value.debugAdversarialModel), 1), Z("span", vF, W(L.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
|
|
29641
29647
|
])])) : Q("", !0),
|
|
29642
|
-
L.value.todos.length ? (Y(), X("div",
|
|
29648
|
+
L.value.todos.length ? (Y(), X("div", yF, [Z("div", bF, "📋 " + W(y.value.debugTodosTitle) + " (" + W(L.value.todos.length) + ")", 1), (Y(!0), X(J, null, ga(L.value.todos, (e, t) => (Y(), X("div", {
|
|
29643
29649
|
key: t,
|
|
29644
29650
|
class: "info-todo"
|
|
29645
29651
|
}, [Z("span", {
|
|
29646
29652
|
class: "todo-tag",
|
|
29647
29653
|
style: Fe({ background: V.value[e.status] && V.value[e.status].color || "#9ca3af" })
|
|
29648
29654
|
}, W(ue(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
|
|
29649
|
-
L.value.memory ? (Y(), X("div",
|
|
29650
|
-
L.value.lastCompression ? (Y(), X("div",
|
|
29651
|
-
Z("div",
|
|
29652
|
-
Z("div",
|
|
29653
|
-
Z("div",
|
|
29654
|
-
Z("div",
|
|
29655
|
-
Z("div",
|
|
29656
|
-
L.value.lastCompression.decision ? (Y(), X("div",
|
|
29655
|
+
L.value.memory ? (Y(), X("div", xF, [Z("div", SF, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", CF, W(L.value.memory), 1)])) : Q("", !0),
|
|
29656
|
+
L.value.lastCompression ? (Y(), X("div", wF, [Z("div", TF, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", EF, [
|
|
29657
|
+
Z("div", DF, [Z("span", OF, W(y.value.debugTriggered), 1), Z("span", kF, W(L.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
|
|
29658
|
+
Z("div", AF, [Z("span", jF, W(y.value.debugRoundsSummarized), 1), Z("span", MF, W(L.value.lastCompression.roundsSummarized) + " / " + W(L.value.lastCompression.roundsTotal), 1)]),
|
|
29659
|
+
Z("div", NF, [Z("span", PF, W(y.value.debugCtxRecalled), 1), Z("span", FF, W(L.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
|
|
29660
|
+
Z("div", IF, [Z("span", LF, W(y.value.debugMessageCount), 1), Z("span", RF, W(L.value.lastCompression.originalMessages) + " → " + W(L.value.lastCompression.compressedMessages), 1)]),
|
|
29661
|
+
Z("div", zF, [Z("span", BF, W(y.value.debugStrategy), 1), Z("span", VF, W(L.value.lastCompression.strategy), 1)]),
|
|
29662
|
+
L.value.lastCompression.decision ? (Y(), X("div", HF, [Z("span", UF, W(y.value.debugDecision), 1), Z("span", WF, "🤖 " + W(be(L.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
29657
29663
|
])])) : Q("", !0)
|
|
29658
|
-
], 64)) : (Y(), X("div",
|
|
29664
|
+
], 64)) : (Y(), X("div", nP, W(y.value.debugNoInfo), 1))])) : Q("", !0)
|
|
29659
29665
|
], 512)], 512)], 512)
|
|
29660
29666
|
], 2), Z("div", {
|
|
29661
29667
|
class: "drawer-mask",
|
|
@@ -29664,16 +29670,16 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29664
29670
|
_: 1
|
|
29665
29671
|
})]));
|
|
29666
29672
|
}
|
|
29667
|
-
}), [["__scopeId", "data-v-ffd46605"]]),
|
|
29673
|
+
}), [["__scopeId", "data-v-ffd46605"]]), qF = { class: "skill-panel" }, JF = { class: "skill-header" }, YF = { class: "skill-title" }, XF = ["title"], ZF = { class: "skill-section" }, QF = { class: "section-title" }, $F = ["title"], eI = { class: "field" }, tI = { class: "field-label" }, nI = ["disabled", "placeholder"], rI = { class: "field" }, iI = { class: "field-label" }, aI = ["placeholder"], oI = { class: "field field-textarea" }, sI = { class: "field-label" }, cI = ["placeholder"], lI = {
|
|
29668
29674
|
key: 0,
|
|
29669
29675
|
class: "skill-error"
|
|
29670
|
-
},
|
|
29676
|
+
}, uI = { class: "skill-section" }, dI = { class: "section-title" }, fI = {
|
|
29671
29677
|
key: 0,
|
|
29672
29678
|
class: "empty-hint"
|
|
29673
|
-
},
|
|
29679
|
+
}, pI = {
|
|
29674
29680
|
key: 1,
|
|
29675
29681
|
class: "skill-list"
|
|
29676
|
-
},
|
|
29682
|
+
}, mI = { class: "skill-actions" }, hI = ["title", "onClick"], gI = ["title", "onClick"], _I = { class: "skill-hint" }, vI = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
29677
29683
|
__name: "SkillPanel",
|
|
29678
29684
|
props: {
|
|
29679
29685
|
visible: { type: Boolean },
|
|
@@ -29728,55 +29734,55 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29728
29734
|
key: 0,
|
|
29729
29735
|
class: "skill-mask",
|
|
29730
29736
|
onClick: n[4] ||= Ol((e) => r("close"), ["self"])
|
|
29731
|
-
}, [Z("div",
|
|
29732
|
-
Z("div",
|
|
29737
|
+
}, [Z("div", qF, [
|
|
29738
|
+
Z("div", JF, [Z("span", YF, W(e.messages.skillPanelTitle), 1), Z("button", {
|
|
29733
29739
|
class: "skill-close",
|
|
29734
29740
|
title: e.messages.close,
|
|
29735
29741
|
onClick: n[0] ||= (e) => r("close")
|
|
29736
|
-
}, "✕", 8,
|
|
29737
|
-
Z("div",
|
|
29738
|
-
Z("div",
|
|
29742
|
+
}, "✕", 8, XF)]),
|
|
29743
|
+
Z("div", ZF, [
|
|
29744
|
+
Z("div", QF, [Es(W(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (Y(), X("button", {
|
|
29739
29745
|
key: 0,
|
|
29740
29746
|
class: "btn btn-ghost btn-cancel",
|
|
29741
29747
|
title: e.messages.skillCancelEdit,
|
|
29742
29748
|
onClick: h
|
|
29743
|
-
}, W(e.messages.skillCancelEdit), 9,
|
|
29744
|
-
Z("label",
|
|
29749
|
+
}, W(e.messages.skillCancelEdit), 9, $F)) : Q("", !0)]),
|
|
29750
|
+
Z("label", eI, [Z("span", tI, W(e.messages.skillNameLabel), 1), ai(Z("input", {
|
|
29745
29751
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
29746
29752
|
disabled: !!u.value,
|
|
29747
29753
|
placeholder: e.messages.skillNamePlaceholder,
|
|
29748
29754
|
class: "field-input"
|
|
29749
|
-
}, null, 8,
|
|
29750
|
-
Z("label",
|
|
29755
|
+
}, null, 8, nI), [[Tl, i.value]])]),
|
|
29756
|
+
Z("label", rI, [Z("span", iI, W(e.messages.skillDescLabel), 1), ai(Z("input", {
|
|
29751
29757
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
29752
29758
|
placeholder: e.messages.skillDescPlaceholder,
|
|
29753
29759
|
class: "field-input"
|
|
29754
|
-
}, null, 8,
|
|
29755
|
-
Z("label",
|
|
29760
|
+
}, null, 8, aI), [[Tl, a.value]])]),
|
|
29761
|
+
Z("label", oI, [Z("span", sI, W(e.messages.skillContentLabel), 1), ai(Z("textarea", {
|
|
29756
29762
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
29757
29763
|
placeholder: e.messages.skillContentPlaceholder,
|
|
29758
29764
|
rows: "6",
|
|
29759
29765
|
class: "field-input"
|
|
29760
|
-
}, null, 8,
|
|
29761
|
-
s.value ? (Y(), X("div",
|
|
29766
|
+
}, null, 8, cI), [[Tl, o.value]])]),
|
|
29767
|
+
s.value ? (Y(), X("div", lI, W(s.value), 1)) : Q("", !0),
|
|
29762
29768
|
Z("button", {
|
|
29763
29769
|
class: "btn btn-primary",
|
|
29764
29770
|
onClick: f
|
|
29765
29771
|
}, W(u.value ? e.messages.skillSave : e.messages.skillAdd), 1)
|
|
29766
29772
|
]),
|
|
29767
|
-
Z("div",
|
|
29773
|
+
Z("div", uI, [Z("div", dI, W(e.messages.skillCreatedTitle) + "(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", pI, [(Y(!0), X(J, null, ga(c.value, (t) => (Y(), X("li", {
|
|
29768
29774
|
key: t,
|
|
29769
29775
|
class: "skill-item"
|
|
29770
|
-
}, [Z("span", { class: Be(["skill-name", { active: u.value === t }]) }, W(t), 3), Z("span",
|
|
29776
|
+
}, [Z("span", { class: Be(["skill-name", { active: u.value === t }]) }, W(t), 3), Z("span", mI, [Z("button", {
|
|
29771
29777
|
class: "btn btn-ghost btn-edit",
|
|
29772
29778
|
title: e.messages.skillEditTitle,
|
|
29773
29779
|
onClick: (e) => m(t)
|
|
29774
|
-
}, W(e.messages.skillEditBtn), 9,
|
|
29780
|
+
}, W(e.messages.skillEditBtn), 9, hI), Z("button", {
|
|
29775
29781
|
class: "btn btn-ghost btn-del",
|
|
29776
29782
|
title: e.messages.skillDeleteTitle,
|
|
29777
29783
|
onClick: (e) => p(t)
|
|
29778
|
-
}, W(e.messages.skillDeleteBtn), 9,
|
|
29779
|
-
Z("div",
|
|
29784
|
+
}, W(e.messages.skillDeleteBtn), 9, gI)])]))), 128))])) : (Y(), X("div", fI, W(e.messages.skillEmpty), 1))]),
|
|
29785
|
+
Z("div", _I, [
|
|
29780
29786
|
Es(" 💡 " + W(e.messages.skillHintA) + " ", 1),
|
|
29781
29787
|
n[5] ||= Z("code", null, "load_skill(name)", -1),
|
|
29782
29788
|
Es(" " + W(e.messages.skillHintB) + " ", 1),
|
|
@@ -29787,7 +29793,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29787
29793
|
_: 1
|
|
29788
29794
|
})]));
|
|
29789
29795
|
}
|
|
29790
|
-
}), [["__scopeId", "data-v-fcd21121"]]),
|
|
29796
|
+
}), [["__scopeId", "data-v-fcd21121"]]), yI = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
29791
29797
|
__name: "ChatDialog",
|
|
29792
29798
|
props: {
|
|
29793
29799
|
fetchResponse: {},
|
|
@@ -29976,7 +29982,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29976
29982
|
key: 0,
|
|
29977
29983
|
name: "cs-slide"
|
|
29978
29984
|
}, {
|
|
29979
|
-
default: ri(() => [_a(t.$slots, "body", { chat: K(i) }, () => [ai(xs(
|
|
29985
|
+
default: ri(() => [_a(t.$slots, "body", { chat: K(i) }, () => [ai(xs(TA, {
|
|
29980
29986
|
"show-avatar": e.showAvatar,
|
|
29981
29987
|
"show-typing": e.showTyping
|
|
29982
29988
|
}, null, 8, ["show-avatar", "show-typing"]), [[Uc, K(a)]])], !0)]),
|
|
@@ -29985,15 +29991,15 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
29985
29991
|
h("queued") ? _a(t.$slots, "queued", {
|
|
29986
29992
|
key: 1,
|
|
29987
29993
|
chat: K(i)
|
|
29988
|
-
}, () => [xs(
|
|
29994
|
+
}, () => [xs(FA)], !0) : Q("", !0),
|
|
29989
29995
|
h("approval") ? _a(t.$slots, "approval", {
|
|
29990
29996
|
key: 2,
|
|
29991
29997
|
chat: K(i)
|
|
29992
|
-
}, () => [xs(
|
|
29998
|
+
}, () => [xs(XA)], !0) : Q("", !0),
|
|
29993
29999
|
h("conflict") ? _a(t.$slots, "conflict", {
|
|
29994
30000
|
key: 3,
|
|
29995
30001
|
chat: K(i)
|
|
29996
|
-
}, () => [xs(
|
|
30002
|
+
}, () => [xs(pj, {
|
|
29997
30003
|
"pending-conflict": e.pendingConflict,
|
|
29998
30004
|
"on-resolve": e.onResolveConflict,
|
|
29999
30005
|
icons: K(i).icons,
|
|
@@ -30009,7 +30015,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
30009
30015
|
key: 2,
|
|
30010
30016
|
name: "cs-slide"
|
|
30011
30017
|
}, {
|
|
30012
|
-
default: ri(() => [_a(t.$slots, "footer", { chat: K(i) }, () => [xs(
|
|
30018
|
+
default: ri(() => [_a(t.$slots, "footer", { chat: K(i) }, () => [xs(Ij, {
|
|
30013
30019
|
placeholder: e.placeholder || K(i).messages.inputPlaceholder,
|
|
30014
30020
|
"input-rows": e.inputRows
|
|
30015
30021
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
@@ -30018,7 +30024,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
30018
30024
|
h("debug") ? _a(t.$slots, "debug", {
|
|
30019
30025
|
key: 3,
|
|
30020
30026
|
chat: K(i)
|
|
30021
|
-
}, () => [xs(
|
|
30027
|
+
}, () => [xs(KF, {
|
|
30022
30028
|
visible: K(o),
|
|
30023
30029
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ jn(o) ? o.value = e : null,
|
|
30024
30030
|
logs: e.debugLogs,
|
|
@@ -30044,7 +30050,7 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
30044
30050
|
h("skill") ? _a(t.$slots, "skill", {
|
|
30045
30051
|
key: 4,
|
|
30046
30052
|
chat: K(i)
|
|
30047
|
-
}, () => [xs(
|
|
30053
|
+
}, () => [xs(vI, {
|
|
30048
30054
|
visible: K(s),
|
|
30049
30055
|
"on-add-skill": e.onAddSkill,
|
|
30050
30056
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -30066,10 +30072,10 @@ var Wk = ["innerHTML"], Gk = /* @__PURE__ */ Wi({
|
|
|
30066
30072
|
}), [["__scopeId", "data-v-e3c6c516"]]);
|
|
30067
30073
|
//#endregion
|
|
30068
30074
|
//#region src/core/sdk/mountChatDialog.ts
|
|
30069
|
-
function
|
|
30075
|
+
function bI(e) {
|
|
30070
30076
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
30071
30077
|
return r = Pl(/* @__PURE__ */ Wi({ setup() {
|
|
30072
|
-
return () => cc(
|
|
30078
|
+
return () => cc(yI, {
|
|
30073
30079
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
30074
30080
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
30075
30081
|
if (n) {
|
|
@@ -30189,7 +30195,7 @@ function yI(e) {
|
|
|
30189
30195
|
}
|
|
30190
30196
|
//#endregion
|
|
30191
30197
|
//#region src/core/sdk/ragSubagent.ts
|
|
30192
|
-
function
|
|
30198
|
+
function xI(e, t, n, r, i) {
|
|
30193
30199
|
let a = [];
|
|
30194
30200
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
30195
30201
|
let o = [];
|
|
@@ -30204,7 +30210,7 @@ function bI(e, t, n, r, i) {
|
|
|
30204
30210
|
|
|
30205
30211
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
30206
30212
|
}
|
|
30207
|
-
function
|
|
30213
|
+
function SI(e, t, n, r, i) {
|
|
30208
30214
|
let a = [], o = [];
|
|
30209
30215
|
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)
|
|
30210
30216
|
|
|
@@ -30221,12 +30227,12 @@ ${a.join("\n")}
|
|
|
30221
30227
|
## 何时用何源
|
|
30222
30228
|
${o.join("\n")}`;
|
|
30223
30229
|
}
|
|
30224
|
-
var
|
|
30230
|
+
var CI = {
|
|
30225
30231
|
name: "rag-search",
|
|
30226
30232
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
30227
|
-
getContent: () =>
|
|
30233
|
+
getContent: () => SI(!0, !0, !0, "search_docs", "load_doc")
|
|
30228
30234
|
};
|
|
30229
|
-
function
|
|
30235
|
+
function wI(e, n, i) {
|
|
30230
30236
|
let a = r(async ({ query: e, topK: t }) => {
|
|
30231
30237
|
try {
|
|
30232
30238
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -30244,7 +30250,7 @@ function CI(e, n, i) {
|
|
|
30244
30250
|
});
|
|
30245
30251
|
return hu([a]), a;
|
|
30246
30252
|
}
|
|
30247
|
-
function
|
|
30253
|
+
function TI(e, n) {
|
|
30248
30254
|
let i = r(async ({ source: e }) => {
|
|
30249
30255
|
try {
|
|
30250
30256
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -30259,19 +30265,19 @@ function wI(e, n) {
|
|
|
30259
30265
|
});
|
|
30260
30266
|
return hu([i]), i;
|
|
30261
30267
|
}
|
|
30262
|
-
function
|
|
30268
|
+
function EI(e) {
|
|
30263
30269
|
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;
|
|
30264
30270
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
30265
30271
|
let p = [];
|
|
30266
|
-
t && p.push(
|
|
30272
|
+
t && p.push(wI(s, t, o)), n && p.push(TI(c, n)), f && p.push(...f);
|
|
30267
30273
|
let m = r ? [
|
|
30268
30274
|
"vfs_grep",
|
|
30269
30275
|
"vfs_read",
|
|
30270
30276
|
"vfs_json_read"
|
|
30271
|
-
] : void 0, h =
|
|
30277
|
+
] : void 0, h = xI(r, !!t, !!n, s, c), g = {
|
|
30272
30278
|
name: "rag-search",
|
|
30273
|
-
description:
|
|
30274
|
-
getContent: () =>
|
|
30279
|
+
description: CI.description,
|
|
30280
|
+
getContent: () => SI(r, !!t, !!n, s, c)
|
|
30275
30281
|
};
|
|
30276
30282
|
return {
|
|
30277
30283
|
id: i,
|
|
@@ -30286,20 +30292,20 @@ function TI(e) {
|
|
|
30286
30292
|
}
|
|
30287
30293
|
//#endregion
|
|
30288
30294
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
30289
|
-
var
|
|
30295
|
+
var DI = { class: "code-preview-modal" }, OI = { class: "preview-header" }, kI = { class: "preview-title" }, AI = { class: "preview-tabs" }, jI = ["disabled"], MI = { class: "preview-actions" }, NI = ["title"], PI = {
|
|
30290
30296
|
key: 0,
|
|
30291
30297
|
viewBox: "0 0 16 16",
|
|
30292
30298
|
fill: "none",
|
|
30293
30299
|
"aria-hidden": "true"
|
|
30294
|
-
},
|
|
30300
|
+
}, FI = {
|
|
30295
30301
|
key: 1,
|
|
30296
30302
|
viewBox: "0 0 16 16",
|
|
30297
30303
|
fill: "none",
|
|
30298
30304
|
"aria-hidden": "true"
|
|
30299
|
-
},
|
|
30305
|
+
}, II = ["title"], LI = ["title"], RI = { class: "preview-body" }, zI = ["srcdoc"], BI = {
|
|
30300
30306
|
key: 1,
|
|
30301
30307
|
class: "preview-source"
|
|
30302
|
-
},
|
|
30308
|
+
}, VI = /*#__PURE__*/ qT(/* @__PURE__ */ Wi({
|
|
30303
30309
|
__name: "CodePreview",
|
|
30304
30310
|
props: {
|
|
30305
30311
|
code: {},
|
|
@@ -30366,28 +30372,28 @@ app.mount('#app');
|
|
|
30366
30372
|
return (t, n) => (Y(), X("div", {
|
|
30367
30373
|
class: "code-preview-overlay",
|
|
30368
30374
|
onClick: n[3] ||= Ol((e) => r("close"), ["self"])
|
|
30369
|
-
}, [Z("div",
|
|
30370
|
-
Z("span",
|
|
30371
|
-
Z("div",
|
|
30375
|
+
}, [Z("div", DI, [Z("div", OI, [
|
|
30376
|
+
Z("span", kI, W(e.messages.codePreviewTitlePrefix) + W(e.lang), 1),
|
|
30377
|
+
Z("div", AI, [Z("button", {
|
|
30372
30378
|
class: Be({ active: a.value === "preview" }),
|
|
30373
30379
|
disabled: !s.value,
|
|
30374
30380
|
onClick: n[0] ||= (e) => a.value = "preview"
|
|
30375
|
-
}, W(e.messages.codePreviewTab), 11,
|
|
30381
|
+
}, W(e.messages.codePreviewTab), 11, jI), Z("button", {
|
|
30376
30382
|
class: Be({ active: a.value === "source" }),
|
|
30377
30383
|
onClick: n[1] ||= (e) => a.value = "source"
|
|
30378
30384
|
}, W(e.messages.codeSourceTab), 3)]),
|
|
30379
|
-
Z("div",
|
|
30385
|
+
Z("div", MI, [
|
|
30380
30386
|
Z("button", {
|
|
30381
30387
|
class: Be(["icon-btn", { done: o.value }]),
|
|
30382
30388
|
title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
|
|
30383
30389
|
onClick: u
|
|
30384
|
-
}, [o.value ? (Y(), X("svg",
|
|
30390
|
+
}, [o.value ? (Y(), X("svg", PI, [...n[4] ||= [Z("path", {
|
|
30385
30391
|
d: "M3 8.5l3 3 7-7",
|
|
30386
30392
|
stroke: "currentColor",
|
|
30387
30393
|
"stroke-width": "1.6",
|
|
30388
30394
|
"stroke-linecap": "round",
|
|
30389
30395
|
"stroke-linejoin": "round"
|
|
30390
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
30396
|
+
}, null, -1)]])) : (Y(), X("svg", FI, [...n[5] ||= [Z("rect", {
|
|
30391
30397
|
x: "5.5",
|
|
30392
30398
|
y: "5.5",
|
|
30393
30399
|
width: "8",
|
|
@@ -30399,7 +30405,7 @@ app.mount('#app');
|
|
|
30399
30405
|
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",
|
|
30400
30406
|
stroke: "currentColor",
|
|
30401
30407
|
"stroke-width": "1.3"
|
|
30402
|
-
}, null, -1)]]))], 10,
|
|
30408
|
+
}, null, -1)]]))], 10, NI),
|
|
30403
30409
|
Z("button", {
|
|
30404
30410
|
class: "icon-btn",
|
|
30405
30411
|
title: e.messages.codeOpenTitle,
|
|
@@ -30419,7 +30425,7 @@ app.mount('#app');
|
|
|
30419
30425
|
"stroke-width": "1.3",
|
|
30420
30426
|
"stroke-linecap": "round",
|
|
30421
30427
|
"stroke-linejoin": "round"
|
|
30422
|
-
})], -1)]], 8,
|
|
30428
|
+
})], -1)]], 8, II),
|
|
30423
30429
|
Z("button", {
|
|
30424
30430
|
class: "icon-btn",
|
|
30425
30431
|
title: e.messages.close,
|
|
@@ -30433,22 +30439,22 @@ app.mount('#app');
|
|
|
30433
30439
|
stroke: "currentColor",
|
|
30434
30440
|
"stroke-width": "1.4",
|
|
30435
30441
|
"stroke-linecap": "round"
|
|
30436
|
-
})], -1)]], 8,
|
|
30442
|
+
})], -1)]], 8, LI)
|
|
30437
30443
|
])
|
|
30438
|
-
]), Z("div",
|
|
30444
|
+
]), Z("div", RI, [a.value === "preview" && s.value ? (Y(), X("iframe", {
|
|
30439
30445
|
key: 0,
|
|
30440
30446
|
ref_key: "iframeRef",
|
|
30441
30447
|
ref: i,
|
|
30442
30448
|
class: "preview-iframe",
|
|
30443
30449
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
30444
30450
|
srcdoc: c.value
|
|
30445
|
-
}, null, 8,
|
|
30451
|
+
}, null, 8, zI)) : (Y(), X("pre", BI, [Z("code", null, W(e.code), 1)]))])])]));
|
|
30446
30452
|
}
|
|
30447
30453
|
}), [["__scopeId", "data-v-27eac25e"]]);
|
|
30448
30454
|
//#endregion
|
|
30449
30455
|
//#region src/core/index.ts
|
|
30450
|
-
function
|
|
30451
|
-
return Jy(e,
|
|
30456
|
+
function HI(e) {
|
|
30457
|
+
return Jy(e, bI);
|
|
30452
30458
|
}
|
|
30453
30459
|
//#endregion
|
|
30454
|
-
export {
|
|
30460
|
+
export { XA as ApprovalBar, zv as CAPABILITIES, Hv as CONTEXT_PRESETS, yI as ChatDialog, CE as ChatHeader, Ij as ChatInput, VI as CodePreview, Z_ as CompressDecisionSchema, pj as ConflictBar, ty as DEFAULT_COMPUTED_STYLES, iw as DEFAULT_DIALOG_ICONS, Sm as DEFAULT_PROMPT_SOFT_CAP, qh as DEFAULT_SYSTEM_PROMPT, Jh as DEFAULT_SYSTEM_PROMPT_EN, KF as DebugDrawer, PE as FocusBar, Pk as HLJS_BLOCK_MAX_CHARS, Kg as HTML_VOID_TAGS, lh as HUMAN_CONFIRM_TOOL_NAME, JT as IconGlyph, Yl as ImageInputError, sw as MESSAGES_EN_US, ow as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, Mu as MODEL_UNAVAILABLE_GUIDANCE, Kk as MessageContent, TA as MessageList, hA as MessageRow, FA as QueuedBar, xm as SOFT_CAP_MIN_WINDOW, hm as STOP_WORDS, vI as SkillPanel, _p as UNSAFE_KEYS, Cy as actionsToInspectInfo, Sy as actionsToTools, Gl as agentError, Bh as analyzeContext, Mp as applyPatchToClone, Fp as applyPatchToLive, Pg as applyPatchesToBind, Af as arrayMinLength, Wl as asAgentError, M_ as buildCollectorJs, oy as buildCssPath, Yh as buildDataPrompt, O_ as buildDiagnosticsReport, H_ as buildHtmlFragmentSkill, N_ as buildSandboxSrcdoc, Xh as buildSystemPrompt, uw as chatContextKey, Ng as commitSetToBind, z_ as composeStructureThenRender, ou as compressImage, Kh as connectMcp, A as constructLlmFromConfig, te as constructOpenLlmSync, rw as copyText, bf as createAgent, ch as createApprovalMiddleware, dw as createChatContext, HI as createChatSdk, yh as createCheckpointManager, bh as createCheckpointMiddleware, lv as createConflictManager, Vh as createContextInspectorMiddleware, Gg as createDataOps, W_ as createHtmlFormatCheck, R_ as createHtmlRenderCheck, q_ as createHtmlSubagent, fh as createHumanConfirmMiddleware, dh as createHumanConfirmTool, jv as createMemoryBackend, th as createMemoryMiddleware, y as createProxyLlm, EI as createRagSubagent, Ru as createSandboxRunner, Vv as createSdkEvents, By as createSerialRunner, Fv as createSessionStore, Iy as createSkillStore, Km as createSubagentMiddleware, Om as createSubagentTracker, Ym as createSubagentsMiddleware, Ay as createUsageHintsMiddleware, xh as createVerifyMiddleware, eg as createVfs, Nv as createWebStorageBackend, Dh as createWriteBackCheck, Nu as decorateModelUnavailable, Cp as deepClone, Ey as defineDataToolset, Gp as defineSkill, J_ as defineTool, Sp as deleteByPath, Q_ as deriveTitle, Wf as describeSchemaNode, of as detectGarbledToolCall, jd as detectTransitionalReply, zp as diffObjects, dy as domInfoTool, fy as domInspectSkill, uy as domSearchTool, Qv as domToStructure, ey as domTools, Ty as domToolsStatic, jf as elementSchemaCandidates, iy as ensureDomListenerRecorder, _m as estimateMessageTokens, vm as estimateRoundTokens, w as estimateTokens, M as extractReasoningDelta, rp as extractSchemaHint, Hh as extractText, j as extractTextDelta, ne as extractUsage, Jv as fetchDocTools, wy as fetchTools, Rp as findStrippedKeys, Gf as formatConstraints, Bl as formatZodIssues, bp as getByPath, $v as getDomTool, ly as getElementInfo, hy as getEnvSummary, ay as getRecordedListeners, I_ as getSandboxLifecycle, wf as getSchemaAtPath, xf as getSchemaTopKeys, Ap as hashValue, U_ as htmlFragmentSkill, Qf as htmlOrchestratorPrompt, ym as indexSummarize, vy as inspectEnvTool, yy as inspectTools, $_ as isChatModel, Au as isContextLengthError, IT as isIconHtml, ju as isModelUnavailableError, Sf as isPathAllowed, Cv as isQuotaError, vp as isUnsafePath, Ju as jpEval, Hl as jsonParseError, Dp as limitDepth, Bk as markedToHtml, E_ as maskUrlCredentials, Tp as maybeParseValue, b_ as measureWriteScale, Pp as moveByPath, k as normalizeBaseUrl, j_ as normalizeRenderResult, N as normalizeUsage, E as offloadPassThroughChars, T as offloadThresholdChars, Zf as presets, Rf as projectBySchema, Lf as projectBySchemaDeep, Ep as projectFields, bm as recallRounds, L_ as renderInSandbox, Vk as renderMarkdownHtml, Kf as renderSchemaHint, qf as renderSchemaOverview, Xf as renderSchemaShallow, Bv as resolveCapabilities, Wv as resolveContextOptions, Rv as resolveDialogConfig, aw as resolveDialogIcons, lw as resolveDialogMessages, cv as resolveLlm, C as resolveModelCaps, Cm as resolvePromptSoftCap, Df as resolveSchemaPath, Lv as resolveStorage, Lp as restoreInPlace, Ip as restoreLive, Ul as routeError, Qu as runSandboxedScript, yp as safeMerge, my as safeSerialize, Op as safeStringify, sf as sanitizeGarbledContent, BT as sanitizeIconHtml, UT as sanitizeMessageHtml, kf as schemaHasRefinement, sy as searchDom, Xu as searchJson, Dy as selectBuiltinTools, xp as setByPath, wm as shouldTriggerCompression, k_ as stringifyDiagnosticsReport, O as stripStainlessFetch, $f as systemPromptHelpers, gm as tokenize, $ as toolError, Cf as unwrapSchema, nw as useChat, fw as useChatContext, Of as validateAtPath, Jg as validateHtmlFormat, jg as validateRootValueLocally, Mg as validateWriteLocally, jp as watchFieldsHash, e as z, Vl as zodError };
|