page-agent-sdk 4.24.5 → 4.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/README.zh-CN.md +2 -1
- package/dist/page-agent-sdk.headless.js +237 -178
- package/dist/page-agent-sdk.iife.js +153 -153
- package/dist/page-agent-sdk.js +2983 -2806
- package/dist/page-agent-sdk.legacy.js +834 -650
- package/dist/page-agent-sdk.umd.cjs +14 -14
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/headless.d.ts +11 -0
- package/types/index.d.ts +15 -0
|
@@ -56630,10 +56630,10 @@ function HQ(e) {
|
|
|
56630
56630
|
he = PZ(), e.__pgIsSubagent && (he.__pgIsSubagent = !0), he.messages = t, he = await qwe(p, he);
|
|
56631
56631
|
try {
|
|
56632
56632
|
var i, a;
|
|
56633
|
-
let
|
|
56633
|
+
let oe = t;
|
|
56634
56634
|
for (let e of p) if (e.compressInput) {
|
|
56635
|
-
let t = await e.compressInput(
|
|
56636
|
-
|
|
56635
|
+
let t = await e.compressInput(oe);
|
|
56636
|
+
oe = Array.isArray(t) ? t : t.messages, t && !Array.isArray(t) && t.stats && (he = j(j({}, he), {}, { lastCompression: t.stats }));
|
|
56637
56637
|
}
|
|
56638
56638
|
{
|
|
56639
56639
|
let e = oF(d || "你是一个智能助手。"), t = Math.max(2e3, Math.round(A.contextWindow * ge));
|
|
@@ -56650,13 +56650,13 @@ function HQ(e) {
|
|
|
56650
56650
|
}), "";
|
|
56651
56651
|
}
|
|
56652
56652
|
}
|
|
56653
|
-
let
|
|
56653
|
+
let se = ye(oe);
|
|
56654
56654
|
le("context", {
|
|
56655
56655
|
model: pe(),
|
|
56656
56656
|
tools: I.map((e) => e.name),
|
|
56657
56657
|
middleware: p.map((e) => e.name)
|
|
56658
56658
|
});
|
|
56659
|
-
let
|
|
56659
|
+
let ce = MQ(p, (e) => xe(e, n, r)), fe = Zwe(p, Se), me = {
|
|
56660
56660
|
rounds: 0,
|
|
56661
56661
|
maxToolRounds: k,
|
|
56662
56662
|
invokeUsage: {
|
|
@@ -56666,33 +56666,33 @@ function HQ(e) {
|
|
|
56666
56666
|
},
|
|
56667
56667
|
writeFailures: {}
|
|
56668
56668
|
};
|
|
56669
|
-
he.loopProgress =
|
|
56670
|
-
let
|
|
56669
|
+
he.loopProgress = me;
|
|
56670
|
+
let _e = {
|
|
56671
56671
|
counts: {},
|
|
56672
56672
|
writePaths: [],
|
|
56673
56673
|
failures: 0
|
|
56674
|
-
},
|
|
56674
|
+
}, Ee = Vwe(), De = new Map(((i = he.todos) == null ? [] : i).map((e) => [e.id, {
|
|
56675
56675
|
status: e.status,
|
|
56676
56676
|
content: e.content
|
|
56677
|
-
}])),
|
|
56677
|
+
}])), Oe = /* @__PURE__ */ new Map(), L = 0, ke = (e) => {
|
|
56678
56678
|
let t = I.find((t) => t.name === e);
|
|
56679
56679
|
return t && "writeCapable" in t ? typeof t.writeCapable == "function" || t.writeCapable === !0 : BQ.has(e);
|
|
56680
|
-
},
|
|
56681
|
-
for (; (
|
|
56682
|
-
if (C > 0 &&
|
|
56683
|
-
let e = `本轮 token 预算(约 ${C})已用尽:任务在 ${
|
|
56680
|
+
}, Ae = 0, je = 0, Me = iTe(k, h), Ne = null, Pe = 0, Fe = !1, Ie = !1, Le = !1;
|
|
56681
|
+
for (; (Ae < k || Le) && je < Me && (je++, !(r != null && r.aborted));) {
|
|
56682
|
+
if (C > 0 && me.invokeUsage.total_tokens > C) {
|
|
56683
|
+
let e = `本轮 token 预算(约 ${C})已用尽:任务在 ${Ae} 轮工具调用后中断,已完成的部分均保留。可继续对话,指定下一步(如「继续完成」/「只改 X」/「提高预算重试」)。`;
|
|
56684
56684
|
return le("error", {
|
|
56685
56685
|
stage: "round_token_budget_exceeded",
|
|
56686
|
-
used:
|
|
56686
|
+
used: me.invokeUsage.total_tokens,
|
|
56687
56687
|
budget: C,
|
|
56688
|
-
rounds:
|
|
56688
|
+
rounds: Ae
|
|
56689
56689
|
}), n({
|
|
56690
56690
|
type: "error",
|
|
56691
56691
|
message: e,
|
|
56692
56692
|
severity: "observable",
|
|
56693
56693
|
code: "ROUND_TOKEN_BUDGET_EXCEEDED",
|
|
56694
56694
|
context: {
|
|
56695
|
-
used:
|
|
56695
|
+
used: me.invokeUsage.total_tokens,
|
|
56696
56696
|
budget: C
|
|
56697
56697
|
}
|
|
56698
56698
|
}), n({
|
|
@@ -56702,29 +56702,29 @@ function HQ(e) {
|
|
|
56702
56702
|
}
|
|
56703
56703
|
n({
|
|
56704
56704
|
type: "round_start",
|
|
56705
|
-
round:
|
|
56705
|
+
round: je
|
|
56706
56706
|
}), he = Jwe(p, {
|
|
56707
|
-
messages:
|
|
56707
|
+
messages: se,
|
|
56708
56708
|
state: he
|
|
56709
|
-
}),
|
|
56710
|
-
round:
|
|
56709
|
+
}), se = be(se, aTe(Ae, k, e.hasSubagent)), se = we(se, Math.round(A.contextWindow * .6)), le("llm_request", {
|
|
56710
|
+
round: Ae + 1,
|
|
56711
56711
|
model: pe(),
|
|
56712
56712
|
tools: I.map((e) => e.name),
|
|
56713
|
-
messages: Te(
|
|
56713
|
+
messages: Te(se)
|
|
56714
56714
|
});
|
|
56715
|
-
let t = await
|
|
56716
|
-
messages:
|
|
56715
|
+
let t = await ce({
|
|
56716
|
+
messages: se,
|
|
56717
56717
|
state: he
|
|
56718
56718
|
});
|
|
56719
|
-
|
|
56719
|
+
se.push(t.message);
|
|
56720
56720
|
let i = HG(t.message);
|
|
56721
56721
|
if (le("llm_response", j({
|
|
56722
|
-
round:
|
|
56722
|
+
round: Ae + 1,
|
|
56723
56723
|
content: t.content,
|
|
56724
56724
|
toolCalls: t.toolCalls
|
|
56725
56725
|
}, i ? { usage: i } : {})), i) {
|
|
56726
56726
|
var o, s, c;
|
|
56727
|
-
|
|
56727
|
+
me.invokeUsage.prompt_tokens += (o = i.prompt_tokens) == null ? 0 : o, me.invokeUsage.completion_tokens += (s = i.completion_tokens) == null ? 0 : s, me.invokeUsage.total_tokens += (c = i.total_tokens) == null ? 0 : c;
|
|
56728
56728
|
}
|
|
56729
56729
|
if (he = jQ(p, t, he), t.aborted) return n({
|
|
56730
56730
|
type: "done",
|
|
@@ -56732,17 +56732,27 @@ function HQ(e) {
|
|
|
56732
56732
|
}), t.content;
|
|
56733
56733
|
if (!t.toolCalls.length) {
|
|
56734
56734
|
{
|
|
56735
|
-
var l, u, f, m, g;
|
|
56735
|
+
var l, u, f, m, g, _;
|
|
56736
56736
|
let e = (l = (u = t.message) == null ? void 0 : u.response_metadata) == null ? (f = t.message) == null ? void 0 : f.responseMetadata : l, n = (m = e == null ? void 0 : e.stop_reason) == null ? e == null ? void 0 : e.finish_reason : m, r = HG(t.message);
|
|
56737
|
-
if ((n === "length" || !t.content && ((g = r == null ? void 0 : r.completion_tokens) == null ? 0 : g) >= 4e3) && !
|
|
56738
|
-
var
|
|
56739
|
-
|
|
56737
|
+
if ((n === "length" || !t.content && ((g = r == null ? void 0 : r.completion_tokens) == null ? 0 : g) >= 4e3) && !Fe) {
|
|
56738
|
+
var v;
|
|
56739
|
+
Fe = !0, Le = !0, le("error", {
|
|
56740
56740
|
stage: "completion_truncated_retry",
|
|
56741
56741
|
completionTokens: r == null ? void 0 : r.completion_tokens,
|
|
56742
56742
|
stopReason: n == null ? null : n,
|
|
56743
|
-
maxTokens: (
|
|
56743
|
+
maxTokens: (v = de == null ? void 0 : de.maxTokens) == null ? null : v,
|
|
56744
56744
|
hint: "空输出且 completion 达上限,疑似 max_tokens 截断;回灌分步写入指引"
|
|
56745
|
-
}),
|
|
56745
|
+
}), se.push(new Hy("⚠️ 你上一轮输出为空(疑似被 max_tokens 截断:单次输出过长,常见于把完整大段代码塞进一次工具调用参数)。必须改用分块输出,不要一次性输出完整大段内容:① 先写小体积骨架 —— 大 code 场景先 write 组件、code 字段只含开头一小段(≤800 字符);② 用增量追加逐块补全 —— write({ patch:{ op:\"append\", jsonPath:\"<该组件 code 的路径>\", value:\"<后续代码块,每段 ≤1500 字符>\" } })(append 对字符串是尾接,可连续多次直至完整);③ 已写入部分勿在后续调用重传全文。其他大内容同理:先骨架后增量。"));
|
|
56746
|
+
continue;
|
|
56747
|
+
}
|
|
56748
|
+
if (!t.content && ((_ = r == null ? void 0 : r.reasoning_tokens) == null ? 0 : _) > 0 && !Ie) {
|
|
56749
|
+
var y, b;
|
|
56750
|
+
Ie = !0, Le = !0, le("error", {
|
|
56751
|
+
stage: "reasoning_exhausted_retry",
|
|
56752
|
+
completionTokens: (y = r == null ? void 0 : r.completion_tokens) == null ? null : y,
|
|
56753
|
+
reasoningTokens: (b = r == null ? void 0 : r.reasoning_tokens) == null ? null : b,
|
|
56754
|
+
hint: "空输出且 completion 全为 reasoning,疑似思考耗尽未答;回灌直接作答"
|
|
56755
|
+
}), se.push(new Hy("⚠️ 你上一轮把全部输出都花在了思考(reasoning)上,没有产出任何正文,用户看到的是空回复。请直接输出对用户问题的回答正文;可以有少量必要思考,但本轮必须给出正文。"));
|
|
56746
56756
|
continue;
|
|
56747
56757
|
}
|
|
56748
56758
|
}
|
|
@@ -56761,17 +56771,17 @@ function HQ(e) {
|
|
|
56761
56771
|
names: i.map((e) => e.name)
|
|
56762
56772
|
});
|
|
56763
56773
|
} else {
|
|
56764
|
-
if (r &&
|
|
56765
|
-
|
|
56774
|
+
if (r && Pe < 2) {
|
|
56775
|
+
Pe += 1, Le = !0, le("middleware", {
|
|
56766
56776
|
stage: "format_retry",
|
|
56767
|
-
attempt:
|
|
56777
|
+
attempt: Pe,
|
|
56768
56778
|
content: t.content.slice(0, 200)
|
|
56769
|
-
}),
|
|
56779
|
+
}), se.push(new Hy("⚠️ 你刚才把工具调用写成了文本(伪 XML/标签/DSML 标记,如 <|tool_calls|>、<||DSML||>、<invoke name=...>),未被系统识别为工具调用,因此未执行,页面无变化。请直接用标准 function calling(工具调用)格式重新发起工具调用,不要在回复正文里输出这些标签或 JSON 文本。"));
|
|
56770
56780
|
continue;
|
|
56771
56781
|
}
|
|
56772
56782
|
r && (le("error", {
|
|
56773
56783
|
stage: "garbled_exhausted",
|
|
56774
|
-
retries:
|
|
56784
|
+
retries: Pe,
|
|
56775
56785
|
content: t.content.slice(0, 200)
|
|
56776
56786
|
}), n({
|
|
56777
56787
|
type: "error",
|
|
@@ -56781,29 +56791,29 @@ function HQ(e) {
|
|
|
56781
56791
|
context: { content: t.content.slice(0, 200) }
|
|
56782
56792
|
}));
|
|
56783
56793
|
let i = Wwe({
|
|
56784
|
-
state:
|
|
56794
|
+
state: Ee,
|
|
56785
56795
|
garbled: r,
|
|
56786
|
-
rounds:
|
|
56796
|
+
rounds: Ae,
|
|
56787
56797
|
finalContent: t.content,
|
|
56788
56798
|
todos: he.todos,
|
|
56789
56799
|
isSubagent: !!he.__pgIsSubagent,
|
|
56790
|
-
turnUsage:
|
|
56791
|
-
isWriteToolByName:
|
|
56792
|
-
messages:
|
|
56800
|
+
turnUsage: _e,
|
|
56801
|
+
isWriteToolByName: ke,
|
|
56802
|
+
messages: se,
|
|
56793
56803
|
sessionWritePaths: F,
|
|
56794
|
-
todosStatusAtStart:
|
|
56804
|
+
todosStatusAtStart: De,
|
|
56795
56805
|
pageGate: e.pageAssertionGate === !0,
|
|
56796
56806
|
pageReadTools: e.pageReadTools,
|
|
56797
56807
|
deferredWriteTools: e.deferredWriteTools
|
|
56798
56808
|
});
|
|
56799
56809
|
if ((i == null ? void 0 : i.kind) === "feedback") {
|
|
56800
|
-
var
|
|
56801
|
-
|
|
56810
|
+
var w;
|
|
56811
|
+
Le = !0;
|
|
56802
56812
|
let e = ie[i.gate.stage];
|
|
56803
56813
|
e && (e.retries += 1), le("middleware", j(j({
|
|
56804
56814
|
stage: i.gate.stage,
|
|
56805
56815
|
attempt: i.gate.attempt
|
|
56806
|
-
}, (
|
|
56816
|
+
}, (w = i.gate.logData) == null ? {} : w), {}, { content: t.content.slice(0, 160) })), se.push(new Hy(i.gate.feedback));
|
|
56807
56817
|
continue;
|
|
56808
56818
|
}
|
|
56809
56819
|
if ((i == null ? void 0 : i.kind) === "observable") {
|
|
@@ -56818,13 +56828,13 @@ function HQ(e) {
|
|
|
56818
56828
|
}
|
|
56819
56829
|
if (!r && S > 0 && he.verifyAttempts < S) {
|
|
56820
56830
|
let e = await Xwe(p, {
|
|
56821
|
-
messages:
|
|
56831
|
+
messages: se,
|
|
56822
56832
|
state: he,
|
|
56823
56833
|
response: t,
|
|
56824
56834
|
log: (e, t) => le(e, t)
|
|
56825
56835
|
});
|
|
56826
56836
|
if (e) {
|
|
56827
|
-
|
|
56837
|
+
Ne = t.content, he.verifyAttempts += 1, se.push(new Hy(`⚠️ 验证未通过,请修正:${e}`)), le("middleware", {
|
|
56828
56838
|
stage: "verify_retry",
|
|
56829
56839
|
attempt: he.verifyAttempts,
|
|
56830
56840
|
feedback: e
|
|
@@ -56832,7 +56842,7 @@ function HQ(e) {
|
|
|
56832
56842
|
continue;
|
|
56833
56843
|
}
|
|
56834
56844
|
}
|
|
56835
|
-
|
|
56845
|
+
Le = !1;
|
|
56836
56846
|
let a = t.content;
|
|
56837
56847
|
if (r) {
|
|
56838
56848
|
let e = PQ(a);
|
|
@@ -56844,7 +56854,7 @@ function HQ(e) {
|
|
|
56844
56854
|
}), a;
|
|
56845
56855
|
}
|
|
56846
56856
|
}
|
|
56847
|
-
|
|
56857
|
+
Le = !1;
|
|
56848
56858
|
let a = t.toolCalls, d = a.map((e) => {
|
|
56849
56859
|
let t = e.id || `call_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
56850
56860
|
return {
|
|
@@ -56880,14 +56890,14 @@ function HQ(e) {
|
|
|
56880
56890
|
args: e.call.args,
|
|
56881
56891
|
id: e.id
|
|
56882
56892
|
}), le("tool_call", {
|
|
56883
|
-
round:
|
|
56893
|
+
round: Ae + 1,
|
|
56884
56894
|
name: e.call.name,
|
|
56885
56895
|
args: e.call.args,
|
|
56886
56896
|
id: e.id
|
|
56887
56897
|
});
|
|
56888
56898
|
let i;
|
|
56889
56899
|
try {
|
|
56890
|
-
i = await
|
|
56900
|
+
i = await fe(e.ctx);
|
|
56891
56901
|
} catch (e) {
|
|
56892
56902
|
if (FZ(e, r)) throw e;
|
|
56893
56903
|
i = {
|
|
@@ -56904,7 +56914,7 @@ function HQ(e) {
|
|
|
56904
56914
|
durationMs: a,
|
|
56905
56915
|
id: e.id
|
|
56906
56916
|
}), le("tool_result", {
|
|
56907
|
-
round:
|
|
56917
|
+
round: Ae + 1,
|
|
56908
56918
|
name: e.call.name,
|
|
56909
56919
|
result: i.content,
|
|
56910
56920
|
status: i.status,
|
|
@@ -56912,47 +56922,47 @@ function HQ(e) {
|
|
|
56912
56922
|
}), i;
|
|
56913
56923
|
}, r);
|
|
56914
56924
|
for (let e = 0; e < d.length; e++) {
|
|
56915
|
-
var
|
|
56925
|
+
var T;
|
|
56916
56926
|
let t = h[e];
|
|
56917
56927
|
if (!t) continue;
|
|
56918
|
-
let n = (e) => e && typeof e == "object" && !Array.isArray(e) ? Object.fromEntries(Object.keys(e).sort().map((t) => [t, n(e[t])])) : e, r = `${d[e].call.name}|${JSON.stringify(n((
|
|
56928
|
+
let n = (e) => e && typeof e == "object" && !Array.isArray(e) ? Object.fromEntries(Object.keys(e).sort().map((t) => [t, n(e[t])])) : e, r = `${d[e].call.name}|${JSON.stringify(n((T = d[e].call.args) == null ? {} : T))}`, i = t.status === "error" || typeof t.content == "string" && t.content.startsWith("ERROR:"), a = t.content;
|
|
56919
56929
|
if (i) {
|
|
56920
56930
|
if (!(typeof t.content == "string" && t.content.includes("COMPONENT_BUSY"))) {
|
|
56921
|
-
var
|
|
56922
|
-
let e = ((
|
|
56923
|
-
|
|
56931
|
+
var E;
|
|
56932
|
+
let e = ((E = Oe.get(r)) == null ? 0 : E) + 1;
|
|
56933
|
+
Oe.set(r, e), e >= 2 && (a = `${t.content}\n(提示:同参数已连续失败 ${e} 次,原样重试大概率仍失败;请检查参数/换路径/换方法,或向用户如实说明困难)`);
|
|
56924
56934
|
}
|
|
56925
|
-
} else
|
|
56935
|
+
} else Oe.delete(r);
|
|
56926
56936
|
if (d[e].call.name === "read" && !i) {
|
|
56927
|
-
var
|
|
56928
|
-
let t = (
|
|
56929
|
-
t.jsonPath && !((
|
|
56937
|
+
var O, M, ee;
|
|
56938
|
+
let t = (O = d[e].call.args) == null ? {} : O;
|
|
56939
|
+
t.jsonPath && !((M = t.jsonPaths) != null && M.length) ? (L++, L >= 2 && (a = `${a}\n(提示:还需读多个路径时,用 read({jsonPaths:["路径1","路径2",…]}) 一次取回省轮次;多路径单项标错不整批失败)`)) : (ee = t.jsonPaths) != null && ee.length && (L = 0);
|
|
56930
56940
|
}
|
|
56931
|
-
|
|
56941
|
+
se.push(new sy({
|
|
56932
56942
|
tool_call_id: d[e].id,
|
|
56933
56943
|
content: a
|
|
56934
56944
|
}));
|
|
56935
56945
|
}
|
|
56936
56946
|
for (let e = 0; e < d.length; e++) {
|
|
56937
|
-
var
|
|
56947
|
+
var te;
|
|
56938
56948
|
let t = h[e];
|
|
56939
56949
|
if (!t || !BQ.has(d[e].call.name)) continue;
|
|
56940
56950
|
let n = VQ(d[e].call.args);
|
|
56941
|
-
t.status === "error" ?
|
|
56951
|
+
t.status === "error" ? me.writeFailures[n] = ((te = me.writeFailures[n]) == null ? 0 : te) + 1 : delete me.writeFailures[n];
|
|
56942
56952
|
}
|
|
56943
|
-
let
|
|
56953
|
+
let oe = [];
|
|
56944
56954
|
for (let e = 0; e < d.length; e++) {
|
|
56945
|
-
var
|
|
56955
|
+
var N;
|
|
56946
56956
|
let t = h[e];
|
|
56947
56957
|
if (!t) continue;
|
|
56948
56958
|
let n = d[e].call.name;
|
|
56949
|
-
if (
|
|
56950
|
-
var
|
|
56951
|
-
|
|
56959
|
+
if (_e.counts[n] = ((N = _e.counts[n]) == null ? 0 : N) + 1, t.status === "error" && (_e.failures += 1), dQ.test(n) && String(t.content || "").startsWith("ERROR:")) {
|
|
56960
|
+
var P, re;
|
|
56961
|
+
_e.rejectedDelegations = (P = _e.rejectedDelegations) == null ? {} : P, _e.rejectedDelegations[n] = ((re = _e.rejectedDelegations[n]) == null ? 0 : re) + 1;
|
|
56952
56962
|
}
|
|
56953
56963
|
if (Mwe(I.find((e) => e.name === n), d[e].call.args, t)) {
|
|
56954
56964
|
let t = VQ(d[e].call.args);
|
|
56955
|
-
|
|
56965
|
+
_e.writePaths.push(t || "(整体)"), oe.push({
|
|
56956
56966
|
name: n,
|
|
56957
56967
|
args: d[e].call.args,
|
|
56958
56968
|
callIndex: e
|
|
@@ -56965,48 +56975,48 @@ function HQ(e) {
|
|
|
56965
56975
|
if (r) for (let e of r.paths) F.add(e);
|
|
56966
56976
|
}
|
|
56967
56977
|
}
|
|
56968
|
-
if (D &&
|
|
56969
|
-
let e = iwe(
|
|
56970
|
-
round:
|
|
56978
|
+
if (D && oe.length) {
|
|
56979
|
+
let e = iwe(se, oe, {
|
|
56980
|
+
round: Ae + 1,
|
|
56971
56981
|
maxParallelTools: x
|
|
56972
56982
|
});
|
|
56973
|
-
e.invalidatedCount > 0 && (
|
|
56983
|
+
e.invalidatedCount > 0 && (se = e.messages, ne += e.invalidatedCount, le("middleware", {
|
|
56974
56984
|
stage: "stale_read_invalidated",
|
|
56975
|
-
round:
|
|
56976
|
-
writtenPaths:
|
|
56985
|
+
round: Ae + 1,
|
|
56986
|
+
writtenPaths: oe.map((e) => VQ(e.args) || "(整体)"),
|
|
56977
56987
|
invalidatedCount: e.invalidatedCount
|
|
56978
56988
|
}));
|
|
56979
56989
|
}
|
|
56980
56990
|
if (r != null && r.aborted) break;
|
|
56981
|
-
|
|
56991
|
+
Ae++, me.rounds = Ae;
|
|
56982
56992
|
}
|
|
56983
56993
|
if (r != null && r.aborted) return n({
|
|
56984
56994
|
type: "done",
|
|
56985
56995
|
content: ""
|
|
56986
56996
|
}), "";
|
|
56987
|
-
let
|
|
56997
|
+
let Re = `\n\n(提示:工具调用次数已达上限(${k} 轮 / ${Me} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
|
|
56988
56998
|
le("error", {
|
|
56989
56999
|
stage: "react_call_limit_exceeded",
|
|
56990
|
-
rounds:
|
|
57000
|
+
rounds: Ae,
|
|
56991
57001
|
maxToolRounds: k,
|
|
56992
|
-
iterations:
|
|
56993
|
-
maxIterations:
|
|
57002
|
+
iterations: je,
|
|
57003
|
+
maxIterations: Me
|
|
56994
57004
|
}), n({
|
|
56995
57005
|
type: "error",
|
|
56996
|
-
message: `ReAct 循环达到调用上限(rounds=${
|
|
57006
|
+
message: `ReAct 循环达到调用上限(rounds=${Ae}/${k},iterations=${je}/${Me}),已强制收口,可回复「继续」。`,
|
|
56997
57007
|
severity: "observable",
|
|
56998
57008
|
code: "REACT_CALL_LIMIT_EXCEEDED",
|
|
56999
57009
|
context: {
|
|
57000
|
-
rounds:
|
|
57010
|
+
rounds: Ae,
|
|
57001
57011
|
maxToolRounds: k,
|
|
57002
|
-
iterations:
|
|
57003
|
-
maxIterations:
|
|
57012
|
+
iterations: je,
|
|
57013
|
+
maxIterations: Me
|
|
57004
57014
|
}
|
|
57005
57015
|
});
|
|
57006
|
-
let
|
|
57007
|
-
if (
|
|
57016
|
+
let ze = kQ((a = he.todos) == null ? [] : a, De, F);
|
|
57017
|
+
if (ze.length) {
|
|
57008
57018
|
ie.evidence_audit_gate.exhausted += 1;
|
|
57009
|
-
let e =
|
|
57019
|
+
let e = ze.map((e) => ({
|
|
57010
57020
|
id: e.id,
|
|
57011
57021
|
evidence: e.evidence
|
|
57012
57022
|
}));
|
|
@@ -57015,22 +57025,22 @@ function HQ(e) {
|
|
|
57015
57025
|
offenders: e
|
|
57016
57026
|
}), n({
|
|
57017
57027
|
type: "error",
|
|
57018
|
-
message: `轮次耗尽收口:${
|
|
57028
|
+
message: `轮次耗尽收口:${ze.length} 项已完成任务的 evidence 路径与写入记录不符,最终回复中的完成声明可能不实`,
|
|
57019
57029
|
severity: "observable",
|
|
57020
57030
|
code: "AUDIT_EVIDENCE_SUSPECT",
|
|
57021
57031
|
context: { offenders: e }
|
|
57022
57032
|
});
|
|
57023
57033
|
}
|
|
57024
|
-
if (
|
|
57025
|
-
let e =
|
|
57034
|
+
if (Ne != null) {
|
|
57035
|
+
let e = Ne + Re;
|
|
57026
57036
|
return n({
|
|
57027
57037
|
type: "done",
|
|
57028
57038
|
content: e
|
|
57029
57039
|
}), e;
|
|
57030
57040
|
}
|
|
57031
|
-
let
|
|
57032
|
-
if (
|
|
57033
|
-
let e =
|
|
57041
|
+
let Be = se[se.length - 1];
|
|
57042
|
+
if (Be && Ce(Be) === "tool") {
|
|
57043
|
+
let e = se[0] && Ce(se[0]) === "system" ? se.slice(1) : se.slice(), t = [new qy(ve() + "\n\n工具调用次数已达上限,请基于已有工具结果直接给出最终回答,不要再调用工具。"), ...e];
|
|
57034
57044
|
le("llm_request", {
|
|
57035
57045
|
round: "wrap_up",
|
|
57036
57046
|
model: pe(),
|
|
@@ -57065,15 +57075,15 @@ function HQ(e) {
|
|
|
57065
57075
|
}
|
|
57066
57076
|
return n({
|
|
57067
57077
|
type: "done",
|
|
57068
|
-
content: e +
|
|
57069
|
-
}), e +
|
|
57078
|
+
content: e + Re
|
|
57079
|
+
}), e + Re;
|
|
57070
57080
|
}
|
|
57071
57081
|
}
|
|
57072
|
-
let
|
|
57082
|
+
let Ve = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
|
|
57073
57083
|
return n({
|
|
57074
57084
|
type: "done",
|
|
57075
|
-
content:
|
|
57076
|
-
}),
|
|
57085
|
+
content: Ve + Re
|
|
57086
|
+
}), Ve + Re;
|
|
57077
57087
|
} finally {
|
|
57078
57088
|
try {
|
|
57079
57089
|
await Ywe(p, he);
|
|
@@ -68697,8 +68707,20 @@ function yje(e, t) {
|
|
|
68697
68707
|
QP(), Uf(), M();
|
|
68698
68708
|
function w6(e, t) {
|
|
68699
68709
|
if (!e) return null;
|
|
68700
|
-
let n = t ? KQ(e, t) : e
|
|
68701
|
-
|
|
68710
|
+
let n = t ? KQ(e, t) : e;
|
|
68711
|
+
if (!n) return null;
|
|
68712
|
+
let r = n == null ? void 0 : n.shape;
|
|
68713
|
+
if (r && typeof r == "object") return Object.keys(r);
|
|
68714
|
+
let i = n == null ? void 0 : n.options;
|
|
68715
|
+
if (Array.isArray(i)) {
|
|
68716
|
+
let e = /* @__PURE__ */ new Set();
|
|
68717
|
+
for (let t of i) {
|
|
68718
|
+
let n = t == null ? void 0 : t.shape;
|
|
68719
|
+
if (n && typeof n == "object") for (let t of Object.keys(n)) e.add(t);
|
|
68720
|
+
}
|
|
68721
|
+
return e.size ? [...e] : null;
|
|
68722
|
+
}
|
|
68723
|
+
return null;
|
|
68702
68724
|
}
|
|
68703
68725
|
var T6 = (e) => e && e.length ? `(可用字段:${e.slice(0, 12).join(", ")}${e.length > 12 ? " …" : ""})` : "", E6 = (e) => /[.[]/.test(e) ? e.replace(/[.[][^.[]*$/, "") : "";
|
|
68704
68726
|
function D6(e) {
|
|
@@ -68774,7 +68796,7 @@ function D6(e) {
|
|
|
68774
68796
|
error: _Z({
|
|
68775
68797
|
code: "SCHEMA_STRIP",
|
|
68776
68798
|
message: `字段 ${c.join(", ")} 不在 schema 声明内,写入被拒绝(防静默丢失)`,
|
|
68777
|
-
hint:
|
|
68799
|
+
hint: `该数据结构不支持这些字段;请只用 schema 声明的字段,或在 data.schema 中声明后重试${T6(w6(t, E6(String(c[0]))))}`,
|
|
68778
68800
|
path: c[0],
|
|
68779
68801
|
details: { stripped: c }
|
|
68780
68802
|
}),
|
|
@@ -68818,7 +68840,7 @@ function bje(e) {
|
|
|
68818
68840
|
}, f = (e) => _Z({
|
|
68819
68841
|
code: "SCHEMA_STRIP",
|
|
68820
68842
|
message: `字段 ${e.join(", ")} 不在 schema 声明内,写入被拒绝(防静默丢失)`,
|
|
68821
|
-
hint:
|
|
68843
|
+
hint: `该数据结构不支持这些字段;请只用 schema 声明的字段,或在 data.schema 中声明后重试${T6(w6(t, E6(String(e[0]))))}`,
|
|
68822
68844
|
path: e[0],
|
|
68823
68845
|
details: { stripped: e }
|
|
68824
68846
|
}), p = [];
|
|
@@ -78651,50 +78673,51 @@ function yRe(e = {}) {
|
|
|
78651
78673
|
messages: (t = e.messages) == null ? [] : t,
|
|
78652
78674
|
loading: !1,
|
|
78653
78675
|
error: null
|
|
78654
|
-
}), l = /* @__PURE__ */ Iq(null), u = /* @__PURE__ */ Iq(!0), d = null, f = /* @__PURE__ */ Iq([]),
|
|
78655
|
-
function
|
|
78656
|
-
function
|
|
78676
|
+
}), l = /* @__PURE__ */ Iq(null), u = /* @__PURE__ */ Iq(!0), d = null, f = 0, p = /* @__PURE__ */ Iq([]), m = /* @__PURE__ */ Iq(null);
|
|
78677
|
+
function h() {}
|
|
78678
|
+
function g(e) {
|
|
78657
78679
|
let t = l.value;
|
|
78658
78680
|
e.deltaY < 0 ? u.value = !1 : t && (u.value = t.scrollHeight - t.scrollTop - t.clientHeight < 64);
|
|
78659
78681
|
}
|
|
78660
|
-
function
|
|
78682
|
+
function _() {
|
|
78661
78683
|
l.value && requestAnimationFrame(() => {
|
|
78662
78684
|
let e = l.value;
|
|
78663
78685
|
!e || !u.value || (e.scrollTop = e.scrollHeight);
|
|
78664
78686
|
});
|
|
78665
78687
|
}
|
|
78666
|
-
function
|
|
78688
|
+
function v(e, t, n, r, i) {
|
|
78667
78689
|
c.messages.push(j(j(j({
|
|
78668
78690
|
role: e,
|
|
78669
78691
|
content: t,
|
|
78670
78692
|
timestamp: Date.now()
|
|
78671
|
-
}, n && n.length ? { focuses: n } : {}), r != null && r.length ? { images: r } : {}), i ? { quote: i } : {})), u.value = !0,
|
|
78693
|
+
}, n && n.length ? { focuses: n } : {}), r != null && r.length ? { images: r } : {}), i ? { quote: i } : {})), u.value = !0, _();
|
|
78672
78694
|
}
|
|
78673
|
-
async function
|
|
78695
|
+
async function y(e) {
|
|
78696
|
+
let t = ++f;
|
|
78674
78697
|
if (u.value = !0, r) {
|
|
78675
|
-
let
|
|
78698
|
+
let n = /* @__PURE__ */ Tq({
|
|
78676
78699
|
role: "assistant",
|
|
78677
78700
|
content: "",
|
|
78678
78701
|
timestamp: Date.now(),
|
|
78679
78702
|
reasoning: "",
|
|
78680
78703
|
reasoningTotal: 0,
|
|
78681
78704
|
steps: []
|
|
78682
|
-
}),
|
|
78683
|
-
c.messages.push(
|
|
78705
|
+
}), i = !1;
|
|
78706
|
+
c.messages.push(n);
|
|
78684
78707
|
try {
|
|
78685
78708
|
await r(c.messages.slice(0, -1), (e) => {
|
|
78686
78709
|
switch (e.type) {
|
|
78687
78710
|
case "round_start":
|
|
78688
|
-
e.round > 1 && (
|
|
78711
|
+
e.round > 1 && (n.content || n.reasoning) && (i = !0);
|
|
78689
78712
|
break;
|
|
78690
78713
|
case "reasoning":
|
|
78691
|
-
|
|
78714
|
+
i && (n.reasoning += "\n", i = !1), n.reasoningTotal += e.delta.length, n.reasoning = (n.reasoning + e.delta).slice(-4e3);
|
|
78692
78715
|
break;
|
|
78693
78716
|
case "text":
|
|
78694
|
-
|
|
78717
|
+
i && (n.content += "\n", i = !1), n.content += e.delta;
|
|
78695
78718
|
break;
|
|
78696
78719
|
case "tool_call":
|
|
78697
|
-
|
|
78720
|
+
n.steps.push({
|
|
78698
78721
|
name: e.name,
|
|
78699
78722
|
args: e.args,
|
|
78700
78723
|
status: "running",
|
|
@@ -78702,15 +78725,15 @@ function yRe(e = {}) {
|
|
|
78702
78725
|
});
|
|
78703
78726
|
break;
|
|
78704
78727
|
case "tool_result": {
|
|
78705
|
-
let
|
|
78706
|
-
if (e.id !== void 0 && (
|
|
78707
|
-
for (let r =
|
|
78708
|
-
|
|
78728
|
+
let t = -1;
|
|
78729
|
+
if (e.id !== void 0 && (t = n.steps.findIndex((t) => t.id === e.id)), t < 0) {
|
|
78730
|
+
for (let r = n.steps.length - 1; r >= 0; r--) if (n.steps[r].name === e.name && n.steps[r].status === "running") {
|
|
78731
|
+
t = r;
|
|
78709
78732
|
break;
|
|
78710
78733
|
}
|
|
78711
78734
|
}
|
|
78712
|
-
if (
|
|
78713
|
-
let r =
|
|
78735
|
+
if (t >= 0) {
|
|
78736
|
+
let r = n.steps[t];
|
|
78714
78737
|
r.result = e.result, r.status = e.status, r.durationMs = e.durationMs, e.image && (r.image = e.image);
|
|
78715
78738
|
let i = r.subReason;
|
|
78716
78739
|
i && i.length > 80 && (r.subReason = i.slice(0, 80) + "…");
|
|
@@ -78718,58 +78741,58 @@ function yRe(e = {}) {
|
|
|
78718
78741
|
break;
|
|
78719
78742
|
}
|
|
78720
78743
|
case "subagent": {
|
|
78721
|
-
let
|
|
78722
|
-
if (!
|
|
78744
|
+
let t = e.toolCallId === void 0 ? n.steps[n.steps.length - 1] : n.steps.find((t) => t.id === e.toolCallId);
|
|
78745
|
+
if (!t) break;
|
|
78723
78746
|
if (e.kind === "reasoning") {
|
|
78724
|
-
let
|
|
78725
|
-
|
|
78726
|
-
let r = (
|
|
78727
|
-
|
|
78747
|
+
let n = e.delta || "";
|
|
78748
|
+
t.subReasonFull = (t.subReasonFull || "") + n;
|
|
78749
|
+
let r = (t.subReason || "") + n;
|
|
78750
|
+
t.subReason = r.length > vRe ? r.slice(-4e3) : r;
|
|
78728
78751
|
break;
|
|
78729
78752
|
}
|
|
78730
|
-
|
|
78753
|
+
t.children || (t.children = []);
|
|
78731
78754
|
let r = e.label ? `[${e.label}] ${e.name}` : e.name;
|
|
78732
|
-
if (e.kind === "tool_call")
|
|
78755
|
+
if (e.kind === "tool_call") t.children.push({
|
|
78733
78756
|
name: r,
|
|
78734
78757
|
args: e.args,
|
|
78735
78758
|
status: "running"
|
|
78736
78759
|
});
|
|
78737
|
-
else for (let
|
|
78738
|
-
|
|
78760
|
+
else for (let n = t.children.length - 1; n >= 0; n--) if (t.children[n].status === "running" && t.children[n].name === r) {
|
|
78761
|
+
t.children[n].result = e.result, t.children[n].status = e.status || "done";
|
|
78739
78762
|
break;
|
|
78740
78763
|
}
|
|
78741
78764
|
break;
|
|
78742
78765
|
}
|
|
78743
78766
|
case "approval_request":
|
|
78744
|
-
var
|
|
78745
|
-
(
|
|
78767
|
+
var t;
|
|
78768
|
+
(t = e.hold) == null || t.call(e), m.value = j({
|
|
78746
78769
|
toolName: e.toolName,
|
|
78747
78770
|
args: e.args,
|
|
78748
78771
|
resolve: e.resolve
|
|
78749
78772
|
}, e.preview ? { preview: e.preview } : {});
|
|
78750
78773
|
break;
|
|
78751
78774
|
}
|
|
78752
|
-
|
|
78775
|
+
_();
|
|
78753
78776
|
}, e);
|
|
78754
|
-
} catch (
|
|
78755
|
-
if (FZ(
|
|
78756
|
-
let e = c.messages.indexOf(
|
|
78777
|
+
} catch (t) {
|
|
78778
|
+
if (FZ(t, e) || (c.error = t.message || "请求失败,请重试"), !n.content && !n.reasoning) {
|
|
78779
|
+
let e = c.messages.indexOf(n);
|
|
78757
78780
|
e >= 0 && c.messages.splice(e, 1);
|
|
78758
78781
|
}
|
|
78759
78782
|
} finally {
|
|
78760
|
-
await
|
|
78783
|
+
await x(t), t === f && (m.value = null);
|
|
78761
78784
|
}
|
|
78762
78785
|
return;
|
|
78763
78786
|
}
|
|
78764
78787
|
try {
|
|
78765
|
-
|
|
78788
|
+
v("assistant", await (n || E)(c.messages, e));
|
|
78766
78789
|
} catch (t) {
|
|
78767
78790
|
FZ(t, e) || (c.error = t.message || "请求失败,请重试");
|
|
78768
78791
|
} finally {
|
|
78769
|
-
await
|
|
78792
|
+
await x(t);
|
|
78770
78793
|
}
|
|
78771
78794
|
}
|
|
78772
|
-
function
|
|
78795
|
+
function b(e) {
|
|
78773
78796
|
let t = (e) => {
|
|
78774
78797
|
if (e != null && e.length) for (let r of e) {
|
|
78775
78798
|
var n;
|
|
@@ -78781,31 +78804,33 @@ function yRe(e = {}) {
|
|
|
78781
78804
|
break;
|
|
78782
78805
|
}
|
|
78783
78806
|
}
|
|
78784
|
-
async function
|
|
78785
|
-
|
|
78807
|
+
async function x(t) {
|
|
78808
|
+
if (t !== f) return;
|
|
78809
|
+
b(c.messages);
|
|
78786
78810
|
try {
|
|
78787
78811
|
await (i == null ? void 0 : i(c.messages));
|
|
78788
78812
|
} catch (e) {}
|
|
78813
|
+
if (t !== f) return;
|
|
78789
78814
|
c.loading = !1, d = null;
|
|
78790
|
-
let
|
|
78791
|
-
if (
|
|
78792
|
-
var
|
|
78793
|
-
|
|
78815
|
+
let n = p.value.shift();
|
|
78816
|
+
if (n !== void 0) {
|
|
78817
|
+
var r;
|
|
78818
|
+
v("user", n, (r = e.getFocuses) == null ? void 0 : r.call(e)), c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal);
|
|
78794
78819
|
}
|
|
78795
78820
|
}
|
|
78796
|
-
function
|
|
78797
|
-
|
|
78821
|
+
function S(e) {
|
|
78822
|
+
p.value.splice(e, 1);
|
|
78798
78823
|
}
|
|
78799
|
-
async function
|
|
78824
|
+
async function C(e, t, n, r) {
|
|
78800
78825
|
if (!(!e.trim() && !(n != null && n.length))) {
|
|
78801
78826
|
if (c.loading) {
|
|
78802
|
-
|
|
78827
|
+
p.value.push(e.trim());
|
|
78803
78828
|
return;
|
|
78804
78829
|
}
|
|
78805
|
-
|
|
78830
|
+
v("user", e.trim() || "[image]", t, n, r), c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal);
|
|
78806
78831
|
}
|
|
78807
78832
|
}
|
|
78808
|
-
async function
|
|
78833
|
+
async function w() {
|
|
78809
78834
|
if (c.loading) return;
|
|
78810
78835
|
s == null || s();
|
|
78811
78836
|
let e = c.messages;
|
|
@@ -78813,27 +78838,41 @@ function yRe(e = {}) {
|
|
|
78813
78838
|
e.splice(t);
|
|
78814
78839
|
break;
|
|
78815
78840
|
}
|
|
78816
|
-
e.some((e) => e.role === "user") && (c.loading = !0, c.error = null, d = new AbortController(), await
|
|
78841
|
+
e.some((e) => e.role === "user") && (c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal));
|
|
78842
|
+
}
|
|
78843
|
+
async function T(e, t) {
|
|
78844
|
+
var n;
|
|
78845
|
+
let r = c.messages[e];
|
|
78846
|
+
if (!r || r.role !== "user") return;
|
|
78847
|
+
let a = !!((n = r.images) != null && n.length), o = t.trim();
|
|
78848
|
+
if (!o && !a) return;
|
|
78849
|
+
c.loading && O();
|
|
78850
|
+
let { focuses: l, images: u, quote: f } = r;
|
|
78851
|
+
s == null || s(), c.messages.splice(e), v("user", o || "[image]", l, u, f);
|
|
78852
|
+
try {
|
|
78853
|
+
await (i == null ? void 0 : i(c.messages));
|
|
78854
|
+
} catch (e) {}
|
|
78855
|
+
c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal);
|
|
78817
78856
|
}
|
|
78818
|
-
async function
|
|
78857
|
+
async function E(e) {
|
|
78819
78858
|
await new Promise((e) => setTimeout(e, 800 + Math.random() * 1200));
|
|
78820
78859
|
let t = e.filter((e) => e.role === "user").pop();
|
|
78821
78860
|
return `收到你的消息:"${t == null ? void 0 : t.content}"。这是一个模拟回复,请接入实际的 AI API。`;
|
|
78822
78861
|
}
|
|
78823
|
-
function
|
|
78862
|
+
function D() {
|
|
78824
78863
|
a == null || a(), c.messages.splice(0, c.messages.length), c.error = null;
|
|
78825
78864
|
}
|
|
78826
|
-
function
|
|
78827
|
-
|
|
78865
|
+
function O() {
|
|
78866
|
+
p.value.length && (o == null || o([...p.value])), p.value = [], d == null || d.abort();
|
|
78828
78867
|
}
|
|
78829
|
-
function
|
|
78830
|
-
|
|
78868
|
+
function k() {
|
|
78869
|
+
p.value = [], d == null || d.abort(), d = null, c.loading = !1, c.error = null, m.value = null;
|
|
78831
78870
|
}
|
|
78832
|
-
function
|
|
78833
|
-
let t =
|
|
78834
|
-
t && (
|
|
78871
|
+
function A(e) {
|
|
78872
|
+
let t = m.value;
|
|
78873
|
+
t && (m.value = null, t.resolve(e));
|
|
78835
78874
|
}
|
|
78836
|
-
async function
|
|
78875
|
+
async function M() {
|
|
78837
78876
|
if (!c.error) return;
|
|
78838
78877
|
let e = c.messages, t = -1;
|
|
78839
78878
|
for (let n = e.length - 1; n >= 0; n--) if (e[n].role === "user") {
|
|
@@ -78842,23 +78881,24 @@ function yRe(e = {}) {
|
|
|
78842
78881
|
}
|
|
78843
78882
|
if (t < 0) return;
|
|
78844
78883
|
let n = e[t].content;
|
|
78845
|
-
e.splice(t), c.error = null, await
|
|
78884
|
+
e.splice(t), c.error = null, await C(n);
|
|
78846
78885
|
}
|
|
78847
78886
|
return {
|
|
78848
78887
|
state: c,
|
|
78849
78888
|
scrollContainer: l,
|
|
78850
|
-
pendingApproval:
|
|
78851
|
-
queuedTasks:
|
|
78852
|
-
sendMessage:
|
|
78853
|
-
removeQueuedTask:
|
|
78854
|
-
clearMessages:
|
|
78855
|
-
stop:
|
|
78856
|
-
reset:
|
|
78857
|
-
retry:
|
|
78858
|
-
regenerate:
|
|
78859
|
-
|
|
78860
|
-
|
|
78861
|
-
|
|
78889
|
+
pendingApproval: m,
|
|
78890
|
+
queuedTasks: p,
|
|
78891
|
+
sendMessage: C,
|
|
78892
|
+
removeQueuedTask: S,
|
|
78893
|
+
clearMessages: D,
|
|
78894
|
+
stop: O,
|
|
78895
|
+
reset: k,
|
|
78896
|
+
retry: M,
|
|
78897
|
+
regenerate: w,
|
|
78898
|
+
editAndResend: T,
|
|
78899
|
+
resolveApproval: A,
|
|
78900
|
+
onScroll: h,
|
|
78901
|
+
onWheel: g
|
|
78862
78902
|
};
|
|
78863
78903
|
}
|
|
78864
78904
|
//#endregion
|
|
@@ -78942,6 +78982,10 @@ var R7 = {
|
|
|
78942
78982
|
copy: "复制",
|
|
78943
78983
|
copied: "已复制",
|
|
78944
78984
|
regenerate: "重新生成",
|
|
78985
|
+
edit: "编辑",
|
|
78986
|
+
editTitle: "编辑后重发:之后的回复将被移除并重新生成",
|
|
78987
|
+
editSave: "保存并重发",
|
|
78988
|
+
editCancel: "取消",
|
|
78945
78989
|
expand: "展开",
|
|
78946
78990
|
collapse: "收起",
|
|
78947
78991
|
noResult: "(无返回值)",
|
|
@@ -79174,6 +79218,10 @@ var R7 = {
|
|
|
79174
79218
|
copy: "Copy",
|
|
79175
79219
|
copied: "Copied",
|
|
79176
79220
|
regenerate: "Regenerate",
|
|
79221
|
+
edit: "Edit",
|
|
79222
|
+
editTitle: "Edit & resubmit: replies after it will be removed and regenerated",
|
|
79223
|
+
editSave: "Save & resubmit",
|
|
79224
|
+
editCancel: "Cancel",
|
|
79177
79225
|
expand: "Expand",
|
|
79178
79226
|
collapse: "Collapse",
|
|
79179
79227
|
noResult: "(no result)",
|
|
@@ -79427,12 +79475,12 @@ function wRe(e = {}) {
|
|
|
79427
79475
|
}), S = EX(() => (r.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), C = () => {
|
|
79428
79476
|
var t;
|
|
79429
79477
|
(t = e.onUndo) != null && t.call(e) && (r.error = null);
|
|
79430
|
-
}, w = (e) => new Date(e).toLocaleTimeString(
|
|
79478
|
+
}, w = (e) => new Date(e).toLocaleTimeString(pe, {
|
|
79431
79479
|
hour: "2-digit",
|
|
79432
79480
|
minute: "2-digit"
|
|
79433
79481
|
}), T = () => {
|
|
79434
79482
|
let e = E.value, t = ee.value;
|
|
79435
|
-
!s.value.trim() && !e.length || (i(s.value,
|
|
79483
|
+
!s.value.trim() && !e.length || (i(s.value, ce.value, e.length ? [...e] : void 0, t == null ? void 0 : t), s.value = "", E.value = [], t && N());
|
|
79436
79484
|
}, E = /* @__PURE__ */ Iq([]), D = /* @__PURE__ */ Iq(""), O = /* @__PURE__ */ Iq(!1), k, A = (e) => {
|
|
79437
79485
|
D.value = e, clearTimeout(k), k = setTimeout(() => {
|
|
79438
79486
|
D.value = "";
|
|
@@ -79442,16 +79490,16 @@ function wRe(e = {}) {
|
|
|
79442
79490
|
if (!t.length) return;
|
|
79443
79491
|
let n = 4 - E.value.length;
|
|
79444
79492
|
if (n <= 0) {
|
|
79445
|
-
A(`${
|
|
79493
|
+
A(`${me.imageCountLimitPrefix}4${me.imageCountLimitSuffix}`);
|
|
79446
79494
|
return;
|
|
79447
79495
|
}
|
|
79448
|
-
t.length > n && A(`${
|
|
79496
|
+
t.length > n && A(`${me.imageCountLimitPrefix}4${me.imageCountLimitSuffix}`), O.value = !0;
|
|
79449
79497
|
try {
|
|
79450
79498
|
for (let e of t.slice(0, n)) try {
|
|
79451
79499
|
let t = await TZ(e, { name: e.name });
|
|
79452
79500
|
E.value.push(t);
|
|
79453
79501
|
} catch (e) {
|
|
79454
|
-
A(e instanceof SZ ? `${e.message}` :
|
|
79502
|
+
A(e instanceof SZ ? `${e.message}` : me.imageInvalid);
|
|
79455
79503
|
}
|
|
79456
79504
|
} finally {
|
|
79457
79505
|
O.value = !1;
|
|
@@ -79471,30 +79519,39 @@ function wRe(e = {}) {
|
|
|
79471
79519
|
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), T());
|
|
79472
79520
|
}, ne = (e) => {
|
|
79473
79521
|
s.value = o.value[e] || "", a(e);
|
|
79474
|
-
}, re = (e) => {
|
|
79522
|
+
}, re = /* @__PURE__ */ Iq(null), ie = (e) => {
|
|
79523
|
+
e.role === "user" && (r.loading && n.stop(), re.value = e);
|
|
79524
|
+
}, ae = () => {
|
|
79525
|
+
re.value = null;
|
|
79526
|
+
}, oe = (e) => {
|
|
79527
|
+
let t = re.value;
|
|
79528
|
+
if (re.value = null, !t) return;
|
|
79529
|
+
let i = r.messages.indexOf(t);
|
|
79530
|
+
i < 0 || n.editAndResend(i, e);
|
|
79531
|
+
}, se = (e) => {
|
|
79475
79532
|
let t = r.messages, n = t[e];
|
|
79476
79533
|
if (!n || n.role !== "assistant") return !1;
|
|
79477
79534
|
let i = "reasoning" in n ? n.reasoning : void 0, a = "steps" in n ? n.steps : void 0;
|
|
79478
79535
|
return r.loading && e === t.length - 1 && !n.content && !i && !(a && a.length);
|
|
79479
|
-
},
|
|
79536
|
+
}, ce = EX(() => {
|
|
79480
79537
|
var t, n, r;
|
|
79481
79538
|
return (t = e.infoTick) == null || t.value, (n = (r = e.getFocuses) == null ? void 0 : r.call(e)) == null ? [] : n;
|
|
79482
|
-
}),
|
|
79539
|
+
}), F = EX(() => {
|
|
79483
79540
|
var t, n;
|
|
79484
79541
|
return (t = e.infoTick) == null || t.value, (n = e.getInfo) == null || (n = n.call(e)) == null ? void 0 : n.planConfirmation;
|
|
79485
|
-
}),
|
|
79542
|
+
}), le = (t) => e.onAddFocus ? e.onAddFocus(t) : {
|
|
79486
79543
|
ok: !1,
|
|
79487
79544
|
error: "focus 未启用"
|
|
79488
|
-
},
|
|
79545
|
+
}, ue = (t) => {
|
|
79489
79546
|
var n;
|
|
79490
79547
|
(n = e.onRemoveFocus) == null || n.call(e, t);
|
|
79491
|
-
},
|
|
79548
|
+
}, I = () => {
|
|
79492
79549
|
var t;
|
|
79493
79550
|
(t = e.onClearFocus) == null || t.call(e);
|
|
79494
|
-
},
|
|
79551
|
+
}, de = (t) => {
|
|
79495
79552
|
var n;
|
|
79496
79553
|
(n = e.onFocusChipClick) == null || n.call(e, t);
|
|
79497
|
-
},
|
|
79554
|
+
}, fe = bRe(e.icons), pe = (t = e.locale) == null ? "zh-CN" : t, me = CRe(pe, e.dialogMessages);
|
|
79498
79555
|
return {
|
|
79499
79556
|
chat: n,
|
|
79500
79557
|
inputText: s,
|
|
@@ -79526,16 +79583,20 @@ function wRe(e = {}) {
|
|
|
79526
79583
|
setQuote: te,
|
|
79527
79584
|
clearQuote: N,
|
|
79528
79585
|
editQueued: ne,
|
|
79529
|
-
|
|
79530
|
-
|
|
79531
|
-
|
|
79532
|
-
|
|
79533
|
-
|
|
79534
|
-
|
|
79535
|
-
|
|
79536
|
-
|
|
79537
|
-
|
|
79538
|
-
|
|
79586
|
+
editingMessage: re,
|
|
79587
|
+
startEdit: ie,
|
|
79588
|
+
cancelEdit: ae,
|
|
79589
|
+
submitEdit: oe,
|
|
79590
|
+
isPendingAssistant: se,
|
|
79591
|
+
focuses: ce,
|
|
79592
|
+
planConfirmation: F,
|
|
79593
|
+
addFocus: le,
|
|
79594
|
+
removeFocus: ue,
|
|
79595
|
+
clearFocus: I,
|
|
79596
|
+
focusChipClick: de,
|
|
79597
|
+
icons: fe,
|
|
79598
|
+
locale: pe,
|
|
79599
|
+
messages: me,
|
|
79539
79600
|
toolStepView: e.toolStepView
|
|
79540
79601
|
};
|
|
79541
79602
|
}
|
|
@@ -89509,45 +89570,134 @@ var iUe = { class: "typing-text" }, aUe = {
|
|
|
89509
89570
|
messages: e.messages
|
|
89510
89571
|
}, null, 8, ["content", "messages"])) : (X(), Z(KY, { key: 1 }, [cX(J(e.content), 1)], 64))], 64))], 2), e.showCursor ? (X(), Z("span", aUe)) : $("", !0)], 64));
|
|
89511
89572
|
}
|
|
89512
|
-
}), [["__scopeId", "data-v-4b4111d8"]])
|
|
89573
|
+
}), [["__scopeId", "data-v-4b4111d8"]]);
|
|
89574
|
+
//#endregion
|
|
89575
|
+
//#region src/core/components/message/MessageEdit.vue?vue&type=script&setup=true&lang.ts
|
|
89576
|
+
M();
|
|
89577
|
+
var sUe = {
|
|
89578
|
+
class: "msg-edit",
|
|
89579
|
+
"data-test": "msg-edit"
|
|
89580
|
+
}, cUe = ["disabled"], lUe = { class: "msg-edit-actions" }, uUe = ["disabled"], dUe = ["disabled"], fUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89581
|
+
__name: "MessageEdit",
|
|
89582
|
+
props: {
|
|
89583
|
+
initialValue: {},
|
|
89584
|
+
hasImages: {
|
|
89585
|
+
type: Boolean,
|
|
89586
|
+
default: !1
|
|
89587
|
+
},
|
|
89588
|
+
loading: {
|
|
89589
|
+
type: Boolean,
|
|
89590
|
+
default: !1
|
|
89591
|
+
},
|
|
89592
|
+
messages: { default: () => j({}, R7) }
|
|
89593
|
+
},
|
|
89594
|
+
emits: ["save", "cancel"],
|
|
89595
|
+
setup(e, { emit: t }) {
|
|
89596
|
+
let n = e, r = t, i = /* @__PURE__ */ Iq(n.initialValue), a = /* @__PURE__ */ Iq(null);
|
|
89597
|
+
function o() {
|
|
89598
|
+
let e = a.value;
|
|
89599
|
+
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
89600
|
+
}
|
|
89601
|
+
$J(async () => {
|
|
89602
|
+
await tJ();
|
|
89603
|
+
let e = a.value;
|
|
89604
|
+
e && (o(), e.focus(), e.setSelectionRange(e.value.length, e.value.length));
|
|
89605
|
+
});
|
|
89606
|
+
function s(e) {
|
|
89607
|
+
if (e.key === "Escape") {
|
|
89608
|
+
e.preventDefault(), r("cancel");
|
|
89609
|
+
return;
|
|
89610
|
+
}
|
|
89611
|
+
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), c());
|
|
89612
|
+
}
|
|
89613
|
+
function c() {
|
|
89614
|
+
n.loading || !i.value.trim() && !n.hasImages || r("save", i.value);
|
|
89615
|
+
}
|
|
89616
|
+
return (t, n) => (X(), Z("div", sUe, [fJ(Q("textarea", {
|
|
89617
|
+
ref_key: "ta",
|
|
89618
|
+
ref: a,
|
|
89619
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => i.value = e),
|
|
89620
|
+
class: "msg-edit-area",
|
|
89621
|
+
"data-test": "msg-edit-area",
|
|
89622
|
+
disabled: e.loading,
|
|
89623
|
+
onKeydown: s,
|
|
89624
|
+
onInput: o
|
|
89625
|
+
}, null, 40, cUe), [[pZ, i.value]]), Q("div", lUe, [Q("button", {
|
|
89626
|
+
type: "button",
|
|
89627
|
+
class: "msg-edit-btn primary",
|
|
89628
|
+
"data-test": "msg-edit-save",
|
|
89629
|
+
disabled: e.loading || !(i.value.trim() || e.hasImages),
|
|
89630
|
+
onClick: c
|
|
89631
|
+
}, J(e.messages.editSave), 9, uUe), Q("button", {
|
|
89632
|
+
type: "button",
|
|
89633
|
+
class: "msg-edit-btn",
|
|
89634
|
+
"data-test": "msg-edit-cancel",
|
|
89635
|
+
disabled: e.loading,
|
|
89636
|
+
onClick: n[1] || (n[1] = (e) => t.$emit("cancel"))
|
|
89637
|
+
}, J(e.messages.editCancel), 9, dUe)])]));
|
|
89638
|
+
}
|
|
89639
|
+
}), [["__scopeId", "data-v-e2fafbfd"]]), pUe = { class: "message-time" }, mUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89513
89640
|
__name: "MessageTime",
|
|
89514
89641
|
props: { time: {} },
|
|
89515
89642
|
setup(e) {
|
|
89516
|
-
return (t, n) => (X(), Z("div",
|
|
89643
|
+
return (t, n) => (X(), Z("div", pUe, J(e.time), 1));
|
|
89517
89644
|
}
|
|
89518
89645
|
}), [["__scopeId", "data-v-4a976e4a"]]);
|
|
89519
89646
|
//#endregion
|
|
89520
89647
|
//#region src/core/components/message/MessageActions.vue?vue&type=script&setup=true&lang.ts
|
|
89521
89648
|
M();
|
|
89522
|
-
var
|
|
89649
|
+
var hUe = { class: "msg-actions" }, gUe = ["title"], _Ue = ["title"], vUe = {
|
|
89523
89650
|
key: 0,
|
|
89524
89651
|
viewBox: "0 0 16 16",
|
|
89525
89652
|
fill: "none",
|
|
89526
89653
|
"aria-hidden": "true"
|
|
89527
|
-
},
|
|
89654
|
+
}, yUe = {
|
|
89528
89655
|
key: 1,
|
|
89529
89656
|
viewBox: "0 0 16 16",
|
|
89530
89657
|
fill: "none",
|
|
89531
89658
|
"aria-hidden": "true"
|
|
89532
|
-
},
|
|
89659
|
+
}, bUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89533
89660
|
__name: "MessageActions",
|
|
89534
89661
|
props: {
|
|
89535
89662
|
copied: { type: Boolean },
|
|
89663
|
+
editable: {
|
|
89664
|
+
type: Boolean,
|
|
89665
|
+
default: !1
|
|
89666
|
+
},
|
|
89536
89667
|
messages: { default: () => j({}, R7) }
|
|
89537
89668
|
},
|
|
89538
|
-
emits: [
|
|
89669
|
+
emits: [
|
|
89670
|
+
"copy",
|
|
89671
|
+
"regenerate",
|
|
89672
|
+
"edit"
|
|
89673
|
+
],
|
|
89539
89674
|
setup(e) {
|
|
89540
|
-
return (t, n) => (X(), Z("div",
|
|
89675
|
+
return (t, n) => (X(), Z("div", hUe, [e.editable ? (X(), Z("button", {
|
|
89676
|
+
key: 0,
|
|
89677
|
+
class: "msg-action-btn",
|
|
89678
|
+
title: e.messages.editTitle,
|
|
89679
|
+
"data-test": "msg-edit-btn",
|
|
89680
|
+
onClick: n[0] || (n[0] = (e) => t.$emit("edit"))
|
|
89681
|
+
}, [n[3] || (n[3] = Q("svg", {
|
|
89682
|
+
viewBox: "0 0 16 16",
|
|
89683
|
+
fill: "none",
|
|
89684
|
+
"aria-hidden": "true"
|
|
89685
|
+
}, [Q("path", {
|
|
89686
|
+
d: "M11.3 2.2a1.5 1.5 0 0 1 2.1 2.1l-7.6 7.6-2.9.8.8-2.9 7.6-7.6z",
|
|
89687
|
+
stroke: "currentColor",
|
|
89688
|
+
"stroke-width": "1.3",
|
|
89689
|
+
"stroke-linejoin": "round"
|
|
89690
|
+
})], -1)), Q("span", null, J(e.messages.edit), 1)], 8, gUe)) : $("", !0), e.editable ? $("", !0) : (X(), Z(KY, { key: 1 }, [Q("button", {
|
|
89541
89691
|
class: TK(["msg-action-btn", { done: e.copied }]),
|
|
89542
89692
|
title: e.copied ? e.messages.copied : e.messages.copy,
|
|
89543
|
-
onClick: n[
|
|
89544
|
-
}, [e.copied ? (X(), Z("svg",
|
|
89693
|
+
onClick: n[1] || (n[1] = (e) => t.$emit("copy"))
|
|
89694
|
+
}, [e.copied ? (X(), Z("svg", vUe, [...n[4] || (n[4] = [Q("path", {
|
|
89545
89695
|
d: "M3 8.5l3 3 7-7",
|
|
89546
89696
|
stroke: "currentColor",
|
|
89547
89697
|
"stroke-width": "1.6",
|
|
89548
89698
|
"stroke-linecap": "round",
|
|
89549
89699
|
"stroke-linejoin": "round"
|
|
89550
|
-
}, null, -1)])])) : (X(), Z("svg",
|
|
89700
|
+
}, null, -1)])])) : (X(), Z("svg", yUe, [...n[5] || (n[5] = [Q("rect", {
|
|
89551
89701
|
x: "5.5",
|
|
89552
89702
|
y: "5.5",
|
|
89553
89703
|
width: "8",
|
|
@@ -89559,10 +89709,10 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89559
89709
|
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",
|
|
89560
89710
|
stroke: "currentColor",
|
|
89561
89711
|
"stroke-width": "1.3"
|
|
89562
|
-
}, null, -1)])])), Q("span", null, J(e.copied ? e.messages.copied : e.messages.copy), 1)], 10,
|
|
89712
|
+
}, null, -1)])])), Q("span", null, J(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, _Ue), Q("button", {
|
|
89563
89713
|
class: "msg-action-btn",
|
|
89564
|
-
onClick: n[
|
|
89565
|
-
}, [n[
|
|
89714
|
+
onClick: n[2] || (n[2] = (e) => t.$emit("regenerate"))
|
|
89715
|
+
}, [n[6] || (n[6] = Q("svg", {
|
|
89566
89716
|
viewBox: "0 0 16 16",
|
|
89567
89717
|
fill: "none",
|
|
89568
89718
|
"aria-hidden": "true"
|
|
@@ -89577,21 +89727,21 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89577
89727
|
"stroke-width": "1.3",
|
|
89578
89728
|
"stroke-linecap": "round",
|
|
89579
89729
|
"stroke-linejoin": "round"
|
|
89580
|
-
})], -1)), Q("span", null, J(e.messages.regenerate), 1)])]));
|
|
89730
|
+
})], -1)), Q("span", null, J(e.messages.regenerate), 1)])], 64))]));
|
|
89581
89731
|
}
|
|
89582
|
-
}), [["__scopeId", "data-v-
|
|
89732
|
+
}), [["__scopeId", "data-v-f6c166bd"]]), xUe = {
|
|
89583
89733
|
key: 1,
|
|
89584
89734
|
class: "avatar-icon",
|
|
89585
89735
|
viewBox: "0 0 1024 1024",
|
|
89586
89736
|
xmlns: "http://www.w3.org/2000/svg",
|
|
89587
89737
|
"aria-hidden": "true"
|
|
89588
|
-
},
|
|
89738
|
+
}, SUe = {
|
|
89589
89739
|
key: 2,
|
|
89590
89740
|
class: "avatar-icon",
|
|
89591
89741
|
viewBox: "0 0 1024 1024",
|
|
89592
89742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
89593
89743
|
"aria-hidden": "true"
|
|
89594
|
-
},
|
|
89744
|
+
}, CUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89595
89745
|
__name: "AvatarIcon",
|
|
89596
89746
|
props: {
|
|
89597
89747
|
role: {},
|
|
@@ -89602,25 +89752,25 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89602
89752
|
key: 0,
|
|
89603
89753
|
icon: e.glyph,
|
|
89604
89754
|
class: "avatar-glyph"
|
|
89605
|
-
}, null, 8, ["icon"])) : e.role === "user" ? (X(), Z("svg",
|
|
89755
|
+
}, null, 8, ["icon"])) : e.role === "user" ? (X(), Z("svg", xUe, [...n[0] || (n[0] = [Q("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)])])) : (X(), Z("svg", SUe, [...n[1] || (n[1] = [Q("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)])]));
|
|
89606
89756
|
}
|
|
89607
|
-
}), [["__scopeId", "data-v-a0b508ea"]]),
|
|
89757
|
+
}), [["__scopeId", "data-v-a0b508ea"]]), wUe = ["data-msg-idx"], TUe = {
|
|
89608
89758
|
key: 0,
|
|
89609
89759
|
class: "message-avatar"
|
|
89610
|
-
},
|
|
89760
|
+
}, EUe = { class: "message-content" }, DUe = {
|
|
89611
89761
|
key: 2,
|
|
89612
89762
|
class: "msg-focuses"
|
|
89613
|
-
},
|
|
89763
|
+
}, OUe = ["title"], kUe = {
|
|
89614
89764
|
key: 3,
|
|
89615
89765
|
class: "msg-quote",
|
|
89616
89766
|
"data-test": "msg-quote"
|
|
89617
|
-
},
|
|
89767
|
+
}, AUe = { class: "msg-quote-text" }, jUe = {
|
|
89618
89768
|
key: 0,
|
|
89619
89769
|
class: "msg-quote-source"
|
|
89620
|
-
},
|
|
89770
|
+
}, MUe = ["data-img-count"], NUe = ["title", "onClick"], PUe = ["src", "alt"], FUe = {
|
|
89621
89771
|
key: 1,
|
|
89622
89772
|
class: "msg-image-lost"
|
|
89623
|
-
},
|
|
89773
|
+
}, IUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89624
89774
|
__name: "MessageRow",
|
|
89625
89775
|
props: {
|
|
89626
89776
|
message: {},
|
|
@@ -89637,7 +89787,10 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89637
89787
|
emits: [
|
|
89638
89788
|
"toggle-reasoning",
|
|
89639
89789
|
"copy",
|
|
89640
|
-
"regenerate"
|
|
89790
|
+
"regenerate",
|
|
89791
|
+
"edit",
|
|
89792
|
+
"edit-save",
|
|
89793
|
+
"edit-cancel"
|
|
89641
89794
|
],
|
|
89642
89795
|
setup(e) {
|
|
89643
89796
|
let t = e, n = B7(), r = EX(() => t.message.role === "assistant"), i = EX(() => {
|
|
@@ -89646,23 +89799,23 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89646
89799
|
}), a = EX(() => r.value && "reasoningTotal" in t.message ? t.message.reasoningTotal : void 0), o = EX(() => {
|
|
89647
89800
|
var e;
|
|
89648
89801
|
return r.value && "steps" in t.message ? (e = t.message.steps) == null ? [] : e : [];
|
|
89649
|
-
}), s = EX(() => r.value && !!t.message.content && !t.loading && t.isLast), c = EX(() => r.value && t.loading && t.isLast && !!t.message.content),
|
|
89650
|
-
return (t,
|
|
89651
|
-
var
|
|
89802
|
+
}), s = EX(() => r.value && !!t.message.content && !t.loading && t.isLast), c = EX(() => n.editingMessage.value === t.message), l = EX(() => t.message.role === "user" && !c.value), u = EX(() => t.message.content === "[image]" ? "" : t.message.content), d = EX(() => r.value && t.loading && t.isLast && !!t.message.content), f = /* @__PURE__ */ Iq(void 0);
|
|
89803
|
+
return (t, p) => {
|
|
89804
|
+
var m, h, g;
|
|
89652
89805
|
return X(), Z(KY, null, [Q("div", {
|
|
89653
89806
|
class: TK(["message-row", e.message.role]),
|
|
89654
89807
|
"data-msg-idx": e.index
|
|
89655
|
-
}, [e.showAvatar ? (X(), Z("div",
|
|
89808
|
+
}, [e.showAvatar ? (X(), Z("div", TUe, [oX(CUe, {
|
|
89656
89809
|
role: e.message.role,
|
|
89657
89810
|
glyph: e.message.role === "user" ? Y(n).icons.userAvatar : Y(n).icons.assistantAvatar
|
|
89658
|
-
}, null, 8, ["role", "glyph"])])) : $("", !0), Q("div",
|
|
89811
|
+
}, null, 8, ["role", "glyph"])])) : $("", !0), Q("div", EUe, [
|
|
89659
89812
|
r.value ? (X(), tX(bBe, {
|
|
89660
89813
|
key: 0,
|
|
89661
89814
|
text: i.value,
|
|
89662
89815
|
total: a.value,
|
|
89663
89816
|
expanded: e.reasoningExpanded,
|
|
89664
89817
|
running: e.loading && e.isLast,
|
|
89665
|
-
onToggle:
|
|
89818
|
+
onToggle: p[0] || (p[0] = (e) => t.$emit("toggle-reasoning"))
|
|
89666
89819
|
}, null, 8, [
|
|
89667
89820
|
"text",
|
|
89668
89821
|
"total",
|
|
@@ -89681,13 +89834,13 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89681
89834
|
"messages",
|
|
89682
89835
|
"step-view"
|
|
89683
89836
|
])) : $("", !0),
|
|
89684
|
-
e.message.role === "user" && (
|
|
89837
|
+
e.message.role === "user" && (m = e.message.focuses) != null && m.length ? (X(), Z("div", DUe, [(X(!0), Z(KY, null, nY(e.message.focuses, (e) => (X(), Z("span", {
|
|
89685
89838
|
key: e.path,
|
|
89686
89839
|
class: "msg-focus-chip",
|
|
89687
89840
|
title: Y(n).messages.historyFocusChipTitlePrefix + e.path
|
|
89688
|
-
}, [oX(g9, { icon: Y(n).icons.focus }, null, 8, ["icon"]), cX(" " + J(e.path), 1)], 8,
|
|
89689
|
-
e.message.role === "user" && e.message.quote ? (X(), Z("div",
|
|
89690
|
-
e.message.role === "user" && (
|
|
89841
|
+
}, [oX(g9, { icon: Y(n).icons.focus }, null, 8, ["icon"]), cX(" " + J(e.path), 1)], 8, OUe))), 128))])) : $("", !0),
|
|
89842
|
+
e.message.role === "user" && e.message.quote ? (X(), Z("div", kUe, [Q("blockquote", AUe, J(e.message.quote.text), 1), e.message.quote.source ? (X(), Z("span", jUe, "❝ " + J(e.message.quote.source), 1)) : $("", !0)])) : $("", !0),
|
|
89843
|
+
e.message.role === "user" && (h = e.message.images) != null && h.length ? (X(), Z("div", {
|
|
89691
89844
|
key: 4,
|
|
89692
89845
|
class: "msg-images",
|
|
89693
89846
|
"data-img-count": e.message.images.length
|
|
@@ -89696,21 +89849,34 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89696
89849
|
type: "button",
|
|
89697
89850
|
class: "msg-image",
|
|
89698
89851
|
title: e.name || Y(n).messages.imageAlt,
|
|
89699
|
-
onClick: (t) =>
|
|
89852
|
+
onClick: (t) => f.value = e.dataUri || e.url
|
|
89700
89853
|
}, [e.thumb || e.dataUri ? (X(), Z("img", {
|
|
89701
89854
|
key: 0,
|
|
89702
89855
|
class: "msg-image-thumb",
|
|
89703
89856
|
src: e.thumb || e.dataUri,
|
|
89704
89857
|
alt: e.name || Y(n).messages.imageAlt
|
|
89705
|
-
}, null, 8,
|
|
89706
|
-
|
|
89858
|
+
}, null, 8, PUe)) : (X(), Z("span", FUe, "🖼️"))], 8, NUe))), 128))], 8, MUe)) : $("", !0),
|
|
89859
|
+
c.value ? (X(), tX(fUe, {
|
|
89707
89860
|
key: 5,
|
|
89861
|
+
"initial-value": u.value,
|
|
89862
|
+
"has-images": !!((g = e.message.images) != null && g.length),
|
|
89863
|
+
loading: e.loading,
|
|
89864
|
+
messages: Y(n).messages,
|
|
89865
|
+
onSave: p[1] || (p[1] = (e) => t.$emit("edit-save", e)),
|
|
89866
|
+
onCancel: p[2] || (p[2] = (e) => t.$emit("edit-cancel"))
|
|
89867
|
+
}, null, 8, [
|
|
89868
|
+
"initial-value",
|
|
89869
|
+
"has-images",
|
|
89870
|
+
"loading",
|
|
89871
|
+
"messages"
|
|
89872
|
+
])) : !r.value || e.message.content || e.isPendingAssistant ? (X(), tX(oUe, {
|
|
89873
|
+
key: 6,
|
|
89708
89874
|
messages: Y(n).messages,
|
|
89709
89875
|
content: e.message.content,
|
|
89710
89876
|
role: e.message.role,
|
|
89711
89877
|
"is-pending-assistant": e.isPendingAssistant,
|
|
89712
89878
|
"show-typing": e.showTyping,
|
|
89713
|
-
"show-cursor":
|
|
89879
|
+
"show-cursor": d.value
|
|
89714
89880
|
}, null, 8, [
|
|
89715
89881
|
"messages",
|
|
89716
89882
|
"content",
|
|
@@ -89719,19 +89885,25 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89719
89885
|
"show-typing",
|
|
89720
89886
|
"show-cursor"
|
|
89721
89887
|
])) : $("", !0),
|
|
89722
|
-
oX(
|
|
89723
|
-
s.value ? (X(), tX(
|
|
89724
|
-
key:
|
|
89888
|
+
oX(mUe, { time: e.time }, null, 8, ["time"]),
|
|
89889
|
+
s.value || l.value ? (X(), tX(bUe, {
|
|
89890
|
+
key: 7,
|
|
89891
|
+
editable: l.value,
|
|
89725
89892
|
messages: Y(n).messages,
|
|
89726
89893
|
copied: e.copied,
|
|
89727
|
-
onCopy:
|
|
89728
|
-
onRegenerate:
|
|
89729
|
-
|
|
89730
|
-
|
|
89731
|
-
|
|
89894
|
+
onCopy: p[3] || (p[3] = (e) => t.$emit("copy")),
|
|
89895
|
+
onRegenerate: p[4] || (p[4] = (e) => t.$emit("regenerate")),
|
|
89896
|
+
onEdit: p[5] || (p[5] = (e) => t.$emit("edit"))
|
|
89897
|
+
}, null, 8, [
|
|
89898
|
+
"editable",
|
|
89899
|
+
"messages",
|
|
89900
|
+
"copied"
|
|
89901
|
+
])) : $("", !0)
|
|
89902
|
+
])], 10, wUe), oX(kBe, {
|
|
89903
|
+
src: f.value,
|
|
89732
89904
|
alt: Y(n).messages.imageAlt,
|
|
89733
89905
|
"close-title": Y(n).messages.close,
|
|
89734
|
-
onClose:
|
|
89906
|
+
onClose: p[6] || (p[6] = (e) => f.value = void 0)
|
|
89735
89907
|
}, null, 8, [
|
|
89736
89908
|
"src",
|
|
89737
89909
|
"alt",
|
|
@@ -89739,32 +89911,32 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89739
89911
|
])], 64);
|
|
89740
89912
|
};
|
|
89741
89913
|
}
|
|
89742
|
-
}), [["__scopeId", "data-v-
|
|
89914
|
+
}), [["__scopeId", "data-v-70c7d2f4"]]), LUe = { class: "chat-body" }, RUe = {
|
|
89743
89915
|
key: 0,
|
|
89744
89916
|
class: "empty-state"
|
|
89745
|
-
},
|
|
89917
|
+
}, zUe = { class: "empty-icon" }, BUe = {
|
|
89746
89918
|
key: 1,
|
|
89747
89919
|
class: "message-row assistant"
|
|
89748
|
-
},
|
|
89920
|
+
}, VUe = {
|
|
89749
89921
|
key: 0,
|
|
89750
89922
|
class: "message-avatar"
|
|
89751
|
-
},
|
|
89923
|
+
}, HUe = { class: "message-content" }, UUe = {
|
|
89752
89924
|
key: 2,
|
|
89753
89925
|
class: "error-bar"
|
|
89754
|
-
},
|
|
89926
|
+
}, WUe = { class: "error-text" }, GUe = ["title"], KUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89755
89927
|
__name: "MessageList",
|
|
89756
89928
|
props: {
|
|
89757
89929
|
showAvatar: { type: Boolean },
|
|
89758
89930
|
showTyping: { type: Boolean }
|
|
89759
89931
|
},
|
|
89760
89932
|
setup(e) {
|
|
89761
|
-
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u, messages: d } = B7(), { state:
|
|
89933
|
+
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u, messages: d, startEdit: f, submitEdit: p, cancelEdit: m } = B7(), { state: h, retry: g, regenerate: _ } = t, v = EX(() => h.messages.length > 0), y = EX(() => h.messages.some((e) => e.role === "user")), b = EX(() => {
|
|
89762
89934
|
var e;
|
|
89763
|
-
return ((e =
|
|
89935
|
+
return ((e = h.messages[h.messages.length - 1]) == null ? void 0 : e.role) === "assistant";
|
|
89764
89936
|
});
|
|
89765
|
-
return (t,
|
|
89766
|
-
|
|
89767
|
-
(X(!0), Z(KY, null, nY(Y(
|
|
89937
|
+
return (t, x) => (X(), Z("div", LUe, [
|
|
89938
|
+
v.value ? $("", !0) : (X(), Z("div", RUe, [Q("div", zUe, [oX(g9, { icon: Y(u).empty }, null, 8, ["icon"])]), Q("p", null, [oX(_9, { text: Y(d).emptyGreeting }, null, 8, ["text"])])])),
|
|
89939
|
+
(X(!0), Z(KY, null, nY(Y(h).messages, (t, c) => (X(), tX(IUe, {
|
|
89768
89940
|
key: c,
|
|
89769
89941
|
message: t,
|
|
89770
89942
|
index: c,
|
|
@@ -89773,12 +89945,15 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89773
89945
|
"is-pending-assistant": Y(a)(c),
|
|
89774
89946
|
"reasoning-expanded": Y(o)(c),
|
|
89775
89947
|
copied: Y(r),
|
|
89776
|
-
"is-last": c === Y(
|
|
89777
|
-
loading: Y(
|
|
89948
|
+
"is-last": c === Y(h).messages.length - 1,
|
|
89949
|
+
loading: Y(h).loading,
|
|
89778
89950
|
time: Y(n)(t.timestamp),
|
|
89779
89951
|
onToggleReasoning: (e) => Y(s)(c),
|
|
89780
89952
|
onCopy: (e) => Y(i)(t.content),
|
|
89781
|
-
onRegenerate: Y(
|
|
89953
|
+
onRegenerate: Y(_),
|
|
89954
|
+
onEdit: (e) => Y(f)(t),
|
|
89955
|
+
onEditSave: Y(p),
|
|
89956
|
+
onEditCancel: Y(m)
|
|
89782
89957
|
}, null, 8, [
|
|
89783
89958
|
"message",
|
|
89784
89959
|
"index",
|
|
@@ -89792,12 +89967,15 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89792
89967
|
"time",
|
|
89793
89968
|
"onToggleReasoning",
|
|
89794
89969
|
"onCopy",
|
|
89795
|
-
"onRegenerate"
|
|
89970
|
+
"onRegenerate",
|
|
89971
|
+
"onEdit",
|
|
89972
|
+
"onEditSave",
|
|
89973
|
+
"onEditCancel"
|
|
89796
89974
|
]))), 128)),
|
|
89797
|
-
Y(
|
|
89975
|
+
Y(h).loading && !b.value ? (X(), Z("div", BUe, [e.showAvatar ? (X(), Z("div", VUe, [oX(CUe, {
|
|
89798
89976
|
role: "assistant",
|
|
89799
89977
|
glyph: Y(u).assistantAvatar
|
|
89800
|
-
}, null, 8, ["glyph"])])) : $("", !0), Q("div",
|
|
89978
|
+
}, null, 8, ["glyph"])])) : $("", !0), Q("div", HUe, [oX(oUe, {
|
|
89801
89979
|
content: "",
|
|
89802
89980
|
role: "assistant",
|
|
89803
89981
|
"is-pending-assistant": !0,
|
|
@@ -89805,84 +89983,84 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89805
89983
|
"show-cursor": !1,
|
|
89806
89984
|
messages: Y(d)
|
|
89807
89985
|
}, null, 8, ["show-typing", "messages"])])])) : $("", !0),
|
|
89808
|
-
Y(
|
|
89809
|
-
Q("span",
|
|
89810
|
-
|
|
89986
|
+
Y(h).error ? (X(), Z("div", UUe, [
|
|
89987
|
+
Q("span", WUe, J(Y(h).error), 1),
|
|
89988
|
+
y.value ? (X(), Z("button", {
|
|
89811
89989
|
key: 0,
|
|
89812
89990
|
class: "retry-btn",
|
|
89813
|
-
onClick:
|
|
89991
|
+
onClick: x[0] || (x[0] = (...e) => Y(g) && Y(g)(...e))
|
|
89814
89992
|
}, [oX(_9, { text: Y(d).retry }, null, 8, ["text"])])) : $("", !0),
|
|
89815
89993
|
Y(c) ? (X(), Z("button", {
|
|
89816
89994
|
key: 1,
|
|
89817
89995
|
class: "undo-btn",
|
|
89818
89996
|
title: Y(d).undoTitle,
|
|
89819
|
-
onClick:
|
|
89820
|
-
}, [oX(_9, { text: Y(d).undo }, null, 8, ["text"])], 8,
|
|
89997
|
+
onClick: x[1] || (x[1] = (...e) => Y(l) && Y(l)(...e))
|
|
89998
|
+
}, [oX(_9, { text: Y(d).undo }, null, 8, ["text"])], 8, GUe)) : $("", !0)
|
|
89821
89999
|
])) : $("", !0)
|
|
89822
90000
|
]));
|
|
89823
90001
|
}
|
|
89824
|
-
}), [["__scopeId", "data-v-
|
|
90002
|
+
}), [["__scopeId", "data-v-c0dd8179"]]), qUe = {
|
|
89825
90003
|
key: 0,
|
|
89826
90004
|
class: "queued-bar"
|
|
89827
|
-
},
|
|
90005
|
+
}, JUe = { class: "queued-head" }, YUe = { class: "queued-icon" }, XUe = { class: "queued-title" }, ZUe = { class: "queued-count" }, QUe = { class: "queued-idx" }, $Ue = { class: "queued-text" }, eWe = ["title", "onClick"], tWe = ["title", "onClick"], nWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89828
90006
|
__name: "QueuedBar",
|
|
89829
90007
|
setup(e) {
|
|
89830
90008
|
let { chat: t, editQueued: n, icons: r, messages: i } = B7(), { queuedTasks: a, removeQueuedTask: o } = t;
|
|
89831
|
-
return (e, t) => Y(a).length ? (X(), Z("div",
|
|
89832
|
-
Q("span",
|
|
89833
|
-
Q("span",
|
|
89834
|
-
Q("span",
|
|
90009
|
+
return (e, t) => Y(a).length ? (X(), Z("div", qUe, [Q("div", JUe, [
|
|
90010
|
+
Q("span", YUe, [oX(g9, { icon: Y(r).queued }, null, 8, ["icon"])]),
|
|
90011
|
+
Q("span", XUe, J(Y(i).queuedTitle), 1),
|
|
90012
|
+
Q("span", ZUe, J(Y(a).length), 1)
|
|
89835
90013
|
]), (X(!0), Z(KY, null, nY(Y(a), (e, t) => (X(), Z("div", {
|
|
89836
90014
|
key: t,
|
|
89837
90015
|
class: "queued-item"
|
|
89838
90016
|
}, [
|
|
89839
|
-
Q("span",
|
|
89840
|
-
Q("span",
|
|
90017
|
+
Q("span", QUe, J(t + 1), 1),
|
|
90018
|
+
Q("span", $Ue, J(e), 1),
|
|
89841
90019
|
Q("button", {
|
|
89842
90020
|
class: "queued-act",
|
|
89843
90021
|
title: Y(i).queuedEditTitle,
|
|
89844
90022
|
onClick: (e) => Y(n)(t)
|
|
89845
|
-
}, [oX(g9, { icon: Y(r).queuedEdit }, null, 8, ["icon"])], 8,
|
|
90023
|
+
}, [oX(g9, { icon: Y(r).queuedEdit }, null, 8, ["icon"])], 8, eWe),
|
|
89846
90024
|
Q("button", {
|
|
89847
90025
|
class: "queued-act queued-del",
|
|
89848
90026
|
title: Y(i).removeQueuedTitle,
|
|
89849
90027
|
onClick: (e) => Y(o)(t)
|
|
89850
|
-
}, "✕", 8,
|
|
90028
|
+
}, "✕", 8, tWe)
|
|
89851
90029
|
]))), 128))])) : $("", !0);
|
|
89852
90030
|
}
|
|
89853
|
-
}), [["__scopeId", "data-v-02414fc9"]]),
|
|
90031
|
+
}), [["__scopeId", "data-v-02414fc9"]]), rWe = {
|
|
89854
90032
|
key: 0,
|
|
89855
90033
|
class: "approval-bar"
|
|
89856
|
-
},
|
|
90034
|
+
}, iWe = { class: "approval-head" }, aWe = { class: "approval-title" }, oWe = {
|
|
89857
90035
|
key: 0,
|
|
89858
90036
|
class: "approval-question"
|
|
89859
|
-
},
|
|
90037
|
+
}, sWe = {
|
|
89860
90038
|
key: 1,
|
|
89861
90039
|
class: "approval-context"
|
|
89862
|
-
},
|
|
90040
|
+
}, cWe = {
|
|
89863
90041
|
key: 2,
|
|
89864
90042
|
class: "approval-recommend"
|
|
89865
|
-
},
|
|
90043
|
+
}, lWe = {
|
|
89866
90044
|
key: 3,
|
|
89867
90045
|
class: "approval-options"
|
|
89868
|
-
},
|
|
90046
|
+
}, uWe = ["onClick"], dWe = { class: "approval-actions" }, fWe = { class: "approval-head" }, pWe = { class: "approval-title" }, mWe = {
|
|
89869
90047
|
key: 0,
|
|
89870
90048
|
class: "approval-args"
|
|
89871
|
-
},
|
|
90049
|
+
}, hWe = {
|
|
89872
90050
|
key: 1,
|
|
89873
90051
|
class: "approval-preview",
|
|
89874
90052
|
"data-test": "approval-preview"
|
|
89875
|
-
},
|
|
90053
|
+
}, gWe = {
|
|
89876
90054
|
key: 0,
|
|
89877
90055
|
class: "preview-error",
|
|
89878
90056
|
"data-test": "preview-error"
|
|
89879
|
-
},
|
|
90057
|
+
}, _We = ["data-test"], vWe = { class: "preview-op" }, yWe = { class: "preview-path" }, bWe = { class: "preview-diff" }, xWe = { class: "preview-old" }, SWe = { class: "preview-new" }, CWe = {
|
|
89880
90058
|
key: 1,
|
|
89881
90059
|
class: "preview-more"
|
|
89882
|
-
},
|
|
90060
|
+
}, wWe = {
|
|
89883
90061
|
key: 2,
|
|
89884
90062
|
class: "approval-plan-context"
|
|
89885
|
-
},
|
|
90063
|
+
}, TWe = { class: "approval-actions" }, EWe = ["disabled"], Z9 = 20, DWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89886
90064
|
__name: "ApprovalBar",
|
|
89887
90065
|
setup(e) {
|
|
89888
90066
|
let t = B7(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = t.planConfirmation, o = /* @__PURE__ */ Iq(!1);
|
|
@@ -89909,40 +90087,44 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89909
90087
|
}), u = EX(() => {
|
|
89910
90088
|
var e, t;
|
|
89911
90089
|
return (e = (t = n.value) == null || (t = t.preview) == null ? void 0 : t.items) == null ? [] : e;
|
|
89912
|
-
}), d = EX(() => u.value.length > Z9)
|
|
89913
|
-
|
|
89914
|
-
|
|
89915
|
-
return
|
|
89916
|
-
|
|
89917
|
-
|
|
89918
|
-
|
|
89919
|
-
|
|
89920
|
-
|
|
90090
|
+
}), d = EX(() => u.value.length > Z9), f = EX(() => {
|
|
90091
|
+
var e;
|
|
90092
|
+
let t = (e = n.value) == null ? void 0 : e.preview;
|
|
90093
|
+
return !!t && t.ok === !1;
|
|
90094
|
+
});
|
|
90095
|
+
return (e, p) => {
|
|
90096
|
+
var m, h, g;
|
|
90097
|
+
return Y(n) ? (X(), Z("div", rWe, [s.value ? (X(), Z(KY, { key: 0 }, [
|
|
90098
|
+
Q("div", iWe, [p[5] || (p[5] = Q("span", { class: "approval-icon" }, "❓", -1)), Q("span", aWe, J(Y(i).humanConfirmTitle), 1)]),
|
|
90099
|
+
(m = Y(n).args) != null && m.question ? (X(), Z("div", oWe, J(Y(n).args.question), 1)) : $("", !0),
|
|
90100
|
+
(h = Y(n).args) != null && h.context ? (X(), Z("div", sWe, J(Y(n).args.context), 1)) : $("", !0),
|
|
90101
|
+
(g = Y(n).args) != null && g.recommendation ? (X(), Z("div", cWe, [oX(g9, { icon: Y(t).icons.recommend }, null, 8, ["icon"]), cX(J(Y(i).recommendPrefix) + J(Y(n).args.recommendation), 1)])) : $("", !0),
|
|
90102
|
+
c.value.length ? (X(), Z("div", lWe, [(X(!0), Z(KY, null, nY(c.value, (e) => (X(), Z("button", {
|
|
89921
90103
|
key: e,
|
|
89922
90104
|
class: "approval-opt",
|
|
89923
90105
|
onClick: (t) => Y(r)(e)
|
|
89924
|
-
}, J(e), 9,
|
|
89925
|
-
Q("div",
|
|
90106
|
+
}, J(e), 9, uWe))), 128))])) : $("", !0),
|
|
90107
|
+
Q("div", dWe, [Q("button", {
|
|
89926
90108
|
class: "approval-deny",
|
|
89927
|
-
onClick:
|
|
90109
|
+
onClick: p[0] || (p[0] = (e) => Y(r)(!1))
|
|
89928
90110
|
}, [oX(_9, { text: Y(i).deny }, null, 8, ["text"])]), c.value.length ? $("", !0) : (X(), Z("button", {
|
|
89929
90111
|
key: 0,
|
|
89930
90112
|
class: "approval-allow",
|
|
89931
|
-
onClick:
|
|
90113
|
+
onClick: p[1] || (p[1] = (e) => Y(r)(!0))
|
|
89932
90114
|
}, [oX(_9, { text: Y(i).approve }, null, 8, ["text"])]))])
|
|
89933
90115
|
], 64)) : (X(), Z(KY, { key: 1 }, [
|
|
89934
|
-
Q("div",
|
|
89935
|
-
|
|
89936
|
-
Q("span",
|
|
90116
|
+
Q("div", fWe, [
|
|
90117
|
+
p[6] || (p[6] = Q("span", { class: "approval-icon" }, "✋", -1)),
|
|
90118
|
+
Q("span", pWe, [cX(J(Y(i).toolConfirmPrefix), 1), Q("code", null, J(Y(n).toolName), 1)]),
|
|
89937
90119
|
l.value ? (X(), Z("button", {
|
|
89938
90120
|
key: 0,
|
|
89939
90121
|
class: "approval-toggle",
|
|
89940
|
-
onClick:
|
|
90122
|
+
onClick: p[2] || (p[2] = (e) => o.value = !o.value)
|
|
89941
90123
|
}, J(o.value ? Y(i).collapseArgs : Y(i).viewArgs) + J(o.value ? " ▴" : " ▾"), 1)) : $("", !0)
|
|
89942
90124
|
]),
|
|
89943
|
-
l.value && o.value ? (X(), Z("pre",
|
|
89944
|
-
u.value.length ? (X(), Z("div",
|
|
89945
|
-
Y(n).preview && !Y(n).preview.ok ? (X(), Z("div",
|
|
90125
|
+
l.value && o.value ? (X(), Z("pre", mWe, J(l.value), 1)) : $("", !0),
|
|
90126
|
+
u.value.length ? (X(), Z("div", hWe, [
|
|
90127
|
+
Y(n).preview && !Y(n).preview.ok ? (X(), Z("div", gWe, "⚠ " + J(Y(n).preview.error), 1)) : $("", !0),
|
|
89946
90128
|
(X(!0), Z(KY, null, nY(u.value.slice(0, Z9), (e, t) => {
|
|
89947
90129
|
var n, r;
|
|
89948
90130
|
return X(), Z("div", {
|
|
@@ -89950,39 +90132,41 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
|
|
|
89950
90132
|
class: "preview-item",
|
|
89951
90133
|
"data-test": `preview-item-${t}`
|
|
89952
90134
|
}, [
|
|
89953
|
-
Q("span",
|
|
89954
|
-
Q("code",
|
|
89955
|
-
Q("span",
|
|
89956
|
-
Q("span",
|
|
89957
|
-
|
|
89958
|
-
Q("span",
|
|
90135
|
+
Q("span", vWe, J(e.op || "set"), 1),
|
|
90136
|
+
Q("code", yWe, J(e.jsonPath || "(主数据整体)"), 1),
|
|
90137
|
+
Q("span", bWe, [
|
|
90138
|
+
Q("span", xWe, J((n = e.oldSummary) == null ? "—" : n), 1),
|
|
90139
|
+
p[7] || (p[7] = Q("span", { class: "preview-arrow" }, " → ", -1)),
|
|
90140
|
+
Q("span", SWe, J((r = e.newSummary) == null ? "—" : r), 1)
|
|
89959
90141
|
])
|
|
89960
|
-
], 8,
|
|
90142
|
+
], 8, _We);
|
|
89961
90143
|
}), 128)),
|
|
89962
|
-
d.value ? (X(), Z("div",
|
|
90144
|
+
d.value ? (X(), Z("div", CWe, "… 其余 " + J(u.value.length - Z9) + " 项", 1)) : $("", !0)
|
|
89963
90145
|
])) : $("", !0),
|
|
89964
|
-
Y(a) ? (X(), Z("div",
|
|
89965
|
-
Q("div",
|
|
90146
|
+
Y(a) ? (X(), Z("div", wWe, [oX(g9, { icon: Y(t).icons.recommend }, null, 8, ["icon"]), cX(J(Y(i).planConfirmedPrefix) + J(Y(a).choice) + J(Y(i).planConfirmedSuffix), 1)])) : $("", !0),
|
|
90147
|
+
Q("div", TWe, [Q("button", {
|
|
89966
90148
|
class: "approval-deny",
|
|
89967
|
-
onClick:
|
|
90149
|
+
onClick: p[3] || (p[3] = (e) => Y(r)(!1))
|
|
89968
90150
|
}, [oX(_9, { text: Y(i).deny }, null, 8, ["text"])]), Q("button", {
|
|
89969
90151
|
class: "approval-allow",
|
|
89970
|
-
|
|
89971
|
-
|
|
90152
|
+
disabled: f.value,
|
|
90153
|
+
"data-test": "approval-allow",
|
|
90154
|
+
onClick: p[4] || (p[4] = (e) => Y(r)(!0))
|
|
90155
|
+
}, [oX(_9, { text: Y(i).approve }, null, 8, ["text"])], 8, EWe)])
|
|
89972
90156
|
], 64))])) : $("", !0);
|
|
89973
90157
|
};
|
|
89974
90158
|
}
|
|
89975
|
-
}), [["__scopeId", "data-v-
|
|
90159
|
+
}), [["__scopeId", "data-v-3b1ae2a6"]]);
|
|
89976
90160
|
//#endregion
|
|
89977
90161
|
//#region src/core/components/ConflictBar.vue?vue&type=script&setup=true&lang.ts
|
|
89978
90162
|
M();
|
|
89979
|
-
var
|
|
90163
|
+
var OWe = {
|
|
89980
90164
|
key: 0,
|
|
89981
90165
|
class: "conflict-bar"
|
|
89982
|
-
},
|
|
90166
|
+
}, kWe = { class: "conflict-head" }, AWe = { class: "conflict-icon" }, jWe = { class: "conflict-title" }, MWe = { class: "conflict-detail" }, NWe = {
|
|
89983
90167
|
key: 0,
|
|
89984
90168
|
class: "conflict-diff"
|
|
89985
|
-
},
|
|
90169
|
+
}, PWe = { class: "conflict-diff-col" }, FWe = { class: "conflict-diff-label" }, IWe = { class: "conflict-diff-pre" }, LWe = { class: "conflict-diff-col" }, RWe = { class: "conflict-diff-label" }, zWe = { class: "conflict-diff-pre" }, BWe = { class: "conflict-actions" }, VWe = ["title"], HWe = ["title"], UWe = ["title"], WWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
89986
90170
|
__name: "ConflictBar",
|
|
89987
90171
|
props: {
|
|
89988
90172
|
pendingConflict: {},
|
|
@@ -90016,19 +90200,19 @@ var bWe = {
|
|
|
90016
90200
|
return String(n);
|
|
90017
90201
|
}
|
|
90018
90202
|
});
|
|
90019
|
-
return (t, a) => e.pendingConflict ? (X(), Z("div",
|
|
90020
|
-
Q("div",
|
|
90203
|
+
return (t, a) => e.pendingConflict ? (X(), Z("div", OWe, [
|
|
90204
|
+
Q("div", kWe, [Q("span", AWe, [oX(g9, { icon: e.icons.conflict }, null, 8, ["icon"])]), Q("span", jWe, [
|
|
90021
90205
|
cX(J(e.messages.conflictTitlePrefix), 1),
|
|
90022
90206
|
Q("code", null, J(e.pendingConflict.path), 1),
|
|
90023
90207
|
cX(J(e.messages.conflictTitleSuffix), 1)
|
|
90024
90208
|
])]),
|
|
90025
|
-
Q("div",
|
|
90209
|
+
Q("div", MWe, J(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
|
|
90026
90210
|
Q("button", {
|
|
90027
90211
|
class: "conflict-toggle",
|
|
90028
90212
|
onClick: a[0] || (a[0] = (e) => n.value = !n.value)
|
|
90029
90213
|
}, J(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + J(n.value ? " ▴" : " ▾"), 1),
|
|
90030
|
-
n.value ? (X(), Z("div",
|
|
90031
|
-
Q("div",
|
|
90214
|
+
n.value ? (X(), Z("div", NWe, [Q("div", PWe, [Q("div", FWe, J(e.messages.agentValueLabel), 1), Q("pre", IWe, J(r.value || e.messages.deleteNoValue), 1)]), Q("div", LWe, [Q("div", RWe, J(e.messages.currentValueLabel), 1), Q("pre", zWe, J(i.value), 1)])])) : $("", !0),
|
|
90215
|
+
Q("div", BWe, [
|
|
90032
90216
|
Q("button", {
|
|
90033
90217
|
class: "conflict-keep",
|
|
90034
90218
|
onClick: a[1] || (a[1] = (t) => {
|
|
@@ -90036,7 +90220,7 @@ var bWe = {
|
|
|
90036
90220
|
return (n = e.onResolve) == null ? void 0 : n.call(e, "keep_external");
|
|
90037
90221
|
}),
|
|
90038
90222
|
title: e.messages.keepExternalTitle
|
|
90039
|
-
}, [oX(_9, { text: e.messages.keepExternal }, null, 8, ["text"])], 8,
|
|
90223
|
+
}, [oX(_9, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, VWe),
|
|
90040
90224
|
Q("button", {
|
|
90041
90225
|
class: "conflict-overwrite",
|
|
90042
90226
|
onClick: a[2] || (a[2] = (t) => {
|
|
@@ -90044,7 +90228,7 @@ var bWe = {
|
|
|
90044
90228
|
return (n = e.onResolve) == null ? void 0 : n.call(e, "overwrite");
|
|
90045
90229
|
}),
|
|
90046
90230
|
title: e.messages.overwriteTitle
|
|
90047
|
-
}, [oX(_9, { text: e.messages.overwrite }, null, 8, ["text"])], 8,
|
|
90231
|
+
}, [oX(_9, { text: e.messages.overwrite }, null, 8, ["text"])], 8, HWe),
|
|
90048
90232
|
Q("button", {
|
|
90049
90233
|
class: "conflict-restore",
|
|
90050
90234
|
onClick: a[3] || (a[3] = (t) => {
|
|
@@ -90052,49 +90236,49 @@ var bWe = {
|
|
|
90052
90236
|
return (n = e.onResolve) == null ? void 0 : n.call(e, "restore");
|
|
90053
90237
|
}),
|
|
90054
90238
|
title: e.messages.restoreTitle
|
|
90055
|
-
}, [oX(_9, { text: e.messages.restore }, null, 8, ["text"])], 8,
|
|
90239
|
+
}, [oX(_9, { text: e.messages.restore }, null, 8, ["text"])], 8, UWe)
|
|
90056
90240
|
])
|
|
90057
90241
|
])) : $("", !0);
|
|
90058
90242
|
}
|
|
90059
|
-
}), [["__scopeId", "data-v-36dda58c"]]),
|
|
90243
|
+
}), [["__scopeId", "data-v-36dda58c"]]), GWe = { class: "chat-footer" }, KWe = ["title"], qWe = {
|
|
90060
90244
|
key: 0,
|
|
90061
90245
|
class: "drop-hint"
|
|
90062
|
-
},
|
|
90246
|
+
}, JWe = {
|
|
90063
90247
|
key: 1,
|
|
90064
90248
|
class: "quick-actions",
|
|
90065
90249
|
"data-test": "quick-actions"
|
|
90066
|
-
},
|
|
90250
|
+
}, YWe = [
|
|
90067
90251
|
"disabled",
|
|
90068
90252
|
"data-test",
|
|
90069
90253
|
"title",
|
|
90070
90254
|
"onClick"
|
|
90071
|
-
],
|
|
90255
|
+
], XWe = {
|
|
90072
90256
|
key: 2,
|
|
90073
90257
|
class: "chip-stack"
|
|
90074
|
-
},
|
|
90258
|
+
}, ZWe = {
|
|
90075
90259
|
key: 0,
|
|
90076
90260
|
class: "focus-chips"
|
|
90077
|
-
},
|
|
90261
|
+
}, QWe = ["title", "onClick"], $We = { class: "focus-chip-icon" }, eGe = { class: "focus-chip-path" }, tGe = ["title", "onClick"], nGe = {
|
|
90078
90262
|
key: 1,
|
|
90079
90263
|
class: "quote-chips",
|
|
90080
90264
|
"data-test": "quote-chips"
|
|
90081
|
-
},
|
|
90265
|
+
}, rGe = ["title"], iGe = { class: "quote-chip-text" }, aGe = ["title"], oGe = {
|
|
90082
90266
|
key: 2,
|
|
90083
90267
|
class: "img-chips",
|
|
90084
90268
|
"data-test": "img-chips"
|
|
90085
|
-
},
|
|
90269
|
+
}, sGe = ["title"], cGe = ["src", "alt"], lGe = ["onClick"], uGe = {
|
|
90086
90270
|
key: 3,
|
|
90087
90271
|
class: "img-error",
|
|
90088
90272
|
"data-test": "img-error"
|
|
90089
|
-
},
|
|
90273
|
+
}, dGe = {
|
|
90090
90274
|
key: 3,
|
|
90091
90275
|
class: "gate-hint",
|
|
90092
90276
|
"data-test": "gate-hint"
|
|
90093
|
-
},
|
|
90277
|
+
}, fGe = [
|
|
90094
90278
|
"placeholder",
|
|
90095
90279
|
"rows",
|
|
90096
90280
|
"disabled"
|
|
90097
|
-
],
|
|
90281
|
+
], pGe = { class: "input-actions" }, mGe = { class: "send-hint" }, hGe = ["title", "disabled"], gGe = {
|
|
90098
90282
|
key: 1,
|
|
90099
90283
|
width: "15",
|
|
90100
90284
|
height: "15",
|
|
@@ -90104,13 +90288,13 @@ var bWe = {
|
|
|
90104
90288
|
"stroke-width": "2",
|
|
90105
90289
|
"stroke-linecap": "round",
|
|
90106
90290
|
"stroke-linejoin": "round"
|
|
90107
|
-
},
|
|
90291
|
+
}, _Ge = ["disabled", "title"], vGe = {
|
|
90108
90292
|
key: 0,
|
|
90109
90293
|
width: "16",
|
|
90110
90294
|
height: "16",
|
|
90111
90295
|
viewBox: "0 0 24 24",
|
|
90112
90296
|
fill: "currentColor"
|
|
90113
|
-
},
|
|
90297
|
+
}, yGe = {
|
|
90114
90298
|
key: 2,
|
|
90115
90299
|
width: "18",
|
|
90116
90300
|
height: "18",
|
|
@@ -90118,7 +90302,7 @@ var bWe = {
|
|
|
90118
90302
|
fill: "none",
|
|
90119
90303
|
stroke: "currentColor",
|
|
90120
90304
|
"stroke-width": "2"
|
|
90121
|
-
},
|
|
90305
|
+
}, bGe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
90122
90306
|
__name: "ChatInput",
|
|
90123
90307
|
props: {
|
|
90124
90308
|
placeholder: {},
|
|
@@ -90176,19 +90360,19 @@ var bWe = {
|
|
|
90176
90360
|
window.removeEventListener("dragstart", N, !0), window.removeEventListener("dragend", P, !0), te && clearTimeout(te);
|
|
90177
90361
|
}), (t, n) => {
|
|
90178
90362
|
var h;
|
|
90179
|
-
return X(), Z("div",
|
|
90363
|
+
return X(), Z("div", GWe, [Y(o) ? (X(), Z("button", {
|
|
90180
90364
|
key: 0,
|
|
90181
90365
|
class: "undo-foot-btn",
|
|
90182
90366
|
title: Y(f).undoTitle,
|
|
90183
90367
|
onClick: n[0] || (n[0] = (...e) => Y(s) && Y(s)(...e))
|
|
90184
|
-
}, J(Y(f).undo), 9,
|
|
90368
|
+
}, J(Y(f).undo), 9, KWe)) : $("", !0), Q("div", {
|
|
90185
90369
|
class: TK(["chat-input-wrap", { "drag-over": D.value }]),
|
|
90186
90370
|
onPointerdownCapture: T,
|
|
90187
90371
|
onDragover: n[5] || (n[5] = mZ((e) => D.value = !0, ["prevent"])),
|
|
90188
90372
|
onDragleave: n[6] || (n[6] = (e) => D.value = !1),
|
|
90189
90373
|
onDrop: mZ(A, ["prevent"])
|
|
90190
90374
|
}, [
|
|
90191
|
-
D.value ? (X(), Z("div",
|
|
90375
|
+
D.value ? (X(), Z("div", qWe, [n[7] || (n[7] = Q("svg", {
|
|
90192
90376
|
class: "drop-hint-icon",
|
|
90193
90377
|
viewBox: "0 0 24 24",
|
|
90194
90378
|
fill: "none",
|
|
@@ -90211,7 +90395,7 @@ var bWe = {
|
|
|
90211
90395
|
}),
|
|
90212
90396
|
Q("path", { d: "m21 15-4.35-4.35a1.5 1.5 0 0 0-2.12 0L5 20" })
|
|
90213
90397
|
], -1)), cX(" " + J(Y(f).imageDropHint), 1)])) : $("", !0),
|
|
90214
|
-
(h = e.quickActions) != null && h.length ? (X(), Z("div",
|
|
90398
|
+
(h = e.quickActions) != null && h.length ? (X(), Z("div", JWe, [(X(!0), Z(KY, null, nY(e.quickActions, (t, n) => (X(), Z("button", {
|
|
90215
90399
|
key: n,
|
|
90216
90400
|
type: "button",
|
|
90217
90401
|
class: "quick-action-chip",
|
|
@@ -90219,39 +90403,39 @@ var bWe = {
|
|
|
90219
90403
|
"data-test": `quick-action-${n}`,
|
|
90220
90404
|
title: t.prompt,
|
|
90221
90405
|
onClick: (e) => M(t)
|
|
90222
|
-
}, J(t.icon ? `${t.icon} ` : "") + J(t.label), 9,
|
|
90223
|
-
Y(c).length || Y(y).length || Y(p) || Y(S) ? (X(), Z("div",
|
|
90224
|
-
Y(c).length ? (X(), Z("div",
|
|
90406
|
+
}, J(t.icon ? `${t.icon} ` : "") + J(t.label), 9, YWe))), 128))])) : $("", !0),
|
|
90407
|
+
Y(c).length || Y(y).length || Y(p) || Y(S) ? (X(), Z("div", XWe, [
|
|
90408
|
+
Y(c).length ? (X(), Z("div", ZWe, [(X(!0), Z(KY, null, nY(Y(c), (e) => (X(), Z("span", {
|
|
90225
90409
|
key: e.path,
|
|
90226
90410
|
class: "focus-chip",
|
|
90227
90411
|
title: Y(f).focusChipTitlePrefix + e.path + Y(f).focusChipTitleHint,
|
|
90228
90412
|
onClick: (t) => Y(u)(e)
|
|
90229
90413
|
}, [
|
|
90230
|
-
Q("span",
|
|
90231
|
-
Q("code",
|
|
90414
|
+
Q("span", $We, [oX(g9, { icon: Y(d).focus }, null, 8, ["icon"])]),
|
|
90415
|
+
Q("code", eGe, J(e.path), 1),
|
|
90232
90416
|
Q("button", {
|
|
90233
90417
|
type: "button",
|
|
90234
90418
|
class: "focus-chip-x",
|
|
90235
90419
|
"data-test": "focus-clear",
|
|
90236
90420
|
title: Y(f).removeFocus,
|
|
90237
90421
|
onClick: mZ((t) => Y(l)(e.path), ["stop"])
|
|
90238
|
-
}, "✕", 8,
|
|
90239
|
-
], 8,
|
|
90240
|
-
Y(p) ? (X(), Z("div",
|
|
90422
|
+
}, "✕", 8, tGe)
|
|
90423
|
+
], 8, QWe))), 128))])) : $("", !0),
|
|
90424
|
+
Y(p) ? (X(), Z("div", nGe, [Q("span", {
|
|
90241
90425
|
class: "quote-chip",
|
|
90242
90426
|
title: w(Y(p))
|
|
90243
90427
|
}, [
|
|
90244
90428
|
n[8] || (n[8] = Q("span", { class: "quote-chip-icon" }, "❝", -1)),
|
|
90245
|
-
Q("span",
|
|
90429
|
+
Q("span", iGe, J(Y(p).text), 1),
|
|
90246
90430
|
Q("button", {
|
|
90247
90431
|
type: "button",
|
|
90248
90432
|
class: "focus-chip-x",
|
|
90249
90433
|
"data-test": "quote-clear",
|
|
90250
90434
|
title: Y(f).quoteRemove,
|
|
90251
90435
|
onClick: n[1] || (n[1] = mZ((e) => Y(m)(), ["stop"]))
|
|
90252
|
-
}, "✕", 8,
|
|
90253
|
-
], 8,
|
|
90254
|
-
Y(y).length ? (X(), Z("div",
|
|
90436
|
+
}, "✕", 8, aGe)
|
|
90437
|
+
], 8, rGe)])) : $("", !0),
|
|
90438
|
+
Y(y).length ? (X(), Z("div", oGe, [(X(!0), Z(KY, null, nY(Y(y), (e) => (X(), Z("span", {
|
|
90255
90439
|
key: e.id,
|
|
90256
90440
|
class: "img-chip",
|
|
90257
90441
|
title: e.name || Y(f).imageAlt
|
|
@@ -90259,15 +90443,15 @@ var bWe = {
|
|
|
90259
90443
|
class: "img-chip-thumb",
|
|
90260
90444
|
src: e.dataUri,
|
|
90261
90445
|
alt: e.name || Y(f).imageAlt
|
|
90262
|
-
}, null, 8,
|
|
90446
|
+
}, null, 8, cGe), Q("button", {
|
|
90263
90447
|
type: "button",
|
|
90264
90448
|
class: "img-chip-x",
|
|
90265
90449
|
"data-test": "img-chip-x",
|
|
90266
90450
|
onClick: (t) => Y(x)(e.id)
|
|
90267
|
-
}, "✕", 8,
|
|
90268
|
-
Y(S) ? (X(), Z("div",
|
|
90451
|
+
}, "✕", 8, lGe)], 8, sGe))), 128))])) : $("", !0),
|
|
90452
|
+
Y(S) ? (X(), Z("div", uGe, J(Y(S)), 1)) : $("", !0)
|
|
90269
90453
|
])) : $("", !0),
|
|
90270
|
-
e.gatePending ? (X(), Z("div",
|
|
90454
|
+
e.gatePending ? (X(), Z("div", dGe, J(Y(f).inputGateHint), 1)) : $("", !0),
|
|
90271
90455
|
fJ(Q("textarea", {
|
|
90272
90456
|
"onUpdate:modelValue": n[2] || (n[2] = (e) => /* @__PURE__ */ Fq(r) ? r.value = e : null),
|
|
90273
90457
|
class: "chat-input",
|
|
@@ -90276,9 +90460,9 @@ var bWe = {
|
|
|
90276
90460
|
disabled: e.gatePending,
|
|
90277
90461
|
onKeydown: n[3] || (n[3] = (...e) => Y(a) && Y(a)(...e)),
|
|
90278
90462
|
onPaste: j
|
|
90279
|
-
}, null, 40,
|
|
90280
|
-
Q("div",
|
|
90281
|
-
Q("span",
|
|
90463
|
+
}, null, 40, fGe), [[pZ, Y(r)]]),
|
|
90464
|
+
Q("div", pGe, [
|
|
90465
|
+
Q("span", mGe, J(Y(f).sendHint), 1),
|
|
90282
90466
|
Q("button", {
|
|
90283
90467
|
class: "attach-btn",
|
|
90284
90468
|
title: Y(f).attachImageTitle,
|
|
@@ -90288,7 +90472,7 @@ var bWe = {
|
|
|
90288
90472
|
}, [Y(d).attachImage ? (X(), tX(g9, {
|
|
90289
90473
|
key: 0,
|
|
90290
90474
|
icon: Y(d).attachImage
|
|
90291
|
-
}, null, 8, ["icon"])) : (X(), Z("svg",
|
|
90475
|
+
}, null, 8, ["icon"])) : (X(), Z("svg", gGe, [...n[9] || (n[9] = [Q("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, hGe),
|
|
90292
90476
|
Q("input", {
|
|
90293
90477
|
ref_key: "fileInput",
|
|
90294
90478
|
ref: E,
|
|
@@ -90304,7 +90488,7 @@ var bWe = {
|
|
|
90304
90488
|
disabled: !Y(g).loading && !Y(r).trim() && !Y(y).length && !Y(C) || e.gatePending && !Y(g).loading,
|
|
90305
90489
|
title: Y(g).loading ? Y(f).stopTitle : Y(f).sendTitle,
|
|
90306
90490
|
onClick: n[4] || (n[4] = (e) => Y(g).loading ? Y(_)() : Y(i)())
|
|
90307
|
-
}, [Y(g).loading ? (X(), Z("svg",
|
|
90491
|
+
}, [Y(g).loading ? (X(), Z("svg", vGe, [...n[10] || (n[10] = [Q("rect", {
|
|
90308
90492
|
x: "6",
|
|
90309
90493
|
y: "6",
|
|
90310
90494
|
width: "12",
|
|
@@ -90313,12 +90497,12 @@ var bWe = {
|
|
|
90313
90497
|
}, null, -1)])])) : Y(d).send ? (X(), tX(g9, {
|
|
90314
90498
|
key: 1,
|
|
90315
90499
|
icon: Y(d).send
|
|
90316
|
-
}, null, 8, ["icon"])) : (X(), Z("svg",
|
|
90500
|
+
}, null, 8, ["icon"])) : (X(), Z("svg", yGe, [...n[11] || (n[11] = [Q("line", {
|
|
90317
90501
|
x1: "22",
|
|
90318
90502
|
y1: "2",
|
|
90319
90503
|
x2: "11",
|
|
90320
90504
|
y2: "13"
|
|
90321
|
-
}, null, -1), Q("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)])]))], 10,
|
|
90505
|
+
}, null, -1), Q("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)])]))], 10, _Ge)
|
|
90322
90506
|
])
|
|
90323
90507
|
], 34)]);
|
|
90324
90508
|
};
|
|
@@ -90327,178 +90511,178 @@ var bWe = {
|
|
|
90327
90511
|
//#endregion
|
|
90328
90512
|
//#region src/core/components/DebugDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
90329
90513
|
M();
|
|
90330
|
-
var
|
|
90514
|
+
var xGe = {
|
|
90331
90515
|
key: 0,
|
|
90332
90516
|
class: "debug-drawer"
|
|
90333
|
-
},
|
|
90517
|
+
}, SGe = { class: "drawer-header" }, CGe = { class: "tab-group" }, wGe = { class: "header-actions" }, TGe = ["title"], EGe = ["title"], DGe = ["title"], OGe = {
|
|
90334
90518
|
key: 0,
|
|
90335
90519
|
class: "drawer-filters"
|
|
90336
|
-
},
|
|
90520
|
+
}, kGe = ["onClick"], AGe = { class: "chip-count" }, jGe = { class: "chip-count" }, MGe = {
|
|
90337
90521
|
key: 0,
|
|
90338
90522
|
class: "context-panel"
|
|
90339
|
-
},
|
|
90523
|
+
}, NGe = {
|
|
90340
90524
|
key: 0,
|
|
90341
90525
|
class: "trace-empty"
|
|
90342
|
-
},
|
|
90526
|
+
}, PGe = { class: "ctx-overview" }, FGe = { class: "ctx-occupancy" }, IGe = ["title"], LGe = ["title"], RGe = { class: "ctx-pct" }, zGe = { class: "ctx-kv-row" }, BGe = { class: "ctx-kv" }, VGe = {
|
|
90343
90527
|
key: 0,
|
|
90344
90528
|
class: "ctx-kv"
|
|
90345
|
-
},
|
|
90529
|
+
}, HGe = {
|
|
90346
90530
|
key: 1,
|
|
90347
90531
|
class: "ctx-kv"
|
|
90348
|
-
},
|
|
90532
|
+
}, UGe = { class: "ctx-section-title" }, WGe = ["title"], GGe = { class: "ctx-cat-bar" }, KGe = { class: "ctx-cat-tokens" }, qGe = {
|
|
90349
90533
|
key: 0,
|
|
90350
90534
|
class: "ctx-compression"
|
|
90351
|
-
},
|
|
90535
|
+
}, JGe = { class: "ctx-section-title" }, YGe = { class: "ctx-kv-row" }, XGe = { class: "ctx-kv" }, ZGe = { class: "ctx-kv" }, QGe = { class: "ctx-kv" }, $Ge = {
|
|
90352
90536
|
key: 0,
|
|
90353
90537
|
class: "ctx-kv"
|
|
90354
|
-
},
|
|
90538
|
+
}, eKe = {
|
|
90355
90539
|
key: 1,
|
|
90356
90540
|
class: "subagent-panel"
|
|
90357
|
-
},
|
|
90541
|
+
}, tKe = {
|
|
90358
90542
|
key: 0,
|
|
90359
90543
|
class: "sub-section"
|
|
90360
|
-
},
|
|
90544
|
+
}, nKe = { class: "sub-section-title" }, rKe = {
|
|
90361
90545
|
key: 1,
|
|
90362
90546
|
class: "trace-empty"
|
|
90363
|
-
},
|
|
90547
|
+
}, iKe = {
|
|
90364
90548
|
key: 0,
|
|
90365
90549
|
class: "sub-section"
|
|
90366
|
-
},
|
|
90550
|
+
}, aKe = { class: "sub-section-title" }, oKe = { class: "sub-head" }, sKe = { class: "sub-label" }, cKe = { class: "sub-steps-badge" }, lKe = { class: "sub-task" }, uKe = {
|
|
90367
90551
|
key: 1,
|
|
90368
90552
|
class: "sub-section"
|
|
90369
|
-
},
|
|
90553
|
+
}, dKe = { class: "sub-section-title" }, fKe = { class: "sub-head" }, pKe = { class: "sub-label" }, mKe = {
|
|
90370
90554
|
key: 0,
|
|
90371
90555
|
class: "sub-dur"
|
|
90372
|
-
},
|
|
90556
|
+
}, hKe = ["onClick"], gKe = { class: "sub-task" }, _Ke = {
|
|
90373
90557
|
key: 0,
|
|
90374
90558
|
class: "sub-result"
|
|
90375
|
-
},
|
|
90559
|
+
}, vKe = {
|
|
90376
90560
|
key: 1,
|
|
90377
90561
|
class: "sub-steps-list"
|
|
90378
|
-
},
|
|
90562
|
+
}, yKe = { class: "sub-step-kind" }, bKe = { class: "sub-step-name" }, xKe = { class: "sub-step-ts" }, SKe = {
|
|
90379
90563
|
key: 0,
|
|
90380
90564
|
class: "empty"
|
|
90381
|
-
},
|
|
90565
|
+
}, CKe = ["onClick"], wKe = { class: "log-group-title" }, TKe = { class: "log-group-meta" }, EKe = {
|
|
90382
90566
|
key: 0,
|
|
90383
90567
|
class: "lg-badge"
|
|
90384
|
-
},
|
|
90568
|
+
}, DKe = {
|
|
90385
90569
|
key: 1,
|
|
90386
90570
|
class: "lg-badge"
|
|
90387
|
-
},
|
|
90571
|
+
}, OKe = {
|
|
90388
90572
|
key: 2,
|
|
90389
90573
|
class: "lg-badge err"
|
|
90390
|
-
},
|
|
90574
|
+
}, kKe = { class: "log-group-body" }, AKe = { class: "log-head" }, jKe = {
|
|
90391
90575
|
key: 0,
|
|
90392
90576
|
class: "log-source"
|
|
90393
|
-
},
|
|
90577
|
+
}, MKe = { class: "log-time" }, NKe = { class: "log-body" }, PKe = { class: "kv-grid" }, FKe = { class: "kv" }, IKe = { class: "k" }, LKe = { class: "v" }, RKe = { class: "kv" }, zKe = { class: "k" }, BKe = { class: "v" }, VKe = { class: "kv" }, HKe = { class: "v" }, UKe = { class: "kv" }, WKe = { class: "k" }, GKe = { class: "v" }, KKe = { class: "section-label" }, qKe = { class: "chip-row" }, JKe = { class: "section-label" }, YKe = { class: "msg-list" }, XKe = { class: "msg-text" }, ZKe = { class: "badge-row" }, QKe = { class: "badge" }, $Ke = {
|
|
90394
90578
|
key: 0,
|
|
90395
90579
|
class: "badge muted"
|
|
90396
|
-
},
|
|
90580
|
+
}, eqe = { class: "badge muted" }, tqe = {
|
|
90397
90581
|
key: 1,
|
|
90398
90582
|
class: "badge muted"
|
|
90399
|
-
},
|
|
90583
|
+
}, nqe = ["onClick"], rqe = ["title", "onClick"], iqe = ["onClick"], aqe = ["title", "onClick"], oqe = { class: "msg-detail" }, sqe = {
|
|
90400
90584
|
key: 0,
|
|
90401
90585
|
class: "msg-text"
|
|
90402
|
-
},
|
|
90586
|
+
}, cqe = { class: "tc-inline-name" }, lqe = { class: "tc-inline-args" }, uqe = {
|
|
90403
90587
|
key: 1,
|
|
90404
90588
|
class: "tc-id"
|
|
90405
|
-
},
|
|
90589
|
+
}, dqe = {
|
|
90406
90590
|
key: 1,
|
|
90407
90591
|
class: "log-raw"
|
|
90408
|
-
},
|
|
90592
|
+
}, fqe = { class: "badge-row" }, pqe = { class: "badge" }, mqe = {
|
|
90409
90593
|
key: 0,
|
|
90410
90594
|
class: "badge warn"
|
|
90411
|
-
},
|
|
90595
|
+
}, hqe = {
|
|
90412
90596
|
key: 0,
|
|
90413
90597
|
class: "resp-content"
|
|
90414
|
-
},
|
|
90598
|
+
}, gqe = {
|
|
90415
90599
|
key: 1,
|
|
90416
90600
|
class: "tc-list"
|
|
90417
|
-
},
|
|
90601
|
+
}, _qe = { class: "tc-name" }, vqe = { class: "tc-args" }, yqe = {
|
|
90418
90602
|
key: 2,
|
|
90419
90603
|
class: "usage-row"
|
|
90420
|
-
},
|
|
90604
|
+
}, bqe = { class: "usage" }, xqe = { class: "usage" }, Sqe = { class: "usage" }, Cqe = {
|
|
90421
90605
|
key: 0,
|
|
90422
90606
|
class: "usage"
|
|
90423
|
-
},
|
|
90607
|
+
}, wqe = { class: "tc-name" }, Tqe = {
|
|
90424
90608
|
key: 0,
|
|
90425
90609
|
class: "tc-dur"
|
|
90426
|
-
},
|
|
90610
|
+
}, Eqe = ["title", "onClick"], Dqe = { class: "tc-args" }, Oqe = { class: "tc-result-sep" }, kqe = { class: "tc-args tc-result" }, Aqe = {
|
|
90427
90611
|
key: 1,
|
|
90428
90612
|
class: "tc-card inline"
|
|
90429
|
-
},
|
|
90613
|
+
}, jqe = { class: "tc-name" }, Mqe = {
|
|
90430
90614
|
key: 0,
|
|
90431
90615
|
class: "tc-dur running"
|
|
90432
|
-
},
|
|
90616
|
+
}, Nqe = { class: "tc-args" }, Pqe = {
|
|
90433
90617
|
key: 4,
|
|
90434
90618
|
class: "err-box"
|
|
90435
|
-
},
|
|
90619
|
+
}, Fqe = { class: "log-footer" }, Iqe = ["onClick"], Lqe = ["onClick"], Rqe = {
|
|
90436
90620
|
key: 0,
|
|
90437
90621
|
class: "log-raw"
|
|
90438
|
-
},
|
|
90622
|
+
}, zqe = {
|
|
90439
90623
|
key: 3,
|
|
90440
90624
|
class: "info-body"
|
|
90441
|
-
},
|
|
90625
|
+
}, Bqe = {
|
|
90442
90626
|
key: 0,
|
|
90443
90627
|
class: "empty"
|
|
90444
|
-
},
|
|
90628
|
+
}, Vqe = { class: "info-section" }, Hqe = { class: "info-title" }, Uqe = { class: "kv-grid" }, Wqe = { class: "kv" }, Gqe = { class: "v" }, Kqe = { class: "kv" }, qqe = { class: "k" }, Jqe = { class: "v" }, Yqe = { class: "kv" }, Xqe = { class: "k" }, Zqe = { class: "v" }, Qqe = { class: "kv" }, $qe = { class: "k" }, eJe = { class: "v" }, tJe = {
|
|
90445
90629
|
class: "kv",
|
|
90446
90630
|
style: { "margin-top": "6px" }
|
|
90447
|
-
},
|
|
90631
|
+
}, nJe = { class: "k" }, rJe = {
|
|
90448
90632
|
class: "v",
|
|
90449
90633
|
style: { "font-size": "11px" }
|
|
90450
|
-
},
|
|
90634
|
+
}, iJe = { class: "info-section" }, aJe = { class: "info-title" }, oJe = { class: "info-name" }, sJe = { class: "info-desc" }, cJe = {
|
|
90451
90635
|
key: 0,
|
|
90452
90636
|
class: "info-section"
|
|
90453
|
-
},
|
|
90637
|
+
}, lJe = { class: "info-title" }, uJe = { class: "info-hint" }, dJe = ["onClick"], fJe = { class: "info-desc" }, pJe = {
|
|
90454
90638
|
key: 0,
|
|
90455
90639
|
class: "skill-content"
|
|
90456
|
-
},
|
|
90640
|
+
}, mJe = {
|
|
90457
90641
|
key: 0,
|
|
90458
90642
|
class: "skill-loading"
|
|
90459
|
-
},
|
|
90643
|
+
}, hJe = {
|
|
90460
90644
|
key: 1,
|
|
90461
90645
|
class: "skill-error"
|
|
90462
|
-
},
|
|
90646
|
+
}, gJe = {
|
|
90463
90647
|
key: 2,
|
|
90464
90648
|
class: "skill-pre"
|
|
90465
|
-
},
|
|
90649
|
+
}, _Je = {
|
|
90466
90650
|
key: 1,
|
|
90467
90651
|
class: "info-section"
|
|
90468
|
-
},
|
|
90652
|
+
}, vJe = { class: "info-title" }, yJe = { class: "info-item" }, bJe = { class: "info-name" }, xJe = { class: "info-desc" }, SJe = { class: "info-section" }, CJe = { class: "info-title" }, wJe = { class: "kv-grid" }, TJe = { class: "kv" }, EJe = { class: "k" }, DJe = { class: "v" }, OJe = { class: "kv" }, kJe = { class: "k" }, AJe = { class: "v" }, jJe = { class: "kv" }, MJe = { class: "k" }, NJe = { class: "v" }, PJe = { class: "kv" }, FJe = { class: "k" }, IJe = {
|
|
90469
90653
|
class: "v",
|
|
90470
90654
|
style: { "font-size": "11px" }
|
|
90471
|
-
},
|
|
90655
|
+
}, LJe = {
|
|
90472
90656
|
key: 2,
|
|
90473
90657
|
class: "info-section"
|
|
90474
|
-
},
|
|
90658
|
+
}, RJe = { class: "info-title" }, zJe = { class: "info-name" }, BJe = { class: "src-tag mcp" }, VJe = { class: "info-desc" }, HJe = {
|
|
90475
90659
|
key: 3,
|
|
90476
90660
|
class: "info-section"
|
|
90477
|
-
},
|
|
90661
|
+
}, UJe = { class: "info-title" }, WJe = { class: "kv-grid" }, GJe = { class: "kv" }, KJe = { class: "k" }, qJe = { class: "v" }, JJe = { class: "kv" }, YJe = { class: "k" }, XJe = { class: "v" }, ZJe = { class: "kv" }, QJe = { class: "k" }, $Je = { class: "v" }, eYe = {
|
|
90478
90662
|
key: 0,
|
|
90479
90663
|
class: "kv"
|
|
90480
|
-
},
|
|
90664
|
+
}, tYe = { class: "k" }, nYe = {
|
|
90481
90665
|
class: "v",
|
|
90482
90666
|
style: { "font-size": "11px" }
|
|
90483
|
-
},
|
|
90667
|
+
}, rYe = {
|
|
90484
90668
|
key: 4,
|
|
90485
90669
|
class: "info-section"
|
|
90486
|
-
},
|
|
90670
|
+
}, iYe = { class: "info-title" }, aYe = {
|
|
90487
90671
|
key: 5,
|
|
90488
90672
|
class: "info-section"
|
|
90489
|
-
},
|
|
90673
|
+
}, oYe = { class: "info-title" }, sYe = { class: "info-pre" }, cYe = {
|
|
90490
90674
|
key: 6,
|
|
90491
90675
|
class: "info-section"
|
|
90492
|
-
},
|
|
90676
|
+
}, lYe = { class: "info-title" }, uYe = { class: "info-kv" }, dYe = { class: "kv" }, fYe = { class: "k" }, pYe = { class: "v" }, mYe = { class: "kv" }, hYe = { class: "k" }, gYe = { class: "v" }, _Ye = { class: "kv" }, vYe = { class: "k" }, yYe = { class: "v" }, bYe = { class: "kv" }, xYe = { class: "k" }, SYe = { class: "v" }, CYe = { class: "kv" }, wYe = { class: "k" }, TYe = {
|
|
90493
90677
|
class: "v",
|
|
90494
90678
|
style: { "font-size": "11px" }
|
|
90495
|
-
},
|
|
90679
|
+
}, EYe = {
|
|
90496
90680
|
key: 0,
|
|
90497
90681
|
class: "kv"
|
|
90498
|
-
},
|
|
90682
|
+
}, DYe = { class: "k" }, OYe = {
|
|
90499
90683
|
class: "v",
|
|
90500
90684
|
style: { "font-size": "11px" }
|
|
90501
|
-
}, Q9 = 400,
|
|
90685
|
+
}, Q9 = 400, kYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
90502
90686
|
__name: "DebugDrawer",
|
|
90503
90687
|
props: {
|
|
90504
90688
|
logs: { default: () => [] },
|
|
@@ -90917,8 +91101,8 @@ var pGe = {
|
|
|
90917
91101
|
return (t, n) => (X(), tX(DJ, { to: "body" }, [oX(LX, { name: "drawer" }, {
|
|
90918
91102
|
default: dJ(() => {
|
|
90919
91103
|
var t;
|
|
90920
|
-
return [e.visible ? (X(), Z("div",
|
|
90921
|
-
Q("div",
|
|
91104
|
+
return [e.visible ? (X(), Z("div", xGe, [Q("div", { class: TK(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
91105
|
+
Q("div", SGe, [Q("div", CGe, [
|
|
90922
91106
|
Q("button", {
|
|
90923
91107
|
class: TK(["tab-btn", { active: ue.value === "logs" }]),
|
|
90924
91108
|
onClick: n[0] || (n[0] = (e) => me("logs"))
|
|
@@ -90938,33 +91122,33 @@ var pGe = {
|
|
|
90938
91122
|
class: TK(["tab-btn", { active: ue.value === "info" }]),
|
|
90939
91123
|
onClick: n[3] || (n[3] = (e) => me("info"))
|
|
90940
91124
|
}, "🧬 " + J(y.value.debugTabInfo), 3)) : $("", !0)
|
|
90941
|
-
]), Q("div",
|
|
91125
|
+
]), Q("div", wGe, [
|
|
90942
91126
|
Q("button", {
|
|
90943
91127
|
class: "hd-btn",
|
|
90944
91128
|
title: y.value.debugCopyReport,
|
|
90945
91129
|
onClick: v
|
|
90946
|
-
}, J(g.value === "report" ? "✓" : "💾"), 9,
|
|
91130
|
+
}, J(g.value === "report" ? "✓" : "💾"), 9, TGe),
|
|
90947
91131
|
ue.value === "logs" ? (X(), Z("button", {
|
|
90948
91132
|
key: 0,
|
|
90949
91133
|
class: "hd-btn",
|
|
90950
91134
|
title: y.value.debugClearLogs,
|
|
90951
91135
|
onClick: le
|
|
90952
|
-
}, "🗑️", 8,
|
|
91136
|
+
}, "🗑️", 8, EGe)) : $("", !0),
|
|
90953
91137
|
Q("button", {
|
|
90954
91138
|
class: "hd-btn",
|
|
90955
91139
|
title: y.value.close,
|
|
90956
91140
|
onClick: F
|
|
90957
|
-
}, "✕", 8,
|
|
91141
|
+
}, "✕", 8, DGe)
|
|
90958
91142
|
])]),
|
|
90959
|
-
ue.value === "logs" ? (X(), Z("div",
|
|
91143
|
+
ue.value === "logs" ? (X(), Z("div", OGe, [(X(!0), Z(KY, null, nY(b.value, (e, t) => (X(), Z("button", {
|
|
90960
91144
|
key: t,
|
|
90961
91145
|
class: TK(["filter-chip", { active: i.value === t }]),
|
|
90962
91146
|
style: wK({ "--chip-color": e.color }),
|
|
90963
91147
|
onClick: (e) => i.value = t
|
|
90964
|
-
}, [cX(J(e.icon) + " " + J(e.label) + " ", 1), Q("span",
|
|
91148
|
+
}, [cX(J(e.icon) + " " + J(e.label) + " ", 1), Q("span", AGe, J(C.value[t] || 0), 1)], 14, kGe))), 128)), Q("button", {
|
|
90965
91149
|
class: TK(["filter-chip all", { active: i.value === "all" }]),
|
|
90966
91150
|
onClick: n[4] || (n[4] = (e) => i.value = "all")
|
|
90967
|
-
}, [cX(J(y.value.debugFilterAll) + " ", 1), Q("span",
|
|
91151
|
+
}, [cX(J(y.value.debugFilterAll) + " ", 1), Q("span", jGe, J(C.value.all || 0), 1)], 2)])) : $("", !0),
|
|
90968
91152
|
Q("div", {
|
|
90969
91153
|
class: "drawer-body",
|
|
90970
91154
|
ref_key: "drawerBodyEl",
|
|
@@ -90978,8 +91162,8 @@ var pGe = {
|
|
|
90978
91162
|
ref_key: "drawerContentsEl",
|
|
90979
91163
|
ref: c
|
|
90980
91164
|
}, [
|
|
90981
|
-
ue.value === "context" ? (X(), Z("div",
|
|
90982
|
-
Q("div",
|
|
91165
|
+
ue.value === "context" ? (X(), Z("div", MGe, [be.value ? (X(), Z(KY, { key: 1 }, [be.value ? (X(), Z(KY, { key: 0 }, [
|
|
91166
|
+
Q("div", PGe, [Q("div", FGe, [Q("div", {
|
|
90983
91167
|
class: "ctx-bar-track",
|
|
90984
91168
|
title: `${y.value.debugCtxOccupancy} ${Math.round(be.value.occupancy * 100)}%`
|
|
90985
91169
|
}, [Q("div", {
|
|
@@ -90990,12 +91174,12 @@ var pGe = {
|
|
|
90990
91174
|
class: "ctx-threshold-mark",
|
|
90991
91175
|
style: wK({ left: Math.min(be.value.thresholdRatio * 100, 100) + "%" }),
|
|
90992
91176
|
title: y.value.debugCtxThreshold
|
|
90993
|
-
}, null, 12,
|
|
90994
|
-
Q("span",
|
|
90995
|
-
be.value.contextWindow ? (X(), Z("span",
|
|
90996
|
-
be.value.thresholdRatio > 0 ? (X(), Z("span",
|
|
91177
|
+
}, null, 12, LGe)) : $("", !0)], 8, IGe), Q("span", RGe, J(Math.round(be.value.occupancy * 100)) + "%", 1)]), Q("div", zGe, [
|
|
91178
|
+
Q("span", BGe, J(y.value.debugCtxTokens) + " " + J(be.value.totalTokens) + " token", 1),
|
|
91179
|
+
be.value.contextWindow ? (X(), Z("span", VGe, J(y.value.debugCtxWindow) + " " + J(be.value.contextWindow), 1)) : $("", !0),
|
|
91180
|
+
be.value.thresholdRatio > 0 ? (X(), Z("span", HGe, J(y.value.debugCtxThresholdPct) + " " + J(Math.round(be.value.thresholdRatio * 100)) + "%", 1)) : $("", !0)
|
|
90997
91181
|
])]),
|
|
90998
|
-
Q("div",
|
|
91182
|
+
Q("div", UGe, J(y.value.debugCtxCategories), 1),
|
|
90999
91183
|
(X(!0), Z(KY, null, nY(be.value.categories, (e) => (X(), Z("div", {
|
|
91000
91184
|
key: e.key,
|
|
91001
91185
|
class: "ctx-cat"
|
|
@@ -91003,62 +91187,62 @@ var pGe = {
|
|
|
91003
91187
|
Q("span", {
|
|
91004
91188
|
class: "ctx-cat-label",
|
|
91005
91189
|
title: e.label
|
|
91006
|
-
}, J(e.label), 9,
|
|
91007
|
-
Q("div",
|
|
91190
|
+
}, J(e.label), 9, WGe),
|
|
91191
|
+
Q("div", GGe, [Q("div", {
|
|
91008
91192
|
class: "ctx-cat-fill",
|
|
91009
91193
|
style: wK({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
91010
91194
|
}, null, 4)]),
|
|
91011
|
-
Q("span",
|
|
91195
|
+
Q("span", KGe, [cX(J(e.tokens) + " ", 1), Q("i", null, "(" + J(Math.round(e.pct * 100)) + "%)", 1)])
|
|
91012
91196
|
]))), 128)),
|
|
91013
|
-
be.value.compression ? (X(), Z("div",
|
|
91014
|
-
Q("span",
|
|
91015
|
-
Q("span",
|
|
91016
|
-
Q("span",
|
|
91017
|
-
be.value.compression.decision ? (X(), Z("span",
|
|
91197
|
+
be.value.compression ? (X(), Z("div", qGe, [Q("div", JGe, J(y.value.debugCtxLastCompression), 1), Q("div", YGe, [
|
|
91198
|
+
Q("span", XGe, J(y.value.debugCtxSummarized) + " " + J(be.value.compression.roundsSummarized) + "/" + J(be.value.compression.roundsTotal) + J(y.value.debugCtxRoundsSuffix), 1),
|
|
91199
|
+
Q("span", ZGe, J(y.value.debugCtxRecalled) + " " + J(be.value.compression.roundsRecalled), 1),
|
|
91200
|
+
Q("span", QGe, J(be.value.compression.strategy), 1),
|
|
91201
|
+
be.value.compression.decision ? (X(), Z("span", $Ge, "🤖 " + J(y.value.debugCtxAgentDecision) + J(Oe(be.value.compression.decision)), 1)) : $("", !0)
|
|
91018
91202
|
])])) : $("", !0)
|
|
91019
|
-
], 64)) : $("", !0)], 64)) : (X(), Z("div",
|
|
91020
|
-
ue.value === "subagent" ? (X(), Z("div",
|
|
91203
|
+
], 64)) : $("", !0)], 64)) : (X(), Z("div", NGe, J(y.value.debugCtxEmpty), 1))])) : $("", !0),
|
|
91204
|
+
ue.value === "subagent" ? (X(), Z("div", eKe, [we.value.length ? (X(), Z("div", tKe, [Q("div", nKe, "🔒 " + J(y.value.debugLocksTitle) + " (" + J(we.value.length) + ")", 1), (X(!0), Z(KY, null, nY(we.value, ([e, t]) => (X(), Z("div", {
|
|
91021
91205
|
key: "lock-" + e,
|
|
91022
91206
|
class: "sub-task"
|
|
91023
|
-
}, "🔒 " + J(e) + " ← " + J(t), 1))), 128))])) : $("", !0), !Se.value.length && !Ce.value.length ? (X(), Z("div",
|
|
91207
|
+
}, "🔒 " + J(e) + " ← " + J(t), 1))), 128))])) : $("", !0), !Se.value.length && !Ce.value.length ? (X(), Z("div", rKe, J(y.value.debugSubagentEmpty), 1)) : (X(), Z(KY, { key: 2 }, [Se.value.length ? (X(), Z("div", iKe, [Q("div", aKe, "▶ " + J(y.value.debugSubRunningTitle) + " (" + J(Se.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Se.value, (e, t) => (X(), Z("div", {
|
|
91024
91208
|
key: "a" + t,
|
|
91025
91209
|
class: TK(["sub-card", e.status])
|
|
91026
|
-
}, [Q("div",
|
|
91210
|
+
}, [Q("div", oKe, [
|
|
91027
91211
|
Q("span", {
|
|
91028
91212
|
class: "sub-status",
|
|
91029
91213
|
style: wK({ background: Te.value[e.status] && Te.value[e.status].color || "#9ca3af" })
|
|
91030
91214
|
}, J(Te.value[e.status] && Te.value[e.status].label || e.status), 5),
|
|
91031
|
-
Q("span",
|
|
91032
|
-
Q("span",
|
|
91033
|
-
]), Q("div",
|
|
91215
|
+
Q("span", sKe, J(e.label), 1),
|
|
91216
|
+
Q("span", cKe, J(e.steps.length) + J(y.value.debugStepsCountSuffix), 1)
|
|
91217
|
+
]), Q("div", lKe, J(ve(e.task, 80)), 1)], 2))), 128))])) : $("", !0), Ce.value.length ? (X(), Z("div", uKe, [Q("div", dKe, "🕐 " + J(y.value.debugSubHistoryTitle) + " (" + J(Ce.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Ce.value, (e, t) => (X(), Z("div", {
|
|
91034
91218
|
key: "h" + t,
|
|
91035
91219
|
class: TK(["sub-card", e.status])
|
|
91036
91220
|
}, [
|
|
91037
|
-
Q("div",
|
|
91221
|
+
Q("div", fKe, [
|
|
91038
91222
|
Q("span", {
|
|
91039
91223
|
class: "sub-status",
|
|
91040
91224
|
style: wK({ background: Te.value[e.status] && Te.value[e.status].color || "#9ca3af" })
|
|
91041
91225
|
}, J(Te.value[e.status] && Te.value[e.status].label || e.status), 5),
|
|
91042
|
-
Q("span",
|
|
91043
|
-
e.durationMs == null ? $("", !0) : (X(), Z("span",
|
|
91226
|
+
Q("span", pKe, J(e.label), 1),
|
|
91227
|
+
e.durationMs == null ? $("", !0) : (X(), Z("span", mKe, J(ye(e.durationMs)), 1)),
|
|
91044
91228
|
e.steps.length ? (X(), Z("button", {
|
|
91045
91229
|
key: 1,
|
|
91046
91230
|
class: "sub-toggle",
|
|
91047
91231
|
onClick: (e) => De(t)
|
|
91048
|
-
}, J(Ee.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9,
|
|
91232
|
+
}, J(Ee.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, hKe)) : $("", !0)
|
|
91049
91233
|
]),
|
|
91050
|
-
Q("div",
|
|
91051
|
-
e.resultPreview ? (X(), Z("div",
|
|
91052
|
-
Ee.value.has(t) && e.steps.length ? (X(), Z("div",
|
|
91234
|
+
Q("div", gKe, J(ve(e.task, 80)), 1),
|
|
91235
|
+
e.resultPreview ? (X(), Z("div", _Ke, J(e.resultPreview), 1)) : $("", !0),
|
|
91236
|
+
Ee.value.has(t) && e.steps.length ? (X(), Z("div", vKe, [(X(!0), Z(KY, null, nY(e.steps, (e, t) => (X(), Z("div", {
|
|
91053
91237
|
key: t,
|
|
91054
91238
|
class: "sub-step"
|
|
91055
91239
|
}, [
|
|
91056
|
-
Q("span",
|
|
91057
|
-
Q("span",
|
|
91058
|
-
Q("span",
|
|
91240
|
+
Q("span", yKe, J(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
91241
|
+
Q("span", bKe, J(e.name), 1),
|
|
91242
|
+
Q("span", xKe, J(re(e.ts)), 1)
|
|
91059
91243
|
]))), 128))])) : $("", !0)
|
|
91060
91244
|
], 2))), 128))])) : $("", !0)], 64))])) : $("", !0),
|
|
91061
|
-
ue.value === "logs" ? (X(), Z(KY, { key: 2 }, [S.value.length === 0 ? (X(), Z("div",
|
|
91245
|
+
ue.value === "logs" ? (X(), Z(KY, { key: 2 }, [S.value.length === 0 ? (X(), Z("div", SKe, J(y.value.debugLogsEmpty), 1)) : $("", !0), (X(!0), Z(KY, null, nY(k.value, (e) => (X(), Z("div", {
|
|
91062
91246
|
key: e.key,
|
|
91063
91247
|
class: "log-group"
|
|
91064
91248
|
}, [Q("div", {
|
|
@@ -91066,69 +91250,69 @@ var pGe = {
|
|
|
91066
91250
|
onClick: (t) => N(e.key)
|
|
91067
91251
|
}, [
|
|
91068
91252
|
Q("span", { class: TK(["log-group-arrow", { open: te(e.key) }]) }, "▶", 2),
|
|
91069
|
-
Q("span",
|
|
91070
|
-
Q("span",
|
|
91253
|
+
Q("span", wKe, J(P(e)), 1),
|
|
91254
|
+
Q("span", TKe, [
|
|
91071
91255
|
cX(J(re(e.firstTs)), 1),
|
|
91072
91256
|
e.lastTs > e.firstTs ? (X(), Z(KY, { key: 0 }, [cX(" ~ " + J(re(e.lastTs)), 1)], 64)) : $("", !0),
|
|
91073
91257
|
cX(" · " + J(ye(e.lastTs - e.firstTs)), 1)
|
|
91074
91258
|
]),
|
|
91075
|
-
e.toolCount ? (X(), Z("span",
|
|
91076
|
-
e.tokens == null ? $("", !0) : (X(), Z("span",
|
|
91077
|
-
e.errorCount ? (X(), Z("span",
|
|
91078
|
-
], 10,
|
|
91259
|
+
e.toolCount ? (X(), Z("span", EKe, "🔧 " + J(e.toolCount), 1)) : $("", !0),
|
|
91260
|
+
e.tokens == null ? $("", !0) : (X(), Z("span", DKe, "Σ " + J(e.tokens) + " tok", 1)),
|
|
91261
|
+
e.errorCount ? (X(), Z("span", OKe, "❌ " + J(e.errorCount), 1)) : $("", !0)
|
|
91262
|
+
], 10, CKe), fJ(Q("div", kKe, [(X(!0), Z(KY, null, nY(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => {
|
|
91079
91263
|
var o, s, c, l, u, v, x, S;
|
|
91080
91264
|
return X(), Z("div", {
|
|
91081
91265
|
key: i,
|
|
91082
91266
|
class: "log-item"
|
|
91083
91267
|
}, [
|
|
91084
|
-
Q("div",
|
|
91268
|
+
Q("div", AKe, [
|
|
91085
91269
|
Q("span", {
|
|
91086
91270
|
class: "log-type",
|
|
91087
91271
|
style: wK({ background: b.value[e.type].color })
|
|
91088
91272
|
}, J(b.value[e.type].icon) + " " + J(b.value[e.type].label), 5),
|
|
91089
|
-
e.source ? (X(), Z("span",
|
|
91090
|
-
Q("span",
|
|
91273
|
+
e.source ? (X(), Z("span", jKe, "↳ " + J(e.source), 1)) : $("", !0),
|
|
91274
|
+
Q("span", MKe, J(re(e.timestamp)), 1)
|
|
91091
91275
|
]),
|
|
91092
|
-
Q("div",
|
|
91093
|
-
Q("div",
|
|
91094
|
-
Q("div",
|
|
91095
|
-
Q("div",
|
|
91096
|
-
Q("div",
|
|
91097
|
-
Q("div",
|
|
91276
|
+
Q("div", NKe, [e.type === "context" ? (X(), Z(KY, { key: 0 }, [
|
|
91277
|
+
Q("div", PKe, [
|
|
91278
|
+
Q("div", FKe, [Q("span", IKe, J(y.value.debugModel), 1), Q("span", LKe, J(e.data.model), 1)]),
|
|
91279
|
+
Q("div", RKe, [Q("span", zKe, J(y.value.debugTemperature), 1), Q("span", BKe, J(e.data.temperature), 1)]),
|
|
91280
|
+
Q("div", VKe, [n[5] || (n[5] = Q("span", { class: "k" }, "MaxTokens", -1)), Q("span", HKe, J(e.data.maxTokens), 1)]),
|
|
91281
|
+
Q("div", UKe, [Q("span", WKe, J(y.value.debugMessageCount), 1), Q("span", GKe, J(e.data.totalMessages), 1)])
|
|
91098
91282
|
]),
|
|
91099
|
-
Q("div",
|
|
91100
|
-
Q("div",
|
|
91283
|
+
Q("div", KKe, J(y.value.debugToolsLabel) + " (" + J(((o = e.data.tools) == null ? void 0 : o.length) || 0) + ")", 1),
|
|
91284
|
+
Q("div", qKe, [(X(!0), Z(KY, null, nY(e.data.tools, (e) => (X(), Z("span", {
|
|
91101
91285
|
key: e,
|
|
91102
91286
|
class: "tool-chip"
|
|
91103
91287
|
}, J(e), 1))), 128))]),
|
|
91104
|
-
Q("div",
|
|
91105
|
-
Q("div",
|
|
91288
|
+
Q("div", JKe, J(y.value.debugContextMessages), 1),
|
|
91289
|
+
Q("div", YKe, [(X(!0), Z(KY, null, nY(e.data.messages, (e, t) => (X(), Z("div", {
|
|
91106
91290
|
key: t,
|
|
91107
91291
|
class: "msg-row"
|
|
91108
91292
|
}, [Q("span", {
|
|
91109
91293
|
class: "msg-role",
|
|
91110
91294
|
style: wK({ background: ce(e.type).color })
|
|
91111
|
-
}, J(ce(e.type).label), 5), Q("span",
|
|
91112
|
-
], 64)) : e.type === "llm_request" ? (X(), Z(KY, { key: 1 }, [Q("div",
|
|
91113
|
-
Q("span",
|
|
91114
|
-
e.data.model ? (X(), Z("span",
|
|
91115
|
-
Q("span",
|
|
91116
|
-
(s = e.data.tools) != null && s.length ? (X(), Z("span",
|
|
91295
|
+
}, J(ce(e.type).label), 5), Q("span", XKe, J(e.content), 1)]))), 128))])
|
|
91296
|
+
], 64)) : e.type === "llm_request" ? (X(), Z(KY, { key: 1 }, [Q("div", ZKe, [
|
|
91297
|
+
Q("span", QKe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1),
|
|
91298
|
+
e.data.model ? (X(), Z("span", $Ke, J(e.data.model), 1)) : $("", !0),
|
|
91299
|
+
Q("span", eqe, [cX(J((e.data.messages || []).length) + J(y.value.debugMsgCountSuffix), 1), r != null && r < (e.data.messages || []).length ? (X(), Z(KY, { key: 0 }, [cX("(+" + J((e.data.messages || []).length - r) + ")", 1)], 64)) : $("", !0)]),
|
|
91300
|
+
(s = e.data.tools) != null && s.length ? (X(), Z("span", tqe, J(e.data.tools.length) + J(y.value.debugToolCountSuffix), 1)) : $("", !0),
|
|
91117
91301
|
r != null && r > 0 ? (X(), Z("button", {
|
|
91118
91302
|
key: 2,
|
|
91119
91303
|
class: "view-toggle only-new-btn",
|
|
91120
91304
|
onClick: (e) => h(i)
|
|
91121
|
-
}, J(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9,
|
|
91305
|
+
}, J(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, nqe)) : $("", !0),
|
|
91122
91306
|
Q("button", {
|
|
91123
91307
|
class: "view-toggle copy-btn",
|
|
91124
91308
|
title: y.value.copy,
|
|
91125
91309
|
onClick: (t) => _(oe(e.data.messages), "req" + i)
|
|
91126
|
-
}, J(g.value === "req" + i ? "✓" : "📋"), 9,
|
|
91310
|
+
}, J(g.value === "req" + i ? "✓" : "📋"), 9, rqe),
|
|
91127
91311
|
Q("button", {
|
|
91128
91312
|
class: "view-toggle",
|
|
91129
91313
|
onClick: (e) => ae(i)
|
|
91130
|
-
}, J(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9,
|
|
91131
|
-
]), d.value.has(i) ? (X(), Z("pre",
|
|
91314
|
+
}, J(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, iqe)
|
|
91315
|
+
]), d.value.has(i) ? (X(), Z("pre", dqe, [Q("code", null, J(oe(e.data.messages)), 1)])) : (X(!0), Z(KY, { key: 0 }, nY([ne(e, r, m.value.has(i))], (e) => (X(), Z("div", {
|
|
91132
91316
|
key: e.base,
|
|
91133
91317
|
class: "msg-list"
|
|
91134
91318
|
}, [(X(!0), Z(KY, null, nY(e.list, (t, n) => {
|
|
@@ -91144,37 +91328,37 @@ var pGe = {
|
|
|
91144
91328
|
}, [Q("span", {
|
|
91145
91329
|
class: "msg-role",
|
|
91146
91330
|
style: wK({ background: ce(t.role).color })
|
|
91147
|
-
}, J(ce(t.role).label), 5), Q("div",
|
|
91148
|
-
t.content ? (X(), Z("span",
|
|
91331
|
+
}, J(ce(t.role).label), 5), Q("div", oqe, [
|
|
91332
|
+
t.content ? (X(), Z("span", sqe, J(t.content), 1)) : $("", !0),
|
|
91149
91333
|
(X(!0), Z(KY, null, nY(t.tool_calls || [], (e, t) => {
|
|
91150
91334
|
var n, r, i;
|
|
91151
91335
|
return X(), Z("div", {
|
|
91152
91336
|
key: t,
|
|
91153
91337
|
class: "tc-inline"
|
|
91154
|
-
}, [Q("span",
|
|
91338
|
+
}, [Q("span", cqe, "🔧 " + J(((n = e.function) == null ? void 0 : n.name) || e.name), 1), Q("code", lqe, J((r = (i = e.function) == null ? void 0 : i.arguments) == null ? e.args : r), 1)]);
|
|
91155
91339
|
}), 128)),
|
|
91156
|
-
t.tool_call_id ? (X(), Z("span",
|
|
91157
|
-
])], 10,
|
|
91340
|
+
t.tool_call_id ? (X(), Z("span", uqe, "↳ tool_call_id: " + J(t.tool_call_id), 1)) : $("", !0)
|
|
91341
|
+
])], 10, aqe);
|
|
91158
91342
|
}), 128))]))), 128))], 64)) : e.type === "llm_response" ? (X(), Z(KY, { key: 2 }, [
|
|
91159
|
-
Q("div",
|
|
91160
|
-
e.data.content ? (X(), Z("div",
|
|
91161
|
-
(l = e.data.toolCalls) != null && l.length ? (X(), Z("div",
|
|
91343
|
+
Q("div", fqe, [Q("span", pqe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1), (c = e.data.toolCalls) != null && c.length ? (X(), Z("span", mqe, "🔧 " + J(e.data.toolCalls.length) + J(y.value.debugToolCallsSuffix), 1)) : $("", !0)]),
|
|
91344
|
+
e.data.content ? (X(), Z("div", hqe, J(e.data.content), 1)) : $("", !0),
|
|
91345
|
+
(l = e.data.toolCalls) != null && l.length ? (X(), Z("div", gqe, [(X(!0), Z(KY, null, nY(e.data.toolCalls, (e, t) => (X(), Z("div", {
|
|
91162
91346
|
key: t,
|
|
91163
91347
|
class: "tc-card"
|
|
91164
|
-
}, [Q("div",
|
|
91165
|
-
e.data.usage ? (X(), Z("div",
|
|
91166
|
-
Q("span",
|
|
91167
|
-
Q("span",
|
|
91168
|
-
Q("span",
|
|
91169
|
-
e.data.usage.reasoning_tokens ? (X(), Z("span",
|
|
91348
|
+
}, [Q("div", _qe, "🔧 " + J(e.name), 1), Q("pre", vqe, J(oe(e.args)), 1)]))), 128))])) : $("", !0),
|
|
91349
|
+
e.data.usage ? (X(), Z("div", yqe, [
|
|
91350
|
+
Q("span", bqe, "prompt: " + J((u = e.data.usage.prompt_tokens) == null ? "-" : u), 1),
|
|
91351
|
+
Q("span", xqe, "completion: " + J((v = e.data.usage.completion_tokens) == null ? "-" : v), 1),
|
|
91352
|
+
Q("span", Sqe, "total: " + J((x = e.data.usage.total_tokens) == null ? "-" : x), 1),
|
|
91353
|
+
e.data.usage.reasoning_tokens ? (X(), Z("span", Cqe, "reasoning: " + J(e.data.usage.reasoning_tokens) + "(" + J(Math.round(e.data.usage.reasoning_tokens / Math.max(1, (S = e.data.usage.completion_tokens) == null ? 0 : S) * 100)) + "%)", 1)) : $("", !0)
|
|
91170
91354
|
])) : $("", !0)
|
|
91171
91355
|
], 64)) : e.type === "tool_call" || e.type === "tool_result" ? (X(), Z(KY, { key: 3 }, [t ? (X(), Z("div", {
|
|
91172
91356
|
key: 0,
|
|
91173
91357
|
class: TK(["tc-card inline paired", { error: e.data.status === "error" }])
|
|
91174
91358
|
}, [
|
|
91175
|
-
Q("div",
|
|
91359
|
+
Q("div", wqe, [
|
|
91176
91360
|
cX(J(e.data.status === "error" ? "❌" : "✅") + " " + J(e.data.name) + " ", 1),
|
|
91177
|
-
e.data.durationMs == null ? $("", !0) : (X(), Z("span",
|
|
91361
|
+
e.data.durationMs == null ? $("", !0) : (X(), Z("span", Tqe, J(ye(e.data.durationMs)), 1)),
|
|
91178
91362
|
Q("button", {
|
|
91179
91363
|
class: "view-toggle copy-btn",
|
|
91180
91364
|
title: y.value.copy,
|
|
@@ -91182,84 +91366,84 @@ var pGe = {
|
|
|
91182
91366
|
var n;
|
|
91183
91367
|
return _(String((n = e.data.result) == null ? "" : n), "res" + i);
|
|
91184
91368
|
}
|
|
91185
|
-
}, J(g.value === "res" + i ? "✓" : "📋"), 9,
|
|
91369
|
+
}, J(g.value === "res" + i ? "✓" : "📋"), 9, Eqe)
|
|
91186
91370
|
]),
|
|
91187
|
-
Q("pre",
|
|
91188
|
-
Q("div",
|
|
91189
|
-
Q("pre",
|
|
91190
|
-
], 2)) : (X(), Z("div",
|
|
91191
|
-
Q("div",
|
|
91371
|
+
Q("pre", Dqe, J(oe(t.data.args)), 1),
|
|
91372
|
+
Q("div", Oqe, "↓ " + J(y.value.resultLabel), 1),
|
|
91373
|
+
Q("pre", kqe, J(e.data.result), 1)
|
|
91374
|
+
], 2)) : (X(), Z("div", Aqe, [Q("div", jqe, [cX(J(e.type === "tool_call" ? "🔧" : "✅") + " " + J(e.data.name) + " ", 1), e.type === "tool_call" ? (X(), Z("span", Mqe, J(y.value.statusRunning) + "…", 1)) : $("", !0)]), Q("pre", Nqe, J(e.type === "tool_call" ? oe(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (X(), Z("div", Pqe, J(e.data.tool ? `[${e.data.tool}] ` : "") + J(e.data.error), 1)) : $("", !0)]),
|
|
91375
|
+
Q("div", Fqe, [Q("button", {
|
|
91192
91376
|
class: "raw-toggle",
|
|
91193
91377
|
onClick: (e) => ie(i)
|
|
91194
|
-
}, J(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9,
|
|
91378
|
+
}, J(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, Iqe), Q("button", {
|
|
91195
91379
|
class: "raw-toggle",
|
|
91196
91380
|
onClick: (t) => Y(I7)(oe(e.data))
|
|
91197
|
-
}, J(y.value.copy), 9,
|
|
91198
|
-
a.value.has(i) ? (X(), Z("pre",
|
|
91381
|
+
}, J(y.value.copy), 9, Lqe)]),
|
|
91382
|
+
a.value.has(i) ? (X(), Z("pre", Rqe, [Q("code", null, J(oe(e.data)), 1)])) : $("", !0)
|
|
91199
91383
|
]);
|
|
91200
|
-
}), 128))], 512), [[XX, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (X(), Z("div",
|
|
91201
|
-
Q("div",
|
|
91202
|
-
Q("div",
|
|
91203
|
-
Q("div",
|
|
91204
|
-
Q("div",
|
|
91205
|
-
Q("div",
|
|
91206
|
-
Q("div",
|
|
91207
|
-
Q("div",
|
|
91384
|
+
}), 128))], 512), [[XX, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (X(), Z("div", zqe, [I.value ? (X(), Z(KY, { key: 1 }, [
|
|
91385
|
+
Q("div", Vqe, [
|
|
91386
|
+
Q("div", Hqe, J(y.value.debugInfoBasic), 1),
|
|
91387
|
+
Q("div", Uqe, [
|
|
91388
|
+
Q("div", Wqe, [n[6] || (n[6] = Q("span", { class: "k" }, "ID", -1)), Q("span", Gqe, J(I.value.id), 1)]),
|
|
91389
|
+
Q("div", Kqe, [Q("span", qqe, J(y.value.debugModel), 1), Q("span", Jqe, J(I.value.model || "-"), 1)]),
|
|
91390
|
+
Q("div", Yqe, [Q("span", Xqe, J(y.value.debugToolCount), 1), Q("span", Zqe, J(I.value.tools.length), 1)]),
|
|
91391
|
+
Q("div", Qqe, [Q("span", $qe, J(y.value.debugMiddleware), 1), Q("span", eJe, J(I.value.middleware.length), 1)])
|
|
91208
91392
|
]),
|
|
91209
|
-
Q("div",
|
|
91393
|
+
Q("div", tJe, [Q("span", nJe, J(y.value.debugMiddlewareStack), 1), Q("span", rJe, J(I.value.middleware.join(" → ") || "-"), 1)])
|
|
91210
91394
|
]),
|
|
91211
|
-
Q("div",
|
|
91395
|
+
Q("div", iJe, [Q("div", aJe, "🔧 " + J(y.value.debugToolsLabel) + " (" + J(I.value.tools.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.tools, (e) => (X(), Z("div", {
|
|
91212
91396
|
key: e.name,
|
|
91213
91397
|
class: "info-item"
|
|
91214
|
-
}, [Q("div",
|
|
91398
|
+
}, [Q("div", oJe, [cX(J(e.name), 1), e.source ? (X(), Z("span", {
|
|
91215
91399
|
key: 0,
|
|
91216
91400
|
class: TK(["src-tag", _e(e.source)])
|
|
91217
|
-
}, J(e.source), 3)) : $("", !0)]), Q("div",
|
|
91218
|
-
I.value.skills.length ? (X(), Z("div",
|
|
91401
|
+
}, J(e.source), 3)) : $("", !0)]), Q("div", sJe, J(e.description), 1)]))), 128))]),
|
|
91402
|
+
I.value.skills.length ? (X(), Z("div", cJe, [Q("div", lJe, [cX("📘 " + J(y.value.debugSkillsTitle) + " (" + J(I.value.skills.length) + ")", 1), Q("span", uJe, J(y.value.debugSkillsHint), 1)]), (X(!0), Z(KY, null, nY(I.value.skills, (e) => (X(), Z("div", {
|
|
91219
91403
|
key: e.name,
|
|
91220
91404
|
class: "info-item"
|
|
91221
91405
|
}, [
|
|
91222
91406
|
Q("div", {
|
|
91223
91407
|
class: "info-name skill-toggle",
|
|
91224
91408
|
onClick: (t) => fe(e.name)
|
|
91225
|
-
}, [Q("span", { class: TK(["skill-arrow", { open: !!de.value[e.name] }]) }, "▶", 2), cX(" " + J(e.name), 1)], 8,
|
|
91226
|
-
Q("div",
|
|
91227
|
-
de.value[e.name] ? (X(), Z("div",
|
|
91409
|
+
}, [Q("span", { class: TK(["skill-arrow", { open: !!de.value[e.name] }]) }, "▶", 2), cX(" " + J(e.name), 1)], 8, dJe),
|
|
91410
|
+
Q("div", fJe, J(e.description), 1),
|
|
91411
|
+
de.value[e.name] ? (X(), Z("div", pJe, [de.value[e.name].loading ? (X(), Z("div", mJe, J(y.value.debugLoading), 1)) : de.value[e.name].error ? (X(), Z("div", hJe, J(de.value[e.name].error), 1)) : de.value[e.name].content ? (X(), Z("pre", gJe, J(de.value[e.name].content), 1)) : $("", !0)])) : $("", !0)
|
|
91228
91412
|
]))), 128))])) : $("", !0),
|
|
91229
|
-
I.value.data ? (X(), Z("div",
|
|
91230
|
-
Q("div",
|
|
91231
|
-
Q("div",
|
|
91232
|
-
Q("div",
|
|
91233
|
-
Q("div",
|
|
91234
|
-
Q("div",
|
|
91413
|
+
I.value.data ? (X(), Z("div", _Je, [Q("div", vJe, "📊 " + J(y.value.debugDataTitle), 1), Q("div", yJe, [Q("div", bJe, J(I.value.data.description || y.value.debugDataFallback), 1), Q("div", xJe, J(y.value.debugSchemaPrefix) + J(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : $("", !0),
|
|
91414
|
+
Q("div", SJe, [Q("div", CJe, "🧬 " + J(y.value.debugSubagentTitle), 1), Q("div", wJe, [
|
|
91415
|
+
Q("div", TJe, [Q("span", EJe, J(y.value.debugEnabled), 1), Q("span", DJe, J(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
91416
|
+
Q("div", OJe, [Q("span", kJe, J(y.value.debugMaxDepth), 1), Q("span", AJe, J(I.value.subagent.maxDepth), 1)]),
|
|
91417
|
+
Q("div", jJe, [Q("span", MJe, J(y.value.debugMaxParallel), 1), Q("span", NJe, J(I.value.subagent.maxParallel), 1)]),
|
|
91418
|
+
Q("div", PJe, [Q("span", FJe, J(y.value.debugExtraTools), 1), Q("span", IJe, J(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
|
|
91235
91419
|
])]),
|
|
91236
|
-
!((t = I.value.mcp) == null || (t = t.servers) == null) && t.length ? (X(), Z("div",
|
|
91420
|
+
!((t = I.value.mcp) == null || (t = t.servers) == null) && t.length ? (X(), Z("div", LJe, [Q("div", RJe, "🔌 MCP (" + J(I.value.mcp.servers.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.mcp.servers, (e) => (X(), Z("div", {
|
|
91237
91421
|
key: e.name,
|
|
91238
91422
|
class: "info-item"
|
|
91239
|
-
}, [Q("div",
|
|
91240
|
-
I.value.verify ? (X(), Z("div",
|
|
91241
|
-
Q("div",
|
|
91242
|
-
Q("div",
|
|
91243
|
-
Q("div",
|
|
91244
|
-
I.value.verify.adversarial ? (X(), Z("div",
|
|
91423
|
+
}, [Q("div", zJe, [cX(J(e.name) + " ", 1), Q("span", BJe, J(e.toolCount) + J(y.value.debugToolCountSuffix), 1)]), Q("div", VJe, J(e.url), 1)]))), 128))])) : $("", !0),
|
|
91424
|
+
I.value.verify ? (X(), Z("div", HJe, [Q("div", UJe, "✅ " + J(y.value.debugVerifyTitle), 1), Q("div", WJe, [
|
|
91425
|
+
Q("div", GJe, [Q("span", KJe, J(y.value.debugEnabled), 1), Q("span", qJe, J(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
91426
|
+
Q("div", JJe, [Q("span", YJe, J(y.value.debugMaxAttempts), 1), Q("span", XJe, J(I.value.verify.maxAttempts), 1)]),
|
|
91427
|
+
Q("div", ZJe, [Q("span", QJe, J(y.value.debugAdversarial), 1), Q("span", $Je, J(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
|
|
91428
|
+
I.value.verify.adversarial ? (X(), Z("div", eYe, [Q("span", tYe, J(y.value.debugAdversarialModel), 1), Q("span", nYe, J(I.value.model || "-") + J(y.value.debugSameAsMain), 1)])) : $("", !0)
|
|
91245
91429
|
])])) : $("", !0),
|
|
91246
|
-
I.value.todos.length ? (X(), Z("div",
|
|
91430
|
+
I.value.todos.length ? (X(), Z("div", rYe, [Q("div", iYe, "📋 " + J(y.value.debugTodosTitle) + " (" + J(I.value.todos.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.todos, (e, t) => (X(), Z("div", {
|
|
91247
91431
|
key: t,
|
|
91248
91432
|
class: "info-todo"
|
|
91249
91433
|
}, [Q("span", {
|
|
91250
91434
|
class: "todo-tag",
|
|
91251
91435
|
style: wK({ background: he.value[e.status] && he.value[e.status].color || "#9ca3af" })
|
|
91252
91436
|
}, J(ge(e.status)), 5), Q("span", null, J(e.content), 1)]))), 128))])) : $("", !0),
|
|
91253
|
-
I.value.memory ? (X(), Z("div",
|
|
91254
|
-
I.value.lastCompression ? (X(), Z("div",
|
|
91255
|
-
Q("div",
|
|
91256
|
-
Q("div",
|
|
91257
|
-
Q("div",
|
|
91258
|
-
Q("div",
|
|
91259
|
-
Q("div",
|
|
91260
|
-
I.value.lastCompression.decision ? (X(), Z("div",
|
|
91437
|
+
I.value.memory ? (X(), Z("div", aYe, [Q("div", oYe, "📝 " + J(y.value.debugMemoryTitle), 1), Q("pre", sYe, J(I.value.memory), 1)])) : $("", !0),
|
|
91438
|
+
I.value.lastCompression ? (X(), Z("div", cYe, [Q("div", lYe, "🗜️ " + J(y.value.debugLastCompTitle), 1), Q("div", uYe, [
|
|
91439
|
+
Q("div", dYe, [Q("span", fYe, J(y.value.debugTriggered), 1), Q("span", pYe, J(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
|
|
91440
|
+
Q("div", mYe, [Q("span", hYe, J(y.value.debugRoundsSummarized), 1), Q("span", gYe, J(I.value.lastCompression.roundsSummarized) + " / " + J(I.value.lastCompression.roundsTotal), 1)]),
|
|
91441
|
+
Q("div", _Ye, [Q("span", vYe, J(y.value.debugCtxRecalled), 1), Q("span", yYe, J(I.value.lastCompression.roundsRecalled) + J(y.value.debugCountSuffix), 1)]),
|
|
91442
|
+
Q("div", bYe, [Q("span", xYe, J(y.value.debugMessageCount), 1), Q("span", SYe, J(I.value.lastCompression.originalMessages) + " → " + J(I.value.lastCompression.compressedMessages), 1)]),
|
|
91443
|
+
Q("div", CYe, [Q("span", wYe, J(y.value.debugStrategy), 1), Q("span", TYe, J(I.value.lastCompression.strategy), 1)]),
|
|
91444
|
+
I.value.lastCompression.decision ? (X(), Z("div", EYe, [Q("span", DYe, J(y.value.debugDecision), 1), Q("span", OYe, "🤖 " + J(Oe(I.value.lastCompression.decision)), 1)])) : $("", !0)
|
|
91261
91445
|
])])) : $("", !0)
|
|
91262
|
-
], 64)) : (X(), Z("div",
|
|
91446
|
+
], 64)) : (X(), Z("div", Bqe, J(y.value.debugNoInfo), 1))])) : $("", !0)
|
|
91263
91447
|
], 512)], 512)], 512)
|
|
91264
91448
|
], 2), Q("div", {
|
|
91265
91449
|
class: "drawer-mask",
|
|
@@ -91269,7 +91453,7 @@ var pGe = {
|
|
|
91269
91453
|
_: 1
|
|
91270
91454
|
})]));
|
|
91271
91455
|
}
|
|
91272
|
-
}), [["__scopeId", "data-v-6d9e98b4"]]),
|
|
91456
|
+
}), [["__scopeId", "data-v-6d9e98b4"]]), AYe = ["title"], jYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
91273
91457
|
__name: "SelectionMenu",
|
|
91274
91458
|
emits: ["quote"],
|
|
91275
91459
|
setup(e, { emit: t }) {
|
|
@@ -91357,18 +91541,18 @@ var pGe = {
|
|
|
91357
91541
|
title: Y(r).selectionMenuTitle,
|
|
91358
91542
|
onMousedown: t[0] || (t[0] = mZ(() => {}, ["prevent"])),
|
|
91359
91543
|
onClick: _
|
|
91360
|
-
}, "❝ " + J(Y(r).selectionMenuLabel), 41,
|
|
91544
|
+
}, "❝ " + J(Y(r).selectionMenuLabel), 41, AYe)], 4), [[XX, i.value]])]));
|
|
91361
91545
|
}
|
|
91362
|
-
}), [["__scopeId", "data-v-19e6dbb4"]]),
|
|
91546
|
+
}), [["__scopeId", "data-v-19e6dbb4"]]), MYe = { class: "skill-panel" }, NYe = { class: "skill-header" }, PYe = { class: "skill-title" }, FYe = ["title"], IYe = { class: "skill-section" }, LYe = { class: "section-title" }, RYe = ["title"], zYe = { class: "field" }, BYe = { class: "field-label" }, VYe = ["disabled", "placeholder"], HYe = { class: "field" }, UYe = { class: "field-label" }, WYe = ["placeholder"], GYe = { class: "field field-textarea" }, KYe = { class: "field-label" }, qYe = ["placeholder"], JYe = {
|
|
91363
91547
|
key: 0,
|
|
91364
91548
|
class: "skill-error"
|
|
91365
|
-
},
|
|
91549
|
+
}, YYe = { class: "skill-section" }, XYe = { class: "section-title" }, ZYe = {
|
|
91366
91550
|
key: 0,
|
|
91367
91551
|
class: "empty-hint"
|
|
91368
|
-
},
|
|
91552
|
+
}, QYe = {
|
|
91369
91553
|
key: 1,
|
|
91370
91554
|
class: "skill-list"
|
|
91371
|
-
},
|
|
91555
|
+
}, $Ye = { class: "skill-actions" }, eXe = ["title", "onClick"], tXe = ["title", "onClick"], nXe = { class: "skill-hint" }, rXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
91372
91556
|
__name: "SkillPanel",
|
|
91373
91557
|
props: {
|
|
91374
91558
|
visible: { type: Boolean },
|
|
@@ -91424,55 +91608,55 @@ var pGe = {
|
|
|
91424
91608
|
key: 0,
|
|
91425
91609
|
class: "skill-mask",
|
|
91426
91610
|
onClick: n[4] || (n[4] = mZ((e) => r("close"), ["self"]))
|
|
91427
|
-
}, [Q("div",
|
|
91428
|
-
Q("div",
|
|
91611
|
+
}, [Q("div", MYe, [
|
|
91612
|
+
Q("div", NYe, [Q("span", PYe, J(e.messages.skillPanelTitle), 1), Q("button", {
|
|
91429
91613
|
class: "skill-close",
|
|
91430
91614
|
title: e.messages.close,
|
|
91431
91615
|
onClick: n[0] || (n[0] = (e) => r("close"))
|
|
91432
|
-
}, "✕", 8,
|
|
91433
|
-
Q("div",
|
|
91434
|
-
Q("div",
|
|
91616
|
+
}, "✕", 8, FYe)]),
|
|
91617
|
+
Q("div", IYe, [
|
|
91618
|
+
Q("div", LYe, [cX(J(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (X(), Z("button", {
|
|
91435
91619
|
key: 0,
|
|
91436
91620
|
class: "btn btn-ghost btn-cancel",
|
|
91437
91621
|
title: e.messages.skillCancelEdit,
|
|
91438
91622
|
onClick: h
|
|
91439
|
-
}, J(e.messages.skillCancelEdit), 9,
|
|
91440
|
-
Q("label",
|
|
91623
|
+
}, J(e.messages.skillCancelEdit), 9, RYe)) : $("", !0)]),
|
|
91624
|
+
Q("label", zYe, [Q("span", BYe, J(e.messages.skillNameLabel), 1), fJ(Q("input", {
|
|
91441
91625
|
"onUpdate:modelValue": n[1] || (n[1] = (e) => i.value = e),
|
|
91442
91626
|
disabled: !!u.value,
|
|
91443
91627
|
placeholder: e.messages.skillNamePlaceholder,
|
|
91444
91628
|
class: "field-input"
|
|
91445
|
-
}, null, 8,
|
|
91446
|
-
Q("label",
|
|
91629
|
+
}, null, 8, VYe), [[pZ, i.value]])]),
|
|
91630
|
+
Q("label", HYe, [Q("span", UYe, J(e.messages.skillDescLabel), 1), fJ(Q("input", {
|
|
91447
91631
|
"onUpdate:modelValue": n[2] || (n[2] = (e) => a.value = e),
|
|
91448
91632
|
placeholder: e.messages.skillDescPlaceholder,
|
|
91449
91633
|
class: "field-input"
|
|
91450
|
-
}, null, 8,
|
|
91451
|
-
Q("label",
|
|
91634
|
+
}, null, 8, WYe), [[pZ, a.value]])]),
|
|
91635
|
+
Q("label", GYe, [Q("span", KYe, J(e.messages.skillContentLabel), 1), fJ(Q("textarea", {
|
|
91452
91636
|
"onUpdate:modelValue": n[3] || (n[3] = (e) => o.value = e),
|
|
91453
91637
|
placeholder: e.messages.skillContentPlaceholder,
|
|
91454
91638
|
rows: "6",
|
|
91455
91639
|
class: "field-input"
|
|
91456
|
-
}, null, 8,
|
|
91457
|
-
s.value ? (X(), Z("div",
|
|
91640
|
+
}, null, 8, qYe), [[pZ, o.value]])]),
|
|
91641
|
+
s.value ? (X(), Z("div", JYe, J(s.value), 1)) : $("", !0),
|
|
91458
91642
|
Q("button", {
|
|
91459
91643
|
class: "btn btn-primary",
|
|
91460
91644
|
onClick: f
|
|
91461
91645
|
}, J(u.value ? e.messages.skillSave : e.messages.skillAdd), 1)
|
|
91462
91646
|
]),
|
|
91463
|
-
Q("div",
|
|
91647
|
+
Q("div", YYe, [Q("div", XYe, J(e.messages.skillCreatedTitle) + "(" + J(c.value.length) + ")", 1), c.value.length ? (X(), Z("ul", QYe, [(X(!0), Z(KY, null, nY(c.value, (t) => (X(), Z("li", {
|
|
91464
91648
|
key: t,
|
|
91465
91649
|
class: "skill-item"
|
|
91466
|
-
}, [Q("span", { class: TK(["skill-name", { active: u.value === t }]) }, J(t), 3), Q("span",
|
|
91650
|
+
}, [Q("span", { class: TK(["skill-name", { active: u.value === t }]) }, J(t), 3), Q("span", $Ye, [Q("button", {
|
|
91467
91651
|
class: "btn btn-ghost btn-edit",
|
|
91468
91652
|
title: e.messages.skillEditTitle,
|
|
91469
91653
|
onClick: (e) => m(t)
|
|
91470
|
-
}, J(e.messages.skillEditBtn), 9,
|
|
91654
|
+
}, J(e.messages.skillEditBtn), 9, eXe), Q("button", {
|
|
91471
91655
|
class: "btn btn-ghost btn-del",
|
|
91472
91656
|
title: e.messages.skillDeleteTitle,
|
|
91473
91657
|
onClick: (e) => p(t)
|
|
91474
|
-
}, J(e.messages.skillDeleteBtn), 9,
|
|
91475
|
-
Q("div",
|
|
91658
|
+
}, J(e.messages.skillDeleteBtn), 9, tXe)])]))), 128))])) : (X(), Z("div", ZYe, J(e.messages.skillEmpty), 1))]),
|
|
91659
|
+
Q("div", nXe, [
|
|
91476
91660
|
cX(" 💡 " + J(e.messages.skillHintA) + " ", 1),
|
|
91477
91661
|
n[5] || (n[5] = Q("code", null, "load_skill(name)", -1)),
|
|
91478
91662
|
cX(" " + J(e.messages.skillHintB) + " ", 1),
|
|
@@ -91487,7 +91671,7 @@ var pGe = {
|
|
|
91487
91671
|
//#endregion
|
|
91488
91672
|
//#region src/core/components/ChatDialog.vue?vue&type=script&setup=true&lang.ts
|
|
91489
91673
|
M();
|
|
91490
|
-
var
|
|
91674
|
+
var iXe = ["aria-valuenow"], aXe = "page-agent-sdk:drawerWidth", $9 = 320, oXe = 960, sXe = 420, cXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
91491
91675
|
__name: "ChatDialog",
|
|
91492
91676
|
props: {
|
|
91493
91677
|
fetchResponse: {},
|
|
@@ -91612,7 +91796,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91612
91796
|
function b() {
|
|
91613
91797
|
if (typeof localStorage > "u") return null;
|
|
91614
91798
|
try {
|
|
91615
|
-
let e = Number(localStorage.getItem(
|
|
91799
|
+
let e = Number(localStorage.getItem(aXe));
|
|
91616
91800
|
return Number.isFinite(e) && e >= $9 ? e : null;
|
|
91617
91801
|
} catch (e) {
|
|
91618
91802
|
return null;
|
|
@@ -91620,7 +91804,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91620
91804
|
}
|
|
91621
91805
|
let x = /* @__PURE__ */ Iq(b()), S = /* @__PURE__ */ Iq(!1);
|
|
91622
91806
|
function C(e) {
|
|
91623
|
-
let t = typeof window < "u" ? window.innerWidth :
|
|
91807
|
+
let t = typeof window < "u" ? window.innerWidth : oXe, n = Math.max(Math.min(oXe, t * .9), $9);
|
|
91624
91808
|
return Math.min(Math.max(e, $9), n);
|
|
91625
91809
|
}
|
|
91626
91810
|
let w = EX(() => x.value == null ? typeof i.drawerWidth == "number" ? i.drawerWidth : null : x.value), T = EX(() => {
|
|
@@ -91649,13 +91833,13 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91649
91833
|
}
|
|
91650
91834
|
function ee() {
|
|
91651
91835
|
if (!(x.value == null || typeof localStorage > "u")) try {
|
|
91652
|
-
localStorage.setItem(
|
|
91836
|
+
localStorage.setItem(aXe, String(x.value));
|
|
91653
91837
|
} catch (e) {}
|
|
91654
91838
|
}
|
|
91655
91839
|
function te(e) {
|
|
91656
91840
|
var t;
|
|
91657
91841
|
if (!D.value) return;
|
|
91658
|
-
let n = e.shiftKey ? 64 : 16, r = (t = w.value) == null ? typeof window < "u" ? Math.min(
|
|
91842
|
+
let n = e.shiftKey ? 64 : 16, r = (t = w.value) == null ? typeof window < "u" ? Math.min(sXe, window.innerWidth * .9) : sXe : t;
|
|
91659
91843
|
if (e.key === "ArrowLeft") x.value = C(r + n);
|
|
91660
91844
|
else if (e.key === "ArrowRight") x.value = C(r - n);
|
|
91661
91845
|
else return;
|
|
@@ -91690,7 +91874,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91690
91874
|
onPointerup: M,
|
|
91691
91875
|
onPointercancel: M,
|
|
91692
91876
|
onKeydown: te
|
|
91693
|
-
}, null, 40,
|
|
91877
|
+
}, null, 40, iXe)) : $("", !0),
|
|
91694
91878
|
v("header") ? rY(t.$slots, "header", {
|
|
91695
91879
|
key: 1,
|
|
91696
91880
|
chat: Y(o)
|
|
@@ -91761,7 +91945,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91761
91945
|
key: 0,
|
|
91762
91946
|
name: "cs-slide"
|
|
91763
91947
|
}, {
|
|
91764
|
-
default: dJ(() => [rY(t.$slots, "body", { chat: Y(o) }, () => [fJ(oX(
|
|
91948
|
+
default: dJ(() => [rY(t.$slots, "body", { chat: Y(o) }, () => [fJ(oX(KUe, {
|
|
91765
91949
|
"show-avatar": e.showAvatar,
|
|
91766
91950
|
"show-typing": e.showTyping
|
|
91767
91951
|
}, null, 8, ["show-avatar", "show-typing"]), [[XX, Y(s)]])], !0)]),
|
|
@@ -91770,15 +91954,15 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91770
91954
|
v("queued") ? rY(t.$slots, "queued", {
|
|
91771
91955
|
key: 1,
|
|
91772
91956
|
chat: Y(o)
|
|
91773
|
-
}, () => [oX(
|
|
91957
|
+
}, () => [oX(nWe)], !0) : $("", !0),
|
|
91774
91958
|
v("approval") ? rY(t.$slots, "approval", {
|
|
91775
91959
|
key: 2,
|
|
91776
91960
|
chat: Y(o)
|
|
91777
|
-
}, () => [oX(
|
|
91961
|
+
}, () => [oX(DWe)], !0) : $("", !0),
|
|
91778
91962
|
v("conflict") ? rY(t.$slots, "conflict", {
|
|
91779
91963
|
key: 3,
|
|
91780
91964
|
chat: Y(o)
|
|
91781
|
-
}, () => [oX(
|
|
91965
|
+
}, () => [oX(WWe, {
|
|
91782
91966
|
"pending-conflict": e.pendingConflict,
|
|
91783
91967
|
"on-resolve": e.onResolveConflict,
|
|
91784
91968
|
icons: Y(o).icons,
|
|
@@ -91794,7 +91978,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91794
91978
|
key: 3,
|
|
91795
91979
|
name: "cs-slide"
|
|
91796
91980
|
}, {
|
|
91797
|
-
default: dJ(() => [rY(t.$slots, "footer", { chat: Y(o) }, () => [oX(
|
|
91981
|
+
default: dJ(() => [rY(t.$slots, "footer", { chat: Y(o) }, () => [oX(bGe, {
|
|
91798
91982
|
placeholder: e.placeholder || Y(o).messages.inputPlaceholder,
|
|
91799
91983
|
"input-rows": e.inputRows,
|
|
91800
91984
|
"gate-pending": m.value,
|
|
@@ -91814,7 +91998,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91814
91998
|
v("debug") ? rY(t.$slots, "debug", {
|
|
91815
91999
|
key: 4,
|
|
91816
92000
|
chat: Y(o)
|
|
91817
|
-
}, () => [oX(
|
|
92001
|
+
}, () => [oX(kYe, {
|
|
91818
92002
|
visible: Y(c),
|
|
91819
92003
|
"onUpdate:visible": n[4] || (n[4] = (e) => /* @__PURE__ */ Fq(c) ? c.value = e : null),
|
|
91820
92004
|
logs: e.debugLogs,
|
|
@@ -91843,7 +92027,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91843
92027
|
v("skill") ? rY(t.$slots, "skill", {
|
|
91844
92028
|
key: 5,
|
|
91845
92029
|
chat: Y(o)
|
|
91846
|
-
}, () => [oX(
|
|
92030
|
+
}, () => [oX(rXe, {
|
|
91847
92031
|
visible: Y(l),
|
|
91848
92032
|
"on-add-skill": e.onAddSkill,
|
|
91849
92033
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -91860,7 +92044,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91860
92044
|
"messages",
|
|
91861
92045
|
"onClose"
|
|
91862
92046
|
])], !0) : $("", !0),
|
|
91863
|
-
e.selectionMenu ? (X(), tX(
|
|
92047
|
+
e.selectionMenu ? (X(), tX(jYe, {
|
|
91864
92048
|
key: 6,
|
|
91865
92049
|
onQuote: n[6] || (n[6] = (t) => {
|
|
91866
92050
|
var n;
|
|
@@ -91874,7 +92058,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
|
|
|
91874
92058
|
//#endregion
|
|
91875
92059
|
//#region src/core/sdk/mountChatDialog.ts
|
|
91876
92060
|
M();
|
|
91877
|
-
function
|
|
92061
|
+
function lXe(e) {
|
|
91878
92062
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = () => {
|
|
91879
92063
|
var e, t;
|
|
91880
92064
|
let n = (e = i.querySelector) == null ? void 0 : e.call(i, ".chat-dialog"), r = (t = i.querySelector) == null ? void 0 : t.call(i, ".chat-mask");
|
|
@@ -91883,7 +92067,7 @@ function tXe(e) {
|
|
|
91883
92067
|
return r = YSe(/* @__PURE__ */ HJ({ setup() {
|
|
91884
92068
|
return () => {
|
|
91885
92069
|
var r;
|
|
91886
|
-
return DX(
|
|
92070
|
+
return DX(cXe, j({
|
|
91887
92071
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
91888
92072
|
fetchResponse: e.streaming ? void 0 : (e, n) => t.stream(e, () => {}, n),
|
|
91889
92073
|
title: n.title,
|
|
@@ -92040,7 +92224,7 @@ function tXe(e) {
|
|
|
92040
92224
|
};
|
|
92041
92225
|
}
|
|
92042
92226
|
QP(), Uf(), M();
|
|
92043
|
-
function
|
|
92227
|
+
function uXe(e, t, n, r, i) {
|
|
92044
92228
|
let a = [];
|
|
92045
92229
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
92046
92230
|
let o = [];
|
|
@@ -92055,7 +92239,7 @@ function nXe(e, t, n, r, i) {
|
|
|
92055
92239
|
|
|
92056
92240
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
92057
92241
|
}
|
|
92058
|
-
function
|
|
92242
|
+
function dXe(e, t, n, r, i) {
|
|
92059
92243
|
let a = [], o = [];
|
|
92060
92244
|
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)
|
|
92061
92245
|
|
|
@@ -92072,12 +92256,12 @@ ${a.join("\n")}
|
|
|
92072
92256
|
## 何时用何源
|
|
92073
92257
|
${o.join("\n")}`;
|
|
92074
92258
|
}
|
|
92075
|
-
var
|
|
92259
|
+
var fXe = {
|
|
92076
92260
|
name: "rag-search",
|
|
92077
92261
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
92078
|
-
getContent: () =>
|
|
92262
|
+
getContent: () => dXe(!0, !0, !0, "search_docs", "load_doc")
|
|
92079
92263
|
};
|
|
92080
|
-
function
|
|
92264
|
+
function pXe(e, t, n) {
|
|
92081
92265
|
let r = qP(async ({ query: e, topK: r }) => {
|
|
92082
92266
|
try {
|
|
92083
92267
|
let i = await t(e, { topK: r == null ? n : r });
|
|
@@ -92095,7 +92279,7 @@ function aXe(e, t, n) {
|
|
|
92095
92279
|
});
|
|
92096
92280
|
return NZ([r]), r;
|
|
92097
92281
|
}
|
|
92098
|
-
function
|
|
92282
|
+
function mXe(e, t) {
|
|
92099
92283
|
let n = qP(async ({ source: e }) => {
|
|
92100
92284
|
try {
|
|
92101
92285
|
let n = await t(e), r = Array.isArray(n) ? n : [n];
|
|
@@ -92110,19 +92294,19 @@ function oXe(e, t) {
|
|
|
92110
92294
|
});
|
|
92111
92295
|
return NZ([n]), n;
|
|
92112
92296
|
}
|
|
92113
|
-
function
|
|
92297
|
+
function hXe(e) {
|
|
92114
92298
|
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;
|
|
92115
92299
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
92116
92300
|
let p = [];
|
|
92117
|
-
t && p.push(
|
|
92301
|
+
t && p.push(pXe(s, t, o)), n && p.push(mXe(c, n)), f && p.push(...f);
|
|
92118
92302
|
let m = r ? [
|
|
92119
92303
|
"vfs_grep",
|
|
92120
92304
|
"vfs_read",
|
|
92121
92305
|
"vfs_json_read"
|
|
92122
|
-
] : void 0, h =
|
|
92306
|
+
] : void 0, h = uXe(r, !!t, !!n, s, c), g = {
|
|
92123
92307
|
name: "rag-search",
|
|
92124
|
-
description:
|
|
92125
|
-
getContent: () =>
|
|
92308
|
+
description: fXe.description,
|
|
92309
|
+
getContent: () => dXe(r, !!t, !!n, s, c)
|
|
92126
92310
|
};
|
|
92127
92311
|
return j({
|
|
92128
92312
|
id: i,
|
|
@@ -92135,12 +92319,12 @@ function sXe(e) {
|
|
|
92135
92319
|
}, u === void 0 ? {} : { summarization: u });
|
|
92136
92320
|
}
|
|
92137
92321
|
P(), M();
|
|
92138
|
-
var
|
|
92322
|
+
var gXe = [
|
|
92139
92323
|
"timeoutMs",
|
|
92140
92324
|
"sampleMs",
|
|
92141
92325
|
"onSample"
|
|
92142
92326
|
];
|
|
92143
|
-
function
|
|
92327
|
+
function _Xe(e = {}) {
|
|
92144
92328
|
var t, n, r;
|
|
92145
92329
|
let i = (t = e.quietMs) == null ? 9e4 : t, a = (n = e.confirmSamples) == null ? 3 : n, o = (r = e.baselineMessageCount) == null ? 0 : r, s = 0;
|
|
92146
92330
|
return {
|
|
@@ -92152,14 +92336,14 @@ function lXe(e = {}) {
|
|
|
92152
92336
|
}
|
|
92153
92337
|
};
|
|
92154
92338
|
}
|
|
92155
|
-
var
|
|
92156
|
-
function
|
|
92339
|
+
var vXe = /* @__PURE__ */ new Set(["elapsedSec"]);
|
|
92340
|
+
function yXe(e, t, n = {}) {
|
|
92157
92341
|
var r, i, a;
|
|
92158
92342
|
let o = (r = n.tokenAbs) == null ? 2e3 : r, s = (i = n.tokenPct) == null ? 15 : i, c = (a = n.toolCountAbs) == null ? 3 : a, l = [], u = 0, d = 0, f = 0, p = /* @__PURE__ */ new Set([...Object.keys(e == null ? {} : e), ...Object.keys(t == null ? {} : t)]);
|
|
92159
92343
|
for (let n of p) {
|
|
92160
92344
|
var m, h;
|
|
92161
92345
|
let r = Number((m = e == null ? void 0 : e[n]) == null ? 0 : m), i = Number((h = t == null ? void 0 : t[n]) == null ? 0 : h), a = r - i, p = i > 0 ? Math.round(a / i * 100) : 0, g = "";
|
|
92162
|
-
|
|
92346
|
+
vXe.has(n) || (n === "toolCount" ? Math.abs(a) > c : Math.abs(a) > o && Math.abs(p) >= s) && (g = a > 0 ? "up" : "down", g === "up" ? (u++, d++) : f++), l.push({
|
|
92163
92347
|
key: n,
|
|
92164
92348
|
prev: i,
|
|
92165
92349
|
cur: r,
|
|
@@ -92174,7 +92358,7 @@ function dXe(e, t, n = {}) {
|
|
|
92174
92358
|
fields: l
|
|
92175
92359
|
};
|
|
92176
92360
|
}
|
|
92177
|
-
function
|
|
92361
|
+
function bXe(e) {
|
|
92178
92362
|
let { sdk: t } = e, n = () => {
|
|
92179
92363
|
var e, n, r, i, a;
|
|
92180
92364
|
let o = (e = t.debugLogs.value) == null ? [] : e, s = o.length ? o[o.length - 1].timestamp : 0;
|
|
@@ -92188,7 +92372,7 @@ function fXe(e) {
|
|
|
92188
92372
|
};
|
|
92189
92373
|
return {
|
|
92190
92374
|
async waitForIdle(e = {}) {
|
|
92191
|
-
let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a } = e, o =
|
|
92375
|
+
let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a } = e, o = _Xe(N(e, gXe)), s = Date.now();
|
|
92192
92376
|
for (;;) {
|
|
92193
92377
|
let e = n(), h = o.push(e);
|
|
92194
92378
|
if (a == null || a(e), h === "done") return e;
|
|
@@ -92221,20 +92405,20 @@ function fXe(e) {
|
|
|
92221
92405
|
}
|
|
92222
92406
|
//#endregion
|
|
92223
92407
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
92224
|
-
var
|
|
92408
|
+
var xXe = { class: "code-preview-modal" }, SXe = { class: "preview-header" }, CXe = { class: "preview-title" }, wXe = { class: "preview-tabs" }, TXe = ["disabled"], EXe = { class: "preview-actions" }, DXe = ["title"], OXe = {
|
|
92225
92409
|
key: 0,
|
|
92226
92410
|
viewBox: "0 0 16 16",
|
|
92227
92411
|
fill: "none",
|
|
92228
92412
|
"aria-hidden": "true"
|
|
92229
|
-
},
|
|
92413
|
+
}, kXe = {
|
|
92230
92414
|
key: 1,
|
|
92231
92415
|
viewBox: "0 0 16 16",
|
|
92232
92416
|
fill: "none",
|
|
92233
92417
|
"aria-hidden": "true"
|
|
92234
|
-
},
|
|
92418
|
+
}, AXe = ["title"], jXe = ["title"], MXe = { class: "preview-body" }, NXe = ["srcdoc"], PXe = {
|
|
92235
92419
|
key: 1,
|
|
92236
92420
|
class: "preview-source"
|
|
92237
|
-
},
|
|
92421
|
+
}, FXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
|
|
92238
92422
|
__name: "CodePreview",
|
|
92239
92423
|
props: {
|
|
92240
92424
|
code: {},
|
|
@@ -92301,28 +92485,28 @@ app.mount('#app');
|
|
|
92301
92485
|
return (t, n) => (X(), Z("div", {
|
|
92302
92486
|
class: "code-preview-overlay",
|
|
92303
92487
|
onClick: n[3] || (n[3] = mZ((e) => r("close"), ["self"]))
|
|
92304
|
-
}, [Q("div",
|
|
92305
|
-
Q("span",
|
|
92306
|
-
Q("div",
|
|
92488
|
+
}, [Q("div", xXe, [Q("div", SXe, [
|
|
92489
|
+
Q("span", CXe, J(e.messages.codePreviewTitlePrefix) + J(e.lang), 1),
|
|
92490
|
+
Q("div", wXe, [Q("button", {
|
|
92307
92491
|
class: TK({ active: a.value === "preview" }),
|
|
92308
92492
|
disabled: !s.value,
|
|
92309
92493
|
onClick: n[0] || (n[0] = (e) => a.value = "preview")
|
|
92310
|
-
}, J(e.messages.codePreviewTab), 11,
|
|
92494
|
+
}, J(e.messages.codePreviewTab), 11, TXe), Q("button", {
|
|
92311
92495
|
class: TK({ active: a.value === "source" }),
|
|
92312
92496
|
onClick: n[1] || (n[1] = (e) => a.value = "source")
|
|
92313
92497
|
}, J(e.messages.codeSourceTab), 3)]),
|
|
92314
|
-
Q("div",
|
|
92498
|
+
Q("div", EXe, [
|
|
92315
92499
|
Q("button", {
|
|
92316
92500
|
class: TK(["icon-btn", { done: o.value }]),
|
|
92317
92501
|
title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
|
|
92318
92502
|
onClick: u
|
|
92319
|
-
}, [o.value ? (X(), Z("svg",
|
|
92503
|
+
}, [o.value ? (X(), Z("svg", OXe, [...n[4] || (n[4] = [Q("path", {
|
|
92320
92504
|
d: "M3 8.5l3 3 7-7",
|
|
92321
92505
|
stroke: "currentColor",
|
|
92322
92506
|
"stroke-width": "1.6",
|
|
92323
92507
|
"stroke-linecap": "round",
|
|
92324
92508
|
"stroke-linejoin": "round"
|
|
92325
|
-
}, null, -1)])])) : (X(), Z("svg",
|
|
92509
|
+
}, null, -1)])])) : (X(), Z("svg", kXe, [...n[5] || (n[5] = [Q("rect", {
|
|
92326
92510
|
x: "5.5",
|
|
92327
92511
|
y: "5.5",
|
|
92328
92512
|
width: "8",
|
|
@@ -92334,7 +92518,7 @@ app.mount('#app');
|
|
|
92334
92518
|
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",
|
|
92335
92519
|
stroke: "currentColor",
|
|
92336
92520
|
"stroke-width": "1.3"
|
|
92337
|
-
}, null, -1)])]))], 10,
|
|
92521
|
+
}, null, -1)])]))], 10, DXe),
|
|
92338
92522
|
Q("button", {
|
|
92339
92523
|
class: "icon-btn",
|
|
92340
92524
|
title: e.messages.codeOpenTitle,
|
|
@@ -92354,7 +92538,7 @@ app.mount('#app');
|
|
|
92354
92538
|
"stroke-width": "1.3",
|
|
92355
92539
|
"stroke-linecap": "round",
|
|
92356
92540
|
"stroke-linejoin": "round"
|
|
92357
|
-
})], -1)])], 8,
|
|
92541
|
+
})], -1)])], 8, AXe),
|
|
92358
92542
|
Q("button", {
|
|
92359
92543
|
class: "icon-btn",
|
|
92360
92544
|
title: e.messages.close,
|
|
@@ -92368,23 +92552,23 @@ app.mount('#app');
|
|
|
92368
92552
|
stroke: "currentColor",
|
|
92369
92553
|
"stroke-width": "1.4",
|
|
92370
92554
|
"stroke-linecap": "round"
|
|
92371
|
-
})], -1)])], 8,
|
|
92555
|
+
})], -1)])], 8, jXe)
|
|
92372
92556
|
])
|
|
92373
|
-
]), Q("div",
|
|
92557
|
+
]), Q("div", MXe, [a.value === "preview" && s.value ? (X(), Z("iframe", {
|
|
92374
92558
|
key: 0,
|
|
92375
92559
|
ref_key: "iframeRef",
|
|
92376
92560
|
ref: i,
|
|
92377
92561
|
class: "preview-iframe",
|
|
92378
92562
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
92379
92563
|
srcdoc: c.value
|
|
92380
|
-
}, null, 8,
|
|
92564
|
+
}, null, 8, NXe)) : (X(), Z("pre", PXe, [Q("code", null, J(e.code), 1)]))])])]));
|
|
92381
92565
|
}
|
|
92382
92566
|
}), [["__scopeId", "data-v-27eac25e"]]);
|
|
92383
92567
|
//#endregion
|
|
92384
92568
|
//#region src/core/index.ts
|
|
92385
92569
|
Uf();
|
|
92386
|
-
function
|
|
92387
|
-
return aIe(e,
|
|
92570
|
+
function IXe(e) {
|
|
92571
|
+
return aIe(e, lXe);
|
|
92388
92572
|
}
|
|
92389
92573
|
//#endregion
|
|
92390
|
-
export {
|
|
92574
|
+
export { DWe as ApprovalBar, u8 as CAPABILITIES, iNe as CONTEXT_PRESETS, cXe as ChatDialog, aBe as ChatHeader, bGe as ChatInput, FXe as CodePreview, SMe as CompressDecisionSchema, WWe as ConflictBar, pFe as DEFAULT_COMPUTED_STYLES, L7 as DEFAULT_DIALOG_ICONS, i1 as DEFAULT_PROMPT_SOFT_CAP, zAe as DEFAULT_SYSTEM_PROMPT, BAe as DEFAULT_SYSTEM_PROMPT_EN, kYe as DebugDrawer, gBe as FocusBar, KHe as HLJS_BLOCK_MAX_CHARS, Dje as HTML_VOID_TAGS, x1 as HUMAN_CONFIRM_TOOL_NAME, g9 as IconGlyph, SZ as ImageInputError, rF as LOW_CAPS_HINT_BASELINE, xRe as MESSAGES_EN_US, R7 as MESSAGES_ZH_CN, eF as MIN_CONTEXT_WINDOW, WZ as MODEL_UNAVAILABLE_GUIDANCE, rUe as MessageContent, KUe as MessageList, IUe as MessageRow, nWe as QueuedBar, WTe as SOFT_CAP_MIN_WINDOW, Z$ as STOP_WORDS, rXe as SkillPanel, h$ as UNSAFE_KEYS, MFe as actionsToInspectInfo, jFe as actionsToTools, $Se as agentError, F1 as analyzeContext, k$ as applyPatchToClone, TTe as applyPatchToLive, k6 as applyPatchesToBind, YPe as applyProposalOps, XQ as arrayMinLength, xZ as asAgentError, iMe as buildCollectorJs, P8 as buildCssPath, h6 as buildDataPrompt, q6 as buildDiagnosticsReport, X6 as buildHtmlFragmentSkill, aMe as buildSandboxSrcdoc, qAe as buildSystemPrompt, AZ as captureSelectionQuote, z7 as chatContextKey, O6 as commitSetToBind, uMe as composeStructureThenRender, TZ as compressImage, LAe as connectMcp, RG as constructLlmFromConfig, IG as constructOpenLlmSync, I7 as copyText, O8 as countOccurrences, HQ as createAgent, b1 as createApprovalMiddleware, wRe as createChatContext, IXe as createChatSdk, O1 as createCheckpointManager, k1 as createCheckpointMiddleware, PMe as createConflictManager, I1 as createContextInspectorMiddleware, gMe as createCraftNoteCheck, P6 as createDataOps, bXe as createEvalHarness, mMe as createHtmlFormatCheck, lMe as createHtmlRenderCheck, vMe as createHtmlSubagent, C1 as createHumanConfirmMiddleware, S1 as createHumanConfirmTool, _Xe as createIdleDetector, o8 as createMemoryBackend, y1 as createMemoryMiddleware, zge as createProxyLlm, hXe as createRagSubagent, KZ as createSandboxRunner, rNe as createSdkEvents, ZFe as createSerialRunner, l8 as createSessionStore, ZMe as createSessionStoreWithBackend, JFe as createSkillStore, h1 as createSubagentMiddleware, c1 as createSubagentTracker, g1 as createSubagentsMiddleware, VFe as createUsageHintsMiddleware, A1 as createVerifyMiddleware, QAe as createVfs, s8 as createWebStorageBackend, j1 as createWriteBackCheck, GZ as decorateModelUnavailable, x$ as deepClone, FFe as defineDataToolset, kTe as defineSkill, yMe as defineTool, b$ as deleteByPath, CMe as deriveTitle, a$ as describeSchemaNode, NQ as detectGarbledToolCall, yQ as detectTransitionalReply, F$ as diffObjects, yXe as diffReport, I8 as domInfoTool, CFe as domInspectSkill, F8 as domSearchTool, iFe as domToStructure, j8 as domTools, PFe as domToolsStatic, ZQ as elementSchemaCandidates, N8 as ensureDomListenerRecorder, $$ as estimateMessageTokens, UTe as estimateRoundTokens, oF as estimateTokens, BG as extractReasoningDelta, m$ as extractSchemaHint, NAe as extractText, zG as extractTextDelta, VG as extractUsage, A8 as fetchDocTools, NFe as fetchTools, P$ as findStrippedKeys, o$ as formatConstraints, vZ as formatZodIssues, v$ as getByPath, aFe as getDomTool, vFe as getElementInfo, TFe as getEnvSummary, hFe as getRecordedListeners, sMe as getSandboxLifecycle, KQ as getSchemaAtPath, UQ as getSchemaTopKeys, k8 as hashContent, D$ as hashValue, pMe as htmlFragmentSkill, d$ as htmlOrchestratorPrompt, n1 as indexSummarize, OFe as inspectEnvTool, kFe as inspectTools, Q6 as isChatModel, HZ as isContextLengthError, m9 as isIconHtml, UZ as isModelUnavailableError, WQ as isPathAllowed, r8 as isQuotaError, g$ as isUnsafePath, ZZ as jpEval, bZ as jsonParseError, w$ as limitDepth, qPe as lineDiff, iF as lowCapsHint, QHe as markedToHtml, Zje as maskUrlCredentials, S$ as maybeParseValue, qje as measureWriteScale, j$ as moveByPath, FG as normalizeBaseUrl, rMe as normalizeRenderResult, HG as normalizeUsage, cF as offloadPassThroughChars, sF as offloadThresholdChars, mTe as presets, lTe as projectBySchema, n$ as projectBySchemaDeep, C$ as projectFields, r1 as recallRounds, cMe as renderInSandbox, X9 as renderMarkdownHtml, s$ as renderSchemaHint, c$ as renderSchemaOverview, u$ as renderSchemaShallow, d8 as resolveCapabilities, f8 as resolveContextOptions, eNe as resolveDialogConfig, bRe as resolveDialogIcons, CRe as resolveDialogMessages, NMe as resolveLlm, aF as resolveModelCaps, a1 as resolvePromptSoftCap, qQ as resolveSchemaPath, $Me as resolveStorage, N$ as restoreInPlace, M$ as restoreLive, QSe as routeError, eQ as runSandboxedScript, _$ as safeMerge, L8 as safeSerialize, T$ as safeStringify, PQ as sanitizeGarbledContent, wze as sanitizeIconHtml, Dze as sanitizeMessageHtml, YQ as schemaHasRefinement, gFe as searchDom, QZ as searchJson, IFe as selectBuiltinTools, y$ as setByPath, o1 as shouldTriggerCompression, J6 as stringifyDiagnosticsReport, PG as stripStainlessFetch, f$ as systemPromptHelpers, nF as tableMaxOutputTokens, Q$ as tokenize, _Z as toolError, GQ as unwrapSchema, yRe as useChat, B7 as useChatContext, JQ as validateAtPath, F6 as validateHtmlFormat, D6 as validateRootValueLocally, bje as validateWriteLocally, O$ as watchFieldsHash, nre as z, yZ as zodError };
|