page-agent-sdk 4.24.5 → 4.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 N = t;
56633
+ let oe = t;
56634
56634
  for (let e of p) if (e.compressInput) {
56635
- let t = await e.compressInput(N);
56636
- N = Array.isArray(t) ? t : t.messages, t && !Array.isArray(t) && t.stats && (he = j(j({}, he), {}, { lastCompression: t.stats }));
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 P = ye(N);
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 re = MQ(p, (e) => xe(e, n, r)), oe = Zwe(p, Se), se = {
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 = se;
56670
- let ce = {
56669
+ he.loopProgress = me;
56670
+ let _e = {
56671
56671
  counts: {},
56672
56672
  writePaths: [],
56673
56673
  failures: 0
56674
- }, fe = Vwe(), me = new Map(((i = he.todos) == null ? [] : i).map((e) => [e.id, {
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
- }])), _e = /* @__PURE__ */ new Map(), Ee = 0, De = (e) => {
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
- }, Oe = 0, L = 0, ke = iTe(k, h), Ae = null, je = 0, Me = !1, Ne = !1;
56681
- for (; (Oe < k || Ne) && L < ke && (L++, !(r != null && r.aborted));) {
56682
- if (C > 0 && se.invokeUsage.total_tokens > C) {
56683
- let e = `本轮 token 预算(约 ${C})已用尽:任务在 ${Oe} 轮工具调用后中断,已完成的部分均保留。可继续对话,指定下一步(如「继续完成」/「只改 X」/「提高预算重试」)。`;
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: se.invokeUsage.total_tokens,
56686
+ used: me.invokeUsage.total_tokens,
56687
56687
  budget: C,
56688
- rounds: Oe
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: se.invokeUsage.total_tokens,
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: L
56705
+ round: je
56706
56706
  }), he = Jwe(p, {
56707
- messages: P,
56707
+ messages: se,
56708
56708
  state: he
56709
- }), P = be(P, aTe(Oe, k, e.hasSubagent)), P = we(P, Math.round(A.contextWindow * .6)), le("llm_request", {
56710
- round: Oe + 1,
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(P)
56713
+ messages: Te(se)
56714
56714
  });
56715
- let t = await re({
56716
- messages: P,
56715
+ let t = await ce({
56716
+ messages: se,
56717
56717
  state: he
56718
56718
  });
56719
- P.push(t.message);
56719
+ se.push(t.message);
56720
56720
  let i = HG(t.message);
56721
56721
  if (le("llm_response", j({
56722
- round: Oe + 1,
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
- se.invokeUsage.prompt_tokens += (o = i.prompt_tokens) == null ? 0 : o, se.invokeUsage.completion_tokens += (s = i.completion_tokens) == null ? 0 : s, se.invokeUsage.total_tokens += (c = i.total_tokens) == null ? 0 : c;
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) && !Me) {
56738
- var _;
56739
- Me = !0, Ne = !0, le("error", {
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: (_ = de == null ? void 0 : de.maxTokens) == null ? null : _,
56743
+ maxTokens: (v = de == null ? void 0 : de.maxTokens) == null ? null : v,
56744
56744
  hint: "空输出且 completion 达上限,疑似 max_tokens 截断;回灌分步写入指引"
56745
- }), P.push(new Hy("⚠️ 你上一轮输出为空(疑似被 max_tokens 截断:单次输出过长,常见于把完整大段代码塞进一次工具调用参数)。必须改用分块输出,不要一次性输出完整大段内容:① 先写小体积骨架 —— 大 code 场景先 write 组件、code 字段只含开头一小段(≤800 字符);② 用增量追加逐块补全 —— write({ patch:{ op:\"append\", jsonPath:\"<该组件 code 的路径>\", value:\"<后续代码块,每段 ≤1500 字符>\" } })(append 对字符串是尾接,可连续多次直至完整);③ 已写入部分勿在后续调用重传全文。其他大内容同理:先骨架后增量。"));
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 && je < 2) {
56765
- je += 1, Ne = !0, le("middleware", {
56774
+ if (r && Pe < 2) {
56775
+ Pe += 1, Le = !0, le("middleware", {
56766
56776
  stage: "format_retry",
56767
- attempt: je,
56777
+ attempt: Pe,
56768
56778
  content: t.content.slice(0, 200)
56769
- }), P.push(new Hy("⚠️ 你刚才把工具调用写成了文本(伪 XML/标签/DSML 标记,如 <|tool_calls|>、<||DSML||>、<invoke name=...>),未被系统识别为工具调用,因此未执行,页面无变化。请直接用标准 function calling(工具调用)格式重新发起工具调用,不要在回复正文里输出这些标签或 JSON 文本。"));
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: je,
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: fe,
56794
+ state: Ee,
56785
56795
  garbled: r,
56786
- rounds: Oe,
56796
+ rounds: Ae,
56787
56797
  finalContent: t.content,
56788
56798
  todos: he.todos,
56789
56799
  isSubagent: !!he.__pgIsSubagent,
56790
- turnUsage: ce,
56791
- isWriteToolByName: De,
56792
- messages: P,
56800
+ turnUsage: _e,
56801
+ isWriteToolByName: ke,
56802
+ messages: se,
56793
56803
  sessionWritePaths: F,
56794
- todosStatusAtStart: me,
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 v;
56801
- Ne = !0;
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
- }, (v = i.gate.logData) == null ? {} : v), {}, { content: t.content.slice(0, 160) })), P.push(new Hy(i.gate.feedback));
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: P,
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
- Ae = t.content, he.verifyAttempts += 1, P.push(new Hy(`⚠️ 验证未通过,请修正:${e}`)), le("middleware", {
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
- Ne = !1;
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
- Ne = !1;
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: Oe + 1,
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 oe(e.ctx);
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: Oe + 1,
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 y;
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((y = d[e].call.args) == null ? {} : y))}`, i = t.status === "error" || typeof t.content == "string" && t.content.startsWith("ERROR:"), a = t.content;
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 b;
56922
- let e = ((b = _e.get(r)) == null ? 0 : b) + 1;
56923
- _e.set(r, e), e >= 2 && (a = `${t.content}\n(提示:同参数已连续失败 ${e} 次,原样重试大概率仍失败;请检查参数/换路径/换方法,或向用户如实说明困难)`);
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 _e.delete(r);
56935
+ } else Oe.delete(r);
56926
56936
  if (d[e].call.name === "read" && !i) {
56927
- var w, T, E;
56928
- let t = (w = d[e].call.args) == null ? {} : w;
56929
- t.jsonPath && !((T = t.jsonPaths) != null && T.length) ? (Ee++, Ee >= 2 && (a = `${a}\n(提示:还需读多个路径时,用 read({jsonPaths:["路径1","路径2",…]}) 一次取回省轮次;多路径单项标错不整批失败)`)) : (E = t.jsonPaths) != null && E.length && (Ee = 0);
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
- P.push(new sy({
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 O;
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" ? se.writeFailures[n] = ((O = se.writeFailures[n]) == null ? 0 : O) + 1 : delete se.writeFailures[n];
56951
+ t.status === "error" ? me.writeFailures[n] = ((te = me.writeFailures[n]) == null ? 0 : te) + 1 : delete me.writeFailures[n];
56942
56952
  }
56943
- let N = [];
56953
+ let oe = [];
56944
56954
  for (let e = 0; e < d.length; e++) {
56945
- var M;
56955
+ var N;
56946
56956
  let t = h[e];
56947
56957
  if (!t) continue;
56948
56958
  let n = d[e].call.name;
56949
- if (ce.counts[n] = ((M = ce.counts[n]) == null ? 0 : M) + 1, t.status === "error" && (ce.failures += 1), dQ.test(n) && String(t.content || "").startsWith("ERROR:")) {
56950
- var ee, te;
56951
- ce.rejectedDelegations = (ee = ce.rejectedDelegations) == null ? {} : ee, ce.rejectedDelegations[n] = ((te = ce.rejectedDelegations[n]) == null ? 0 : te) + 1;
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
- ce.writePaths.push(t || "(整体)"), N.push({
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 && N.length) {
56969
- let e = iwe(P, N, {
56970
- round: Oe + 1,
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 && (P = e.messages, ne += e.invalidatedCount, le("middleware", {
56983
+ e.invalidatedCount > 0 && (se = e.messages, ne += e.invalidatedCount, le("middleware", {
56974
56984
  stage: "stale_read_invalidated",
56975
- round: Oe + 1,
56976
- writtenPaths: N.map((e) => VQ(e.args) || "(整体)"),
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
- Oe++, se.rounds = Oe;
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 Pe = `\n\n(提示:工具调用次数已达上限(${k} 轮 / ${ke} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
56997
+ let Re = `\n\n(提示:工具调用次数已达上限(${k} 轮 / ${Me} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
56988
56998
  le("error", {
56989
56999
  stage: "react_call_limit_exceeded",
56990
- rounds: Oe,
57000
+ rounds: Ae,
56991
57001
  maxToolRounds: k,
56992
- iterations: L,
56993
- maxIterations: ke
57002
+ iterations: je,
57003
+ maxIterations: Me
56994
57004
  }), n({
56995
57005
  type: "error",
56996
- message: `ReAct 循环达到调用上限(rounds=${Oe}/${k},iterations=${L}/${ke}),已强制收口,可回复「继续」。`,
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: Oe,
57010
+ rounds: Ae,
57001
57011
  maxToolRounds: k,
57002
- iterations: L,
57003
- maxIterations: ke
57012
+ iterations: je,
57013
+ maxIterations: Me
57004
57014
  }
57005
57015
  });
57006
- let Fe = kQ((a = he.todos) == null ? [] : a, me, F);
57007
- if (Fe.length) {
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 = Fe.map((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: `轮次耗尽收口:${Fe.length} 项已完成任务的 evidence 路径与写入记录不符,最终回复中的完成声明可能不实`,
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 (Ae != null) {
57025
- let e = Ae + Pe;
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 Ie = P[P.length - 1];
57032
- if (Ie && Ce(Ie) === "tool") {
57033
- let e = P[0] && Ce(P[0]) === "system" ? P.slice(1) : P.slice(), t = [new qy(ve() + "\n\n工具调用次数已达上限,请基于已有工具结果直接给出最终回答,不要再调用工具。"), ...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 + Pe
57069
- }), e + Pe;
57078
+ content: e + Re
57079
+ }), e + Re;
57070
57080
  }
57071
57081
  }
57072
- let Le = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
57082
+ let Ve = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
57073
57083
  return n({
57074
57084
  type: "done",
57075
- content: Le + Pe
57076
- }), Le + Pe;
57085
+ content: Ve + Re
57086
+ }), Ve + Re;
57077
57087
  } finally {
57078
57088
  try {
57079
57089
  await Ywe(p, he);
@@ -78651,50 +78661,51 @@ function yRe(e = {}) {
78651
78661
  messages: (t = e.messages) == null ? [] : t,
78652
78662
  loading: !1,
78653
78663
  error: null
78654
- }), l = /* @__PURE__ */ Iq(null), u = /* @__PURE__ */ Iq(!0), d = null, f = /* @__PURE__ */ Iq([]), p = /* @__PURE__ */ Iq(null);
78655
- function m() {}
78656
- function h(e) {
78664
+ }), l = /* @__PURE__ */ Iq(null), u = /* @__PURE__ */ Iq(!0), d = null, f = 0, p = /* @__PURE__ */ Iq([]), m = /* @__PURE__ */ Iq(null);
78665
+ function h() {}
78666
+ function g(e) {
78657
78667
  let t = l.value;
78658
78668
  e.deltaY < 0 ? u.value = !1 : t && (u.value = t.scrollHeight - t.scrollTop - t.clientHeight < 64);
78659
78669
  }
78660
- function g() {
78670
+ function _() {
78661
78671
  l.value && requestAnimationFrame(() => {
78662
78672
  let e = l.value;
78663
78673
  !e || !u.value || (e.scrollTop = e.scrollHeight);
78664
78674
  });
78665
78675
  }
78666
- function _(e, t, n, r, i) {
78676
+ function v(e, t, n, r, i) {
78667
78677
  c.messages.push(j(j(j({
78668
78678
  role: e,
78669
78679
  content: t,
78670
78680
  timestamp: Date.now()
78671
- }, n && n.length ? { focuses: n } : {}), r != null && r.length ? { images: r } : {}), i ? { quote: i } : {})), u.value = !0, g();
78681
+ }, n && n.length ? { focuses: n } : {}), r != null && r.length ? { images: r } : {}), i ? { quote: i } : {})), u.value = !0, _();
78672
78682
  }
78673
- async function v(e) {
78683
+ async function y(e) {
78684
+ let t = ++f;
78674
78685
  if (u.value = !0, r) {
78675
- let t = /* @__PURE__ */ Tq({
78686
+ let n = /* @__PURE__ */ Tq({
78676
78687
  role: "assistant",
78677
78688
  content: "",
78678
78689
  timestamp: Date.now(),
78679
78690
  reasoning: "",
78680
78691
  reasoningTotal: 0,
78681
78692
  steps: []
78682
- }), n = !1;
78683
- c.messages.push(t);
78693
+ }), i = !1;
78694
+ c.messages.push(n);
78684
78695
  try {
78685
78696
  await r(c.messages.slice(0, -1), (e) => {
78686
78697
  switch (e.type) {
78687
78698
  case "round_start":
78688
- e.round > 1 && (t.content || t.reasoning) && (n = !0);
78699
+ e.round > 1 && (n.content || n.reasoning) && (i = !0);
78689
78700
  break;
78690
78701
  case "reasoning":
78691
- n && (t.reasoning += "\n", n = !1), t.reasoningTotal += e.delta.length, t.reasoning = (t.reasoning + e.delta).slice(-4e3);
78702
+ i && (n.reasoning += "\n", i = !1), n.reasoningTotal += e.delta.length, n.reasoning = (n.reasoning + e.delta).slice(-4e3);
78692
78703
  break;
78693
78704
  case "text":
78694
- n && (t.content += "\n", n = !1), t.content += e.delta;
78705
+ i && (n.content += "\n", i = !1), n.content += e.delta;
78695
78706
  break;
78696
78707
  case "tool_call":
78697
- t.steps.push({
78708
+ n.steps.push({
78698
78709
  name: e.name,
78699
78710
  args: e.args,
78700
78711
  status: "running",
@@ -78702,15 +78713,15 @@ function yRe(e = {}) {
78702
78713
  });
78703
78714
  break;
78704
78715
  case "tool_result": {
78705
- let n = -1;
78706
- if (e.id !== void 0 && (n = t.steps.findIndex((t) => t.id === e.id)), n < 0) {
78707
- for (let r = t.steps.length - 1; r >= 0; r--) if (t.steps[r].name === e.name && t.steps[r].status === "running") {
78708
- n = r;
78716
+ let t = -1;
78717
+ if (e.id !== void 0 && (t = n.steps.findIndex((t) => t.id === e.id)), t < 0) {
78718
+ for (let r = n.steps.length - 1; r >= 0; r--) if (n.steps[r].name === e.name && n.steps[r].status === "running") {
78719
+ t = r;
78709
78720
  break;
78710
78721
  }
78711
78722
  }
78712
- if (n >= 0) {
78713
- let r = t.steps[n];
78723
+ if (t >= 0) {
78724
+ let r = n.steps[t];
78714
78725
  r.result = e.result, r.status = e.status, r.durationMs = e.durationMs, e.image && (r.image = e.image);
78715
78726
  let i = r.subReason;
78716
78727
  i && i.length > 80 && (r.subReason = i.slice(0, 80) + "…");
@@ -78718,58 +78729,58 @@ function yRe(e = {}) {
78718
78729
  break;
78719
78730
  }
78720
78731
  case "subagent": {
78721
- let n = e.toolCallId === void 0 ? t.steps[t.steps.length - 1] : t.steps.find((t) => t.id === e.toolCallId);
78722
- if (!n) break;
78732
+ let t = e.toolCallId === void 0 ? n.steps[n.steps.length - 1] : n.steps.find((t) => t.id === e.toolCallId);
78733
+ if (!t) break;
78723
78734
  if (e.kind === "reasoning") {
78724
- let t = e.delta || "";
78725
- n.subReasonFull = (n.subReasonFull || "") + t;
78726
- let r = (n.subReason || "") + t;
78727
- n.subReason = r.length > vRe ? r.slice(-4e3) : r;
78735
+ let n = e.delta || "";
78736
+ t.subReasonFull = (t.subReasonFull || "") + n;
78737
+ let r = (t.subReason || "") + n;
78738
+ t.subReason = r.length > vRe ? r.slice(-4e3) : r;
78728
78739
  break;
78729
78740
  }
78730
- n.children || (n.children = []);
78741
+ t.children || (t.children = []);
78731
78742
  let r = e.label ? `[${e.label}] ${e.name}` : e.name;
78732
- if (e.kind === "tool_call") n.children.push({
78743
+ if (e.kind === "tool_call") t.children.push({
78733
78744
  name: r,
78734
78745
  args: e.args,
78735
78746
  status: "running"
78736
78747
  });
78737
- else for (let t = n.children.length - 1; t >= 0; t--) if (n.children[t].status === "running" && n.children[t].name === r) {
78738
- n.children[t].result = e.result, n.children[t].status = e.status || "done";
78748
+ else for (let n = t.children.length - 1; n >= 0; n--) if (t.children[n].status === "running" && t.children[n].name === r) {
78749
+ t.children[n].result = e.result, t.children[n].status = e.status || "done";
78739
78750
  break;
78740
78751
  }
78741
78752
  break;
78742
78753
  }
78743
78754
  case "approval_request":
78744
- var r;
78745
- (r = e.hold) == null || r.call(e), p.value = j({
78755
+ var t;
78756
+ (t = e.hold) == null || t.call(e), m.value = j({
78746
78757
  toolName: e.toolName,
78747
78758
  args: e.args,
78748
78759
  resolve: e.resolve
78749
78760
  }, e.preview ? { preview: e.preview } : {});
78750
78761
  break;
78751
78762
  }
78752
- g();
78763
+ _();
78753
78764
  }, e);
78754
- } catch (n) {
78755
- if (FZ(n, e) || (c.error = n.message || "请求失败,请重试"), !t.content && !t.reasoning) {
78756
- let e = c.messages.indexOf(t);
78765
+ } catch (t) {
78766
+ if (FZ(t, e) || (c.error = t.message || "请求失败,请重试"), !n.content && !n.reasoning) {
78767
+ let e = c.messages.indexOf(n);
78757
78768
  e >= 0 && c.messages.splice(e, 1);
78758
78769
  }
78759
78770
  } finally {
78760
- await b(), p.value = null;
78771
+ await x(t), t === f && (m.value = null);
78761
78772
  }
78762
78773
  return;
78763
78774
  }
78764
78775
  try {
78765
- _("assistant", await (n || w)(c.messages, e));
78776
+ v("assistant", await (n || E)(c.messages, e));
78766
78777
  } catch (t) {
78767
78778
  FZ(t, e) || (c.error = t.message || "请求失败,请重试");
78768
78779
  } finally {
78769
- await b();
78780
+ await x(t);
78770
78781
  }
78771
78782
  }
78772
- function y(e) {
78783
+ function b(e) {
78773
78784
  let t = (e) => {
78774
78785
  if (e != null && e.length) for (let r of e) {
78775
78786
  var n;
@@ -78781,31 +78792,33 @@ function yRe(e = {}) {
78781
78792
  break;
78782
78793
  }
78783
78794
  }
78784
- async function b() {
78785
- y(c.messages);
78795
+ async function x(t) {
78796
+ if (t !== f) return;
78797
+ b(c.messages);
78786
78798
  try {
78787
78799
  await (i == null ? void 0 : i(c.messages));
78788
78800
  } catch (e) {}
78801
+ if (t !== f) return;
78789
78802
  c.loading = !1, d = null;
78790
- let t = f.value.shift();
78791
- if (t !== void 0) {
78792
- var n;
78793
- _("user", t, (n = e.getFocuses) == null ? void 0 : n.call(e)), c.loading = !0, c.error = null, d = new AbortController(), await v(d.signal);
78803
+ let n = p.value.shift();
78804
+ if (n !== void 0) {
78805
+ var r;
78806
+ 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
78807
  }
78795
78808
  }
78796
- function x(e) {
78797
- f.value.splice(e, 1);
78809
+ function S(e) {
78810
+ p.value.splice(e, 1);
78798
78811
  }
78799
- async function S(e, t, n, r) {
78812
+ async function C(e, t, n, r) {
78800
78813
  if (!(!e.trim() && !(n != null && n.length))) {
78801
78814
  if (c.loading) {
78802
- f.value.push(e.trim());
78815
+ p.value.push(e.trim());
78803
78816
  return;
78804
78817
  }
78805
- _("user", e.trim() || "[image]", t, n, r), c.loading = !0, c.error = null, d = new AbortController(), await v(d.signal);
78818
+ v("user", e.trim() || "[image]", t, n, r), c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal);
78806
78819
  }
78807
78820
  }
78808
- async function C() {
78821
+ async function w() {
78809
78822
  if (c.loading) return;
78810
78823
  s == null || s();
78811
78824
  let e = c.messages;
@@ -78813,27 +78826,41 @@ function yRe(e = {}) {
78813
78826
  e.splice(t);
78814
78827
  break;
78815
78828
  }
78816
- e.some((e) => e.role === "user") && (c.loading = !0, c.error = null, d = new AbortController(), await v(d.signal));
78829
+ e.some((e) => e.role === "user") && (c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal));
78817
78830
  }
78818
- async function w(e) {
78831
+ async function T(e, t) {
78832
+ var n;
78833
+ let r = c.messages[e];
78834
+ if (!r || r.role !== "user") return;
78835
+ let a = !!((n = r.images) != null && n.length), o = t.trim();
78836
+ if (!o && !a) return;
78837
+ c.loading && O();
78838
+ let { focuses: l, images: u, quote: f } = r;
78839
+ s == null || s(), c.messages.splice(e), v("user", o || "[image]", l, u, f);
78840
+ try {
78841
+ await (i == null ? void 0 : i(c.messages));
78842
+ } catch (e) {}
78843
+ c.loading = !0, c.error = null, d = new AbortController(), await y(d.signal);
78844
+ }
78845
+ async function E(e) {
78819
78846
  await new Promise((e) => setTimeout(e, 800 + Math.random() * 1200));
78820
78847
  let t = e.filter((e) => e.role === "user").pop();
78821
78848
  return `收到你的消息:"${t == null ? void 0 : t.content}"。这是一个模拟回复,请接入实际的 AI API。`;
78822
78849
  }
78823
- function T() {
78850
+ function D() {
78824
78851
  a == null || a(), c.messages.splice(0, c.messages.length), c.error = null;
78825
78852
  }
78826
- function E() {
78827
- f.value.length && (o == null || o([...f.value])), f.value = [], d == null || d.abort();
78853
+ function O() {
78854
+ p.value.length && (o == null || o([...p.value])), p.value = [], d == null || d.abort();
78828
78855
  }
78829
- function D() {
78830
- f.value = [], d == null || d.abort(), d = null, c.loading = !1, c.error = null, p.value = null;
78856
+ function k() {
78857
+ p.value = [], d == null || d.abort(), d = null, c.loading = !1, c.error = null, m.value = null;
78831
78858
  }
78832
- function O(e) {
78833
- let t = p.value;
78834
- t && (p.value = null, t.resolve(e));
78859
+ function A(e) {
78860
+ let t = m.value;
78861
+ t && (m.value = null, t.resolve(e));
78835
78862
  }
78836
- async function k() {
78863
+ async function M() {
78837
78864
  if (!c.error) return;
78838
78865
  let e = c.messages, t = -1;
78839
78866
  for (let n = e.length - 1; n >= 0; n--) if (e[n].role === "user") {
@@ -78842,23 +78869,24 @@ function yRe(e = {}) {
78842
78869
  }
78843
78870
  if (t < 0) return;
78844
78871
  let n = e[t].content;
78845
- e.splice(t), c.error = null, await S(n);
78872
+ e.splice(t), c.error = null, await C(n);
78846
78873
  }
78847
78874
  return {
78848
78875
  state: c,
78849
78876
  scrollContainer: l,
78850
- pendingApproval: p,
78851
- queuedTasks: f,
78852
- sendMessage: S,
78853
- removeQueuedTask: x,
78854
- clearMessages: T,
78855
- stop: E,
78856
- reset: D,
78857
- retry: k,
78858
- regenerate: C,
78859
- resolveApproval: O,
78860
- onScroll: m,
78861
- onWheel: h
78877
+ pendingApproval: m,
78878
+ queuedTasks: p,
78879
+ sendMessage: C,
78880
+ removeQueuedTask: S,
78881
+ clearMessages: D,
78882
+ stop: O,
78883
+ reset: k,
78884
+ retry: M,
78885
+ regenerate: w,
78886
+ editAndResend: T,
78887
+ resolveApproval: A,
78888
+ onScroll: h,
78889
+ onWheel: g
78862
78890
  };
78863
78891
  }
78864
78892
  //#endregion
@@ -78942,6 +78970,10 @@ var R7 = {
78942
78970
  copy: "复制",
78943
78971
  copied: "已复制",
78944
78972
  regenerate: "重新生成",
78973
+ edit: "编辑",
78974
+ editTitle: "编辑后重发:之后的回复将被移除并重新生成",
78975
+ editSave: "保存并重发",
78976
+ editCancel: "取消",
78945
78977
  expand: "展开",
78946
78978
  collapse: "收起",
78947
78979
  noResult: "(无返回值)",
@@ -79174,6 +79206,10 @@ var R7 = {
79174
79206
  copy: "Copy",
79175
79207
  copied: "Copied",
79176
79208
  regenerate: "Regenerate",
79209
+ edit: "Edit",
79210
+ editTitle: "Edit & resubmit: replies after it will be removed and regenerated",
79211
+ editSave: "Save & resubmit",
79212
+ editCancel: "Cancel",
79177
79213
  expand: "Expand",
79178
79214
  collapse: "Collapse",
79179
79215
  noResult: "(no result)",
@@ -79427,12 +79463,12 @@ function wRe(e = {}) {
79427
79463
  }), S = EX(() => (r.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), C = () => {
79428
79464
  var t;
79429
79465
  (t = e.onUndo) != null && t.call(e) && (r.error = null);
79430
- }, w = (e) => new Date(e).toLocaleTimeString(ue, {
79466
+ }, w = (e) => new Date(e).toLocaleTimeString(pe, {
79431
79467
  hour: "2-digit",
79432
79468
  minute: "2-digit"
79433
79469
  }), T = () => {
79434
79470
  let e = E.value, t = ee.value;
79435
- !s.value.trim() && !e.length || (i(s.value, ie.value, e.length ? [...e] : void 0, t == null ? void 0 : t), s.value = "", E.value = [], t && N());
79471
+ !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
79472
  }, E = /* @__PURE__ */ Iq([]), D = /* @__PURE__ */ Iq(""), O = /* @__PURE__ */ Iq(!1), k, A = (e) => {
79437
79473
  D.value = e, clearTimeout(k), k = setTimeout(() => {
79438
79474
  D.value = "";
@@ -79442,16 +79478,16 @@ function wRe(e = {}) {
79442
79478
  if (!t.length) return;
79443
79479
  let n = 4 - E.value.length;
79444
79480
  if (n <= 0) {
79445
- A(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`);
79481
+ A(`${me.imageCountLimitPrefix}4${me.imageCountLimitSuffix}`);
79446
79482
  return;
79447
79483
  }
79448
- t.length > n && A(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`), O.value = !0;
79484
+ t.length > n && A(`${me.imageCountLimitPrefix}4${me.imageCountLimitSuffix}`), O.value = !0;
79449
79485
  try {
79450
79486
  for (let e of t.slice(0, n)) try {
79451
79487
  let t = await TZ(e, { name: e.name });
79452
79488
  E.value.push(t);
79453
79489
  } catch (e) {
79454
- A(e instanceof SZ ? `${e.message}` : I.imageInvalid);
79490
+ A(e instanceof SZ ? `${e.message}` : me.imageInvalid);
79455
79491
  }
79456
79492
  } finally {
79457
79493
  O.value = !1;
@@ -79471,30 +79507,39 @@ function wRe(e = {}) {
79471
79507
  e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), T());
79472
79508
  }, ne = (e) => {
79473
79509
  s.value = o.value[e] || "", a(e);
79474
- }, re = (e) => {
79510
+ }, re = /* @__PURE__ */ Iq(null), ie = (e) => {
79511
+ e.role === "user" && (r.loading && n.stop(), re.value = e);
79512
+ }, ae = () => {
79513
+ re.value = null;
79514
+ }, oe = (e) => {
79515
+ let t = re.value;
79516
+ if (re.value = null, !t) return;
79517
+ let i = r.messages.indexOf(t);
79518
+ i < 0 || n.editAndResend(i, e);
79519
+ }, se = (e) => {
79475
79520
  let t = r.messages, n = t[e];
79476
79521
  if (!n || n.role !== "assistant") return !1;
79477
79522
  let i = "reasoning" in n ? n.reasoning : void 0, a = "steps" in n ? n.steps : void 0;
79478
79523
  return r.loading && e === t.length - 1 && !n.content && !i && !(a && a.length);
79479
- }, ie = EX(() => {
79524
+ }, ce = EX(() => {
79480
79525
  var t, n, r;
79481
79526
  return (t = e.infoTick) == null || t.value, (n = (r = e.getFocuses) == null ? void 0 : r.call(e)) == null ? [] : n;
79482
- }), ae = EX(() => {
79527
+ }), F = EX(() => {
79483
79528
  var t, n;
79484
79529
  return (t = e.infoTick) == null || t.value, (n = e.getInfo) == null || (n = n.call(e)) == null ? void 0 : n.planConfirmation;
79485
- }), oe = (t) => e.onAddFocus ? e.onAddFocus(t) : {
79530
+ }), le = (t) => e.onAddFocus ? e.onAddFocus(t) : {
79486
79531
  ok: !1,
79487
79532
  error: "focus 未启用"
79488
- }, se = (t) => {
79533
+ }, ue = (t) => {
79489
79534
  var n;
79490
79535
  (n = e.onRemoveFocus) == null || n.call(e, t);
79491
- }, ce = () => {
79536
+ }, I = () => {
79492
79537
  var t;
79493
79538
  (t = e.onClearFocus) == null || t.call(e);
79494
- }, F = (t) => {
79539
+ }, de = (t) => {
79495
79540
  var n;
79496
79541
  (n = e.onFocusChipClick) == null || n.call(e, t);
79497
- }, le = bRe(e.icons), ue = (t = e.locale) == null ? "zh-CN" : t, I = CRe(ue, e.dialogMessages);
79542
+ }, fe = bRe(e.icons), pe = (t = e.locale) == null ? "zh-CN" : t, me = CRe(pe, e.dialogMessages);
79498
79543
  return {
79499
79544
  chat: n,
79500
79545
  inputText: s,
@@ -79526,16 +79571,20 @@ function wRe(e = {}) {
79526
79571
  setQuote: te,
79527
79572
  clearQuote: N,
79528
79573
  editQueued: ne,
79529
- isPendingAssistant: re,
79530
- focuses: ie,
79531
- planConfirmation: ae,
79532
- addFocus: oe,
79533
- removeFocus: se,
79534
- clearFocus: ce,
79535
- focusChipClick: F,
79536
- icons: le,
79537
- locale: ue,
79538
- messages: I,
79574
+ editingMessage: re,
79575
+ startEdit: ie,
79576
+ cancelEdit: ae,
79577
+ submitEdit: oe,
79578
+ isPendingAssistant: se,
79579
+ focuses: ce,
79580
+ planConfirmation: F,
79581
+ addFocus: le,
79582
+ removeFocus: ue,
79583
+ clearFocus: I,
79584
+ focusChipClick: de,
79585
+ icons: fe,
79586
+ locale: pe,
79587
+ messages: me,
79539
79588
  toolStepView: e.toolStepView
79540
79589
  };
79541
79590
  }
@@ -89509,45 +89558,134 @@ var iUe = { class: "typing-text" }, aUe = {
89509
89558
  messages: e.messages
89510
89559
  }, 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
89560
  }
89512
- }), [["__scopeId", "data-v-4b4111d8"]]), sUe = { class: "message-time" }, cUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89561
+ }), [["__scopeId", "data-v-4b4111d8"]]);
89562
+ //#endregion
89563
+ //#region src/core/components/message/MessageEdit.vue?vue&type=script&setup=true&lang.ts
89564
+ M();
89565
+ var sUe = {
89566
+ class: "msg-edit",
89567
+ "data-test": "msg-edit"
89568
+ }, cUe = ["disabled"], lUe = { class: "msg-edit-actions" }, uUe = ["disabled"], dUe = ["disabled"], fUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89569
+ __name: "MessageEdit",
89570
+ props: {
89571
+ initialValue: {},
89572
+ hasImages: {
89573
+ type: Boolean,
89574
+ default: !1
89575
+ },
89576
+ loading: {
89577
+ type: Boolean,
89578
+ default: !1
89579
+ },
89580
+ messages: { default: () => j({}, R7) }
89581
+ },
89582
+ emits: ["save", "cancel"],
89583
+ setup(e, { emit: t }) {
89584
+ let n = e, r = t, i = /* @__PURE__ */ Iq(n.initialValue), a = /* @__PURE__ */ Iq(null);
89585
+ function o() {
89586
+ let e = a.value;
89587
+ e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
89588
+ }
89589
+ $J(async () => {
89590
+ await tJ();
89591
+ let e = a.value;
89592
+ e && (o(), e.focus(), e.setSelectionRange(e.value.length, e.value.length));
89593
+ });
89594
+ function s(e) {
89595
+ if (e.key === "Escape") {
89596
+ e.preventDefault(), r("cancel");
89597
+ return;
89598
+ }
89599
+ e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), c());
89600
+ }
89601
+ function c() {
89602
+ n.loading || !i.value.trim() && !n.hasImages || r("save", i.value);
89603
+ }
89604
+ return (t, n) => (X(), Z("div", sUe, [fJ(Q("textarea", {
89605
+ ref_key: "ta",
89606
+ ref: a,
89607
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => i.value = e),
89608
+ class: "msg-edit-area",
89609
+ "data-test": "msg-edit-area",
89610
+ disabled: e.loading,
89611
+ onKeydown: s,
89612
+ onInput: o
89613
+ }, null, 40, cUe), [[pZ, i.value]]), Q("div", lUe, [Q("button", {
89614
+ type: "button",
89615
+ class: "msg-edit-btn primary",
89616
+ "data-test": "msg-edit-save",
89617
+ disabled: e.loading || !(i.value.trim() || e.hasImages),
89618
+ onClick: c
89619
+ }, J(e.messages.editSave), 9, uUe), Q("button", {
89620
+ type: "button",
89621
+ class: "msg-edit-btn",
89622
+ "data-test": "msg-edit-cancel",
89623
+ disabled: e.loading,
89624
+ onClick: n[1] || (n[1] = (e) => t.$emit("cancel"))
89625
+ }, J(e.messages.editCancel), 9, dUe)])]));
89626
+ }
89627
+ }), [["__scopeId", "data-v-e2fafbfd"]]), pUe = { class: "message-time" }, mUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89513
89628
  __name: "MessageTime",
89514
89629
  props: { time: {} },
89515
89630
  setup(e) {
89516
- return (t, n) => (X(), Z("div", sUe, J(e.time), 1));
89631
+ return (t, n) => (X(), Z("div", pUe, J(e.time), 1));
89517
89632
  }
89518
89633
  }), [["__scopeId", "data-v-4a976e4a"]]);
89519
89634
  //#endregion
89520
89635
  //#region src/core/components/message/MessageActions.vue?vue&type=script&setup=true&lang.ts
89521
89636
  M();
89522
- var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89637
+ var hUe = { class: "msg-actions" }, gUe = ["title"], _Ue = ["title"], vUe = {
89523
89638
  key: 0,
89524
89639
  viewBox: "0 0 16 16",
89525
89640
  fill: "none",
89526
89641
  "aria-hidden": "true"
89527
- }, fUe = {
89642
+ }, yUe = {
89528
89643
  key: 1,
89529
89644
  viewBox: "0 0 16 16",
89530
89645
  fill: "none",
89531
89646
  "aria-hidden": "true"
89532
- }, pUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89647
+ }, bUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89533
89648
  __name: "MessageActions",
89534
89649
  props: {
89535
89650
  copied: { type: Boolean },
89651
+ editable: {
89652
+ type: Boolean,
89653
+ default: !1
89654
+ },
89536
89655
  messages: { default: () => j({}, R7) }
89537
89656
  },
89538
- emits: ["copy", "regenerate"],
89657
+ emits: [
89658
+ "copy",
89659
+ "regenerate",
89660
+ "edit"
89661
+ ],
89539
89662
  setup(e) {
89540
- return (t, n) => (X(), Z("div", lUe, [Q("button", {
89663
+ return (t, n) => (X(), Z("div", hUe, [e.editable ? (X(), Z("button", {
89664
+ key: 0,
89665
+ class: "msg-action-btn",
89666
+ title: e.messages.editTitle,
89667
+ "data-test": "msg-edit-btn",
89668
+ onClick: n[0] || (n[0] = (e) => t.$emit("edit"))
89669
+ }, [n[3] || (n[3] = Q("svg", {
89670
+ viewBox: "0 0 16 16",
89671
+ fill: "none",
89672
+ "aria-hidden": "true"
89673
+ }, [Q("path", {
89674
+ 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",
89675
+ stroke: "currentColor",
89676
+ "stroke-width": "1.3",
89677
+ "stroke-linejoin": "round"
89678
+ })], -1)), Q("span", null, J(e.messages.edit), 1)], 8, gUe)) : $("", !0), e.editable ? $("", !0) : (X(), Z(KY, { key: 1 }, [Q("button", {
89541
89679
  class: TK(["msg-action-btn", { done: e.copied }]),
89542
89680
  title: e.copied ? e.messages.copied : e.messages.copy,
89543
- onClick: n[0] || (n[0] = (e) => t.$emit("copy"))
89544
- }, [e.copied ? (X(), Z("svg", dUe, [...n[2] || (n[2] = [Q("path", {
89681
+ onClick: n[1] || (n[1] = (e) => t.$emit("copy"))
89682
+ }, [e.copied ? (X(), Z("svg", vUe, [...n[4] || (n[4] = [Q("path", {
89545
89683
  d: "M3 8.5l3 3 7-7",
89546
89684
  stroke: "currentColor",
89547
89685
  "stroke-width": "1.6",
89548
89686
  "stroke-linecap": "round",
89549
89687
  "stroke-linejoin": "round"
89550
- }, null, -1)])])) : (X(), Z("svg", fUe, [...n[3] || (n[3] = [Q("rect", {
89688
+ }, null, -1)])])) : (X(), Z("svg", yUe, [...n[5] || (n[5] = [Q("rect", {
89551
89689
  x: "5.5",
89552
89690
  y: "5.5",
89553
89691
  width: "8",
@@ -89559,10 +89697,10 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89559
89697
  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
89698
  stroke: "currentColor",
89561
89699
  "stroke-width": "1.3"
89562
- }, null, -1)])])), Q("span", null, J(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, uUe), Q("button", {
89700
+ }, null, -1)])])), Q("span", null, J(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, _Ue), Q("button", {
89563
89701
  class: "msg-action-btn",
89564
- onClick: n[1] || (n[1] = (e) => t.$emit("regenerate"))
89565
- }, [n[4] || (n[4] = Q("svg", {
89702
+ onClick: n[2] || (n[2] = (e) => t.$emit("regenerate"))
89703
+ }, [n[6] || (n[6] = Q("svg", {
89566
89704
  viewBox: "0 0 16 16",
89567
89705
  fill: "none",
89568
89706
  "aria-hidden": "true"
@@ -89577,21 +89715,21 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89577
89715
  "stroke-width": "1.3",
89578
89716
  "stroke-linecap": "round",
89579
89717
  "stroke-linejoin": "round"
89580
- })], -1)), Q("span", null, J(e.messages.regenerate), 1)])]));
89718
+ })], -1)), Q("span", null, J(e.messages.regenerate), 1)])], 64))]));
89581
89719
  }
89582
- }), [["__scopeId", "data-v-dc051a49"]]), mUe = {
89720
+ }), [["__scopeId", "data-v-f6c166bd"]]), xUe = {
89583
89721
  key: 1,
89584
89722
  class: "avatar-icon",
89585
89723
  viewBox: "0 0 1024 1024",
89586
89724
  xmlns: "http://www.w3.org/2000/svg",
89587
89725
  "aria-hidden": "true"
89588
- }, hUe = {
89726
+ }, SUe = {
89589
89727
  key: 2,
89590
89728
  class: "avatar-icon",
89591
89729
  viewBox: "0 0 1024 1024",
89592
89730
  xmlns: "http://www.w3.org/2000/svg",
89593
89731
  "aria-hidden": "true"
89594
- }, gUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89732
+ }, CUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89595
89733
  __name: "AvatarIcon",
89596
89734
  props: {
89597
89735
  role: {},
@@ -89602,25 +89740,25 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89602
89740
  key: 0,
89603
89741
  icon: e.glyph,
89604
89742
  class: "avatar-glyph"
89605
- }, null, 8, ["icon"])) : e.role === "user" ? (X(), Z("svg", mUe, [...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", hUe, [...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)])]));
89743
+ }, 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
89744
  }
89607
- }), [["__scopeId", "data-v-a0b508ea"]]), _Ue = ["data-msg-idx"], vUe = {
89745
+ }), [["__scopeId", "data-v-a0b508ea"]]), wUe = ["data-msg-idx"], TUe = {
89608
89746
  key: 0,
89609
89747
  class: "message-avatar"
89610
- }, yUe = { class: "message-content" }, bUe = {
89748
+ }, EUe = { class: "message-content" }, DUe = {
89611
89749
  key: 2,
89612
89750
  class: "msg-focuses"
89613
- }, xUe = ["title"], SUe = {
89751
+ }, OUe = ["title"], kUe = {
89614
89752
  key: 3,
89615
89753
  class: "msg-quote",
89616
89754
  "data-test": "msg-quote"
89617
- }, CUe = { class: "msg-quote-text" }, wUe = {
89755
+ }, AUe = { class: "msg-quote-text" }, jUe = {
89618
89756
  key: 0,
89619
89757
  class: "msg-quote-source"
89620
- }, TUe = ["data-img-count"], EUe = ["title", "onClick"], DUe = ["src", "alt"], OUe = {
89758
+ }, MUe = ["data-img-count"], NUe = ["title", "onClick"], PUe = ["src", "alt"], FUe = {
89621
89759
  key: 1,
89622
89760
  class: "msg-image-lost"
89623
- }, kUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89761
+ }, IUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89624
89762
  __name: "MessageRow",
89625
89763
  props: {
89626
89764
  message: {},
@@ -89637,7 +89775,10 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89637
89775
  emits: [
89638
89776
  "toggle-reasoning",
89639
89777
  "copy",
89640
- "regenerate"
89778
+ "regenerate",
89779
+ "edit",
89780
+ "edit-save",
89781
+ "edit-cancel"
89641
89782
  ],
89642
89783
  setup(e) {
89643
89784
  let t = e, n = B7(), r = EX(() => t.message.role === "assistant"), i = EX(() => {
@@ -89646,23 +89787,23 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89646
89787
  }), a = EX(() => r.value && "reasoningTotal" in t.message ? t.message.reasoningTotal : void 0), o = EX(() => {
89647
89788
  var e;
89648
89789
  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), l = /* @__PURE__ */ Iq(void 0);
89650
- return (t, u) => {
89651
- var d, f;
89790
+ }), 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);
89791
+ return (t, p) => {
89792
+ var m, h, g;
89652
89793
  return X(), Z(KY, null, [Q("div", {
89653
89794
  class: TK(["message-row", e.message.role]),
89654
89795
  "data-msg-idx": e.index
89655
- }, [e.showAvatar ? (X(), Z("div", vUe, [oX(gUe, {
89796
+ }, [e.showAvatar ? (X(), Z("div", TUe, [oX(CUe, {
89656
89797
  role: e.message.role,
89657
89798
  glyph: e.message.role === "user" ? Y(n).icons.userAvatar : Y(n).icons.assistantAvatar
89658
- }, null, 8, ["role", "glyph"])])) : $("", !0), Q("div", yUe, [
89799
+ }, null, 8, ["role", "glyph"])])) : $("", !0), Q("div", EUe, [
89659
89800
  r.value ? (X(), tX(bBe, {
89660
89801
  key: 0,
89661
89802
  text: i.value,
89662
89803
  total: a.value,
89663
89804
  expanded: e.reasoningExpanded,
89664
89805
  running: e.loading && e.isLast,
89665
- onToggle: u[0] || (u[0] = (e) => t.$emit("toggle-reasoning"))
89806
+ onToggle: p[0] || (p[0] = (e) => t.$emit("toggle-reasoning"))
89666
89807
  }, null, 8, [
89667
89808
  "text",
89668
89809
  "total",
@@ -89681,13 +89822,13 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89681
89822
  "messages",
89682
89823
  "step-view"
89683
89824
  ])) : $("", !0),
89684
- e.message.role === "user" && (d = e.message.focuses) != null && d.length ? (X(), Z("div", bUe, [(X(!0), Z(KY, null, nY(e.message.focuses, (e) => (X(), Z("span", {
89825
+ 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
89826
  key: e.path,
89686
89827
  class: "msg-focus-chip",
89687
89828
  title: Y(n).messages.historyFocusChipTitlePrefix + e.path
89688
- }, [oX(g9, { icon: Y(n).icons.focus }, null, 8, ["icon"]), cX(" " + J(e.path), 1)], 8, xUe))), 128))])) : $("", !0),
89689
- e.message.role === "user" && e.message.quote ? (X(), Z("div", SUe, [Q("blockquote", CUe, J(e.message.quote.text), 1), e.message.quote.source ? (X(), Z("span", wUe, "❝ " + J(e.message.quote.source), 1)) : $("", !0)])) : $("", !0),
89690
- e.message.role === "user" && (f = e.message.images) != null && f.length ? (X(), Z("div", {
89829
+ }, [oX(g9, { icon: Y(n).icons.focus }, null, 8, ["icon"]), cX(" " + J(e.path), 1)], 8, OUe))), 128))])) : $("", !0),
89830
+ 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),
89831
+ e.message.role === "user" && (h = e.message.images) != null && h.length ? (X(), Z("div", {
89691
89832
  key: 4,
89692
89833
  class: "msg-images",
89693
89834
  "data-img-count": e.message.images.length
@@ -89696,21 +89837,34 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89696
89837
  type: "button",
89697
89838
  class: "msg-image",
89698
89839
  title: e.name || Y(n).messages.imageAlt,
89699
- onClick: (t) => l.value = e.dataUri || e.url
89840
+ onClick: (t) => f.value = e.dataUri || e.url
89700
89841
  }, [e.thumb || e.dataUri ? (X(), Z("img", {
89701
89842
  key: 0,
89702
89843
  class: "msg-image-thumb",
89703
89844
  src: e.thumb || e.dataUri,
89704
89845
  alt: e.name || Y(n).messages.imageAlt
89705
- }, null, 8, DUe)) : (X(), Z("span", OUe, "🖼️"))], 8, EUe))), 128))], 8, TUe)) : $("", !0),
89706
- !r.value || e.message.content || e.isPendingAssistant ? (X(), tX(oUe, {
89846
+ }, null, 8, PUe)) : (X(), Z("span", FUe, "🖼️"))], 8, NUe))), 128))], 8, MUe)) : $("", !0),
89847
+ c.value ? (X(), tX(fUe, {
89707
89848
  key: 5,
89849
+ "initial-value": u.value,
89850
+ "has-images": !!((g = e.message.images) != null && g.length),
89851
+ loading: e.loading,
89852
+ messages: Y(n).messages,
89853
+ onSave: p[1] || (p[1] = (e) => t.$emit("edit-save", e)),
89854
+ onCancel: p[2] || (p[2] = (e) => t.$emit("edit-cancel"))
89855
+ }, null, 8, [
89856
+ "initial-value",
89857
+ "has-images",
89858
+ "loading",
89859
+ "messages"
89860
+ ])) : !r.value || e.message.content || e.isPendingAssistant ? (X(), tX(oUe, {
89861
+ key: 6,
89708
89862
  messages: Y(n).messages,
89709
89863
  content: e.message.content,
89710
89864
  role: e.message.role,
89711
89865
  "is-pending-assistant": e.isPendingAssistant,
89712
89866
  "show-typing": e.showTyping,
89713
- "show-cursor": c.value
89867
+ "show-cursor": d.value
89714
89868
  }, null, 8, [
89715
89869
  "messages",
89716
89870
  "content",
@@ -89719,19 +89873,25 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89719
89873
  "show-typing",
89720
89874
  "show-cursor"
89721
89875
  ])) : $("", !0),
89722
- oX(cUe, { time: e.time }, null, 8, ["time"]),
89723
- s.value ? (X(), tX(pUe, {
89724
- key: 6,
89876
+ oX(mUe, { time: e.time }, null, 8, ["time"]),
89877
+ s.value || l.value ? (X(), tX(bUe, {
89878
+ key: 7,
89879
+ editable: l.value,
89725
89880
  messages: Y(n).messages,
89726
89881
  copied: e.copied,
89727
- onCopy: u[1] || (u[1] = (e) => t.$emit("copy")),
89728
- onRegenerate: u[2] || (u[2] = (e) => t.$emit("regenerate"))
89729
- }, null, 8, ["messages", "copied"])) : $("", !0)
89730
- ])], 10, _Ue), oX(kBe, {
89731
- src: l.value,
89882
+ onCopy: p[3] || (p[3] = (e) => t.$emit("copy")),
89883
+ onRegenerate: p[4] || (p[4] = (e) => t.$emit("regenerate")),
89884
+ onEdit: p[5] || (p[5] = (e) => t.$emit("edit"))
89885
+ }, null, 8, [
89886
+ "editable",
89887
+ "messages",
89888
+ "copied"
89889
+ ])) : $("", !0)
89890
+ ])], 10, wUe), oX(kBe, {
89891
+ src: f.value,
89732
89892
  alt: Y(n).messages.imageAlt,
89733
89893
  "close-title": Y(n).messages.close,
89734
- onClose: u[3] || (u[3] = (e) => l.value = void 0)
89894
+ onClose: p[6] || (p[6] = (e) => f.value = void 0)
89735
89895
  }, null, 8, [
89736
89896
  "src",
89737
89897
  "alt",
@@ -89739,32 +89899,32 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89739
89899
  ])], 64);
89740
89900
  };
89741
89901
  }
89742
- }), [["__scopeId", "data-v-135ee760"]]), AUe = { class: "chat-body" }, jUe = {
89902
+ }), [["__scopeId", "data-v-70c7d2f4"]]), LUe = { class: "chat-body" }, RUe = {
89743
89903
  key: 0,
89744
89904
  class: "empty-state"
89745
- }, MUe = { class: "empty-icon" }, NUe = {
89905
+ }, zUe = { class: "empty-icon" }, BUe = {
89746
89906
  key: 1,
89747
89907
  class: "message-row assistant"
89748
- }, PUe = {
89908
+ }, VUe = {
89749
89909
  key: 0,
89750
89910
  class: "message-avatar"
89751
- }, FUe = { class: "message-content" }, IUe = {
89911
+ }, HUe = { class: "message-content" }, UUe = {
89752
89912
  key: 2,
89753
89913
  class: "error-bar"
89754
- }, LUe = { class: "error-text" }, RUe = ["title"], zUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89914
+ }, WUe = { class: "error-text" }, GUe = ["title"], KUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89755
89915
  __name: "MessageList",
89756
89916
  props: {
89757
89917
  showAvatar: { type: Boolean },
89758
89918
  showTyping: { type: Boolean }
89759
89919
  },
89760
89920
  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: f, retry: p, regenerate: m } = t, h = EX(() => f.messages.length > 0), g = EX(() => f.messages.some((e) => e.role === "user")), _ = EX(() => {
89921
+ 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
89922
  var e;
89763
- return ((e = f.messages[f.messages.length - 1]) == null ? void 0 : e.role) === "assistant";
89923
+ return ((e = h.messages[h.messages.length - 1]) == null ? void 0 : e.role) === "assistant";
89764
89924
  });
89765
- return (t, v) => (X(), Z("div", AUe, [
89766
- h.value ? $("", !0) : (X(), Z("div", jUe, [Q("div", MUe, [oX(g9, { icon: Y(u).empty }, null, 8, ["icon"])]), Q("p", null, [oX(_9, { text: Y(d).emptyGreeting }, null, 8, ["text"])])])),
89767
- (X(!0), Z(KY, null, nY(Y(f).messages, (t, c) => (X(), tX(kUe, {
89925
+ return (t, x) => (X(), Z("div", LUe, [
89926
+ 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"])])])),
89927
+ (X(!0), Z(KY, null, nY(Y(h).messages, (t, c) => (X(), tX(IUe, {
89768
89928
  key: c,
89769
89929
  message: t,
89770
89930
  index: c,
@@ -89773,12 +89933,15 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89773
89933
  "is-pending-assistant": Y(a)(c),
89774
89934
  "reasoning-expanded": Y(o)(c),
89775
89935
  copied: Y(r),
89776
- "is-last": c === Y(f).messages.length - 1,
89777
- loading: Y(f).loading,
89936
+ "is-last": c === Y(h).messages.length - 1,
89937
+ loading: Y(h).loading,
89778
89938
  time: Y(n)(t.timestamp),
89779
89939
  onToggleReasoning: (e) => Y(s)(c),
89780
89940
  onCopy: (e) => Y(i)(t.content),
89781
- onRegenerate: Y(m)
89941
+ onRegenerate: Y(_),
89942
+ onEdit: (e) => Y(f)(t),
89943
+ onEditSave: Y(p),
89944
+ onEditCancel: Y(m)
89782
89945
  }, null, 8, [
89783
89946
  "message",
89784
89947
  "index",
@@ -89792,12 +89955,15 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89792
89955
  "time",
89793
89956
  "onToggleReasoning",
89794
89957
  "onCopy",
89795
- "onRegenerate"
89958
+ "onRegenerate",
89959
+ "onEdit",
89960
+ "onEditSave",
89961
+ "onEditCancel"
89796
89962
  ]))), 128)),
89797
- Y(f).loading && !_.value ? (X(), Z("div", NUe, [e.showAvatar ? (X(), Z("div", PUe, [oX(gUe, {
89963
+ Y(h).loading && !b.value ? (X(), Z("div", BUe, [e.showAvatar ? (X(), Z("div", VUe, [oX(CUe, {
89798
89964
  role: "assistant",
89799
89965
  glyph: Y(u).assistantAvatar
89800
- }, null, 8, ["glyph"])])) : $("", !0), Q("div", FUe, [oX(oUe, {
89966
+ }, null, 8, ["glyph"])])) : $("", !0), Q("div", HUe, [oX(oUe, {
89801
89967
  content: "",
89802
89968
  role: "assistant",
89803
89969
  "is-pending-assistant": !0,
@@ -89805,84 +89971,84 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89805
89971
  "show-cursor": !1,
89806
89972
  messages: Y(d)
89807
89973
  }, null, 8, ["show-typing", "messages"])])])) : $("", !0),
89808
- Y(f).error ? (X(), Z("div", IUe, [
89809
- Q("span", LUe, J(Y(f).error), 1),
89810
- g.value ? (X(), Z("button", {
89974
+ Y(h).error ? (X(), Z("div", UUe, [
89975
+ Q("span", WUe, J(Y(h).error), 1),
89976
+ y.value ? (X(), Z("button", {
89811
89977
  key: 0,
89812
89978
  class: "retry-btn",
89813
- onClick: v[0] || (v[0] = (...e) => Y(p) && Y(p)(...e))
89979
+ onClick: x[0] || (x[0] = (...e) => Y(g) && Y(g)(...e))
89814
89980
  }, [oX(_9, { text: Y(d).retry }, null, 8, ["text"])])) : $("", !0),
89815
89981
  Y(c) ? (X(), Z("button", {
89816
89982
  key: 1,
89817
89983
  class: "undo-btn",
89818
89984
  title: Y(d).undoTitle,
89819
- onClick: v[1] || (v[1] = (...e) => Y(l) && Y(l)(...e))
89820
- }, [oX(_9, { text: Y(d).undo }, null, 8, ["text"])], 8, RUe)) : $("", !0)
89985
+ onClick: x[1] || (x[1] = (...e) => Y(l) && Y(l)(...e))
89986
+ }, [oX(_9, { text: Y(d).undo }, null, 8, ["text"])], 8, GUe)) : $("", !0)
89821
89987
  ])) : $("", !0)
89822
89988
  ]));
89823
89989
  }
89824
- }), [["__scopeId", "data-v-113939bc"]]), BUe = {
89990
+ }), [["__scopeId", "data-v-c0dd8179"]]), qUe = {
89825
89991
  key: 0,
89826
89992
  class: "queued-bar"
89827
- }, VUe = { class: "queued-head" }, HUe = { class: "queued-icon" }, UUe = { class: "queued-title" }, WUe = { class: "queued-count" }, GUe = { class: "queued-idx" }, KUe = { class: "queued-text" }, qUe = ["title", "onClick"], JUe = ["title", "onClick"], YUe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89993
+ }, 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
89994
  __name: "QueuedBar",
89829
89995
  setup(e) {
89830
89996
  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", BUe, [Q("div", VUe, [
89832
- Q("span", HUe, [oX(g9, { icon: Y(r).queued }, null, 8, ["icon"])]),
89833
- Q("span", UUe, J(Y(i).queuedTitle), 1),
89834
- Q("span", WUe, J(Y(a).length), 1)
89997
+ return (e, t) => Y(a).length ? (X(), Z("div", qUe, [Q("div", JUe, [
89998
+ Q("span", YUe, [oX(g9, { icon: Y(r).queued }, null, 8, ["icon"])]),
89999
+ Q("span", XUe, J(Y(i).queuedTitle), 1),
90000
+ Q("span", ZUe, J(Y(a).length), 1)
89835
90001
  ]), (X(!0), Z(KY, null, nY(Y(a), (e, t) => (X(), Z("div", {
89836
90002
  key: t,
89837
90003
  class: "queued-item"
89838
90004
  }, [
89839
- Q("span", GUe, J(t + 1), 1),
89840
- Q("span", KUe, J(e), 1),
90005
+ Q("span", QUe, J(t + 1), 1),
90006
+ Q("span", $Ue, J(e), 1),
89841
90007
  Q("button", {
89842
90008
  class: "queued-act",
89843
90009
  title: Y(i).queuedEditTitle,
89844
90010
  onClick: (e) => Y(n)(t)
89845
- }, [oX(g9, { icon: Y(r).queuedEdit }, null, 8, ["icon"])], 8, qUe),
90011
+ }, [oX(g9, { icon: Y(r).queuedEdit }, null, 8, ["icon"])], 8, eWe),
89846
90012
  Q("button", {
89847
90013
  class: "queued-act queued-del",
89848
90014
  title: Y(i).removeQueuedTitle,
89849
90015
  onClick: (e) => Y(o)(t)
89850
- }, "✕", 8, JUe)
90016
+ }, "✕", 8, tWe)
89851
90017
  ]))), 128))])) : $("", !0);
89852
90018
  }
89853
- }), [["__scopeId", "data-v-02414fc9"]]), XUe = {
90019
+ }), [["__scopeId", "data-v-02414fc9"]]), rWe = {
89854
90020
  key: 0,
89855
90021
  class: "approval-bar"
89856
- }, ZUe = { class: "approval-head" }, QUe = { class: "approval-title" }, $Ue = {
90022
+ }, iWe = { class: "approval-head" }, aWe = { class: "approval-title" }, oWe = {
89857
90023
  key: 0,
89858
90024
  class: "approval-question"
89859
- }, eWe = {
90025
+ }, sWe = {
89860
90026
  key: 1,
89861
90027
  class: "approval-context"
89862
- }, tWe = {
90028
+ }, cWe = {
89863
90029
  key: 2,
89864
90030
  class: "approval-recommend"
89865
- }, nWe = {
90031
+ }, lWe = {
89866
90032
  key: 3,
89867
90033
  class: "approval-options"
89868
- }, rWe = ["onClick"], iWe = { class: "approval-actions" }, aWe = { class: "approval-head" }, oWe = { class: "approval-title" }, sWe = {
90034
+ }, uWe = ["onClick"], dWe = { class: "approval-actions" }, fWe = { class: "approval-head" }, pWe = { class: "approval-title" }, mWe = {
89869
90035
  key: 0,
89870
90036
  class: "approval-args"
89871
- }, cWe = {
90037
+ }, hWe = {
89872
90038
  key: 1,
89873
90039
  class: "approval-preview",
89874
90040
  "data-test": "approval-preview"
89875
- }, lWe = {
90041
+ }, gWe = {
89876
90042
  key: 0,
89877
90043
  class: "preview-error",
89878
90044
  "data-test": "preview-error"
89879
- }, uWe = ["data-test"], dWe = { class: "preview-op" }, fWe = { class: "preview-path" }, pWe = { class: "preview-diff" }, mWe = { class: "preview-old" }, hWe = { class: "preview-new" }, gWe = {
90045
+ }, _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
90046
  key: 1,
89881
90047
  class: "preview-more"
89882
- }, _We = {
90048
+ }, wWe = {
89883
90049
  key: 2,
89884
90050
  class: "approval-plan-context"
89885
- }, vWe = { class: "approval-actions" }, Z9 = 20, yWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90051
+ }, TWe = { class: "approval-actions" }, Z9 = 20, EWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89886
90052
  __name: "ApprovalBar",
89887
90053
  setup(e) {
89888
90054
  let t = B7(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = t.planConfirmation, o = /* @__PURE__ */ Iq(!1);
@@ -89912,17 +90078,17 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89912
90078
  }), d = EX(() => u.value.length > Z9);
89913
90079
  return (e, f) => {
89914
90080
  var p, m, h;
89915
- return Y(n) ? (X(), Z("div", XUe, [s.value ? (X(), Z(KY, { key: 0 }, [
89916
- Q("div", ZUe, [f[5] || (f[5] = Q("span", { class: "approval-icon" }, "❓", -1)), Q("span", QUe, J(Y(i).humanConfirmTitle), 1)]),
89917
- (p = Y(n).args) != null && p.question ? (X(), Z("div", $Ue, J(Y(n).args.question), 1)) : $("", !0),
89918
- (m = Y(n).args) != null && m.context ? (X(), Z("div", eWe, J(Y(n).args.context), 1)) : $("", !0),
89919
- (h = Y(n).args) != null && h.recommendation ? (X(), Z("div", tWe, [oX(g9, { icon: Y(t).icons.recommend }, null, 8, ["icon"]), cX(J(Y(i).recommendPrefix) + J(Y(n).args.recommendation), 1)])) : $("", !0),
89920
- c.value.length ? (X(), Z("div", nWe, [(X(!0), Z(KY, null, nY(c.value, (e) => (X(), Z("button", {
90081
+ return Y(n) ? (X(), Z("div", rWe, [s.value ? (X(), Z(KY, { key: 0 }, [
90082
+ Q("div", iWe, [f[5] || (f[5] = Q("span", { class: "approval-icon" }, "❓", -1)), Q("span", aWe, J(Y(i).humanConfirmTitle), 1)]),
90083
+ (p = Y(n).args) != null && p.question ? (X(), Z("div", oWe, J(Y(n).args.question), 1)) : $("", !0),
90084
+ (m = Y(n).args) != null && m.context ? (X(), Z("div", sWe, J(Y(n).args.context), 1)) : $("", !0),
90085
+ (h = Y(n).args) != null && h.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),
90086
+ c.value.length ? (X(), Z("div", lWe, [(X(!0), Z(KY, null, nY(c.value, (e) => (X(), Z("button", {
89921
90087
  key: e,
89922
90088
  class: "approval-opt",
89923
90089
  onClick: (t) => Y(r)(e)
89924
- }, J(e), 9, rWe))), 128))])) : $("", !0),
89925
- Q("div", iWe, [Q("button", {
90090
+ }, J(e), 9, uWe))), 128))])) : $("", !0),
90091
+ Q("div", dWe, [Q("button", {
89926
90092
  class: "approval-deny",
89927
90093
  onClick: f[0] || (f[0] = (e) => Y(r)(!1))
89928
90094
  }, [oX(_9, { text: Y(i).deny }, null, 8, ["text"])]), c.value.length ? $("", !0) : (X(), Z("button", {
@@ -89931,18 +90097,18 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89931
90097
  onClick: f[1] || (f[1] = (e) => Y(r)(!0))
89932
90098
  }, [oX(_9, { text: Y(i).approve }, null, 8, ["text"])]))])
89933
90099
  ], 64)) : (X(), Z(KY, { key: 1 }, [
89934
- Q("div", aWe, [
90100
+ Q("div", fWe, [
89935
90101
  f[6] || (f[6] = Q("span", { class: "approval-icon" }, "✋", -1)),
89936
- Q("span", oWe, [cX(J(Y(i).toolConfirmPrefix), 1), Q("code", null, J(Y(n).toolName), 1)]),
90102
+ Q("span", pWe, [cX(J(Y(i).toolConfirmPrefix), 1), Q("code", null, J(Y(n).toolName), 1)]),
89937
90103
  l.value ? (X(), Z("button", {
89938
90104
  key: 0,
89939
90105
  class: "approval-toggle",
89940
90106
  onClick: f[2] || (f[2] = (e) => o.value = !o.value)
89941
90107
  }, J(o.value ? Y(i).collapseArgs : Y(i).viewArgs) + J(o.value ? " ▴" : " ▾"), 1)) : $("", !0)
89942
90108
  ]),
89943
- l.value && o.value ? (X(), Z("pre", sWe, J(l.value), 1)) : $("", !0),
89944
- u.value.length ? (X(), Z("div", cWe, [
89945
- Y(n).preview && !Y(n).preview.ok ? (X(), Z("div", lWe, "⚠ " + J(Y(n).preview.error), 1)) : $("", !0),
90109
+ l.value && o.value ? (X(), Z("pre", mWe, J(l.value), 1)) : $("", !0),
90110
+ u.value.length ? (X(), Z("div", hWe, [
90111
+ Y(n).preview && !Y(n).preview.ok ? (X(), Z("div", gWe, "⚠ " + J(Y(n).preview.error), 1)) : $("", !0),
89946
90112
  (X(!0), Z(KY, null, nY(u.value.slice(0, Z9), (e, t) => {
89947
90113
  var n, r;
89948
90114
  return X(), Z("div", {
@@ -89950,19 +90116,19 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89950
90116
  class: "preview-item",
89951
90117
  "data-test": `preview-item-${t}`
89952
90118
  }, [
89953
- Q("span", dWe, J(e.op || "set"), 1),
89954
- Q("code", fWe, J(e.jsonPath || "(主数据整体)"), 1),
89955
- Q("span", pWe, [
89956
- Q("span", mWe, J((n = e.oldSummary) == null ? "—" : n), 1),
90119
+ Q("span", vWe, J(e.op || "set"), 1),
90120
+ Q("code", yWe, J(e.jsonPath || "(主数据整体)"), 1),
90121
+ Q("span", bWe, [
90122
+ Q("span", xWe, J((n = e.oldSummary) == null ? "—" : n), 1),
89957
90123
  f[7] || (f[7] = Q("span", { class: "preview-arrow" }, " → ", -1)),
89958
- Q("span", hWe, J((r = e.newSummary) == null ? "—" : r), 1)
90124
+ Q("span", SWe, J((r = e.newSummary) == null ? "—" : r), 1)
89959
90125
  ])
89960
- ], 8, uWe);
90126
+ ], 8, _We);
89961
90127
  }), 128)),
89962
- d.value ? (X(), Z("div", gWe, "… 其余 " + J(u.value.length - Z9) + " 项", 1)) : $("", !0)
90128
+ d.value ? (X(), Z("div", CWe, "… 其余 " + J(u.value.length - Z9) + " 项", 1)) : $("", !0)
89963
90129
  ])) : $("", !0),
89964
- Y(a) ? (X(), Z("div", _We, [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),
89965
- Q("div", vWe, [Q("button", {
90130
+ 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),
90131
+ Q("div", TWe, [Q("button", {
89966
90132
  class: "approval-deny",
89967
90133
  onClick: f[3] || (f[3] = (e) => Y(r)(!1))
89968
90134
  }, [oX(_9, { text: Y(i).deny }, null, 8, ["text"])]), Q("button", {
@@ -89976,13 +90142,13 @@ var lUe = { class: "msg-actions" }, uUe = ["title"], dUe = {
89976
90142
  //#endregion
89977
90143
  //#region src/core/components/ConflictBar.vue?vue&type=script&setup=true&lang.ts
89978
90144
  M();
89979
- var bWe = {
90145
+ var DWe = {
89980
90146
  key: 0,
89981
90147
  class: "conflict-bar"
89982
- }, xWe = { class: "conflict-head" }, SWe = { class: "conflict-icon" }, CWe = { class: "conflict-title" }, wWe = { class: "conflict-detail" }, TWe = {
90148
+ }, OWe = { class: "conflict-head" }, kWe = { class: "conflict-icon" }, AWe = { class: "conflict-title" }, jWe = { class: "conflict-detail" }, MWe = {
89983
90149
  key: 0,
89984
90150
  class: "conflict-diff"
89985
- }, EWe = { class: "conflict-diff-col" }, DWe = { class: "conflict-diff-label" }, OWe = { class: "conflict-diff-pre" }, kWe = { class: "conflict-diff-col" }, AWe = { class: "conflict-diff-label" }, jWe = { class: "conflict-diff-pre" }, MWe = { class: "conflict-actions" }, NWe = ["title"], PWe = ["title"], FWe = ["title"], IWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90151
+ }, NWe = { class: "conflict-diff-col" }, PWe = { class: "conflict-diff-label" }, FWe = { class: "conflict-diff-pre" }, IWe = { class: "conflict-diff-col" }, LWe = { class: "conflict-diff-label" }, RWe = { class: "conflict-diff-pre" }, zWe = { class: "conflict-actions" }, BWe = ["title"], VWe = ["title"], HWe = ["title"], UWe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
89986
90152
  __name: "ConflictBar",
89987
90153
  props: {
89988
90154
  pendingConflict: {},
@@ -90016,19 +90182,19 @@ var bWe = {
90016
90182
  return String(n);
90017
90183
  }
90018
90184
  });
90019
- return (t, a) => e.pendingConflict ? (X(), Z("div", bWe, [
90020
- Q("div", xWe, [Q("span", SWe, [oX(g9, { icon: e.icons.conflict }, null, 8, ["icon"])]), Q("span", CWe, [
90185
+ return (t, a) => e.pendingConflict ? (X(), Z("div", DWe, [
90186
+ Q("div", OWe, [Q("span", kWe, [oX(g9, { icon: e.icons.conflict }, null, 8, ["icon"])]), Q("span", AWe, [
90021
90187
  cX(J(e.messages.conflictTitlePrefix), 1),
90022
90188
  Q("code", null, J(e.pendingConflict.path), 1),
90023
90189
  cX(J(e.messages.conflictTitleSuffix), 1)
90024
90190
  ])]),
90025
- Q("div", wWe, J(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
90191
+ Q("div", jWe, J(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
90026
90192
  Q("button", {
90027
90193
  class: "conflict-toggle",
90028
90194
  onClick: a[0] || (a[0] = (e) => n.value = !n.value)
90029
90195
  }, J(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + J(n.value ? " ▴" : " ▾"), 1),
90030
- n.value ? (X(), Z("div", TWe, [Q("div", EWe, [Q("div", DWe, J(e.messages.agentValueLabel), 1), Q("pre", OWe, J(r.value || e.messages.deleteNoValue), 1)]), Q("div", kWe, [Q("div", AWe, J(e.messages.currentValueLabel), 1), Q("pre", jWe, J(i.value), 1)])])) : $("", !0),
90031
- Q("div", MWe, [
90196
+ n.value ? (X(), Z("div", MWe, [Q("div", NWe, [Q("div", PWe, J(e.messages.agentValueLabel), 1), Q("pre", FWe, J(r.value || e.messages.deleteNoValue), 1)]), Q("div", IWe, [Q("div", LWe, J(e.messages.currentValueLabel), 1), Q("pre", RWe, J(i.value), 1)])])) : $("", !0),
90197
+ Q("div", zWe, [
90032
90198
  Q("button", {
90033
90199
  class: "conflict-keep",
90034
90200
  onClick: a[1] || (a[1] = (t) => {
@@ -90036,7 +90202,7 @@ var bWe = {
90036
90202
  return (n = e.onResolve) == null ? void 0 : n.call(e, "keep_external");
90037
90203
  }),
90038
90204
  title: e.messages.keepExternalTitle
90039
- }, [oX(_9, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, NWe),
90205
+ }, [oX(_9, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, BWe),
90040
90206
  Q("button", {
90041
90207
  class: "conflict-overwrite",
90042
90208
  onClick: a[2] || (a[2] = (t) => {
@@ -90044,7 +90210,7 @@ var bWe = {
90044
90210
  return (n = e.onResolve) == null ? void 0 : n.call(e, "overwrite");
90045
90211
  }),
90046
90212
  title: e.messages.overwriteTitle
90047
- }, [oX(_9, { text: e.messages.overwrite }, null, 8, ["text"])], 8, PWe),
90213
+ }, [oX(_9, { text: e.messages.overwrite }, null, 8, ["text"])], 8, VWe),
90048
90214
  Q("button", {
90049
90215
  class: "conflict-restore",
90050
90216
  onClick: a[3] || (a[3] = (t) => {
@@ -90052,49 +90218,49 @@ var bWe = {
90052
90218
  return (n = e.onResolve) == null ? void 0 : n.call(e, "restore");
90053
90219
  }),
90054
90220
  title: e.messages.restoreTitle
90055
- }, [oX(_9, { text: e.messages.restore }, null, 8, ["text"])], 8, FWe)
90221
+ }, [oX(_9, { text: e.messages.restore }, null, 8, ["text"])], 8, HWe)
90056
90222
  ])
90057
90223
  ])) : $("", !0);
90058
90224
  }
90059
- }), [["__scopeId", "data-v-36dda58c"]]), LWe = { class: "chat-footer" }, RWe = ["title"], zWe = {
90225
+ }), [["__scopeId", "data-v-36dda58c"]]), WWe = { class: "chat-footer" }, GWe = ["title"], KWe = {
90060
90226
  key: 0,
90061
90227
  class: "drop-hint"
90062
- }, BWe = {
90228
+ }, qWe = {
90063
90229
  key: 1,
90064
90230
  class: "quick-actions",
90065
90231
  "data-test": "quick-actions"
90066
- }, VWe = [
90232
+ }, JWe = [
90067
90233
  "disabled",
90068
90234
  "data-test",
90069
90235
  "title",
90070
90236
  "onClick"
90071
- ], HWe = {
90237
+ ], YWe = {
90072
90238
  key: 2,
90073
90239
  class: "chip-stack"
90074
- }, UWe = {
90240
+ }, XWe = {
90075
90241
  key: 0,
90076
90242
  class: "focus-chips"
90077
- }, WWe = ["title", "onClick"], GWe = { class: "focus-chip-icon" }, KWe = { class: "focus-chip-path" }, qWe = ["title", "onClick"], JWe = {
90243
+ }, ZWe = ["title", "onClick"], QWe = { class: "focus-chip-icon" }, $We = { class: "focus-chip-path" }, eGe = ["title", "onClick"], tGe = {
90078
90244
  key: 1,
90079
90245
  class: "quote-chips",
90080
90246
  "data-test": "quote-chips"
90081
- }, YWe = ["title"], XWe = { class: "quote-chip-text" }, ZWe = ["title"], QWe = {
90247
+ }, nGe = ["title"], rGe = { class: "quote-chip-text" }, iGe = ["title"], aGe = {
90082
90248
  key: 2,
90083
90249
  class: "img-chips",
90084
90250
  "data-test": "img-chips"
90085
- }, $We = ["title"], eGe = ["src", "alt"], tGe = ["onClick"], nGe = {
90251
+ }, oGe = ["title"], sGe = ["src", "alt"], cGe = ["onClick"], lGe = {
90086
90252
  key: 3,
90087
90253
  class: "img-error",
90088
90254
  "data-test": "img-error"
90089
- }, rGe = {
90255
+ }, uGe = {
90090
90256
  key: 3,
90091
90257
  class: "gate-hint",
90092
90258
  "data-test": "gate-hint"
90093
- }, iGe = [
90259
+ }, dGe = [
90094
90260
  "placeholder",
90095
90261
  "rows",
90096
90262
  "disabled"
90097
- ], aGe = { class: "input-actions" }, oGe = { class: "send-hint" }, sGe = ["title", "disabled"], cGe = {
90263
+ ], fGe = { class: "input-actions" }, pGe = { class: "send-hint" }, mGe = ["title", "disabled"], hGe = {
90098
90264
  key: 1,
90099
90265
  width: "15",
90100
90266
  height: "15",
@@ -90104,13 +90270,13 @@ var bWe = {
90104
90270
  "stroke-width": "2",
90105
90271
  "stroke-linecap": "round",
90106
90272
  "stroke-linejoin": "round"
90107
- }, lGe = ["disabled", "title"], uGe = {
90273
+ }, gGe = ["disabled", "title"], _Ge = {
90108
90274
  key: 0,
90109
90275
  width: "16",
90110
90276
  height: "16",
90111
90277
  viewBox: "0 0 24 24",
90112
90278
  fill: "currentColor"
90113
- }, dGe = {
90279
+ }, vGe = {
90114
90280
  key: 2,
90115
90281
  width: "18",
90116
90282
  height: "18",
@@ -90118,7 +90284,7 @@ var bWe = {
90118
90284
  fill: "none",
90119
90285
  stroke: "currentColor",
90120
90286
  "stroke-width": "2"
90121
- }, fGe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90287
+ }, yGe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90122
90288
  __name: "ChatInput",
90123
90289
  props: {
90124
90290
  placeholder: {},
@@ -90176,19 +90342,19 @@ var bWe = {
90176
90342
  window.removeEventListener("dragstart", N, !0), window.removeEventListener("dragend", P, !0), te && clearTimeout(te);
90177
90343
  }), (t, n) => {
90178
90344
  var h;
90179
- return X(), Z("div", LWe, [Y(o) ? (X(), Z("button", {
90345
+ return X(), Z("div", WWe, [Y(o) ? (X(), Z("button", {
90180
90346
  key: 0,
90181
90347
  class: "undo-foot-btn",
90182
90348
  title: Y(f).undoTitle,
90183
90349
  onClick: n[0] || (n[0] = (...e) => Y(s) && Y(s)(...e))
90184
- }, J(Y(f).undo), 9, RWe)) : $("", !0), Q("div", {
90350
+ }, J(Y(f).undo), 9, GWe)) : $("", !0), Q("div", {
90185
90351
  class: TK(["chat-input-wrap", { "drag-over": D.value }]),
90186
90352
  onPointerdownCapture: T,
90187
90353
  onDragover: n[5] || (n[5] = mZ((e) => D.value = !0, ["prevent"])),
90188
90354
  onDragleave: n[6] || (n[6] = (e) => D.value = !1),
90189
90355
  onDrop: mZ(A, ["prevent"])
90190
90356
  }, [
90191
- D.value ? (X(), Z("div", zWe, [n[7] || (n[7] = Q("svg", {
90357
+ D.value ? (X(), Z("div", KWe, [n[7] || (n[7] = Q("svg", {
90192
90358
  class: "drop-hint-icon",
90193
90359
  viewBox: "0 0 24 24",
90194
90360
  fill: "none",
@@ -90211,7 +90377,7 @@ var bWe = {
90211
90377
  }),
90212
90378
  Q("path", { d: "m21 15-4.35-4.35a1.5 1.5 0 0 0-2.12 0L5 20" })
90213
90379
  ], -1)), cX(" " + J(Y(f).imageDropHint), 1)])) : $("", !0),
90214
- (h = e.quickActions) != null && h.length ? (X(), Z("div", BWe, [(X(!0), Z(KY, null, nY(e.quickActions, (t, n) => (X(), Z("button", {
90380
+ (h = e.quickActions) != null && h.length ? (X(), Z("div", qWe, [(X(!0), Z(KY, null, nY(e.quickActions, (t, n) => (X(), Z("button", {
90215
90381
  key: n,
90216
90382
  type: "button",
90217
90383
  class: "quick-action-chip",
@@ -90219,39 +90385,39 @@ var bWe = {
90219
90385
  "data-test": `quick-action-${n}`,
90220
90386
  title: t.prompt,
90221
90387
  onClick: (e) => M(t)
90222
- }, J(t.icon ? `${t.icon} ` : "") + J(t.label), 9, VWe))), 128))])) : $("", !0),
90223
- Y(c).length || Y(y).length || Y(p) || Y(S) ? (X(), Z("div", HWe, [
90224
- Y(c).length ? (X(), Z("div", UWe, [(X(!0), Z(KY, null, nY(Y(c), (e) => (X(), Z("span", {
90388
+ }, J(t.icon ? `${t.icon} ` : "") + J(t.label), 9, JWe))), 128))])) : $("", !0),
90389
+ Y(c).length || Y(y).length || Y(p) || Y(S) ? (X(), Z("div", YWe, [
90390
+ Y(c).length ? (X(), Z("div", XWe, [(X(!0), Z(KY, null, nY(Y(c), (e) => (X(), Z("span", {
90225
90391
  key: e.path,
90226
90392
  class: "focus-chip",
90227
90393
  title: Y(f).focusChipTitlePrefix + e.path + Y(f).focusChipTitleHint,
90228
90394
  onClick: (t) => Y(u)(e)
90229
90395
  }, [
90230
- Q("span", GWe, [oX(g9, { icon: Y(d).focus }, null, 8, ["icon"])]),
90231
- Q("code", KWe, J(e.path), 1),
90396
+ Q("span", QWe, [oX(g9, { icon: Y(d).focus }, null, 8, ["icon"])]),
90397
+ Q("code", $We, J(e.path), 1),
90232
90398
  Q("button", {
90233
90399
  type: "button",
90234
90400
  class: "focus-chip-x",
90235
90401
  "data-test": "focus-clear",
90236
90402
  title: Y(f).removeFocus,
90237
90403
  onClick: mZ((t) => Y(l)(e.path), ["stop"])
90238
- }, "✕", 8, qWe)
90239
- ], 8, WWe))), 128))])) : $("", !0),
90240
- Y(p) ? (X(), Z("div", JWe, [Q("span", {
90404
+ }, "✕", 8, eGe)
90405
+ ], 8, ZWe))), 128))])) : $("", !0),
90406
+ Y(p) ? (X(), Z("div", tGe, [Q("span", {
90241
90407
  class: "quote-chip",
90242
90408
  title: w(Y(p))
90243
90409
  }, [
90244
90410
  n[8] || (n[8] = Q("span", { class: "quote-chip-icon" }, "❝", -1)),
90245
- Q("span", XWe, J(Y(p).text), 1),
90411
+ Q("span", rGe, J(Y(p).text), 1),
90246
90412
  Q("button", {
90247
90413
  type: "button",
90248
90414
  class: "focus-chip-x",
90249
90415
  "data-test": "quote-clear",
90250
90416
  title: Y(f).quoteRemove,
90251
90417
  onClick: n[1] || (n[1] = mZ((e) => Y(m)(), ["stop"]))
90252
- }, "✕", 8, ZWe)
90253
- ], 8, YWe)])) : $("", !0),
90254
- Y(y).length ? (X(), Z("div", QWe, [(X(!0), Z(KY, null, nY(Y(y), (e) => (X(), Z("span", {
90418
+ }, "✕", 8, iGe)
90419
+ ], 8, nGe)])) : $("", !0),
90420
+ Y(y).length ? (X(), Z("div", aGe, [(X(!0), Z(KY, null, nY(Y(y), (e) => (X(), Z("span", {
90255
90421
  key: e.id,
90256
90422
  class: "img-chip",
90257
90423
  title: e.name || Y(f).imageAlt
@@ -90259,15 +90425,15 @@ var bWe = {
90259
90425
  class: "img-chip-thumb",
90260
90426
  src: e.dataUri,
90261
90427
  alt: e.name || Y(f).imageAlt
90262
- }, null, 8, eGe), Q("button", {
90428
+ }, null, 8, sGe), Q("button", {
90263
90429
  type: "button",
90264
90430
  class: "img-chip-x",
90265
90431
  "data-test": "img-chip-x",
90266
90432
  onClick: (t) => Y(x)(e.id)
90267
- }, "✕", 8, tGe)], 8, $We))), 128))])) : $("", !0),
90268
- Y(S) ? (X(), Z("div", nGe, J(Y(S)), 1)) : $("", !0)
90433
+ }, "✕", 8, cGe)], 8, oGe))), 128))])) : $("", !0),
90434
+ Y(S) ? (X(), Z("div", lGe, J(Y(S)), 1)) : $("", !0)
90269
90435
  ])) : $("", !0),
90270
- e.gatePending ? (X(), Z("div", rGe, J(Y(f).inputGateHint), 1)) : $("", !0),
90436
+ e.gatePending ? (X(), Z("div", uGe, J(Y(f).inputGateHint), 1)) : $("", !0),
90271
90437
  fJ(Q("textarea", {
90272
90438
  "onUpdate:modelValue": n[2] || (n[2] = (e) => /* @__PURE__ */ Fq(r) ? r.value = e : null),
90273
90439
  class: "chat-input",
@@ -90276,9 +90442,9 @@ var bWe = {
90276
90442
  disabled: e.gatePending,
90277
90443
  onKeydown: n[3] || (n[3] = (...e) => Y(a) && Y(a)(...e)),
90278
90444
  onPaste: j
90279
- }, null, 40, iGe), [[pZ, Y(r)]]),
90280
- Q("div", aGe, [
90281
- Q("span", oGe, J(Y(f).sendHint), 1),
90445
+ }, null, 40, dGe), [[pZ, Y(r)]]),
90446
+ Q("div", fGe, [
90447
+ Q("span", pGe, J(Y(f).sendHint), 1),
90282
90448
  Q("button", {
90283
90449
  class: "attach-btn",
90284
90450
  title: Y(f).attachImageTitle,
@@ -90288,7 +90454,7 @@ var bWe = {
90288
90454
  }, [Y(d).attachImage ? (X(), tX(g9, {
90289
90455
  key: 0,
90290
90456
  icon: Y(d).attachImage
90291
- }, null, 8, ["icon"])) : (X(), Z("svg", cGe, [...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, sGe),
90457
+ }, null, 8, ["icon"])) : (X(), Z("svg", hGe, [...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, mGe),
90292
90458
  Q("input", {
90293
90459
  ref_key: "fileInput",
90294
90460
  ref: E,
@@ -90304,7 +90470,7 @@ var bWe = {
90304
90470
  disabled: !Y(g).loading && !Y(r).trim() && !Y(y).length && !Y(C) || e.gatePending && !Y(g).loading,
90305
90471
  title: Y(g).loading ? Y(f).stopTitle : Y(f).sendTitle,
90306
90472
  onClick: n[4] || (n[4] = (e) => Y(g).loading ? Y(_)() : Y(i)())
90307
- }, [Y(g).loading ? (X(), Z("svg", uGe, [...n[10] || (n[10] = [Q("rect", {
90473
+ }, [Y(g).loading ? (X(), Z("svg", _Ge, [...n[10] || (n[10] = [Q("rect", {
90308
90474
  x: "6",
90309
90475
  y: "6",
90310
90476
  width: "12",
@@ -90313,12 +90479,12 @@ var bWe = {
90313
90479
  }, null, -1)])])) : Y(d).send ? (X(), tX(g9, {
90314
90480
  key: 1,
90315
90481
  icon: Y(d).send
90316
- }, null, 8, ["icon"])) : (X(), Z("svg", dGe, [...n[11] || (n[11] = [Q("line", {
90482
+ }, null, 8, ["icon"])) : (X(), Z("svg", vGe, [...n[11] || (n[11] = [Q("line", {
90317
90483
  x1: "22",
90318
90484
  y1: "2",
90319
90485
  x2: "11",
90320
90486
  y2: "13"
90321
- }, null, -1), Q("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)])]))], 10, lGe)
90487
+ }, null, -1), Q("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)])]))], 10, gGe)
90322
90488
  ])
90323
90489
  ], 34)]);
90324
90490
  };
@@ -90327,178 +90493,178 @@ var bWe = {
90327
90493
  //#endregion
90328
90494
  //#region src/core/components/DebugDrawer.vue?vue&type=script&setup=true&lang.ts
90329
90495
  M();
90330
- var pGe = {
90496
+ var bGe = {
90331
90497
  key: 0,
90332
90498
  class: "debug-drawer"
90333
- }, mGe = { class: "drawer-header" }, hGe = { class: "tab-group" }, gGe = { class: "header-actions" }, _Ge = ["title"], vGe = ["title"], yGe = ["title"], bGe = {
90499
+ }, xGe = { class: "drawer-header" }, SGe = { class: "tab-group" }, CGe = { class: "header-actions" }, wGe = ["title"], TGe = ["title"], EGe = ["title"], DGe = {
90334
90500
  key: 0,
90335
90501
  class: "drawer-filters"
90336
- }, xGe = ["onClick"], SGe = { class: "chip-count" }, CGe = { class: "chip-count" }, wGe = {
90502
+ }, OGe = ["onClick"], kGe = { class: "chip-count" }, AGe = { class: "chip-count" }, jGe = {
90337
90503
  key: 0,
90338
90504
  class: "context-panel"
90339
- }, TGe = {
90505
+ }, MGe = {
90340
90506
  key: 0,
90341
90507
  class: "trace-empty"
90342
- }, EGe = { class: "ctx-overview" }, DGe = { class: "ctx-occupancy" }, OGe = ["title"], kGe = ["title"], AGe = { class: "ctx-pct" }, jGe = { class: "ctx-kv-row" }, MGe = { class: "ctx-kv" }, NGe = {
90508
+ }, NGe = { class: "ctx-overview" }, PGe = { class: "ctx-occupancy" }, FGe = ["title"], IGe = ["title"], LGe = { class: "ctx-pct" }, RGe = { class: "ctx-kv-row" }, zGe = { class: "ctx-kv" }, BGe = {
90343
90509
  key: 0,
90344
90510
  class: "ctx-kv"
90345
- }, PGe = {
90511
+ }, VGe = {
90346
90512
  key: 1,
90347
90513
  class: "ctx-kv"
90348
- }, FGe = { class: "ctx-section-title" }, IGe = ["title"], LGe = { class: "ctx-cat-bar" }, RGe = { class: "ctx-cat-tokens" }, zGe = {
90514
+ }, HGe = { class: "ctx-section-title" }, UGe = ["title"], WGe = { class: "ctx-cat-bar" }, GGe = { class: "ctx-cat-tokens" }, KGe = {
90349
90515
  key: 0,
90350
90516
  class: "ctx-compression"
90351
- }, BGe = { class: "ctx-section-title" }, VGe = { class: "ctx-kv-row" }, HGe = { class: "ctx-kv" }, UGe = { class: "ctx-kv" }, WGe = { class: "ctx-kv" }, GGe = {
90517
+ }, qGe = { class: "ctx-section-title" }, JGe = { class: "ctx-kv-row" }, YGe = { class: "ctx-kv" }, XGe = { class: "ctx-kv" }, ZGe = { class: "ctx-kv" }, QGe = {
90352
90518
  key: 0,
90353
90519
  class: "ctx-kv"
90354
- }, KGe = {
90520
+ }, $Ge = {
90355
90521
  key: 1,
90356
90522
  class: "subagent-panel"
90357
- }, qGe = {
90523
+ }, eKe = {
90358
90524
  key: 0,
90359
90525
  class: "sub-section"
90360
- }, JGe = { class: "sub-section-title" }, YGe = {
90526
+ }, tKe = { class: "sub-section-title" }, nKe = {
90361
90527
  key: 1,
90362
90528
  class: "trace-empty"
90363
- }, XGe = {
90529
+ }, rKe = {
90364
90530
  key: 0,
90365
90531
  class: "sub-section"
90366
- }, ZGe = { class: "sub-section-title" }, QGe = { class: "sub-head" }, $Ge = { class: "sub-label" }, eKe = { class: "sub-steps-badge" }, tKe = { class: "sub-task" }, nKe = {
90532
+ }, iKe = { class: "sub-section-title" }, aKe = { class: "sub-head" }, oKe = { class: "sub-label" }, sKe = { class: "sub-steps-badge" }, cKe = { class: "sub-task" }, lKe = {
90367
90533
  key: 1,
90368
90534
  class: "sub-section"
90369
- }, rKe = { class: "sub-section-title" }, iKe = { class: "sub-head" }, aKe = { class: "sub-label" }, oKe = {
90535
+ }, uKe = { class: "sub-section-title" }, dKe = { class: "sub-head" }, fKe = { class: "sub-label" }, pKe = {
90370
90536
  key: 0,
90371
90537
  class: "sub-dur"
90372
- }, sKe = ["onClick"], cKe = { class: "sub-task" }, lKe = {
90538
+ }, mKe = ["onClick"], hKe = { class: "sub-task" }, gKe = {
90373
90539
  key: 0,
90374
90540
  class: "sub-result"
90375
- }, uKe = {
90541
+ }, _Ke = {
90376
90542
  key: 1,
90377
90543
  class: "sub-steps-list"
90378
- }, dKe = { class: "sub-step-kind" }, fKe = { class: "sub-step-name" }, pKe = { class: "sub-step-ts" }, mKe = {
90544
+ }, vKe = { class: "sub-step-kind" }, yKe = { class: "sub-step-name" }, bKe = { class: "sub-step-ts" }, xKe = {
90379
90545
  key: 0,
90380
90546
  class: "empty"
90381
- }, hKe = ["onClick"], gKe = { class: "log-group-title" }, _Ke = { class: "log-group-meta" }, vKe = {
90547
+ }, SKe = ["onClick"], CKe = { class: "log-group-title" }, wKe = { class: "log-group-meta" }, TKe = {
90382
90548
  key: 0,
90383
90549
  class: "lg-badge"
90384
- }, yKe = {
90550
+ }, EKe = {
90385
90551
  key: 1,
90386
90552
  class: "lg-badge"
90387
- }, bKe = {
90553
+ }, DKe = {
90388
90554
  key: 2,
90389
90555
  class: "lg-badge err"
90390
- }, xKe = { class: "log-group-body" }, SKe = { class: "log-head" }, CKe = {
90556
+ }, OKe = { class: "log-group-body" }, kKe = { class: "log-head" }, AKe = {
90391
90557
  key: 0,
90392
90558
  class: "log-source"
90393
- }, wKe = { class: "log-time" }, TKe = { class: "log-body" }, EKe = { class: "kv-grid" }, DKe = { class: "kv" }, OKe = { class: "k" }, kKe = { class: "v" }, AKe = { class: "kv" }, jKe = { class: "k" }, MKe = { class: "v" }, NKe = { class: "kv" }, PKe = { class: "v" }, FKe = { class: "kv" }, IKe = { class: "k" }, LKe = { class: "v" }, RKe = { class: "section-label" }, zKe = { class: "chip-row" }, BKe = { class: "section-label" }, VKe = { class: "msg-list" }, HKe = { class: "msg-text" }, UKe = { class: "badge-row" }, WKe = { class: "badge" }, GKe = {
90559
+ }, jKe = { class: "log-time" }, MKe = { class: "log-body" }, NKe = { class: "kv-grid" }, PKe = { class: "kv" }, FKe = { class: "k" }, IKe = { class: "v" }, LKe = { class: "kv" }, RKe = { class: "k" }, zKe = { class: "v" }, BKe = { class: "kv" }, VKe = { class: "v" }, HKe = { class: "kv" }, UKe = { class: "k" }, WKe = { class: "v" }, GKe = { class: "section-label" }, KKe = { class: "chip-row" }, qKe = { class: "section-label" }, JKe = { class: "msg-list" }, YKe = { class: "msg-text" }, XKe = { class: "badge-row" }, ZKe = { class: "badge" }, QKe = {
90394
90560
  key: 0,
90395
90561
  class: "badge muted"
90396
- }, KKe = { class: "badge muted" }, qKe = {
90562
+ }, $Ke = { class: "badge muted" }, eqe = {
90397
90563
  key: 1,
90398
90564
  class: "badge muted"
90399
- }, JKe = ["onClick"], YKe = ["title", "onClick"], XKe = ["onClick"], ZKe = ["title", "onClick"], QKe = { class: "msg-detail" }, $Ke = {
90565
+ }, tqe = ["onClick"], nqe = ["title", "onClick"], rqe = ["onClick"], iqe = ["title", "onClick"], aqe = { class: "msg-detail" }, oqe = {
90400
90566
  key: 0,
90401
90567
  class: "msg-text"
90402
- }, eqe = { class: "tc-inline-name" }, tqe = { class: "tc-inline-args" }, nqe = {
90568
+ }, sqe = { class: "tc-inline-name" }, cqe = { class: "tc-inline-args" }, lqe = {
90403
90569
  key: 1,
90404
90570
  class: "tc-id"
90405
- }, rqe = {
90571
+ }, uqe = {
90406
90572
  key: 1,
90407
90573
  class: "log-raw"
90408
- }, iqe = { class: "badge-row" }, aqe = { class: "badge" }, oqe = {
90574
+ }, dqe = { class: "badge-row" }, fqe = { class: "badge" }, pqe = {
90409
90575
  key: 0,
90410
90576
  class: "badge warn"
90411
- }, sqe = {
90577
+ }, mqe = {
90412
90578
  key: 0,
90413
90579
  class: "resp-content"
90414
- }, cqe = {
90580
+ }, hqe = {
90415
90581
  key: 1,
90416
90582
  class: "tc-list"
90417
- }, lqe = { class: "tc-name" }, uqe = { class: "tc-args" }, dqe = {
90583
+ }, gqe = { class: "tc-name" }, _qe = { class: "tc-args" }, vqe = {
90418
90584
  key: 2,
90419
90585
  class: "usage-row"
90420
- }, fqe = { class: "usage" }, pqe = { class: "usage" }, mqe = { class: "usage" }, hqe = {
90586
+ }, yqe = { class: "usage" }, bqe = { class: "usage" }, xqe = { class: "usage" }, Sqe = {
90421
90587
  key: 0,
90422
90588
  class: "usage"
90423
- }, gqe = { class: "tc-name" }, _qe = {
90589
+ }, Cqe = { class: "tc-name" }, wqe = {
90424
90590
  key: 0,
90425
90591
  class: "tc-dur"
90426
- }, vqe = ["title", "onClick"], yqe = { class: "tc-args" }, bqe = { class: "tc-result-sep" }, xqe = { class: "tc-args tc-result" }, Sqe = {
90592
+ }, Tqe = ["title", "onClick"], Eqe = { class: "tc-args" }, Dqe = { class: "tc-result-sep" }, Oqe = { class: "tc-args tc-result" }, kqe = {
90427
90593
  key: 1,
90428
90594
  class: "tc-card inline"
90429
- }, Cqe = { class: "tc-name" }, wqe = {
90595
+ }, Aqe = { class: "tc-name" }, jqe = {
90430
90596
  key: 0,
90431
90597
  class: "tc-dur running"
90432
- }, Tqe = { class: "tc-args" }, Eqe = {
90598
+ }, Mqe = { class: "tc-args" }, Nqe = {
90433
90599
  key: 4,
90434
90600
  class: "err-box"
90435
- }, Dqe = { class: "log-footer" }, Oqe = ["onClick"], kqe = ["onClick"], Aqe = {
90601
+ }, Pqe = { class: "log-footer" }, Fqe = ["onClick"], Iqe = ["onClick"], Lqe = {
90436
90602
  key: 0,
90437
90603
  class: "log-raw"
90438
- }, jqe = {
90604
+ }, Rqe = {
90439
90605
  key: 3,
90440
90606
  class: "info-body"
90441
- }, Mqe = {
90607
+ }, zqe = {
90442
90608
  key: 0,
90443
90609
  class: "empty"
90444
- }, Nqe = { class: "info-section" }, Pqe = { class: "info-title" }, Fqe = { class: "kv-grid" }, Iqe = { class: "kv" }, Lqe = { class: "v" }, Rqe = { class: "kv" }, zqe = { class: "k" }, Bqe = { class: "v" }, Vqe = { class: "kv" }, Hqe = { class: "k" }, Uqe = { class: "v" }, Wqe = { class: "kv" }, Gqe = { class: "k" }, Kqe = { class: "v" }, qqe = {
90610
+ }, Bqe = { class: "info-section" }, Vqe = { class: "info-title" }, Hqe = { class: "kv-grid" }, Uqe = { class: "kv" }, Wqe = { class: "v" }, Gqe = { class: "kv" }, Kqe = { class: "k" }, qqe = { class: "v" }, Jqe = { class: "kv" }, Yqe = { class: "k" }, Xqe = { class: "v" }, Zqe = { class: "kv" }, Qqe = { class: "k" }, $qe = { class: "v" }, eJe = {
90445
90611
  class: "kv",
90446
90612
  style: { "margin-top": "6px" }
90447
- }, Jqe = { class: "k" }, Yqe = {
90613
+ }, tJe = { class: "k" }, nJe = {
90448
90614
  class: "v",
90449
90615
  style: { "font-size": "11px" }
90450
- }, Xqe = { class: "info-section" }, Zqe = { class: "info-title" }, Qqe = { class: "info-name" }, $qe = { class: "info-desc" }, eJe = {
90616
+ }, rJe = { class: "info-section" }, iJe = { class: "info-title" }, aJe = { class: "info-name" }, oJe = { class: "info-desc" }, sJe = {
90451
90617
  key: 0,
90452
90618
  class: "info-section"
90453
- }, tJe = { class: "info-title" }, nJe = { class: "info-hint" }, rJe = ["onClick"], iJe = { class: "info-desc" }, aJe = {
90619
+ }, cJe = { class: "info-title" }, lJe = { class: "info-hint" }, uJe = ["onClick"], dJe = { class: "info-desc" }, fJe = {
90454
90620
  key: 0,
90455
90621
  class: "skill-content"
90456
- }, oJe = {
90622
+ }, pJe = {
90457
90623
  key: 0,
90458
90624
  class: "skill-loading"
90459
- }, sJe = {
90625
+ }, mJe = {
90460
90626
  key: 1,
90461
90627
  class: "skill-error"
90462
- }, cJe = {
90628
+ }, hJe = {
90463
90629
  key: 2,
90464
90630
  class: "skill-pre"
90465
- }, lJe = {
90631
+ }, gJe = {
90466
90632
  key: 1,
90467
90633
  class: "info-section"
90468
- }, uJe = { class: "info-title" }, dJe = { class: "info-item" }, fJe = { class: "info-name" }, pJe = { class: "info-desc" }, mJe = { class: "info-section" }, hJe = { class: "info-title" }, gJe = { class: "kv-grid" }, _Je = { class: "kv" }, vJe = { class: "k" }, yJe = { class: "v" }, bJe = { class: "kv" }, xJe = { class: "k" }, SJe = { class: "v" }, CJe = { class: "kv" }, wJe = { class: "k" }, TJe = { class: "v" }, EJe = { class: "kv" }, DJe = { class: "k" }, OJe = {
90634
+ }, _Je = { class: "info-title" }, vJe = { class: "info-item" }, yJe = { class: "info-name" }, bJe = { class: "info-desc" }, xJe = { class: "info-section" }, SJe = { class: "info-title" }, CJe = { class: "kv-grid" }, wJe = { class: "kv" }, TJe = { class: "k" }, EJe = { class: "v" }, DJe = { class: "kv" }, OJe = { class: "k" }, kJe = { class: "v" }, AJe = { class: "kv" }, jJe = { class: "k" }, MJe = { class: "v" }, NJe = { class: "kv" }, PJe = { class: "k" }, FJe = {
90469
90635
  class: "v",
90470
90636
  style: { "font-size": "11px" }
90471
- }, kJe = {
90637
+ }, IJe = {
90472
90638
  key: 2,
90473
90639
  class: "info-section"
90474
- }, AJe = { class: "info-title" }, jJe = { class: "info-name" }, MJe = { class: "src-tag mcp" }, NJe = { class: "info-desc" }, PJe = {
90640
+ }, LJe = { class: "info-title" }, RJe = { class: "info-name" }, zJe = { class: "src-tag mcp" }, BJe = { class: "info-desc" }, VJe = {
90475
90641
  key: 3,
90476
90642
  class: "info-section"
90477
- }, FJe = { class: "info-title" }, IJe = { class: "kv-grid" }, LJe = { class: "kv" }, RJe = { class: "k" }, zJe = { class: "v" }, BJe = { class: "kv" }, VJe = { class: "k" }, HJe = { class: "v" }, UJe = { class: "kv" }, WJe = { class: "k" }, GJe = { class: "v" }, KJe = {
90643
+ }, HJe = { class: "info-title" }, UJe = { class: "kv-grid" }, WJe = { class: "kv" }, GJe = { class: "k" }, KJe = { class: "v" }, qJe = { class: "kv" }, JJe = { class: "k" }, YJe = { class: "v" }, XJe = { class: "kv" }, ZJe = { class: "k" }, QJe = { class: "v" }, $Je = {
90478
90644
  key: 0,
90479
90645
  class: "kv"
90480
- }, qJe = { class: "k" }, JJe = {
90646
+ }, eYe = { class: "k" }, tYe = {
90481
90647
  class: "v",
90482
90648
  style: { "font-size": "11px" }
90483
- }, YJe = {
90649
+ }, nYe = {
90484
90650
  key: 4,
90485
90651
  class: "info-section"
90486
- }, XJe = { class: "info-title" }, ZJe = {
90652
+ }, rYe = { class: "info-title" }, iYe = {
90487
90653
  key: 5,
90488
90654
  class: "info-section"
90489
- }, QJe = { class: "info-title" }, $Je = { class: "info-pre" }, eYe = {
90655
+ }, aYe = { class: "info-title" }, oYe = { class: "info-pre" }, sYe = {
90490
90656
  key: 6,
90491
90657
  class: "info-section"
90492
- }, tYe = { class: "info-title" }, nYe = { class: "info-kv" }, rYe = { class: "kv" }, iYe = { class: "k" }, aYe = { class: "v" }, oYe = { class: "kv" }, sYe = { class: "k" }, cYe = { class: "v" }, lYe = { class: "kv" }, uYe = { class: "k" }, dYe = { class: "v" }, fYe = { class: "kv" }, pYe = { class: "k" }, mYe = { class: "v" }, hYe = { class: "kv" }, gYe = { class: "k" }, _Ye = {
90658
+ }, cYe = { class: "info-title" }, lYe = { class: "info-kv" }, uYe = { class: "kv" }, dYe = { class: "k" }, fYe = { class: "v" }, pYe = { class: "kv" }, mYe = { class: "k" }, hYe = { class: "v" }, gYe = { class: "kv" }, _Ye = { class: "k" }, vYe = { class: "v" }, yYe = { class: "kv" }, bYe = { class: "k" }, xYe = { class: "v" }, SYe = { class: "kv" }, CYe = { class: "k" }, wYe = {
90493
90659
  class: "v",
90494
90660
  style: { "font-size": "11px" }
90495
- }, vYe = {
90661
+ }, TYe = {
90496
90662
  key: 0,
90497
90663
  class: "kv"
90498
- }, yYe = { class: "k" }, bYe = {
90664
+ }, EYe = { class: "k" }, DYe = {
90499
90665
  class: "v",
90500
90666
  style: { "font-size": "11px" }
90501
- }, Q9 = 400, xYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90667
+ }, Q9 = 400, OYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
90502
90668
  __name: "DebugDrawer",
90503
90669
  props: {
90504
90670
  logs: { default: () => [] },
@@ -90917,8 +91083,8 @@ var pGe = {
90917
91083
  return (t, n) => (X(), tX(DJ, { to: "body" }, [oX(LX, { name: "drawer" }, {
90918
91084
  default: dJ(() => {
90919
91085
  var t;
90920
- return [e.visible ? (X(), Z("div", pGe, [Q("div", { class: TK(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
90921
- Q("div", mGe, [Q("div", hGe, [
91086
+ return [e.visible ? (X(), Z("div", bGe, [Q("div", { class: TK(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
91087
+ Q("div", xGe, [Q("div", SGe, [
90922
91088
  Q("button", {
90923
91089
  class: TK(["tab-btn", { active: ue.value === "logs" }]),
90924
91090
  onClick: n[0] || (n[0] = (e) => me("logs"))
@@ -90938,33 +91104,33 @@ var pGe = {
90938
91104
  class: TK(["tab-btn", { active: ue.value === "info" }]),
90939
91105
  onClick: n[3] || (n[3] = (e) => me("info"))
90940
91106
  }, "🧬 " + J(y.value.debugTabInfo), 3)) : $("", !0)
90941
- ]), Q("div", gGe, [
91107
+ ]), Q("div", CGe, [
90942
91108
  Q("button", {
90943
91109
  class: "hd-btn",
90944
91110
  title: y.value.debugCopyReport,
90945
91111
  onClick: v
90946
- }, J(g.value === "report" ? "✓" : "💾"), 9, _Ge),
91112
+ }, J(g.value === "report" ? "✓" : "💾"), 9, wGe),
90947
91113
  ue.value === "logs" ? (X(), Z("button", {
90948
91114
  key: 0,
90949
91115
  class: "hd-btn",
90950
91116
  title: y.value.debugClearLogs,
90951
91117
  onClick: le
90952
- }, "🗑️", 8, vGe)) : $("", !0),
91118
+ }, "🗑️", 8, TGe)) : $("", !0),
90953
91119
  Q("button", {
90954
91120
  class: "hd-btn",
90955
91121
  title: y.value.close,
90956
91122
  onClick: F
90957
- }, "✕", 8, yGe)
91123
+ }, "✕", 8, EGe)
90958
91124
  ])]),
90959
- ue.value === "logs" ? (X(), Z("div", bGe, [(X(!0), Z(KY, null, nY(b.value, (e, t) => (X(), Z("button", {
91125
+ ue.value === "logs" ? (X(), Z("div", DGe, [(X(!0), Z(KY, null, nY(b.value, (e, t) => (X(), Z("button", {
90960
91126
  key: t,
90961
91127
  class: TK(["filter-chip", { active: i.value === t }]),
90962
91128
  style: wK({ "--chip-color": e.color }),
90963
91129
  onClick: (e) => i.value = t
90964
- }, [cX(J(e.icon) + " " + J(e.label) + " ", 1), Q("span", SGe, J(C.value[t] || 0), 1)], 14, xGe))), 128)), Q("button", {
91130
+ }, [cX(J(e.icon) + " " + J(e.label) + " ", 1), Q("span", kGe, J(C.value[t] || 0), 1)], 14, OGe))), 128)), Q("button", {
90965
91131
  class: TK(["filter-chip all", { active: i.value === "all" }]),
90966
91132
  onClick: n[4] || (n[4] = (e) => i.value = "all")
90967
- }, [cX(J(y.value.debugFilterAll) + " ", 1), Q("span", CGe, J(C.value.all || 0), 1)], 2)])) : $("", !0),
91133
+ }, [cX(J(y.value.debugFilterAll) + " ", 1), Q("span", AGe, J(C.value.all || 0), 1)], 2)])) : $("", !0),
90968
91134
  Q("div", {
90969
91135
  class: "drawer-body",
90970
91136
  ref_key: "drawerBodyEl",
@@ -90978,8 +91144,8 @@ var pGe = {
90978
91144
  ref_key: "drawerContentsEl",
90979
91145
  ref: c
90980
91146
  }, [
90981
- ue.value === "context" ? (X(), Z("div", wGe, [be.value ? (X(), Z(KY, { key: 1 }, [be.value ? (X(), Z(KY, { key: 0 }, [
90982
- Q("div", EGe, [Q("div", DGe, [Q("div", {
91147
+ ue.value === "context" ? (X(), Z("div", jGe, [be.value ? (X(), Z(KY, { key: 1 }, [be.value ? (X(), Z(KY, { key: 0 }, [
91148
+ Q("div", NGe, [Q("div", PGe, [Q("div", {
90983
91149
  class: "ctx-bar-track",
90984
91150
  title: `${y.value.debugCtxOccupancy} ${Math.round(be.value.occupancy * 100)}%`
90985
91151
  }, [Q("div", {
@@ -90990,12 +91156,12 @@ var pGe = {
90990
91156
  class: "ctx-threshold-mark",
90991
91157
  style: wK({ left: Math.min(be.value.thresholdRatio * 100, 100) + "%" }),
90992
91158
  title: y.value.debugCtxThreshold
90993
- }, null, 12, kGe)) : $("", !0)], 8, OGe), Q("span", AGe, J(Math.round(be.value.occupancy * 100)) + "%", 1)]), Q("div", jGe, [
90994
- Q("span", MGe, J(y.value.debugCtxTokens) + " " + J(be.value.totalTokens) + " token", 1),
90995
- be.value.contextWindow ? (X(), Z("span", NGe, J(y.value.debugCtxWindow) + " " + J(be.value.contextWindow), 1)) : $("", !0),
90996
- be.value.thresholdRatio > 0 ? (X(), Z("span", PGe, J(y.value.debugCtxThresholdPct) + " " + J(Math.round(be.value.thresholdRatio * 100)) + "%", 1)) : $("", !0)
91159
+ }, null, 12, IGe)) : $("", !0)], 8, FGe), Q("span", LGe, J(Math.round(be.value.occupancy * 100)) + "%", 1)]), Q("div", RGe, [
91160
+ Q("span", zGe, J(y.value.debugCtxTokens) + " " + J(be.value.totalTokens) + " token", 1),
91161
+ be.value.contextWindow ? (X(), Z("span", BGe, J(y.value.debugCtxWindow) + " " + J(be.value.contextWindow), 1)) : $("", !0),
91162
+ be.value.thresholdRatio > 0 ? (X(), Z("span", VGe, J(y.value.debugCtxThresholdPct) + " " + J(Math.round(be.value.thresholdRatio * 100)) + "%", 1)) : $("", !0)
90997
91163
  ])]),
90998
- Q("div", FGe, J(y.value.debugCtxCategories), 1),
91164
+ Q("div", HGe, J(y.value.debugCtxCategories), 1),
90999
91165
  (X(!0), Z(KY, null, nY(be.value.categories, (e) => (X(), Z("div", {
91000
91166
  key: e.key,
91001
91167
  class: "ctx-cat"
@@ -91003,62 +91169,62 @@ var pGe = {
91003
91169
  Q("span", {
91004
91170
  class: "ctx-cat-label",
91005
91171
  title: e.label
91006
- }, J(e.label), 9, IGe),
91007
- Q("div", LGe, [Q("div", {
91172
+ }, J(e.label), 9, UGe),
91173
+ Q("div", WGe, [Q("div", {
91008
91174
  class: "ctx-cat-fill",
91009
91175
  style: wK({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
91010
91176
  }, null, 4)]),
91011
- Q("span", RGe, [cX(J(e.tokens) + " ", 1), Q("i", null, "(" + J(Math.round(e.pct * 100)) + "%)", 1)])
91177
+ Q("span", GGe, [cX(J(e.tokens) + " ", 1), Q("i", null, "(" + J(Math.round(e.pct * 100)) + "%)", 1)])
91012
91178
  ]))), 128)),
91013
- be.value.compression ? (X(), Z("div", zGe, [Q("div", BGe, J(y.value.debugCtxLastCompression), 1), Q("div", VGe, [
91014
- Q("span", HGe, J(y.value.debugCtxSummarized) + " " + J(be.value.compression.roundsSummarized) + "/" + J(be.value.compression.roundsTotal) + J(y.value.debugCtxRoundsSuffix), 1),
91015
- Q("span", UGe, J(y.value.debugCtxRecalled) + " " + J(be.value.compression.roundsRecalled), 1),
91016
- Q("span", WGe, J(be.value.compression.strategy), 1),
91017
- be.value.compression.decision ? (X(), Z("span", GGe, "🤖 " + J(y.value.debugCtxAgentDecision) + J(Oe(be.value.compression.decision)), 1)) : $("", !0)
91179
+ be.value.compression ? (X(), Z("div", KGe, [Q("div", qGe, J(y.value.debugCtxLastCompression), 1), Q("div", JGe, [
91180
+ Q("span", YGe, J(y.value.debugCtxSummarized) + " " + J(be.value.compression.roundsSummarized) + "/" + J(be.value.compression.roundsTotal) + J(y.value.debugCtxRoundsSuffix), 1),
91181
+ Q("span", XGe, J(y.value.debugCtxRecalled) + " " + J(be.value.compression.roundsRecalled), 1),
91182
+ Q("span", ZGe, J(be.value.compression.strategy), 1),
91183
+ be.value.compression.decision ? (X(), Z("span", QGe, "🤖 " + J(y.value.debugCtxAgentDecision) + J(Oe(be.value.compression.decision)), 1)) : $("", !0)
91018
91184
  ])])) : $("", !0)
91019
- ], 64)) : $("", !0)], 64)) : (X(), Z("div", TGe, J(y.value.debugCtxEmpty), 1))])) : $("", !0),
91020
- ue.value === "subagent" ? (X(), Z("div", KGe, [we.value.length ? (X(), Z("div", qGe, [Q("div", JGe, "🔒 " + J(y.value.debugLocksTitle) + " (" + J(we.value.length) + ")", 1), (X(!0), Z(KY, null, nY(we.value, ([e, t]) => (X(), Z("div", {
91185
+ ], 64)) : $("", !0)], 64)) : (X(), Z("div", MGe, J(y.value.debugCtxEmpty), 1))])) : $("", !0),
91186
+ ue.value === "subagent" ? (X(), Z("div", $Ge, [we.value.length ? (X(), Z("div", eKe, [Q("div", tKe, "🔒 " + J(y.value.debugLocksTitle) + " (" + J(we.value.length) + ")", 1), (X(!0), Z(KY, null, nY(we.value, ([e, t]) => (X(), Z("div", {
91021
91187
  key: "lock-" + e,
91022
91188
  class: "sub-task"
91023
- }, "🔒 " + J(e) + " ← " + J(t), 1))), 128))])) : $("", !0), !Se.value.length && !Ce.value.length ? (X(), Z("div", YGe, J(y.value.debugSubagentEmpty), 1)) : (X(), Z(KY, { key: 2 }, [Se.value.length ? (X(), Z("div", XGe, [Q("div", ZGe, "▶ " + J(y.value.debugSubRunningTitle) + " (" + J(Se.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Se.value, (e, t) => (X(), Z("div", {
91189
+ }, "🔒 " + J(e) + " ← " + J(t), 1))), 128))])) : $("", !0), !Se.value.length && !Ce.value.length ? (X(), Z("div", nKe, J(y.value.debugSubagentEmpty), 1)) : (X(), Z(KY, { key: 2 }, [Se.value.length ? (X(), Z("div", rKe, [Q("div", iKe, "▶ " + J(y.value.debugSubRunningTitle) + " (" + J(Se.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Se.value, (e, t) => (X(), Z("div", {
91024
91190
  key: "a" + t,
91025
91191
  class: TK(["sub-card", e.status])
91026
- }, [Q("div", QGe, [
91192
+ }, [Q("div", aKe, [
91027
91193
  Q("span", {
91028
91194
  class: "sub-status",
91029
91195
  style: wK({ background: Te.value[e.status] && Te.value[e.status].color || "#9ca3af" })
91030
91196
  }, J(Te.value[e.status] && Te.value[e.status].label || e.status), 5),
91031
- Q("span", $Ge, J(e.label), 1),
91032
- Q("span", eKe, J(e.steps.length) + J(y.value.debugStepsCountSuffix), 1)
91033
- ]), Q("div", tKe, J(ve(e.task, 80)), 1)], 2))), 128))])) : $("", !0), Ce.value.length ? (X(), Z("div", nKe, [Q("div", rKe, "🕐 " + J(y.value.debugSubHistoryTitle) + " (" + J(Ce.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Ce.value, (e, t) => (X(), Z("div", {
91197
+ Q("span", oKe, J(e.label), 1),
91198
+ Q("span", sKe, J(e.steps.length) + J(y.value.debugStepsCountSuffix), 1)
91199
+ ]), Q("div", cKe, J(ve(e.task, 80)), 1)], 2))), 128))])) : $("", !0), Ce.value.length ? (X(), Z("div", lKe, [Q("div", uKe, "🕐 " + J(y.value.debugSubHistoryTitle) + " (" + J(Ce.value.length) + ")", 1), (X(!0), Z(KY, null, nY(Ce.value, (e, t) => (X(), Z("div", {
91034
91200
  key: "h" + t,
91035
91201
  class: TK(["sub-card", e.status])
91036
91202
  }, [
91037
- Q("div", iKe, [
91203
+ Q("div", dKe, [
91038
91204
  Q("span", {
91039
91205
  class: "sub-status",
91040
91206
  style: wK({ background: Te.value[e.status] && Te.value[e.status].color || "#9ca3af" })
91041
91207
  }, J(Te.value[e.status] && Te.value[e.status].label || e.status), 5),
91042
- Q("span", aKe, J(e.label), 1),
91043
- e.durationMs == null ? $("", !0) : (X(), Z("span", oKe, J(ye(e.durationMs)), 1)),
91208
+ Q("span", fKe, J(e.label), 1),
91209
+ e.durationMs == null ? $("", !0) : (X(), Z("span", pKe, J(ye(e.durationMs)), 1)),
91044
91210
  e.steps.length ? (X(), Z("button", {
91045
91211
  key: 1,
91046
91212
  class: "sub-toggle",
91047
91213
  onClick: (e) => De(t)
91048
- }, J(Ee.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, sKe)) : $("", !0)
91214
+ }, J(Ee.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, mKe)) : $("", !0)
91049
91215
  ]),
91050
- Q("div", cKe, J(ve(e.task, 80)), 1),
91051
- e.resultPreview ? (X(), Z("div", lKe, J(e.resultPreview), 1)) : $("", !0),
91052
- Ee.value.has(t) && e.steps.length ? (X(), Z("div", uKe, [(X(!0), Z(KY, null, nY(e.steps, (e, t) => (X(), Z("div", {
91216
+ Q("div", hKe, J(ve(e.task, 80)), 1),
91217
+ e.resultPreview ? (X(), Z("div", gKe, J(e.resultPreview), 1)) : $("", !0),
91218
+ Ee.value.has(t) && e.steps.length ? (X(), Z("div", _Ke, [(X(!0), Z(KY, null, nY(e.steps, (e, t) => (X(), Z("div", {
91053
91219
  key: t,
91054
91220
  class: "sub-step"
91055
91221
  }, [
91056
- Q("span", dKe, J(e.kind === "tool_call" ? "🔧" : "✅"), 1),
91057
- Q("span", fKe, J(e.name), 1),
91058
- Q("span", pKe, J(re(e.ts)), 1)
91222
+ Q("span", vKe, J(e.kind === "tool_call" ? "🔧" : "✅"), 1),
91223
+ Q("span", yKe, J(e.name), 1),
91224
+ Q("span", bKe, J(re(e.ts)), 1)
91059
91225
  ]))), 128))])) : $("", !0)
91060
91226
  ], 2))), 128))])) : $("", !0)], 64))])) : $("", !0),
91061
- ue.value === "logs" ? (X(), Z(KY, { key: 2 }, [S.value.length === 0 ? (X(), Z("div", mKe, J(y.value.debugLogsEmpty), 1)) : $("", !0), (X(!0), Z(KY, null, nY(k.value, (e) => (X(), Z("div", {
91227
+ ue.value === "logs" ? (X(), Z(KY, { key: 2 }, [S.value.length === 0 ? (X(), Z("div", xKe, J(y.value.debugLogsEmpty), 1)) : $("", !0), (X(!0), Z(KY, null, nY(k.value, (e) => (X(), Z("div", {
91062
91228
  key: e.key,
91063
91229
  class: "log-group"
91064
91230
  }, [Q("div", {
@@ -91066,69 +91232,69 @@ var pGe = {
91066
91232
  onClick: (t) => N(e.key)
91067
91233
  }, [
91068
91234
  Q("span", { class: TK(["log-group-arrow", { open: te(e.key) }]) }, "▶", 2),
91069
- Q("span", gKe, J(P(e)), 1),
91070
- Q("span", _Ke, [
91235
+ Q("span", CKe, J(P(e)), 1),
91236
+ Q("span", wKe, [
91071
91237
  cX(J(re(e.firstTs)), 1),
91072
91238
  e.lastTs > e.firstTs ? (X(), Z(KY, { key: 0 }, [cX(" ~ " + J(re(e.lastTs)), 1)], 64)) : $("", !0),
91073
91239
  cX(" · " + J(ye(e.lastTs - e.firstTs)), 1)
91074
91240
  ]),
91075
- e.toolCount ? (X(), Z("span", vKe, "🔧 " + J(e.toolCount), 1)) : $("", !0),
91076
- e.tokens == null ? $("", !0) : (X(), Z("span", yKe, "Σ " + J(e.tokens) + " tok", 1)),
91077
- e.errorCount ? (X(), Z("span", bKe, "❌ " + J(e.errorCount), 1)) : $("", !0)
91078
- ], 10, hKe), fJ(Q("div", xKe, [(X(!0), Z(KY, null, nY(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => {
91241
+ e.toolCount ? (X(), Z("span", TKe, "🔧 " + J(e.toolCount), 1)) : $("", !0),
91242
+ e.tokens == null ? $("", !0) : (X(), Z("span", EKe, "Σ " + J(e.tokens) + " tok", 1)),
91243
+ e.errorCount ? (X(), Z("span", DKe, "❌ " + J(e.errorCount), 1)) : $("", !0)
91244
+ ], 10, SKe), fJ(Q("div", OKe, [(X(!0), Z(KY, null, nY(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => {
91079
91245
  var o, s, c, l, u, v, x, S;
91080
91246
  return X(), Z("div", {
91081
91247
  key: i,
91082
91248
  class: "log-item"
91083
91249
  }, [
91084
- Q("div", SKe, [
91250
+ Q("div", kKe, [
91085
91251
  Q("span", {
91086
91252
  class: "log-type",
91087
91253
  style: wK({ background: b.value[e.type].color })
91088
91254
  }, J(b.value[e.type].icon) + " " + J(b.value[e.type].label), 5),
91089
- e.source ? (X(), Z("span", CKe, "↳ " + J(e.source), 1)) : $("", !0),
91090
- Q("span", wKe, J(re(e.timestamp)), 1)
91255
+ e.source ? (X(), Z("span", AKe, "↳ " + J(e.source), 1)) : $("", !0),
91256
+ Q("span", jKe, J(re(e.timestamp)), 1)
91091
91257
  ]),
91092
- Q("div", TKe, [e.type === "context" ? (X(), Z(KY, { key: 0 }, [
91093
- Q("div", EKe, [
91094
- Q("div", DKe, [Q("span", OKe, J(y.value.debugModel), 1), Q("span", kKe, J(e.data.model), 1)]),
91095
- Q("div", AKe, [Q("span", jKe, J(y.value.debugTemperature), 1), Q("span", MKe, J(e.data.temperature), 1)]),
91096
- Q("div", NKe, [n[5] || (n[5] = Q("span", { class: "k" }, "MaxTokens", -1)), Q("span", PKe, J(e.data.maxTokens), 1)]),
91097
- Q("div", FKe, [Q("span", IKe, J(y.value.debugMessageCount), 1), Q("span", LKe, J(e.data.totalMessages), 1)])
91258
+ Q("div", MKe, [e.type === "context" ? (X(), Z(KY, { key: 0 }, [
91259
+ Q("div", NKe, [
91260
+ Q("div", PKe, [Q("span", FKe, J(y.value.debugModel), 1), Q("span", IKe, J(e.data.model), 1)]),
91261
+ Q("div", LKe, [Q("span", RKe, J(y.value.debugTemperature), 1), Q("span", zKe, J(e.data.temperature), 1)]),
91262
+ Q("div", BKe, [n[5] || (n[5] = Q("span", { class: "k" }, "MaxTokens", -1)), Q("span", VKe, J(e.data.maxTokens), 1)]),
91263
+ Q("div", HKe, [Q("span", UKe, J(y.value.debugMessageCount), 1), Q("span", WKe, J(e.data.totalMessages), 1)])
91098
91264
  ]),
91099
- Q("div", RKe, J(y.value.debugToolsLabel) + " (" + J(((o = e.data.tools) == null ? void 0 : o.length) || 0) + ")", 1),
91100
- Q("div", zKe, [(X(!0), Z(KY, null, nY(e.data.tools, (e) => (X(), Z("span", {
91265
+ Q("div", GKe, J(y.value.debugToolsLabel) + " (" + J(((o = e.data.tools) == null ? void 0 : o.length) || 0) + ")", 1),
91266
+ Q("div", KKe, [(X(!0), Z(KY, null, nY(e.data.tools, (e) => (X(), Z("span", {
91101
91267
  key: e,
91102
91268
  class: "tool-chip"
91103
91269
  }, J(e), 1))), 128))]),
91104
- Q("div", BKe, J(y.value.debugContextMessages), 1),
91105
- Q("div", VKe, [(X(!0), Z(KY, null, nY(e.data.messages, (e, t) => (X(), Z("div", {
91270
+ Q("div", qKe, J(y.value.debugContextMessages), 1),
91271
+ Q("div", JKe, [(X(!0), Z(KY, null, nY(e.data.messages, (e, t) => (X(), Z("div", {
91106
91272
  key: t,
91107
91273
  class: "msg-row"
91108
91274
  }, [Q("span", {
91109
91275
  class: "msg-role",
91110
91276
  style: wK({ background: ce(e.type).color })
91111
- }, J(ce(e.type).label), 5), Q("span", HKe, J(e.content), 1)]))), 128))])
91112
- ], 64)) : e.type === "llm_request" ? (X(), Z(KY, { key: 1 }, [Q("div", UKe, [
91113
- Q("span", WKe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1),
91114
- e.data.model ? (X(), Z("span", GKe, J(e.data.model), 1)) : $("", !0),
91115
- Q("span", KKe, [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)]),
91116
- (s = e.data.tools) != null && s.length ? (X(), Z("span", qKe, J(e.data.tools.length) + J(y.value.debugToolCountSuffix), 1)) : $("", !0),
91277
+ }, J(ce(e.type).label), 5), Q("span", YKe, J(e.content), 1)]))), 128))])
91278
+ ], 64)) : e.type === "llm_request" ? (X(), Z(KY, { key: 1 }, [Q("div", XKe, [
91279
+ Q("span", ZKe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1),
91280
+ e.data.model ? (X(), Z("span", QKe, J(e.data.model), 1)) : $("", !0),
91281
+ Q("span", $Ke, [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)]),
91282
+ (s = e.data.tools) != null && s.length ? (X(), Z("span", eqe, J(e.data.tools.length) + J(y.value.debugToolCountSuffix), 1)) : $("", !0),
91117
91283
  r != null && r > 0 ? (X(), Z("button", {
91118
91284
  key: 2,
91119
91285
  class: "view-toggle only-new-btn",
91120
91286
  onClick: (e) => h(i)
91121
- }, J(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, JKe)) : $("", !0),
91287
+ }, J(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, tqe)) : $("", !0),
91122
91288
  Q("button", {
91123
91289
  class: "view-toggle copy-btn",
91124
91290
  title: y.value.copy,
91125
91291
  onClick: (t) => _(oe(e.data.messages), "req" + i)
91126
- }, J(g.value === "req" + i ? "✓" : "📋"), 9, YKe),
91292
+ }, J(g.value === "req" + i ? "✓" : "📋"), 9, nqe),
91127
91293
  Q("button", {
91128
91294
  class: "view-toggle",
91129
91295
  onClick: (e) => ae(i)
91130
- }, J(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, XKe)
91131
- ]), d.value.has(i) ? (X(), Z("pre", rqe, [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", {
91296
+ }, J(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, rqe)
91297
+ ]), d.value.has(i) ? (X(), Z("pre", uqe, [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
91298
  key: e.base,
91133
91299
  class: "msg-list"
91134
91300
  }, [(X(!0), Z(KY, null, nY(e.list, (t, n) => {
@@ -91144,37 +91310,37 @@ var pGe = {
91144
91310
  }, [Q("span", {
91145
91311
  class: "msg-role",
91146
91312
  style: wK({ background: ce(t.role).color })
91147
- }, J(ce(t.role).label), 5), Q("div", QKe, [
91148
- t.content ? (X(), Z("span", $Ke, J(t.content), 1)) : $("", !0),
91313
+ }, J(ce(t.role).label), 5), Q("div", aqe, [
91314
+ t.content ? (X(), Z("span", oqe, J(t.content), 1)) : $("", !0),
91149
91315
  (X(!0), Z(KY, null, nY(t.tool_calls || [], (e, t) => {
91150
91316
  var n, r, i;
91151
91317
  return X(), Z("div", {
91152
91318
  key: t,
91153
91319
  class: "tc-inline"
91154
- }, [Q("span", eqe, "🔧 " + J(((n = e.function) == null ? void 0 : n.name) || e.name), 1), Q("code", tqe, J((r = (i = e.function) == null ? void 0 : i.arguments) == null ? e.args : r), 1)]);
91320
+ }, [Q("span", sqe, "🔧 " + J(((n = e.function) == null ? void 0 : n.name) || e.name), 1), Q("code", cqe, J((r = (i = e.function) == null ? void 0 : i.arguments) == null ? e.args : r), 1)]);
91155
91321
  }), 128)),
91156
- t.tool_call_id ? (X(), Z("span", nqe, "↳ tool_call_id: " + J(t.tool_call_id), 1)) : $("", !0)
91157
- ])], 10, ZKe);
91322
+ t.tool_call_id ? (X(), Z("span", lqe, "↳ tool_call_id: " + J(t.tool_call_id), 1)) : $("", !0)
91323
+ ])], 10, iqe);
91158
91324
  }), 128))]))), 128))], 64)) : e.type === "llm_response" ? (X(), Z(KY, { key: 2 }, [
91159
- Q("div", iqe, [Q("span", aqe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1), (c = e.data.toolCalls) != null && c.length ? (X(), Z("span", oqe, "🔧 " + J(e.data.toolCalls.length) + J(y.value.debugToolCallsSuffix), 1)) : $("", !0)]),
91160
- e.data.content ? (X(), Z("div", sqe, J(e.data.content), 1)) : $("", !0),
91161
- (l = e.data.toolCalls) != null && l.length ? (X(), Z("div", cqe, [(X(!0), Z(KY, null, nY(e.data.toolCalls, (e, t) => (X(), Z("div", {
91325
+ Q("div", dqe, [Q("span", fqe, J(y.value.debugRoundPrefix) + J(e.data.round) + J(y.value.debugRoundSuffix), 1), (c = e.data.toolCalls) != null && c.length ? (X(), Z("span", pqe, "🔧 " + J(e.data.toolCalls.length) + J(y.value.debugToolCallsSuffix), 1)) : $("", !0)]),
91326
+ e.data.content ? (X(), Z("div", mqe, J(e.data.content), 1)) : $("", !0),
91327
+ (l = e.data.toolCalls) != null && l.length ? (X(), Z("div", hqe, [(X(!0), Z(KY, null, nY(e.data.toolCalls, (e, t) => (X(), Z("div", {
91162
91328
  key: t,
91163
91329
  class: "tc-card"
91164
- }, [Q("div", lqe, "🔧 " + J(e.name), 1), Q("pre", uqe, J(oe(e.args)), 1)]))), 128))])) : $("", !0),
91165
- e.data.usage ? (X(), Z("div", dqe, [
91166
- Q("span", fqe, "prompt: " + J((u = e.data.usage.prompt_tokens) == null ? "-" : u), 1),
91167
- Q("span", pqe, "completion: " + J((v = e.data.usage.completion_tokens) == null ? "-" : v), 1),
91168
- Q("span", mqe, "total: " + J((x = e.data.usage.total_tokens) == null ? "-" : x), 1),
91169
- e.data.usage.reasoning_tokens ? (X(), Z("span", hqe, "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)
91330
+ }, [Q("div", gqe, "🔧 " + J(e.name), 1), Q("pre", _qe, J(oe(e.args)), 1)]))), 128))])) : $("", !0),
91331
+ e.data.usage ? (X(), Z("div", vqe, [
91332
+ Q("span", yqe, "prompt: " + J((u = e.data.usage.prompt_tokens) == null ? "-" : u), 1),
91333
+ Q("span", bqe, "completion: " + J((v = e.data.usage.completion_tokens) == null ? "-" : v), 1),
91334
+ Q("span", xqe, "total: " + J((x = e.data.usage.total_tokens) == null ? "-" : x), 1),
91335
+ e.data.usage.reasoning_tokens ? (X(), Z("span", Sqe, "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
91336
  ])) : $("", !0)
91171
91337
  ], 64)) : e.type === "tool_call" || e.type === "tool_result" ? (X(), Z(KY, { key: 3 }, [t ? (X(), Z("div", {
91172
91338
  key: 0,
91173
91339
  class: TK(["tc-card inline paired", { error: e.data.status === "error" }])
91174
91340
  }, [
91175
- Q("div", gqe, [
91341
+ Q("div", Cqe, [
91176
91342
  cX(J(e.data.status === "error" ? "❌" : "✅") + " " + J(e.data.name) + " ", 1),
91177
- e.data.durationMs == null ? $("", !0) : (X(), Z("span", _qe, J(ye(e.data.durationMs)), 1)),
91343
+ e.data.durationMs == null ? $("", !0) : (X(), Z("span", wqe, J(ye(e.data.durationMs)), 1)),
91178
91344
  Q("button", {
91179
91345
  class: "view-toggle copy-btn",
91180
91346
  title: y.value.copy,
@@ -91182,84 +91348,84 @@ var pGe = {
91182
91348
  var n;
91183
91349
  return _(String((n = e.data.result) == null ? "" : n), "res" + i);
91184
91350
  }
91185
- }, J(g.value === "res" + i ? "✓" : "📋"), 9, vqe)
91351
+ }, J(g.value === "res" + i ? "✓" : "📋"), 9, Tqe)
91186
91352
  ]),
91187
- Q("pre", yqe, J(oe(t.data.args)), 1),
91188
- Q("div", bqe, "↓ " + J(y.value.resultLabel), 1),
91189
- Q("pre", xqe, J(e.data.result), 1)
91190
- ], 2)) : (X(), Z("div", Sqe, [Q("div", Cqe, [cX(J(e.type === "tool_call" ? "🔧" : "✅") + " " + J(e.data.name) + " ", 1), e.type === "tool_call" ? (X(), Z("span", wqe, J(y.value.statusRunning) + "…", 1)) : $("", !0)]), Q("pre", Tqe, J(e.type === "tool_call" ? oe(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (X(), Z("div", Eqe, J(e.data.tool ? `[${e.data.tool}] ` : "") + J(e.data.error), 1)) : $("", !0)]),
91191
- Q("div", Dqe, [Q("button", {
91353
+ Q("pre", Eqe, J(oe(t.data.args)), 1),
91354
+ Q("div", Dqe, "↓ " + J(y.value.resultLabel), 1),
91355
+ Q("pre", Oqe, J(e.data.result), 1)
91356
+ ], 2)) : (X(), Z("div", kqe, [Q("div", Aqe, [cX(J(e.type === "tool_call" ? "🔧" : "✅") + " " + J(e.data.name) + " ", 1), e.type === "tool_call" ? (X(), Z("span", jqe, J(y.value.statusRunning) + "…", 1)) : $("", !0)]), Q("pre", Mqe, J(e.type === "tool_call" ? oe(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (X(), Z("div", Nqe, J(e.data.tool ? `[${e.data.tool}] ` : "") + J(e.data.error), 1)) : $("", !0)]),
91357
+ Q("div", Pqe, [Q("button", {
91192
91358
  class: "raw-toggle",
91193
91359
  onClick: (e) => ie(i)
91194
- }, J(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, Oqe), Q("button", {
91360
+ }, J(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, Fqe), Q("button", {
91195
91361
  class: "raw-toggle",
91196
91362
  onClick: (t) => Y(I7)(oe(e.data))
91197
- }, J(y.value.copy), 9, kqe)]),
91198
- a.value.has(i) ? (X(), Z("pre", Aqe, [Q("code", null, J(oe(e.data)), 1)])) : $("", !0)
91363
+ }, J(y.value.copy), 9, Iqe)]),
91364
+ a.value.has(i) ? (X(), Z("pre", Lqe, [Q("code", null, J(oe(e.data)), 1)])) : $("", !0)
91199
91365
  ]);
91200
- }), 128))], 512), [[XX, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (X(), Z("div", jqe, [I.value ? (X(), Z(KY, { key: 1 }, [
91201
- Q("div", Nqe, [
91202
- Q("div", Pqe, J(y.value.debugInfoBasic), 1),
91203
- Q("div", Fqe, [
91204
- Q("div", Iqe, [n[6] || (n[6] = Q("span", { class: "k" }, "ID", -1)), Q("span", Lqe, J(I.value.id), 1)]),
91205
- Q("div", Rqe, [Q("span", zqe, J(y.value.debugModel), 1), Q("span", Bqe, J(I.value.model || "-"), 1)]),
91206
- Q("div", Vqe, [Q("span", Hqe, J(y.value.debugToolCount), 1), Q("span", Uqe, J(I.value.tools.length), 1)]),
91207
- Q("div", Wqe, [Q("span", Gqe, J(y.value.debugMiddleware), 1), Q("span", Kqe, J(I.value.middleware.length), 1)])
91366
+ }), 128))], 512), [[XX, te(e.key)]])]))), 128))], 64)) : ue.value === "info" ? (X(), Z("div", Rqe, [I.value ? (X(), Z(KY, { key: 1 }, [
91367
+ Q("div", Bqe, [
91368
+ Q("div", Vqe, J(y.value.debugInfoBasic), 1),
91369
+ Q("div", Hqe, [
91370
+ Q("div", Uqe, [n[6] || (n[6] = Q("span", { class: "k" }, "ID", -1)), Q("span", Wqe, J(I.value.id), 1)]),
91371
+ Q("div", Gqe, [Q("span", Kqe, J(y.value.debugModel), 1), Q("span", qqe, J(I.value.model || "-"), 1)]),
91372
+ Q("div", Jqe, [Q("span", Yqe, J(y.value.debugToolCount), 1), Q("span", Xqe, J(I.value.tools.length), 1)]),
91373
+ Q("div", Zqe, [Q("span", Qqe, J(y.value.debugMiddleware), 1), Q("span", $qe, J(I.value.middleware.length), 1)])
91208
91374
  ]),
91209
- Q("div", qqe, [Q("span", Jqe, J(y.value.debugMiddlewareStack), 1), Q("span", Yqe, J(I.value.middleware.join(" → ") || "-"), 1)])
91375
+ Q("div", eJe, [Q("span", tJe, J(y.value.debugMiddlewareStack), 1), Q("span", nJe, J(I.value.middleware.join(" → ") || "-"), 1)])
91210
91376
  ]),
91211
- Q("div", Xqe, [Q("div", Zqe, "🔧 " + J(y.value.debugToolsLabel) + " (" + J(I.value.tools.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.tools, (e) => (X(), Z("div", {
91377
+ Q("div", rJe, [Q("div", iJe, "🔧 " + J(y.value.debugToolsLabel) + " (" + J(I.value.tools.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.tools, (e) => (X(), Z("div", {
91212
91378
  key: e.name,
91213
91379
  class: "info-item"
91214
- }, [Q("div", Qqe, [cX(J(e.name), 1), e.source ? (X(), Z("span", {
91380
+ }, [Q("div", aJe, [cX(J(e.name), 1), e.source ? (X(), Z("span", {
91215
91381
  key: 0,
91216
91382
  class: TK(["src-tag", _e(e.source)])
91217
- }, J(e.source), 3)) : $("", !0)]), Q("div", $qe, J(e.description), 1)]))), 128))]),
91218
- I.value.skills.length ? (X(), Z("div", eJe, [Q("div", tJe, [cX("📘 " + J(y.value.debugSkillsTitle) + " (" + J(I.value.skills.length) + ")", 1), Q("span", nJe, J(y.value.debugSkillsHint), 1)]), (X(!0), Z(KY, null, nY(I.value.skills, (e) => (X(), Z("div", {
91383
+ }, J(e.source), 3)) : $("", !0)]), Q("div", oJe, J(e.description), 1)]))), 128))]),
91384
+ I.value.skills.length ? (X(), Z("div", sJe, [Q("div", cJe, [cX("📘 " + J(y.value.debugSkillsTitle) + " (" + J(I.value.skills.length) + ")", 1), Q("span", lJe, J(y.value.debugSkillsHint), 1)]), (X(!0), Z(KY, null, nY(I.value.skills, (e) => (X(), Z("div", {
91219
91385
  key: e.name,
91220
91386
  class: "info-item"
91221
91387
  }, [
91222
91388
  Q("div", {
91223
91389
  class: "info-name skill-toggle",
91224
91390
  onClick: (t) => fe(e.name)
91225
- }, [Q("span", { class: TK(["skill-arrow", { open: !!de.value[e.name] }]) }, "▶", 2), cX(" " + J(e.name), 1)], 8, rJe),
91226
- Q("div", iJe, J(e.description), 1),
91227
- de.value[e.name] ? (X(), Z("div", aJe, [de.value[e.name].loading ? (X(), Z("div", oJe, J(y.value.debugLoading), 1)) : de.value[e.name].error ? (X(), Z("div", sJe, J(de.value[e.name].error), 1)) : de.value[e.name].content ? (X(), Z("pre", cJe, J(de.value[e.name].content), 1)) : $("", !0)])) : $("", !0)
91391
+ }, [Q("span", { class: TK(["skill-arrow", { open: !!de.value[e.name] }]) }, "▶", 2), cX(" " + J(e.name), 1)], 8, uJe),
91392
+ Q("div", dJe, J(e.description), 1),
91393
+ de.value[e.name] ? (X(), Z("div", fJe, [de.value[e.name].loading ? (X(), Z("div", pJe, J(y.value.debugLoading), 1)) : de.value[e.name].error ? (X(), Z("div", mJe, J(de.value[e.name].error), 1)) : de.value[e.name].content ? (X(), Z("pre", hJe, J(de.value[e.name].content), 1)) : $("", !0)])) : $("", !0)
91228
91394
  ]))), 128))])) : $("", !0),
91229
- I.value.data ? (X(), Z("div", lJe, [Q("div", uJe, "📊 " + J(y.value.debugDataTitle), 1), Q("div", dJe, [Q("div", fJe, J(I.value.data.description || y.value.debugDataFallback), 1), Q("div", pJe, J(y.value.debugSchemaPrefix) + J(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : $("", !0),
91230
- Q("div", mJe, [Q("div", hJe, "🧬 " + J(y.value.debugSubagentTitle), 1), Q("div", gJe, [
91231
- Q("div", _Je, [Q("span", vJe, J(y.value.debugEnabled), 1), Q("span", yJe, J(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
91232
- Q("div", bJe, [Q("span", xJe, J(y.value.debugMaxDepth), 1), Q("span", SJe, J(I.value.subagent.maxDepth), 1)]),
91233
- Q("div", CJe, [Q("span", wJe, J(y.value.debugMaxParallel), 1), Q("span", TJe, J(I.value.subagent.maxParallel), 1)]),
91234
- Q("div", EJe, [Q("span", DJe, J(y.value.debugExtraTools), 1), Q("span", OJe, J(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
91395
+ I.value.data ? (X(), Z("div", gJe, [Q("div", _Je, "📊 " + J(y.value.debugDataTitle), 1), Q("div", vJe, [Q("div", yJe, J(I.value.data.description || y.value.debugDataFallback), 1), Q("div", bJe, J(y.value.debugSchemaPrefix) + J(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : $("", !0),
91396
+ Q("div", xJe, [Q("div", SJe, "🧬 " + J(y.value.debugSubagentTitle), 1), Q("div", CJe, [
91397
+ Q("div", wJe, [Q("span", TJe, J(y.value.debugEnabled), 1), Q("span", EJe, J(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
91398
+ Q("div", DJe, [Q("span", OJe, J(y.value.debugMaxDepth), 1), Q("span", kJe, J(I.value.subagent.maxDepth), 1)]),
91399
+ Q("div", AJe, [Q("span", jJe, J(y.value.debugMaxParallel), 1), Q("span", MJe, J(I.value.subagent.maxParallel), 1)]),
91400
+ Q("div", NJe, [Q("span", PJe, J(y.value.debugExtraTools), 1), Q("span", FJe, J(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
91235
91401
  ])]),
91236
- !((t = I.value.mcp) == null || (t = t.servers) == null) && t.length ? (X(), Z("div", kJe, [Q("div", AJe, "🔌 MCP (" + J(I.value.mcp.servers.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.mcp.servers, (e) => (X(), Z("div", {
91402
+ !((t = I.value.mcp) == null || (t = t.servers) == null) && t.length ? (X(), Z("div", IJe, [Q("div", LJe, "🔌 MCP (" + J(I.value.mcp.servers.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.mcp.servers, (e) => (X(), Z("div", {
91237
91403
  key: e.name,
91238
91404
  class: "info-item"
91239
- }, [Q("div", jJe, [cX(J(e.name) + " ", 1), Q("span", MJe, J(e.toolCount) + J(y.value.debugToolCountSuffix), 1)]), Q("div", NJe, J(e.url), 1)]))), 128))])) : $("", !0),
91240
- I.value.verify ? (X(), Z("div", PJe, [Q("div", FJe, "✅ " + J(y.value.debugVerifyTitle), 1), Q("div", IJe, [
91241
- Q("div", LJe, [Q("span", RJe, J(y.value.debugEnabled), 1), Q("span", zJe, J(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
91242
- Q("div", BJe, [Q("span", VJe, J(y.value.debugMaxAttempts), 1), Q("span", HJe, J(I.value.verify.maxAttempts), 1)]),
91243
- Q("div", UJe, [Q("span", WJe, J(y.value.debugAdversarial), 1), Q("span", GJe, J(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
91244
- I.value.verify.adversarial ? (X(), Z("div", KJe, [Q("span", qJe, J(y.value.debugAdversarialModel), 1), Q("span", JJe, J(I.value.model || "-") + J(y.value.debugSameAsMain), 1)])) : $("", !0)
91405
+ }, [Q("div", RJe, [cX(J(e.name) + " ", 1), Q("span", zJe, J(e.toolCount) + J(y.value.debugToolCountSuffix), 1)]), Q("div", BJe, J(e.url), 1)]))), 128))])) : $("", !0),
91406
+ I.value.verify ? (X(), Z("div", VJe, [Q("div", HJe, "✅ " + J(y.value.debugVerifyTitle), 1), Q("div", UJe, [
91407
+ Q("div", WJe, [Q("span", GJe, J(y.value.debugEnabled), 1), Q("span", KJe, J(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
91408
+ Q("div", qJe, [Q("span", JJe, J(y.value.debugMaxAttempts), 1), Q("span", YJe, J(I.value.verify.maxAttempts), 1)]),
91409
+ Q("div", XJe, [Q("span", ZJe, J(y.value.debugAdversarial), 1), Q("span", QJe, J(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
91410
+ I.value.verify.adversarial ? (X(), Z("div", $Je, [Q("span", eYe, J(y.value.debugAdversarialModel), 1), Q("span", tYe, J(I.value.model || "-") + J(y.value.debugSameAsMain), 1)])) : $("", !0)
91245
91411
  ])])) : $("", !0),
91246
- I.value.todos.length ? (X(), Z("div", YJe, [Q("div", XJe, "📋 " + J(y.value.debugTodosTitle) + " (" + J(I.value.todos.length) + ")", 1), (X(!0), Z(KY, null, nY(I.value.todos, (e, t) => (X(), Z("div", {
91412
+ I.value.todos.length ? (X(), Z("div", nYe, [Q("div", rYe, "📋 " + 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
91413
  key: t,
91248
91414
  class: "info-todo"
91249
91415
  }, [Q("span", {
91250
91416
  class: "todo-tag",
91251
91417
  style: wK({ background: he.value[e.status] && he.value[e.status].color || "#9ca3af" })
91252
91418
  }, J(ge(e.status)), 5), Q("span", null, J(e.content), 1)]))), 128))])) : $("", !0),
91253
- I.value.memory ? (X(), Z("div", ZJe, [Q("div", QJe, "📝 " + J(y.value.debugMemoryTitle), 1), Q("pre", $Je, J(I.value.memory), 1)])) : $("", !0),
91254
- I.value.lastCompression ? (X(), Z("div", eYe, [Q("div", tYe, "🗜️ " + J(y.value.debugLastCompTitle), 1), Q("div", nYe, [
91255
- Q("div", rYe, [Q("span", iYe, J(y.value.debugTriggered), 1), Q("span", aYe, J(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
91256
- Q("div", oYe, [Q("span", sYe, J(y.value.debugRoundsSummarized), 1), Q("span", cYe, J(I.value.lastCompression.roundsSummarized) + " / " + J(I.value.lastCompression.roundsTotal), 1)]),
91257
- Q("div", lYe, [Q("span", uYe, J(y.value.debugCtxRecalled), 1), Q("span", dYe, J(I.value.lastCompression.roundsRecalled) + J(y.value.debugCountSuffix), 1)]),
91258
- Q("div", fYe, [Q("span", pYe, J(y.value.debugMessageCount), 1), Q("span", mYe, J(I.value.lastCompression.originalMessages) + " → " + J(I.value.lastCompression.compressedMessages), 1)]),
91259
- Q("div", hYe, [Q("span", gYe, J(y.value.debugStrategy), 1), Q("span", _Ye, J(I.value.lastCompression.strategy), 1)]),
91260
- I.value.lastCompression.decision ? (X(), Z("div", vYe, [Q("span", yYe, J(y.value.debugDecision), 1), Q("span", bYe, "🤖 " + J(Oe(I.value.lastCompression.decision)), 1)])) : $("", !0)
91419
+ I.value.memory ? (X(), Z("div", iYe, [Q("div", aYe, "📝 " + J(y.value.debugMemoryTitle), 1), Q("pre", oYe, J(I.value.memory), 1)])) : $("", !0),
91420
+ I.value.lastCompression ? (X(), Z("div", sYe, [Q("div", cYe, "🗜️ " + J(y.value.debugLastCompTitle), 1), Q("div", lYe, [
91421
+ Q("div", uYe, [Q("span", dYe, J(y.value.debugTriggered), 1), Q("span", fYe, J(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
91422
+ Q("div", pYe, [Q("span", mYe, J(y.value.debugRoundsSummarized), 1), Q("span", hYe, J(I.value.lastCompression.roundsSummarized) + " / " + J(I.value.lastCompression.roundsTotal), 1)]),
91423
+ Q("div", gYe, [Q("span", _Ye, J(y.value.debugCtxRecalled), 1), Q("span", vYe, J(I.value.lastCompression.roundsRecalled) + J(y.value.debugCountSuffix), 1)]),
91424
+ Q("div", yYe, [Q("span", bYe, J(y.value.debugMessageCount), 1), Q("span", xYe, J(I.value.lastCompression.originalMessages) + " → " + J(I.value.lastCompression.compressedMessages), 1)]),
91425
+ Q("div", SYe, [Q("span", CYe, J(y.value.debugStrategy), 1), Q("span", wYe, J(I.value.lastCompression.strategy), 1)]),
91426
+ I.value.lastCompression.decision ? (X(), Z("div", TYe, [Q("span", EYe, J(y.value.debugDecision), 1), Q("span", DYe, "🤖 " + J(Oe(I.value.lastCompression.decision)), 1)])) : $("", !0)
91261
91427
  ])])) : $("", !0)
91262
- ], 64)) : (X(), Z("div", Mqe, J(y.value.debugNoInfo), 1))])) : $("", !0)
91428
+ ], 64)) : (X(), Z("div", zqe, J(y.value.debugNoInfo), 1))])) : $("", !0)
91263
91429
  ], 512)], 512)], 512)
91264
91430
  ], 2), Q("div", {
91265
91431
  class: "drawer-mask",
@@ -91269,7 +91435,7 @@ var pGe = {
91269
91435
  _: 1
91270
91436
  })]));
91271
91437
  }
91272
- }), [["__scopeId", "data-v-6d9e98b4"]]), SYe = ["title"], CYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91438
+ }), [["__scopeId", "data-v-6d9e98b4"]]), kYe = ["title"], AYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91273
91439
  __name: "SelectionMenu",
91274
91440
  emits: ["quote"],
91275
91441
  setup(e, { emit: t }) {
@@ -91357,18 +91523,18 @@ var pGe = {
91357
91523
  title: Y(r).selectionMenuTitle,
91358
91524
  onMousedown: t[0] || (t[0] = mZ(() => {}, ["prevent"])),
91359
91525
  onClick: _
91360
- }, "❝ " + J(Y(r).selectionMenuLabel), 41, SYe)], 4), [[XX, i.value]])]));
91526
+ }, "❝ " + J(Y(r).selectionMenuLabel), 41, kYe)], 4), [[XX, i.value]])]));
91361
91527
  }
91362
- }), [["__scopeId", "data-v-19e6dbb4"]]), wYe = { class: "skill-panel" }, TYe = { class: "skill-header" }, EYe = { class: "skill-title" }, DYe = ["title"], OYe = { class: "skill-section" }, kYe = { class: "section-title" }, AYe = ["title"], jYe = { class: "field" }, MYe = { class: "field-label" }, NYe = ["disabled", "placeholder"], PYe = { class: "field" }, FYe = { class: "field-label" }, IYe = ["placeholder"], LYe = { class: "field field-textarea" }, RYe = { class: "field-label" }, zYe = ["placeholder"], BYe = {
91528
+ }), [["__scopeId", "data-v-19e6dbb4"]]), jYe = { class: "skill-panel" }, MYe = { class: "skill-header" }, NYe = { class: "skill-title" }, PYe = ["title"], FYe = { class: "skill-section" }, IYe = { class: "section-title" }, LYe = ["title"], RYe = { class: "field" }, zYe = { class: "field-label" }, BYe = ["disabled", "placeholder"], VYe = { class: "field" }, HYe = { class: "field-label" }, UYe = ["placeholder"], WYe = { class: "field field-textarea" }, GYe = { class: "field-label" }, KYe = ["placeholder"], qYe = {
91363
91529
  key: 0,
91364
91530
  class: "skill-error"
91365
- }, VYe = { class: "skill-section" }, HYe = { class: "section-title" }, UYe = {
91531
+ }, JYe = { class: "skill-section" }, YYe = { class: "section-title" }, XYe = {
91366
91532
  key: 0,
91367
91533
  class: "empty-hint"
91368
- }, WYe = {
91534
+ }, ZYe = {
91369
91535
  key: 1,
91370
91536
  class: "skill-list"
91371
- }, GYe = { class: "skill-actions" }, KYe = ["title", "onClick"], qYe = ["title", "onClick"], JYe = { class: "skill-hint" }, YYe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91537
+ }, QYe = { class: "skill-actions" }, $Ye = ["title", "onClick"], eXe = ["title", "onClick"], tXe = { class: "skill-hint" }, nXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91372
91538
  __name: "SkillPanel",
91373
91539
  props: {
91374
91540
  visible: { type: Boolean },
@@ -91424,55 +91590,55 @@ var pGe = {
91424
91590
  key: 0,
91425
91591
  class: "skill-mask",
91426
91592
  onClick: n[4] || (n[4] = mZ((e) => r("close"), ["self"]))
91427
- }, [Q("div", wYe, [
91428
- Q("div", TYe, [Q("span", EYe, J(e.messages.skillPanelTitle), 1), Q("button", {
91593
+ }, [Q("div", jYe, [
91594
+ Q("div", MYe, [Q("span", NYe, J(e.messages.skillPanelTitle), 1), Q("button", {
91429
91595
  class: "skill-close",
91430
91596
  title: e.messages.close,
91431
91597
  onClick: n[0] || (n[0] = (e) => r("close"))
91432
- }, "✕", 8, DYe)]),
91433
- Q("div", OYe, [
91434
- Q("div", kYe, [cX(J(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (X(), Z("button", {
91598
+ }, "✕", 8, PYe)]),
91599
+ Q("div", FYe, [
91600
+ Q("div", IYe, [cX(J(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (X(), Z("button", {
91435
91601
  key: 0,
91436
91602
  class: "btn btn-ghost btn-cancel",
91437
91603
  title: e.messages.skillCancelEdit,
91438
91604
  onClick: h
91439
- }, J(e.messages.skillCancelEdit), 9, AYe)) : $("", !0)]),
91440
- Q("label", jYe, [Q("span", MYe, J(e.messages.skillNameLabel), 1), fJ(Q("input", {
91605
+ }, J(e.messages.skillCancelEdit), 9, LYe)) : $("", !0)]),
91606
+ Q("label", RYe, [Q("span", zYe, J(e.messages.skillNameLabel), 1), fJ(Q("input", {
91441
91607
  "onUpdate:modelValue": n[1] || (n[1] = (e) => i.value = e),
91442
91608
  disabled: !!u.value,
91443
91609
  placeholder: e.messages.skillNamePlaceholder,
91444
91610
  class: "field-input"
91445
- }, null, 8, NYe), [[pZ, i.value]])]),
91446
- Q("label", PYe, [Q("span", FYe, J(e.messages.skillDescLabel), 1), fJ(Q("input", {
91611
+ }, null, 8, BYe), [[pZ, i.value]])]),
91612
+ Q("label", VYe, [Q("span", HYe, J(e.messages.skillDescLabel), 1), fJ(Q("input", {
91447
91613
  "onUpdate:modelValue": n[2] || (n[2] = (e) => a.value = e),
91448
91614
  placeholder: e.messages.skillDescPlaceholder,
91449
91615
  class: "field-input"
91450
- }, null, 8, IYe), [[pZ, a.value]])]),
91451
- Q("label", LYe, [Q("span", RYe, J(e.messages.skillContentLabel), 1), fJ(Q("textarea", {
91616
+ }, null, 8, UYe), [[pZ, a.value]])]),
91617
+ Q("label", WYe, [Q("span", GYe, J(e.messages.skillContentLabel), 1), fJ(Q("textarea", {
91452
91618
  "onUpdate:modelValue": n[3] || (n[3] = (e) => o.value = e),
91453
91619
  placeholder: e.messages.skillContentPlaceholder,
91454
91620
  rows: "6",
91455
91621
  class: "field-input"
91456
- }, null, 8, zYe), [[pZ, o.value]])]),
91457
- s.value ? (X(), Z("div", BYe, J(s.value), 1)) : $("", !0),
91622
+ }, null, 8, KYe), [[pZ, o.value]])]),
91623
+ s.value ? (X(), Z("div", qYe, J(s.value), 1)) : $("", !0),
91458
91624
  Q("button", {
91459
91625
  class: "btn btn-primary",
91460
91626
  onClick: f
91461
91627
  }, J(u.value ? e.messages.skillSave : e.messages.skillAdd), 1)
91462
91628
  ]),
91463
- Q("div", VYe, [Q("div", HYe, J(e.messages.skillCreatedTitle) + "(" + J(c.value.length) + ")", 1), c.value.length ? (X(), Z("ul", WYe, [(X(!0), Z(KY, null, nY(c.value, (t) => (X(), Z("li", {
91629
+ Q("div", JYe, [Q("div", YYe, J(e.messages.skillCreatedTitle) + "(" + J(c.value.length) + ")", 1), c.value.length ? (X(), Z("ul", ZYe, [(X(!0), Z(KY, null, nY(c.value, (t) => (X(), Z("li", {
91464
91630
  key: t,
91465
91631
  class: "skill-item"
91466
- }, [Q("span", { class: TK(["skill-name", { active: u.value === t }]) }, J(t), 3), Q("span", GYe, [Q("button", {
91632
+ }, [Q("span", { class: TK(["skill-name", { active: u.value === t }]) }, J(t), 3), Q("span", QYe, [Q("button", {
91467
91633
  class: "btn btn-ghost btn-edit",
91468
91634
  title: e.messages.skillEditTitle,
91469
91635
  onClick: (e) => m(t)
91470
- }, J(e.messages.skillEditBtn), 9, KYe), Q("button", {
91636
+ }, J(e.messages.skillEditBtn), 9, $Ye), Q("button", {
91471
91637
  class: "btn btn-ghost btn-del",
91472
91638
  title: e.messages.skillDeleteTitle,
91473
91639
  onClick: (e) => p(t)
91474
- }, J(e.messages.skillDeleteBtn), 9, qYe)])]))), 128))])) : (X(), Z("div", UYe, J(e.messages.skillEmpty), 1))]),
91475
- Q("div", JYe, [
91640
+ }, J(e.messages.skillDeleteBtn), 9, eXe)])]))), 128))])) : (X(), Z("div", XYe, J(e.messages.skillEmpty), 1))]),
91641
+ Q("div", tXe, [
91476
91642
  cX(" 💡 " + J(e.messages.skillHintA) + " ", 1),
91477
91643
  n[5] || (n[5] = Q("code", null, "load_skill(name)", -1)),
91478
91644
  cX(" " + J(e.messages.skillHintB) + " ", 1),
@@ -91487,7 +91653,7 @@ var pGe = {
91487
91653
  //#endregion
91488
91654
  //#region src/core/components/ChatDialog.vue?vue&type=script&setup=true&lang.ts
91489
91655
  M();
91490
- var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe = 960, $Ye = 420, eXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91656
+ var rXe = ["aria-valuenow"], iXe = "page-agent-sdk:drawerWidth", $9 = 320, aXe = 960, oXe = 420, sXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
91491
91657
  __name: "ChatDialog",
91492
91658
  props: {
91493
91659
  fetchResponse: {},
@@ -91612,7 +91778,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91612
91778
  function b() {
91613
91779
  if (typeof localStorage > "u") return null;
91614
91780
  try {
91615
- let e = Number(localStorage.getItem(ZYe));
91781
+ let e = Number(localStorage.getItem(iXe));
91616
91782
  return Number.isFinite(e) && e >= $9 ? e : null;
91617
91783
  } catch (e) {
91618
91784
  return null;
@@ -91620,7 +91786,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91620
91786
  }
91621
91787
  let x = /* @__PURE__ */ Iq(b()), S = /* @__PURE__ */ Iq(!1);
91622
91788
  function C(e) {
91623
- let t = typeof window < "u" ? window.innerWidth : QYe, n = Math.max(Math.min(QYe, t * .9), $9);
91789
+ let t = typeof window < "u" ? window.innerWidth : aXe, n = Math.max(Math.min(aXe, t * .9), $9);
91624
91790
  return Math.min(Math.max(e, $9), n);
91625
91791
  }
91626
91792
  let w = EX(() => x.value == null ? typeof i.drawerWidth == "number" ? i.drawerWidth : null : x.value), T = EX(() => {
@@ -91649,13 +91815,13 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91649
91815
  }
91650
91816
  function ee() {
91651
91817
  if (!(x.value == null || typeof localStorage > "u")) try {
91652
- localStorage.setItem(ZYe, String(x.value));
91818
+ localStorage.setItem(iXe, String(x.value));
91653
91819
  } catch (e) {}
91654
91820
  }
91655
91821
  function te(e) {
91656
91822
  var t;
91657
91823
  if (!D.value) return;
91658
- let n = e.shiftKey ? 64 : 16, r = (t = w.value) == null ? typeof window < "u" ? Math.min($Ye, window.innerWidth * .9) : $Ye : t;
91824
+ let n = e.shiftKey ? 64 : 16, r = (t = w.value) == null ? typeof window < "u" ? Math.min(oXe, window.innerWidth * .9) : oXe : t;
91659
91825
  if (e.key === "ArrowLeft") x.value = C(r + n);
91660
91826
  else if (e.key === "ArrowRight") x.value = C(r - n);
91661
91827
  else return;
@@ -91690,7 +91856,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91690
91856
  onPointerup: M,
91691
91857
  onPointercancel: M,
91692
91858
  onKeydown: te
91693
- }, null, 40, XYe)) : $("", !0),
91859
+ }, null, 40, rXe)) : $("", !0),
91694
91860
  v("header") ? rY(t.$slots, "header", {
91695
91861
  key: 1,
91696
91862
  chat: Y(o)
@@ -91761,7 +91927,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91761
91927
  key: 0,
91762
91928
  name: "cs-slide"
91763
91929
  }, {
91764
- default: dJ(() => [rY(t.$slots, "body", { chat: Y(o) }, () => [fJ(oX(zUe, {
91930
+ default: dJ(() => [rY(t.$slots, "body", { chat: Y(o) }, () => [fJ(oX(KUe, {
91765
91931
  "show-avatar": e.showAvatar,
91766
91932
  "show-typing": e.showTyping
91767
91933
  }, null, 8, ["show-avatar", "show-typing"]), [[XX, Y(s)]])], !0)]),
@@ -91770,15 +91936,15 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91770
91936
  v("queued") ? rY(t.$slots, "queued", {
91771
91937
  key: 1,
91772
91938
  chat: Y(o)
91773
- }, () => [oX(YUe)], !0) : $("", !0),
91939
+ }, () => [oX(nWe)], !0) : $("", !0),
91774
91940
  v("approval") ? rY(t.$slots, "approval", {
91775
91941
  key: 2,
91776
91942
  chat: Y(o)
91777
- }, () => [oX(yWe)], !0) : $("", !0),
91943
+ }, () => [oX(EWe)], !0) : $("", !0),
91778
91944
  v("conflict") ? rY(t.$slots, "conflict", {
91779
91945
  key: 3,
91780
91946
  chat: Y(o)
91781
- }, () => [oX(IWe, {
91947
+ }, () => [oX(UWe, {
91782
91948
  "pending-conflict": e.pendingConflict,
91783
91949
  "on-resolve": e.onResolveConflict,
91784
91950
  icons: Y(o).icons,
@@ -91794,7 +91960,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91794
91960
  key: 3,
91795
91961
  name: "cs-slide"
91796
91962
  }, {
91797
- default: dJ(() => [rY(t.$slots, "footer", { chat: Y(o) }, () => [oX(fGe, {
91963
+ default: dJ(() => [rY(t.$slots, "footer", { chat: Y(o) }, () => [oX(yGe, {
91798
91964
  placeholder: e.placeholder || Y(o).messages.inputPlaceholder,
91799
91965
  "input-rows": e.inputRows,
91800
91966
  "gate-pending": m.value,
@@ -91814,7 +91980,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91814
91980
  v("debug") ? rY(t.$slots, "debug", {
91815
91981
  key: 4,
91816
91982
  chat: Y(o)
91817
- }, () => [oX(xYe, {
91983
+ }, () => [oX(OYe, {
91818
91984
  visible: Y(c),
91819
91985
  "onUpdate:visible": n[4] || (n[4] = (e) => /* @__PURE__ */ Fq(c) ? c.value = e : null),
91820
91986
  logs: e.debugLogs,
@@ -91843,7 +92009,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91843
92009
  v("skill") ? rY(t.$slots, "skill", {
91844
92010
  key: 5,
91845
92011
  chat: Y(o)
91846
- }, () => [oX(YYe, {
92012
+ }, () => [oX(nXe, {
91847
92013
  visible: Y(l),
91848
92014
  "on-add-skill": e.onAddSkill,
91849
92015
  "on-remove-skill": e.onRemoveSkill,
@@ -91860,7 +92026,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91860
92026
  "messages",
91861
92027
  "onClose"
91862
92028
  ])], !0) : $("", !0),
91863
- e.selectionMenu ? (X(), tX(CYe, {
92029
+ e.selectionMenu ? (X(), tX(AYe, {
91864
92030
  key: 6,
91865
92031
  onQuote: n[6] || (n[6] = (t) => {
91866
92032
  var n;
@@ -91874,7 +92040,7 @@ var XYe = ["aria-valuenow"], ZYe = "page-agent-sdk:drawerWidth", $9 = 320, QYe =
91874
92040
  //#endregion
91875
92041
  //#region src/core/sdk/mountChatDialog.ts
91876
92042
  M();
91877
- function tXe(e) {
92043
+ function cXe(e) {
91878
92044
  let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = () => {
91879
92045
  var e, t;
91880
92046
  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 +92049,7 @@ function tXe(e) {
91883
92049
  return r = YSe(/* @__PURE__ */ HJ({ setup() {
91884
92050
  return () => {
91885
92051
  var r;
91886
- return DX(eXe, j({
92052
+ return DX(sXe, j({
91887
92053
  fetchStream: e.streaming ? t.stream : void 0,
91888
92054
  fetchResponse: e.streaming ? void 0 : (e, n) => t.stream(e, () => {}, n),
91889
92055
  title: n.title,
@@ -92040,7 +92206,7 @@ function tXe(e) {
92040
92206
  };
92041
92207
  }
92042
92208
  QP(), Uf(), M();
92043
- function nXe(e, t, n, r, i) {
92209
+ function lXe(e, t, n, r, i) {
92044
92210
  let a = [];
92045
92211
  e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
92046
92212
  let o = [];
@@ -92055,7 +92221,7 @@ function nXe(e, t, n, r, i) {
92055
92221
 
92056
92222
  你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
92057
92223
  }
92058
- function rXe(e, t, n, r, i) {
92224
+ function uXe(e, t, n, r, i) {
92059
92225
  let a = [], o = [];
92060
92226
  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
92227
 
@@ -92072,12 +92238,12 @@ ${a.join("\n")}
92072
92238
  ## 何时用何源
92073
92239
  ${o.join("\n")}`;
92074
92240
  }
92075
- var iXe = {
92241
+ var dXe = {
92076
92242
  name: "rag-search",
92077
92243
  description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
92078
- getContent: () => rXe(!0, !0, !0, "search_docs", "load_doc")
92244
+ getContent: () => uXe(!0, !0, !0, "search_docs", "load_doc")
92079
92245
  };
92080
- function aXe(e, t, n) {
92246
+ function fXe(e, t, n) {
92081
92247
  let r = qP(async ({ query: e, topK: r }) => {
92082
92248
  try {
92083
92249
  let i = await t(e, { topK: r == null ? n : r });
@@ -92095,7 +92261,7 @@ function aXe(e, t, n) {
92095
92261
  });
92096
92262
  return NZ([r]), r;
92097
92263
  }
92098
- function oXe(e, t) {
92264
+ function pXe(e, t) {
92099
92265
  let n = qP(async ({ source: e }) => {
92100
92266
  try {
92101
92267
  let n = await t(e), r = Array.isArray(n) ? n : [n];
@@ -92110,19 +92276,19 @@ function oXe(e, t) {
92110
92276
  });
92111
92277
  return NZ([n]), n;
92112
92278
  }
92113
- function sXe(e) {
92279
+ function mXe(e) {
92114
92280
  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
92281
  if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
92116
92282
  let p = [];
92117
- t && p.push(aXe(s, t, o)), n && p.push(oXe(c, n)), f && p.push(...f);
92283
+ t && p.push(fXe(s, t, o)), n && p.push(pXe(c, n)), f && p.push(...f);
92118
92284
  let m = r ? [
92119
92285
  "vfs_grep",
92120
92286
  "vfs_read",
92121
92287
  "vfs_json_read"
92122
- ] : void 0, h = nXe(r, !!t, !!n, s, c), g = {
92288
+ ] : void 0, h = lXe(r, !!t, !!n, s, c), g = {
92123
92289
  name: "rag-search",
92124
- description: iXe.description,
92125
- getContent: () => rXe(r, !!t, !!n, s, c)
92290
+ description: dXe.description,
92291
+ getContent: () => uXe(r, !!t, !!n, s, c)
92126
92292
  };
92127
92293
  return j({
92128
92294
  id: i,
@@ -92135,12 +92301,12 @@ function sXe(e) {
92135
92301
  }, u === void 0 ? {} : { summarization: u });
92136
92302
  }
92137
92303
  P(), M();
92138
- var cXe = [
92304
+ var hXe = [
92139
92305
  "timeoutMs",
92140
92306
  "sampleMs",
92141
92307
  "onSample"
92142
92308
  ];
92143
- function lXe(e = {}) {
92309
+ function gXe(e = {}) {
92144
92310
  var t, n, r;
92145
92311
  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
92312
  return {
@@ -92152,14 +92318,14 @@ function lXe(e = {}) {
92152
92318
  }
92153
92319
  };
92154
92320
  }
92155
- var uXe = /* @__PURE__ */ new Set(["elapsedSec"]);
92156
- function dXe(e, t, n = {}) {
92321
+ var _Xe = /* @__PURE__ */ new Set(["elapsedSec"]);
92322
+ function vXe(e, t, n = {}) {
92157
92323
  var r, i, a;
92158
92324
  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
92325
  for (let n of p) {
92160
92326
  var m, h;
92161
92327
  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
- uXe.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({
92328
+ _Xe.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
92329
  key: n,
92164
92330
  prev: i,
92165
92331
  cur: r,
@@ -92174,7 +92340,7 @@ function dXe(e, t, n = {}) {
92174
92340
  fields: l
92175
92341
  };
92176
92342
  }
92177
- function fXe(e) {
92343
+ function yXe(e) {
92178
92344
  let { sdk: t } = e, n = () => {
92179
92345
  var e, n, r, i, a;
92180
92346
  let o = (e = t.debugLogs.value) == null ? [] : e, s = o.length ? o[o.length - 1].timestamp : 0;
@@ -92188,7 +92354,7 @@ function fXe(e) {
92188
92354
  };
92189
92355
  return {
92190
92356
  async waitForIdle(e = {}) {
92191
- let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a } = e, o = lXe(N(e, cXe)), s = Date.now();
92357
+ let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a } = e, o = gXe(N(e, hXe)), s = Date.now();
92192
92358
  for (;;) {
92193
92359
  let e = n(), h = o.push(e);
92194
92360
  if (a == null || a(e), h === "done") return e;
@@ -92221,20 +92387,20 @@ function fXe(e) {
92221
92387
  }
92222
92388
  //#endregion
92223
92389
  //#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
92224
- var pXe = { class: "code-preview-modal" }, mXe = { class: "preview-header" }, hXe = { class: "preview-title" }, gXe = { class: "preview-tabs" }, _Xe = ["disabled"], vXe = { class: "preview-actions" }, yXe = ["title"], bXe = {
92390
+ var bXe = { class: "code-preview-modal" }, xXe = { class: "preview-header" }, SXe = { class: "preview-title" }, CXe = { class: "preview-tabs" }, wXe = ["disabled"], TXe = { class: "preview-actions" }, EXe = ["title"], DXe = {
92225
92391
  key: 0,
92226
92392
  viewBox: "0 0 16 16",
92227
92393
  fill: "none",
92228
92394
  "aria-hidden": "true"
92229
- }, xXe = {
92395
+ }, OXe = {
92230
92396
  key: 1,
92231
92397
  viewBox: "0 0 16 16",
92232
92398
  fill: "none",
92233
92399
  "aria-hidden": "true"
92234
- }, SXe = ["title"], CXe = ["title"], wXe = { class: "preview-body" }, TXe = ["srcdoc"], EXe = {
92400
+ }, kXe = ["title"], AXe = ["title"], jXe = { class: "preview-body" }, MXe = ["srcdoc"], NXe = {
92235
92401
  key: 1,
92236
92402
  class: "preview-source"
92237
- }, DXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
92403
+ }, PXe = /*#__PURE__*/ h9(/* @__PURE__ */ HJ({
92238
92404
  __name: "CodePreview",
92239
92405
  props: {
92240
92406
  code: {},
@@ -92301,28 +92467,28 @@ app.mount('#app');
92301
92467
  return (t, n) => (X(), Z("div", {
92302
92468
  class: "code-preview-overlay",
92303
92469
  onClick: n[3] || (n[3] = mZ((e) => r("close"), ["self"]))
92304
- }, [Q("div", pXe, [Q("div", mXe, [
92305
- Q("span", hXe, J(e.messages.codePreviewTitlePrefix) + J(e.lang), 1),
92306
- Q("div", gXe, [Q("button", {
92470
+ }, [Q("div", bXe, [Q("div", xXe, [
92471
+ Q("span", SXe, J(e.messages.codePreviewTitlePrefix) + J(e.lang), 1),
92472
+ Q("div", CXe, [Q("button", {
92307
92473
  class: TK({ active: a.value === "preview" }),
92308
92474
  disabled: !s.value,
92309
92475
  onClick: n[0] || (n[0] = (e) => a.value = "preview")
92310
- }, J(e.messages.codePreviewTab), 11, _Xe), Q("button", {
92476
+ }, J(e.messages.codePreviewTab), 11, wXe), Q("button", {
92311
92477
  class: TK({ active: a.value === "source" }),
92312
92478
  onClick: n[1] || (n[1] = (e) => a.value = "source")
92313
92479
  }, J(e.messages.codeSourceTab), 3)]),
92314
- Q("div", vXe, [
92480
+ Q("div", TXe, [
92315
92481
  Q("button", {
92316
92482
  class: TK(["icon-btn", { done: o.value }]),
92317
92483
  title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
92318
92484
  onClick: u
92319
- }, [o.value ? (X(), Z("svg", bXe, [...n[4] || (n[4] = [Q("path", {
92485
+ }, [o.value ? (X(), Z("svg", DXe, [...n[4] || (n[4] = [Q("path", {
92320
92486
  d: "M3 8.5l3 3 7-7",
92321
92487
  stroke: "currentColor",
92322
92488
  "stroke-width": "1.6",
92323
92489
  "stroke-linecap": "round",
92324
92490
  "stroke-linejoin": "round"
92325
- }, null, -1)])])) : (X(), Z("svg", xXe, [...n[5] || (n[5] = [Q("rect", {
92491
+ }, null, -1)])])) : (X(), Z("svg", OXe, [...n[5] || (n[5] = [Q("rect", {
92326
92492
  x: "5.5",
92327
92493
  y: "5.5",
92328
92494
  width: "8",
@@ -92334,7 +92500,7 @@ app.mount('#app');
92334
92500
  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
92501
  stroke: "currentColor",
92336
92502
  "stroke-width": "1.3"
92337
- }, null, -1)])]))], 10, yXe),
92503
+ }, null, -1)])]))], 10, EXe),
92338
92504
  Q("button", {
92339
92505
  class: "icon-btn",
92340
92506
  title: e.messages.codeOpenTitle,
@@ -92354,7 +92520,7 @@ app.mount('#app');
92354
92520
  "stroke-width": "1.3",
92355
92521
  "stroke-linecap": "round",
92356
92522
  "stroke-linejoin": "round"
92357
- })], -1)])], 8, SXe),
92523
+ })], -1)])], 8, kXe),
92358
92524
  Q("button", {
92359
92525
  class: "icon-btn",
92360
92526
  title: e.messages.close,
@@ -92368,23 +92534,23 @@ app.mount('#app');
92368
92534
  stroke: "currentColor",
92369
92535
  "stroke-width": "1.4",
92370
92536
  "stroke-linecap": "round"
92371
- })], -1)])], 8, CXe)
92537
+ })], -1)])], 8, AXe)
92372
92538
  ])
92373
- ]), Q("div", wXe, [a.value === "preview" && s.value ? (X(), Z("iframe", {
92539
+ ]), Q("div", jXe, [a.value === "preview" && s.value ? (X(), Z("iframe", {
92374
92540
  key: 0,
92375
92541
  ref_key: "iframeRef",
92376
92542
  ref: i,
92377
92543
  class: "preview-iframe",
92378
92544
  sandbox: "allow-scripts allow-modals allow-popups allow-forms",
92379
92545
  srcdoc: c.value
92380
- }, null, 8, TXe)) : (X(), Z("pre", EXe, [Q("code", null, J(e.code), 1)]))])])]));
92546
+ }, null, 8, MXe)) : (X(), Z("pre", NXe, [Q("code", null, J(e.code), 1)]))])])]));
92381
92547
  }
92382
92548
  }), [["__scopeId", "data-v-27eac25e"]]);
92383
92549
  //#endregion
92384
92550
  //#region src/core/index.ts
92385
92551
  Uf();
92386
- function OXe(e) {
92387
- return aIe(e, tXe);
92552
+ function FXe(e) {
92553
+ return aIe(e, cXe);
92388
92554
  }
92389
92555
  //#endregion
92390
- export { yWe as ApprovalBar, u8 as CAPABILITIES, iNe as CONTEXT_PRESETS, eXe as ChatDialog, aBe as ChatHeader, fGe as ChatInput, DXe as CodePreview, SMe as CompressDecisionSchema, IWe 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, xYe 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, zUe as MessageList, kUe as MessageRow, YUe as QueuedBar, WTe as SOFT_CAP_MIN_WINDOW, Z$ as STOP_WORDS, YYe 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, OXe as createChatSdk, O1 as createCheckpointManager, k1 as createCheckpointMiddleware, PMe as createConflictManager, I1 as createContextInspectorMiddleware, gMe as createCraftNoteCheck, P6 as createDataOps, fXe as createEvalHarness, mMe as createHtmlFormatCheck, lMe as createHtmlRenderCheck, vMe as createHtmlSubagent, C1 as createHumanConfirmMiddleware, S1 as createHumanConfirmTool, lXe as createIdleDetector, o8 as createMemoryBackend, y1 as createMemoryMiddleware, zge as createProxyLlm, sXe 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, dXe 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 };
92556
+ export { EWe as ApprovalBar, u8 as CAPABILITIES, iNe as CONTEXT_PRESETS, sXe as ChatDialog, aBe as ChatHeader, yGe as ChatInput, PXe as CodePreview, SMe as CompressDecisionSchema, UWe 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, OYe 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, nXe 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, FXe as createChatSdk, O1 as createCheckpointManager, k1 as createCheckpointMiddleware, PMe as createConflictManager, I1 as createContextInspectorMiddleware, gMe as createCraftNoteCheck, P6 as createDataOps, yXe as createEvalHarness, mMe as createHtmlFormatCheck, lMe as createHtmlRenderCheck, vMe as createHtmlSubagent, C1 as createHumanConfirmMiddleware, S1 as createHumanConfirmTool, gXe as createIdleDetector, o8 as createMemoryBackend, y1 as createMemoryMiddleware, zge as createProxyLlm, mXe 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, vXe 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 };