page-agent-sdk 3.33.0 → 3.34.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.
@@ -5947,6 +5947,7 @@ var xd = {
5947
5947
  function Sd(e, t = "code") {
5948
5948
  let n = `use_${e}`;
5949
5949
  return [
5950
+ `【先判意图(防长对话误路由)】先判断用户是「问」还是「要生成/改」:**提问类**(这是什么组件/怎么用/某字段什么意思/为什么这样/解释代码)→ 用 read / list_components / rag_component_docs **直接回答**,绝不委派 ${n};**生成/修改类**(做一个/生成/改成/加一个 XX 组件)才按下面纪律委派 ${n}。长对话里上文全是生成记录时尤须警惕,不要把新问题当成延续旧任务。`,
5950
5951
  `【执行纪律(最重要)】收到代码组件任务后:**新建类直接委派**(追加组件无需通读/翻页现有数组,子 agent 自会采样一个组件看结构;**新建组件由子 agent 全权创建** —— 它自己把整个组件(含 ${t})写进数组,你不需要也不能替它创建/追加/落地代码)→ 修改类才 read 定位(by name)→ 调 ${n} 委派 → read 核对 → 回复用户。**中间绝不输出过渡性文字** —— 「我先看看…」「稍后委派」「接下来我会…」这类计划性回复等于任务没做就结束了(回复即本轮终止);所有调研和委派在本轮内连续完成,完成后才回复总结。`,
5951
5952
  "【产物形态】每个组件是完整、自包含的 HTML 页面(含 style/script,可独立成页);你只负责委派和收尾,不关心宿主如何渲染(v-html / iframe / SFC 是集成方的事)。",
5952
5953
  `【主 agent 职责边界(硬规则)】禁止直接 read/write 代码组件的 ${t} 字段(read 只得 <code Nkb> 摘要没用;write 绕过 vfs/verify 危险)—— 生成/修改/排查代码一律经 ${n},收尾 read 核对。**委派返回即已落地**:${n} 的结论说「已创建组件 X」= 组件已在数组里,**不要再 write/append 一遍**(子 agent 已自己创建,你再写 = 造出重复组件,还得花轮次删;真 LLM 实测踩过:主 agent 把返回的 code 又追加了一次 → 索引 8/9 重复)。核对方式 = read 该数组尾部(确认新组件存在 + name 唯一),仅此而已。`,
@@ -8994,23 +8995,25 @@ function Km(e, t, n) {
8994
8995
  return r;
8995
8996
  }
8996
8997
  function qm(e) {
8997
- let { writablePaths: t, codeVfsPrefix: n, ext: r, codeField: i = "code", onWarning: a, getController: o, vfsStore: s, craftNotes: c = !0 } = e;
8998
+ let { writablePaths: t, codeVfsPrefix: n, ext: r, codeField: i = "code", onWarning: a, getController: o, vfsStore: s, craftNotes: c = !0 } = e, l = s, u = l.__pgLastCheckout ??= /* @__PURE__ */ new Map(), d = l.__pgPendingRetry ??= /* @__PURE__ */ new Set();
8998
8999
  return {
8999
9000
  name: "code-asset-checkout-commit",
9000
9001
  beforeAgent: (e) => {
9001
- let c = o()?.get?.().bind, l = 0, u = 0, d = /* @__PURE__ */ new Map();
9002
+ let c = o()?.get?.().bind, l = 0, f = 0, p = /* @__PURE__ */ new Map();
9002
9003
  if (Gm(c, t, (e) => {
9003
9004
  l++;
9004
9005
  let t = Bd(e, i);
9005
9006
  if (typeof t == "string") {
9006
- u++, d.set(e.__pgId, Hm(t));
9007
- let i = `${n}${e.__pgId}.${r}`;
9008
- s.files[i] = {
9007
+ f++;
9008
+ let i = e.__pgId, a = Hm(t);
9009
+ p.set(i, a);
9010
+ let o = `${n}${i}.${r}`, c = s.files[o], l = u.get(i);
9011
+ c && typeof c.content == "string" && c.content !== t && l === a ? d.add(o) : (s.files[o] = {
9009
9012
  content: t,
9010
9013
  updatedAt: Date.now()
9011
- };
9014
+ }, d.delete(o)), u.set(i, a);
9012
9015
  }
9013
- }), l > 0 && u === 0 && a) {
9016
+ }), l > 0 && f === 0 && a) {
9014
9017
  let e = "";
9015
9018
  for (let n of t) {
9016
9019
  let t = Bd(c, n);
@@ -9025,7 +9028,7 @@ function qm(e) {
9025
9028
  files: s.files,
9026
9029
  [Pm]: /* @__PURE__ */ new Set(),
9027
9030
  [Fm]: { text: "" },
9028
- [Im]: d,
9031
+ [Im]: p,
9029
9032
  [Lm]: []
9030
9033
  };
9031
9034
  },
@@ -9088,7 +9091,7 @@ function qm(e) {
9088
9091
  let a = t.__pgId;
9089
9092
  c.add(a);
9090
9093
  let l = `${n}${a}.${r}`;
9091
- if (u.has(l)) try {
9094
+ if (!(!u.has(l) && !d.has(l))) try {
9092
9095
  let n = s.files[l];
9093
9096
  if (n && typeof n.content == "string") {
9094
9097
  let r = o.get(a);
@@ -9106,7 +9109,7 @@ function qm(e) {
9106
9109
  console.warn(`[page-agent-sdk][code-asset] 跳过 commit 未通过校验的半成品(可能 abort/timeout 未跑完 verify):${l} - ${s[0].message}(${s[0].code})`);
9107
9110
  return;
9108
9111
  }
9109
- Vd(t, i, n.content);
9112
+ Vd(t, i, n.content), d.delete(l);
9110
9113
  }
9111
9114
  } catch (e) {
9112
9115
  console.warn(`[page-agent-sdk][code-asset] 组件 commit 失败已跳过(其余组件不受影响):${l} - ${String(e?.message ?? e)}`);
@@ -9119,18 +9122,18 @@ function qm(e) {
9119
9122
  a?.markDataDirty?.(), a?.recomputeBaseline?.();
9120
9123
  }
9121
9124
  if (!c) return;
9122
- let d = Bm(e[Fm]?.text ?? "");
9123
- if (!d.length) return;
9124
- let f = [];
9125
+ let f = Bm(e[Fm]?.text ?? "");
9126
+ if (!f.length) return;
9127
+ let p = [];
9125
9128
  if (Gm(l, t, (e) => {
9126
- (u.size === 0 || u.has(`${n}${e.__pgId}.${r}`)) && f.push(e);
9127
- }), !f.length) return;
9128
- let p = !1;
9129
- for (let e of d) {
9130
- let t = f.length === 1 ? f[0] : f.find((t) => typeof t.name == "string" && !!t.name && e.includes(t.name));
9131
- t && (Vm(t, [e]), p = !0);
9129
+ (u.size === 0 || u.has(`${n}${e.__pgId}.${r}`)) && p.push(e);
9130
+ }), !p.length) return;
9131
+ let m = !1;
9132
+ for (let e of f) {
9133
+ let t = p.length === 1 ? p[0] : p.find((t) => typeof t.name == "string" && !!t.name && e.includes(t.name));
9134
+ t && (Vm(t, [e]), m = !0);
9132
9135
  }
9133
- p && a?.markDataDirty?.();
9136
+ m && a?.markDataDirty?.();
9134
9137
  }
9135
9138
  };
9136
9139
  }
@@ -13729,6 +13732,10 @@ function bv(e, n) {
13729
13732
  afterRound() {
13730
13733
  zt(), qt();
13731
13734
  },
13735
+ clearCodeReuse() {
13736
+ let e = y;
13737
+ e.__pgPendingRetry?.clear(), e.__pgLastCheckout?.clear();
13738
+ },
13732
13739
  async send(e, t) {
13733
13740
  if (await G.initDone, G.refCount <= 0) throw Error("page-agent-sdk: agent 已释放(unmount),拒绝排队中的 send");
13734
13741
  t ??= {}, t?.mission && Ne && x.setMission(t.mission);
@@ -14496,6 +14503,7 @@ function xv(e, t) {
14496
14503
  },
14497
14504
  stream: (e, t, n) => a.stream(e, t, n),
14498
14505
  afterRound: a.afterRound,
14506
+ clearCodeReuse: () => a.clearCodeReuse(),
14499
14507
  get debugLogs() {
14500
14508
  return a.agent.debugLogs;
14501
14509
  },
@@ -16016,33 +16024,33 @@ DS.plugin = (e) => {
16016
16024
  //#region src/core/composables/useChat.ts
16017
16025
  var OS = 4e3;
16018
16026
  function kS(e = {}) {
16019
- let { fetchResponse: t, fetchStream: n, onPersist: r, onClear: i, onQueuedCleared: a } = e, o = /* @__PURE__ */ ln({
16027
+ let { fetchResponse: t, fetchStream: n, onPersist: r, onClear: i, onQueuedCleared: a, onBeforeRegenerate: o } = e, s = /* @__PURE__ */ ln({
16020
16028
  messages: e.messages ?? [],
16021
16029
  loading: !1,
16022
16030
  error: null
16023
- }), s = /* @__PURE__ */ Cn(null), c = /* @__PURE__ */ Cn(!0), l = null, u = /* @__PURE__ */ Cn([]), d = /* @__PURE__ */ Cn(null);
16024
- function f() {}
16025
- function p(e) {
16026
- let t = s.value;
16027
- e.deltaY < 0 ? c.value = !1 : t && (c.value = t.scrollHeight - t.scrollTop - t.clientHeight < 64);
16031
+ }), c = /* @__PURE__ */ Cn(null), l = /* @__PURE__ */ Cn(!0), u = null, d = /* @__PURE__ */ Cn([]), f = /* @__PURE__ */ Cn(null);
16032
+ function p() {}
16033
+ function m(e) {
16034
+ let t = c.value;
16035
+ e.deltaY < 0 ? l.value = !1 : t && (l.value = t.scrollHeight - t.scrollTop - t.clientHeight < 64);
16028
16036
  }
16029
- function m() {
16030
- s.value && requestAnimationFrame(() => {
16031
- let e = s.value;
16032
- !e || !c.value || (e.scrollTop = e.scrollHeight);
16037
+ function h() {
16038
+ c.value && requestAnimationFrame(() => {
16039
+ let e = c.value;
16040
+ !e || !l.value || (e.scrollTop = e.scrollHeight);
16033
16041
  });
16034
16042
  }
16035
- function h(e, t, n, r) {
16036
- o.messages.push({
16043
+ function g(e, t, n, r) {
16044
+ s.messages.push({
16037
16045
  role: e,
16038
16046
  content: t,
16039
16047
  timestamp: Date.now(),
16040
16048
  ...n && n.length ? { focuses: n } : {},
16041
16049
  ...r?.length ? { images: r } : {}
16042
- }), c.value = !0, m();
16050
+ }), l.value = !0, h();
16043
16051
  }
16044
- async function g(e) {
16045
- if (c.value = !0, n) {
16052
+ async function _(e) {
16053
+ if (l.value = !0, n) {
16046
16054
  let t = /* @__PURE__ */ ln({
16047
16055
  role: "assistant",
16048
16056
  content: "",
@@ -16050,9 +16058,9 @@ function kS(e = {}) {
16050
16058
  reasoning: "",
16051
16059
  steps: []
16052
16060
  }), r = !1;
16053
- o.messages.push(t);
16061
+ s.messages.push(t);
16054
16062
  try {
16055
- await n(o.messages.slice(0, -1), (e) => {
16063
+ await n(s.messages.slice(0, -1), (e) => {
16056
16064
  switch (e.type) {
16057
16065
  case "round_start":
16058
16066
  e.round > 1 && (t.content || t.reasoning) && (r = !0);
@@ -16111,34 +16119,34 @@ function kS(e = {}) {
16111
16119
  break;
16112
16120
  }
16113
16121
  case "approval_request":
16114
- d.value = {
16122
+ f.value = {
16115
16123
  toolName: e.toolName,
16116
16124
  args: e.args,
16117
16125
  resolve: e.resolve
16118
16126
  };
16119
16127
  break;
16120
16128
  }
16121
- m();
16129
+ h();
16122
16130
  }, e);
16123
16131
  } catch (n) {
16124
- if (pu(n, e) || (o.error = n.message || "请求失败,请重试"), !t.content && !t.reasoning) {
16125
- let e = o.messages.indexOf(t);
16126
- e >= 0 && o.messages.splice(e, 1);
16132
+ if (pu(n, e) || (s.error = n.message || "请求失败,请重试"), !t.content && !t.reasoning) {
16133
+ let e = s.messages.indexOf(t);
16134
+ e >= 0 && s.messages.splice(e, 1);
16127
16135
  }
16128
16136
  } finally {
16129
- await v();
16137
+ await y();
16130
16138
  }
16131
16139
  return;
16132
16140
  }
16133
16141
  try {
16134
- h("assistant", await (t || S)(o.messages, e));
16142
+ g("assistant", await (t || C)(s.messages, e));
16135
16143
  } catch (t) {
16136
- pu(t, e) || (o.error = t.message || "请求失败,请重试");
16144
+ pu(t, e) || (s.error = t.message || "请求失败,请重试");
16137
16145
  } finally {
16138
- await v();
16146
+ await y();
16139
16147
  }
16140
16148
  }
16141
- function _(e) {
16149
+ function v(e) {
16142
16150
  let t = (e) => {
16143
16151
  if (e?.length) for (let n of e) n.status === "running" && (n.status = "error", n.result ||= "(本轮已结束,该步骤未收到结果 —— 子 agent 中断/异常)"), n.children?.length && t(n.children);
16144
16152
  };
@@ -16147,78 +16155,79 @@ function kS(e = {}) {
16147
16155
  break;
16148
16156
  }
16149
16157
  }
16150
- async function v() {
16151
- _(o.messages);
16158
+ async function y() {
16159
+ v(s.messages);
16152
16160
  try {
16153
- await r?.(o.messages);
16161
+ await r?.(s.messages);
16154
16162
  } catch {}
16155
- o.loading = !1, l = null;
16156
- let e = u.value.shift();
16157
- e !== void 0 && (h("user", e), o.loading = !0, o.error = null, l = new AbortController(), await g(l.signal));
16163
+ s.loading = !1, u = null;
16164
+ let e = d.value.shift();
16165
+ e !== void 0 && (g("user", e), s.loading = !0, s.error = null, u = new AbortController(), await _(u.signal));
16158
16166
  }
16159
- function y(e) {
16160
- u.value.splice(e, 1);
16167
+ function b(e) {
16168
+ d.value.splice(e, 1);
16161
16169
  }
16162
- async function b(e, t, n) {
16170
+ async function x(e, t, n) {
16163
16171
  if (!(!e.trim() && !n?.length)) {
16164
- if (o.loading) {
16165
- u.value.push(e.trim());
16172
+ if (s.loading) {
16173
+ d.value.push(e.trim());
16166
16174
  return;
16167
16175
  }
16168
- h("user", e.trim() || "[image]", t, n), o.loading = !0, o.error = null, l = new AbortController(), await g(l.signal);
16176
+ g("user", e.trim() || "[image]", t, n), s.loading = !0, s.error = null, u = new AbortController(), await _(u.signal);
16169
16177
  }
16170
16178
  }
16171
- async function x() {
16172
- if (o.loading) return;
16173
- let e = o.messages;
16179
+ async function S() {
16180
+ if (s.loading) return;
16181
+ o?.();
16182
+ let e = s.messages;
16174
16183
  for (let t = e.length - 1; t >= 0; t--) if (e[t].role === "assistant") {
16175
16184
  e.splice(t);
16176
16185
  break;
16177
16186
  }
16178
- e.some((e) => e.role === "user") && (o.loading = !0, o.error = null, l = new AbortController(), await g(l.signal));
16187
+ e.some((e) => e.role === "user") && (s.loading = !0, s.error = null, u = new AbortController(), await _(u.signal));
16179
16188
  }
16180
- async function S(e) {
16189
+ async function C(e) {
16181
16190
  return await new Promise((e) => setTimeout(e, 800 + Math.random() * 1200)), `收到你的消息:"${e.filter((e) => e.role === "user").pop()?.content}"。这是一个模拟回复,请接入实际的 AI API。`;
16182
16191
  }
16183
- function C() {
16184
- i?.(), o.messages.splice(0, o.messages.length), o.error = null;
16185
- }
16186
16192
  function w() {
16187
- u.value.length && a?.([...u.value]), u.value = [], l?.abort();
16193
+ i?.(), s.messages.splice(0, s.messages.length), s.error = null;
16188
16194
  }
16189
16195
  function T() {
16190
- u.value = [], l?.abort(), l = null, o.loading = !1, o.error = null, d.value = null;
16196
+ d.value.length && a?.([...d.value]), d.value = [], u?.abort();
16191
16197
  }
16192
- function E(e) {
16193
- let t = d.value;
16194
- t && (d.value = null, t.resolve(e));
16198
+ function E() {
16199
+ d.value = [], u?.abort(), u = null, s.loading = !1, s.error = null, f.value = null;
16195
16200
  }
16196
- async function D() {
16197
- if (!o.error) return;
16198
- let e = o.messages, t = -1;
16201
+ function D(e) {
16202
+ let t = f.value;
16203
+ t && (f.value = null, t.resolve(e));
16204
+ }
16205
+ async function O() {
16206
+ if (!s.error) return;
16207
+ let e = s.messages, t = -1;
16199
16208
  for (let n = e.length - 1; n >= 0; n--) if (e[n].role === "user") {
16200
16209
  t = n;
16201
16210
  break;
16202
16211
  }
16203
16212
  if (t < 0) return;
16204
16213
  let n = e[t].content;
16205
- e.splice(t), o.error = null, await b(n);
16214
+ e.splice(t), s.error = null, await x(n);
16206
16215
  }
16207
16216
  return {
16208
- state: o,
16209
- scrollContainer: s,
16210
- pendingApproval: d,
16211
- queuedTasks: u,
16212
- sendMessage: b,
16213
- removeQueuedTask: y,
16214
- clearMessages: C,
16215
- stop: w,
16216
- reset: T,
16217
- retry: D,
16218
- regenerate: x,
16219
- resolveApproval: E,
16220
- onScroll: f,
16221
- onWheel: p
16217
+ state: s,
16218
+ scrollContainer: c,
16219
+ pendingApproval: f,
16220
+ queuedTasks: d,
16221
+ sendMessage: x,
16222
+ removeQueuedTask: b,
16223
+ clearMessages: w,
16224
+ stop: T,
16225
+ reset: E,
16226
+ retry: O,
16227
+ regenerate: S,
16228
+ resolveApproval: D,
16229
+ onScroll: p,
16230
+ onWheel: m
16222
16231
  };
16223
16232
  }
16224
16233
  //#endregion
@@ -16765,7 +16774,8 @@ function RS(e = {}) {
16765
16774
  messages: e.messages,
16766
16775
  onPersist: e.onPersist,
16767
16776
  onClear: e.onClear,
16768
- onQueuedCleared: e.onQueuedCleared
16777
+ onQueuedCleared: e.onQueuedCleared,
16778
+ onBeforeRegenerate: e.onBeforeRegenerate
16769
16779
  }), { state: n, sendMessage: r, removeQueuedTask: i, queuedTasks: a } = t, o = /* @__PURE__ */ Cn(""), s = /* @__PURE__ */ Cn(!0), c = () => {
16770
16780
  s.value = !s.value;
16771
16781
  }, l = /* @__PURE__ */ Cn(!1), u = () => {
@@ -18046,24 +18056,34 @@ var _w = ["innerHTML"], vw = {
18046
18056
  __name: "MessageReasoning",
18047
18057
  props: {
18048
18058
  text: {},
18049
- expanded: { type: Boolean }
18059
+ expanded: { type: Boolean },
18060
+ running: {
18061
+ type: Boolean,
18062
+ default: !1
18063
+ }
18050
18064
  },
18051
18065
  emits: ["toggle"],
18052
18066
  setup(e) {
18053
- return (t, n) => e.text ? (Y(), X("div", {
18067
+ let t = e, n = Qs(() => {
18068
+ let e = t.text.length;
18069
+ if (e < 1e3) return String(e);
18070
+ let n = e / 1e3;
18071
+ return `${n >= 100 ? Math.round(n) : +n.toFixed(1)}k`;
18072
+ });
18073
+ return (t, r) => e.text ? (Y(), X("div", {
18054
18074
  key: 0,
18055
18075
  class: U(["reasoning-block", { expanded: e.expanded }])
18056
18076
  }, [Z("div", {
18057
18077
  class: "reasoning-header",
18058
- onClick: n[0] ||= (e) => t.$emit("toggle")
18078
+ onClick: r[0] ||= (e) => t.$emit("toggle")
18059
18079
  }, [
18060
- n[1] ||= Z("span", { class: "status-dot ok" }, null, -1),
18061
- n[2] ||= Z("span", { class: "reasoning-title" }, "思考过程", -1),
18062
- Z("span", cT, W(e.text.length) + " 字", 1),
18080
+ Z("span", { class: U(["status-dot ok", { breathe: e.running }]) }, null, 2),
18081
+ r[1] ||= Z("span", { class: "reasoning-title" }, "思考过程", -1),
18082
+ Z("span", cT, W(n.value) + " 字", 1),
18063
18083
  Z("span", lT, W(e.expanded ? "收起" : "展开"), 1)
18064
18084
  ]), e.expanded ? (Y(), X("div", uT, W(e.text), 1)) : Q("", !0)], 2)) : Q("", !0);
18065
18085
  }
18066
- }), [["__scopeId", "data-v-6511de6f"]]), fT = ["open"], pT = { class: "sub-reason-head" }, mT = {
18086
+ }), [["__scopeId", "data-v-b5a91bd4"]]), fT = ["open"], pT = { class: "sub-reason-head" }, mT = {
18067
18087
  key: 0,
18068
18088
  class: "sub-reason-trunc"
18069
18089
  }, hT = ["title"], gT = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
@@ -18081,7 +18101,9 @@ var _w = ["innerHTML"], vw = {
18081
18101
  });
18082
18102
  let i = Qs(() => t.subReasonFull?.length ?? t.subReason.length), a = Qs(() => {
18083
18103
  let e = i.value;
18084
- return e >= 1e5 ? `${Math.round(e / 1e3)}k` : `${e}`;
18104
+ if (e < 1e3) return String(e);
18105
+ let t = e / 1e3;
18106
+ return `${t >= 100 ? Math.round(t) : +t.toFixed(1)}k`;
18085
18107
  }), o = Qs(() => (t.subReasonFull?.length ?? t.subReason.length) > t.subReason.length), s = /* @__PURE__ */ Cn(!1);
18086
18108
  async function c() {
18087
18109
  try {
@@ -18110,7 +18132,7 @@ var _w = ["innerHTML"], vw = {
18110
18132
  class: "sub-reason-body"
18111
18133
  }, W(o.value ? "…(前面已截断)\n" : "") + W(e.subReason), 513)], 40, fT));
18112
18134
  }
18113
- }), [["__scopeId", "data-v-282d02cd"]]), _T = {
18135
+ }), [["__scopeId", "data-v-82b847cc"]]), _T = {
18114
18136
  key: 0,
18115
18137
  class: "steps-block"
18116
18138
  }, vT = { class: "step-head" }, yT = { class: "step-name" }, bT = ["title"], xT = {
@@ -18231,18 +18253,27 @@ var _w = ["innerHTML"], vw = {
18231
18253
  };
18232
18254
  }
18233
18255
  function m(e) {
18234
- return e == null || e === "" ? {
18256
+ try {
18257
+ let t = JSON.parse(e);
18258
+ if (t && typeof t == "object") return JSON.stringify(t, null, 2);
18259
+ } catch {}
18260
+ return e;
18261
+ }
18262
+ function h(e) {
18263
+ if (e == null || e === "") return {
18235
18264
  text: "",
18236
18265
  truncated: !1
18237
- } : e.length > BT ? {
18238
- text: e.slice(0, BT) + t.messages.displayTruncatedSuffix,
18266
+ };
18267
+ let n = m(e);
18268
+ return n.length > BT ? {
18269
+ text: n.slice(0, BT) + t.messages.displayTruncatedSuffix,
18239
18270
  truncated: !0
18240
18271
  } : {
18241
- text: e,
18272
+ text: n,
18242
18273
  truncated: !1
18243
18274
  };
18244
18275
  }
18245
- function h(e, t, n) {
18276
+ function g(e, t, n) {
18246
18277
  if (t && n != null) {
18247
18278
  let e;
18248
18279
  try {
@@ -18285,13 +18316,13 @@ var _w = ["innerHTML"], vw = {
18285
18316
  p(n.args).text ? (Y(), X("div", ET, [Z("div", DT, [_s(W(e.messages.argsLabel), 1), Z("button", {
18286
18317
  type: "button",
18287
18318
  class: "step-detail-copy",
18288
- onClick: (e) => h(p(n.args).text, p(n.args).truncated, n.args)
18319
+ onClick: (e) => g(p(n.args).text, p(n.args).truncated, n.args)
18289
18320
  }, W(e.messages.copy), 9, OT)]), Z("pre", kT, W(p(n.args).text), 1)])) : Q("", !0),
18290
- n.status !== "running" && m(n.result).text ? (Y(), X("div", AT, [Z("div", jT, [_s(W(e.messages.resultLabel), 1), Z("button", {
18321
+ n.status !== "running" && h(n.result).text ? (Y(), X("div", AT, [Z("div", jT, [_s(W(e.messages.resultLabel), 1), Z("button", {
18291
18322
  type: "button",
18292
18323
  class: "step-detail-copy",
18293
- onClick: (e) => h(m(n.result).text, m(n.result).truncated, n.result)
18294
- }, W(e.messages.copy), 9, MT)]), Z("pre", { class: U(["step-detail-pre", { err: n.status === "error" }]) }, W(m(n.result).text), 3)])) : n.status !== "running" && !m(n.result).text ? (Y(), X("div", NT, W(e.messages.noResult), 1)) : Q("", !0)
18324
+ onClick: (e) => g(h(n.result).text, h(n.result).truncated, n.result)
18325
+ }, W(e.messages.copy), 9, MT)]), Z("pre", { class: U(["step-detail-pre", { err: n.status === "error" }]) }, W(h(n.result).text), 3)])) : n.status !== "running" && !h(n.result).text ? (Y(), X("div", NT, W(e.messages.noResult), 1)) : Q("", !0)
18295
18326
  ]))), 128))])) : Q("", !0),
18296
18327
  t.subReason ? (Y(), as(gT, {
18297
18328
  key: 1,
@@ -18316,7 +18347,7 @@ var _w = ["innerHTML"], vw = {
18316
18347
  ], 2))), 128))])) : Q("", !0)
18317
18348
  ], 2))), 128))])) : Q("", !0);
18318
18349
  }
18319
- }), [["__scopeId", "data-v-98813036"]]);
18350
+ }), [["__scopeId", "data-v-09c0a586"]]);
18320
18351
  //#endregion
18321
18352
  //#region node_modules/marked/lib/marked.esm.js
18322
18353
  function HT() {
@@ -26580,184 +26611,16 @@ function gO(e) {
26580
26611
  };
26581
26612
  }
26582
26613
  //#endregion
26583
- //#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
26584
- var _O = { class: "code-preview-modal" }, vO = { class: "preview-header" }, yO = { class: "preview-title" }, bO = { class: "preview-tabs" }, xO = ["disabled"], SO = { class: "preview-actions" }, CO = ["title"], wO = {
26585
- key: 0,
26586
- viewBox: "0 0 16 16",
26587
- fill: "none",
26588
- "aria-hidden": "true"
26589
- }, TO = {
26590
- key: 1,
26591
- viewBox: "0 0 16 16",
26592
- fill: "none",
26593
- "aria-hidden": "true"
26594
- }, EO = ["title"], DO = ["title"], OO = { class: "preview-body" }, kO = ["srcdoc"], AO = {
26595
- key: 1,
26596
- class: "preview-source"
26597
- }, jO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26598
- __name: "CodePreview",
26599
- props: {
26600
- code: {},
26601
- lang: {},
26602
- messages: { default: () => NS }
26603
- },
26604
- emits: ["close"],
26605
- setup(e, { emit: t }) {
26606
- let n = e, r = t, i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn("preview"), o = /* @__PURE__ */ Cn(!1), s = Qs(() => {
26607
- let e = n.lang.toLowerCase();
26608
- return [
26609
- "html",
26610
- "htm",
26611
- "vue",
26612
- "javascript",
26613
- "js",
26614
- "css"
26615
- ].includes(e);
26616
- }), c = Qs(() => {
26617
- let e = n.lang.toLowerCase();
26618
- if (e === "html" || e === "htm") return n.code;
26619
- if (e === "vue") return l(n.code);
26620
- if (e === "javascript" || e === "js") return `<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{font-family:sans-serif;padding:16px}</style></head><body><div id="app"></div><script>${n.code}<\/script></body></html>`;
26621
- if (e === "css") {
26622
- let e = n.messages;
26623
- return `<!DOCTYPE html><html><head><meta charset="utf-8"><style>${n.code}</style></head><body><div class="demo"><h1>${e.codeDemoTitle}</h1><p>${e.codeDemoText}</p><button>${e.codeDemoButton}</button><input placeholder="${e.codeDemoInput}"/></div></body></html>`;
26624
- }
26625
- return n.code;
26626
- });
26627
- function l(e) {
26628
- let t = e.replace(/<\/script>/g, "<\\/script>");
26629
- return `<!DOCTYPE html><html><head><meta charset="utf-8">
26630
- <script src="https://unpkg.com/vue@3/dist/vue.global.js"><\/script>
26631
- <script src="https://unpkg.com/@vue/compiler-dom@3/dist/compiler-dom.global.js"><\/script>
26632
- <style>body{margin:0;font-family:sans-serif}body>div{padding:16px}</style>
26633
- </head><body><div id="app"></div>
26634
- <script>
26635
- const { createApp, defineComponent } = Vue;
26636
- const src = ${JSON.stringify(t)};
26637
- // 提取三段
26638
- function extract(re){const m=src.match(re);return m?m[1]:''}
26639
- const template=extract(/<template>([\\s\\S]*?)<\\/template>/);
26640
- const scriptContent=extract(/<script>([\\s\\S]*?)<\\/script>/);
26641
- const styleContent=extract(/<style[^>]*>([\\s\\S]*?)<\\/style>/);
26642
- if(styleContent){const s=document.createElement('style');s.textContent=styleContent;document.head.appendChild(s);}
26643
- let options={};
26644
- try{ const fn=new Function(scriptContent+';\\nreturn {data:typeof data!=="undefined"?data:()=>({}),methods:typeof methods!=="undefined"?methods:{},computed:typeof computed!=="undefined"?computed:{},mounted:typeof mounted!=="undefined"?mounted:undefined}'); options=fn(); }catch(e){ console.error(e); }
26645
- const app=createApp({template:template||'<div></div>',...options});
26646
- app.mount('#app');
26647
- <\/script></body></html>`;
26648
- }
26649
- ni(() => a.value, async () => {
26650
- await sr(), a.value === "preview" && i.value && (i.value.srcdoc = c.value);
26651
- }, { immediate: !0 });
26652
- function u() {
26653
- AS(n.code).then((e) => {
26654
- e && (o.value = !0, setTimeout(() => o.value = !1, 1500));
26655
- });
26656
- }
26657
- function d() {
26658
- let e = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), t = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>代码预览 · " + e(n.lang) + "</title><style>html,body{margin:0;height:100%;background:#fff}iframe{border:none;width:100%;height:100%}</style></head><body><iframe sandbox=\"allow-scripts allow-modals allow-popups allow-forms\" srcdoc=\"" + e(c.value) + "\"></iframe></body></html>", r = new Blob([t], { type: "text/html" }), i = URL.createObjectURL(r);
26659
- window.open(i, "_blank", "noopener,noreferrer"), setTimeout(() => URL.revokeObjectURL(i), 1e4);
26660
- }
26661
- return (t, n) => (Y(), X("div", {
26662
- class: "code-preview-overlay",
26663
- onClick: n[3] ||= yl((e) => r("close"), ["self"])
26664
- }, [Z("div", _O, [Z("div", vO, [
26665
- Z("span", yO, W(e.messages.codePreviewTitlePrefix) + W(e.lang), 1),
26666
- Z("div", bO, [Z("button", {
26667
- class: U({ active: a.value === "preview" }),
26668
- disabled: !s.value,
26669
- onClick: n[0] ||= (e) => a.value = "preview"
26670
- }, W(e.messages.codePreviewTab), 11, xO), Z("button", {
26671
- class: U({ active: a.value === "source" }),
26672
- onClick: n[1] ||= (e) => a.value = "source"
26673
- }, W(e.messages.codeSourceTab), 3)]),
26674
- Z("div", SO, [
26675
- Z("button", {
26676
- class: U(["icon-btn", { done: o.value }]),
26677
- title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
26678
- onClick: u
26679
- }, [o.value ? (Y(), X("svg", wO, [...n[4] ||= [Z("path", {
26680
- d: "M3 8.5l3 3 7-7",
26681
- stroke: "currentColor",
26682
- "stroke-width": "1.6",
26683
- "stroke-linecap": "round",
26684
- "stroke-linejoin": "round"
26685
- }, null, -1)]])) : (Y(), X("svg", TO, [...n[5] ||= [Z("rect", {
26686
- x: "5.5",
26687
- y: "5.5",
26688
- width: "8",
26689
- height: "8",
26690
- rx: "1.5",
26691
- stroke: "currentColor",
26692
- "stroke-width": "1.3"
26693
- }, null, -1), Z("path", {
26694
- 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",
26695
- stroke: "currentColor",
26696
- "stroke-width": "1.3"
26697
- }, null, -1)]]))], 10, CO),
26698
- Z("button", {
26699
- class: "icon-btn",
26700
- title: e.messages.codeOpenTitle,
26701
- onClick: d
26702
- }, [...n[6] ||= [Z("svg", {
26703
- viewBox: "0 0 16 16",
26704
- fill: "none",
26705
- "aria-hidden": "true"
26706
- }, [Z("path", {
26707
- d: "M6 3H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-2",
26708
- stroke: "currentColor",
26709
- "stroke-width": "1.3",
26710
- "stroke-linecap": "round"
26711
- }), Z("path", {
26712
- d: "M9 2.5h4.5V7M13 3l-6 6",
26713
- stroke: "currentColor",
26714
- "stroke-width": "1.3",
26715
- "stroke-linecap": "round",
26716
- "stroke-linejoin": "round"
26717
- })], -1)]], 8, EO),
26718
- Z("button", {
26719
- class: "icon-btn",
26720
- title: e.messages.close,
26721
- onClick: n[2] ||= (e) => r("close")
26722
- }, [...n[7] ||= [Z("svg", {
26723
- viewBox: "0 0 16 16",
26724
- fill: "none",
26725
- "aria-hidden": "true"
26726
- }, [Z("path", {
26727
- d: "M4 4l8 8M12 4l-8 8",
26728
- stroke: "currentColor",
26729
- "stroke-width": "1.4",
26730
- "stroke-linecap": "round"
26731
- })], -1)]], 8, DO)
26732
- ])
26733
- ]), Z("div", OO, [a.value === "preview" && s.value ? (Y(), X("iframe", {
26734
- key: 0,
26735
- ref_key: "iframeRef",
26736
- ref: i,
26737
- class: "preview-iframe",
26738
- sandbox: "allow-scripts allow-modals allow-popups allow-forms",
26739
- srcdoc: c.value
26740
- }, null, 8, kO)) : (Y(), X("pre", AO, [Z("code", null, W(e.code), 1)]))])])]));
26741
- }
26742
- }), [["__scopeId", "data-v-27eac25e"]]), MO = ["innerHTML"], NO = /* @__PURE__ */ Fi({
26614
+ //#region src/core/components/MessageContent.vue?vue&type=script&setup=true&lang.ts
26615
+ var _O = ["innerHTML"], vO = /* @__PURE__ */ Fi({
26743
26616
  __name: "MessageContent",
26744
26617
  props: {
26745
26618
  content: {},
26746
26619
  messages: { default: () => NS }
26747
26620
  },
26748
26621
  setup(e) {
26749
- let t = e, { html: n, codeBlocks: r } = gO(() => t.content), i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn(null), o = [
26750
- "html",
26751
- "htm",
26752
- "vue",
26753
- "javascript",
26754
- "js",
26755
- "css"
26756
- ];
26757
- function s(e) {
26758
- return o.includes(e.toLowerCase());
26759
- }
26760
- function c(e, t) {
26622
+ let t = e, { html: n, codeBlocks: r } = gO(() => t.content), i = /* @__PURE__ */ Cn(null);
26623
+ function a(e, t) {
26761
26624
  let n = {
26762
26625
  html: "html",
26763
26626
  htm: "html",
@@ -26777,64 +26640,45 @@ app.mount('#app');
26777
26640
  }[e.toLowerCase()] || "txt", r = new Blob([t], { type: "text/plain;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
26778
26641
  a.href = i, a.download = `code-${Date.now()}.${n}`, a.click(), setTimeout(() => URL.revokeObjectURL(i), 1e3);
26779
26642
  }
26780
- let l = {
26643
+ let o = {
26781
26644
  copy: "<svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8\" rx=\"1.5\" stroke=\"currentColor\" stroke-width=\"1.3\" /><path 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\" stroke=\"currentColor\" stroke-width=\"1.3\" /></svg>",
26782
26645
  check: "<svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\"><path d=\"M3 8.5l3 3 7-7\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /></svg>",
26783
26646
  download: "<svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\"><path d=\"M8 2.5v7.5m0 0L5 7m3 3l3-3\" stroke=\"currentColor\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /><path d=\"M2.5 11.5v1a1.5 1.5 0 0 0 1.5 1.5h8a1.5 1.5 0 0 0 1.5-1.5v-1\" stroke=\"currentColor\" stroke-width=\"1.3\" stroke-linecap=\"round\" /></svg>",
26784
26647
  play: "<svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\"><path d=\"M4.5 3.2v9.6c0 .6.65.97 1.17.66l7.5-4.8a.78.78 0 0 0 0-1.32l-7.5-4.8A.78.78 0 0 0 4.5 3.2z\" fill=\"currentColor\" /></svg>"
26785
26648
  };
26786
- async function u() {
26649
+ async function s() {
26787
26650
  await sr();
26788
26651
  let e = i.value;
26789
26652
  e && e.querySelectorAll("pre.code-block").forEach((e, t) => {
26790
26653
  if (e.querySelector(".code-toolbar")) return;
26791
26654
  let n = e.dataset.lang || "plaintext", r = decodeURIComponent(e.dataset.code || ""), i = document.createElement("div");
26792
26655
  i.className = "code-toolbar";
26793
- let o = document.createElement("span");
26794
- o.className = "code-lang", o.textContent = n, i.appendChild(o);
26795
- let u = document.createElement("div");
26796
- u.className = "code-toolbar-actions";
26797
- let d = document.createElement("button");
26798
- d.className = "code-action-btn", d.title = "复制代码", d.innerHTML = l.copy + "<span>复制</span>", d.onclick = async () => {
26656
+ let s = document.createElement("span");
26657
+ s.className = "code-lang", s.textContent = n, i.appendChild(s);
26658
+ let c = document.createElement("div");
26659
+ c.className = "code-toolbar-actions";
26660
+ let l = document.createElement("button");
26661
+ l.className = "code-action-btn", l.title = "复制代码", l.innerHTML = o.copy + "<span>复制</span>", l.onclick = async () => {
26799
26662
  let e = await AS(r);
26800
- d.classList.toggle("done", e), d.innerHTML = (e ? l.check : l.copy) + `<span>${e ? "已复制" : "复制失败"}</span>`, setTimeout(() => {
26801
- d.classList.remove("done"), d.innerHTML = l.copy + "<span>复制</span>";
26663
+ l.classList.toggle("done", e), l.innerHTML = (e ? o.check : o.copy) + `<span>${e ? "已复制" : "复制失败"}</span>`, setTimeout(() => {
26664
+ l.classList.remove("done"), l.innerHTML = o.copy + "<span>复制</span>";
26802
26665
  }, 1500);
26803
- }, u.appendChild(d);
26804
- let f = document.createElement("button");
26805
- if (f.className = "code-action-btn", f.title = "下载为文件", f.innerHTML = l.download + "<span>下载</span>", f.onclick = () => c(n, r), u.appendChild(f), s(n)) {
26806
- let e = document.createElement("button");
26807
- e.className = "code-action-btn preview-btn", e.title = "在新弹层预览运行", e.innerHTML = l.play + "<span>运行预览</span>", e.onclick = () => {
26808
- a.value = {
26809
- lang: n,
26810
- code: r
26811
- };
26812
- }, u.appendChild(e);
26813
- }
26814
- i.appendChild(u), e.appendChild(i);
26666
+ }, c.appendChild(l);
26667
+ let u = document.createElement("button");
26668
+ u.className = "code-action-btn", u.title = "下载为文件", u.innerHTML = o.download + "<span>下载</span>", u.onclick = () => a(n, r), c.appendChild(u), i.appendChild(c), e.appendChild(i);
26815
26669
  });
26816
26670
  }
26817
- return Zi(u), ni(n, u), (t, r) => (Y(), X(J, null, [Z("div", {
26671
+ return Zi(s), ni(n, s), (e, t) => (Y(), X("div", {
26818
26672
  class: "message-md",
26819
26673
  ref_key: "containerRef",
26820
26674
  ref: i,
26821
26675
  innerHTML: K(n)
26822
- }, null, 8, MO), (Y(), as(_i, { to: "body" }, [a.value ? (Y(), as(jO, {
26823
- key: 0,
26824
- code: a.value.code,
26825
- lang: a.value.lang,
26826
- messages: e.messages,
26827
- onClose: r[0] ||= (e) => a.value = null
26828
- }, null, 8, [
26829
- "code",
26830
- "lang",
26831
- "messages"
26832
- ])) : Q("", !0)]))], 64));
26833
- }
26834
- }), PO = { class: "typing-text" }, FO = {
26676
+ }, null, 8, _O));
26677
+ }
26678
+ }), yO = { class: "typing-text" }, bO = {
26835
26679
  key: 0,
26836
26680
  class: "stream-cursor"
26837
- }, IO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26681
+ }, xO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26838
26682
  __name: "MessageBubble",
26839
26683
  props: {
26840
26684
  content: {},
@@ -26845,29 +26689,29 @@ app.mount('#app');
26845
26689
  messages: { default: () => ({ ...NS }) }
26846
26690
  },
26847
26691
  setup(e) {
26848
- return (t, n) => (Y(), X(J, null, [Z("div", { class: U(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: U(["typing-dot", { pulse: e.showTyping }]) }, null, 2), Z("span", PO, [fs(Cw, { text: e.messages.thinking }, null, 8, ["text"])])], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), as(NO, {
26692
+ return (t, n) => (Y(), X(J, null, [Z("div", { class: U(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: U(["typing-dot", { pulse: e.showTyping }]) }, null, 2), Z("span", yO, [fs(Cw, { text: e.messages.thinking }, null, 8, ["text"])])], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), as(vO, {
26849
26693
  key: 0,
26850
26694
  content: e.content,
26851
26695
  messages: e.messages
26852
- }, null, 8, ["content", "messages"])) : (Y(), X(J, { key: 1 }, [_s(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", FO)) : Q("", !0)], 64));
26696
+ }, null, 8, ["content", "messages"])) : (Y(), X(J, { key: 1 }, [_s(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", bO)) : Q("", !0)], 64));
26853
26697
  }
26854
- }), [["__scopeId", "data-v-4b4111d8"]]), LO = { class: "message-time" }, RO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26698
+ }), [["__scopeId", "data-v-4b4111d8"]]), SO = { class: "message-time" }, CO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26855
26699
  __name: "MessageTime",
26856
26700
  props: { time: {} },
26857
26701
  setup(e) {
26858
- return (t, n) => (Y(), X("div", LO, W(e.time), 1));
26702
+ return (t, n) => (Y(), X("div", SO, W(e.time), 1));
26859
26703
  }
26860
- }), [["__scopeId", "data-v-4a976e4a"]]), zO = { class: "msg-actions" }, BO = ["title"], VO = {
26704
+ }), [["__scopeId", "data-v-4a976e4a"]]), wO = { class: "msg-actions" }, TO = ["title"], EO = {
26861
26705
  key: 0,
26862
26706
  viewBox: "0 0 16 16",
26863
26707
  fill: "none",
26864
26708
  "aria-hidden": "true"
26865
- }, HO = {
26709
+ }, DO = {
26866
26710
  key: 1,
26867
26711
  viewBox: "0 0 16 16",
26868
26712
  fill: "none",
26869
26713
  "aria-hidden": "true"
26870
- }, UO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26714
+ }, OO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26871
26715
  __name: "MessageActions",
26872
26716
  props: {
26873
26717
  copied: { type: Boolean },
@@ -26875,17 +26719,17 @@ app.mount('#app');
26875
26719
  },
26876
26720
  emits: ["copy", "regenerate"],
26877
26721
  setup(e) {
26878
- return (t, n) => (Y(), X("div", zO, [Z("button", {
26722
+ return (t, n) => (Y(), X("div", wO, [Z("button", {
26879
26723
  class: U(["msg-action-btn", { done: e.copied }]),
26880
26724
  title: e.copied ? e.messages.copied : e.messages.copy,
26881
26725
  onClick: n[0] ||= (e) => t.$emit("copy")
26882
- }, [e.copied ? (Y(), X("svg", VO, [...n[2] ||= [Z("path", {
26726
+ }, [e.copied ? (Y(), X("svg", EO, [...n[2] ||= [Z("path", {
26883
26727
  d: "M3 8.5l3 3 7-7",
26884
26728
  stroke: "currentColor",
26885
26729
  "stroke-width": "1.6",
26886
26730
  "stroke-linecap": "round",
26887
26731
  "stroke-linejoin": "round"
26888
- }, null, -1)]])) : (Y(), X("svg", HO, [...n[3] ||= [Z("rect", {
26732
+ }, null, -1)]])) : (Y(), X("svg", DO, [...n[3] ||= [Z("rect", {
26889
26733
  x: "5.5",
26890
26734
  y: "5.5",
26891
26735
  width: "8",
@@ -26897,7 +26741,7 @@ app.mount('#app');
26897
26741
  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",
26898
26742
  stroke: "currentColor",
26899
26743
  "stroke-width": "1.3"
26900
- }, null, -1)]])), Z("span", null, W(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, BO), Z("button", {
26744
+ }, null, -1)]])), Z("span", null, W(e.copied ? e.messages.copied : e.messages.copy), 1)], 10, TO), Z("button", {
26901
26745
  class: "msg-action-btn",
26902
26746
  onClick: n[1] ||= (e) => t.$emit("regenerate")
26903
26747
  }, [n[4] ||= Z("svg", {
@@ -26917,19 +26761,19 @@ app.mount('#app');
26917
26761
  "stroke-linejoin": "round"
26918
26762
  })], -1), Z("span", null, W(e.messages.regenerate), 1)])]));
26919
26763
  }
26920
- }), [["__scopeId", "data-v-dc051a49"]]), WO = {
26764
+ }), [["__scopeId", "data-v-dc051a49"]]), kO = {
26921
26765
  key: 1,
26922
26766
  class: "avatar-icon",
26923
26767
  viewBox: "0 0 1024 1024",
26924
26768
  xmlns: "http://www.w3.org/2000/svg",
26925
26769
  "aria-hidden": "true"
26926
- }, GO = {
26770
+ }, AO = {
26927
26771
  key: 2,
26928
26772
  class: "avatar-icon",
26929
26773
  viewBox: "0 0 1024 1024",
26930
26774
  xmlns: "http://www.w3.org/2000/svg",
26931
26775
  "aria-hidden": "true"
26932
- }, KO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26776
+ }, jO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26933
26777
  __name: "AvatarIcon",
26934
26778
  props: {
26935
26779
  role: {},
@@ -26940,18 +26784,18 @@ app.mount('#app');
26940
26784
  key: 0,
26941
26785
  icon: e.glyph,
26942
26786
  class: "avatar-glyph"
26943
- }, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg", WO, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", GO, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
26787
+ }, null, 8, ["icon"])) : e.role === "user" ? (Y(), X("svg", kO, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", AO, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
26944
26788
  }
26945
- }), [["__scopeId", "data-v-a0b508ea"]]), qO = ["data-msg-idx"], JO = {
26789
+ }), [["__scopeId", "data-v-a0b508ea"]]), MO = ["data-msg-idx"], NO = {
26946
26790
  key: 0,
26947
26791
  class: "message-avatar"
26948
- }, YO = { class: "message-content" }, XO = {
26792
+ }, PO = { class: "message-content" }, FO = {
26949
26793
  key: 2,
26950
26794
  class: "msg-focuses"
26951
- }, ZO = ["title", "onClick"], QO = ["data-img-count"], $O = ["href", "title"], ek = ["src", "alt"], tk = {
26795
+ }, IO = ["title", "onClick"], LO = ["data-img-count"], RO = ["href", "title"], zO = ["src", "alt"], BO = {
26952
26796
  key: 1,
26953
26797
  class: "msg-image-lost"
26954
- }, nk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26798
+ }, VO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26955
26799
  __name: "MessageRow",
26956
26800
  props: {
26957
26801
  message: {},
@@ -26975,16 +26819,21 @@ app.mount('#app');
26975
26819
  return (t, c) => (Y(), X("div", {
26976
26820
  class: U(["message-row", e.message.role]),
26977
26821
  "data-msg-idx": e.index
26978
- }, [e.showAvatar ? (Y(), X("div", JO, [fs(KO, {
26822
+ }, [e.showAvatar ? (Y(), X("div", NO, [fs(jO, {
26979
26823
  role: e.message.role,
26980
26824
  glyph: e.message.role === "user" ? K(n).icons.userAvatar : K(n).icons.assistantAvatar
26981
- }, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div", YO, [
26825
+ }, null, 8, ["role", "glyph"])])) : Q("", !0), Z("div", PO, [
26982
26826
  r.value ? (Y(), as(dT, {
26983
26827
  key: 0,
26984
26828
  text: i.value,
26985
26829
  expanded: e.reasoningExpanded,
26830
+ running: e.loading && e.isLast,
26986
26831
  onToggle: c[0] ||= (e) => t.$emit("toggle-reasoning")
26987
- }, null, 8, ["text", "expanded"])) : Q("", !0),
26832
+ }, null, 8, [
26833
+ "text",
26834
+ "expanded",
26835
+ "running"
26836
+ ])) : Q("", !0),
26988
26837
  r.value ? (Y(), as(VT, {
26989
26838
  key: 1,
26990
26839
  steps: a.value,
@@ -26995,12 +26844,12 @@ app.mount('#app');
26995
26844
  "icons",
26996
26845
  "messages"
26997
26846
  ])) : Q("", !0),
26998
- e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", XO, [(Y(!0), X(J, null, sa(e.message.focuses, (e) => (Y(), X("span", {
26847
+ e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", FO, [(Y(!0), X(J, null, sa(e.message.focuses, (e) => (Y(), X("span", {
26999
26848
  key: e.path,
27000
26849
  class: "msg-focus-chip",
27001
26850
  title: K(n).messages.historyFocusChipTitlePrefix + e.path,
27002
26851
  onClick: (t) => K(n).focusChipClick(e)
27003
- }, [fs(xw, { icon: K(n).icons.focus }, null, 8, ["icon"]), _s(" " + W(e.path), 1)], 8, ZO))), 128))])) : Q("", !0),
26852
+ }, [fs(xw, { icon: K(n).icons.focus }, null, 8, ["icon"]), _s(" " + W(e.path), 1)], 8, IO))), 128))])) : Q("", !0),
27004
26853
  e.message.role === "user" && e.message.images?.length ? (Y(), X("div", {
27005
26854
  key: 3,
27006
26855
  class: "msg-images",
@@ -27017,8 +26866,8 @@ app.mount('#app');
27017
26866
  class: "msg-image-thumb",
27018
26867
  src: e.thumb || e.dataUri,
27019
26868
  alt: e.name || K(n).messages.imageAlt
27020
- }, null, 8, ek)) : (Y(), X("span", tk, "🖼️"))], 8, $O))), 128))], 8, QO)) : Q("", !0),
27021
- fs(IO, {
26869
+ }, null, 8, zO)) : (Y(), X("span", BO, "🖼️"))], 8, RO))), 128))], 8, LO)) : Q("", !0),
26870
+ fs(xO, {
27022
26871
  messages: K(n).messages,
27023
26872
  content: e.message.content,
27024
26873
  role: e.message.role,
@@ -27033,29 +26882,29 @@ app.mount('#app');
27033
26882
  "show-typing",
27034
26883
  "show-cursor"
27035
26884
  ]),
27036
- fs(RO, { time: e.time }, null, 8, ["time"]),
27037
- o.value ? (Y(), as(UO, {
26885
+ fs(CO, { time: e.time }, null, 8, ["time"]),
26886
+ o.value ? (Y(), as(OO, {
27038
26887
  key: 4,
27039
26888
  messages: K(n).messages,
27040
26889
  copied: e.copied,
27041
26890
  onCopy: c[1] ||= (e) => t.$emit("copy"),
27042
26891
  onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
27043
26892
  }, null, 8, ["messages", "copied"])) : Q("", !0)
27044
- ])], 10, qO));
26893
+ ])], 10, MO));
27045
26894
  }
27046
- }), [["__scopeId", "data-v-d19e8cc0"]]), rk = { class: "chat-body" }, ik = {
26895
+ }), [["__scopeId", "data-v-2baea2ab"]]), HO = { class: "chat-body" }, UO = {
27047
26896
  key: 0,
27048
26897
  class: "empty-state"
27049
- }, ak = { class: "empty-icon" }, ok = {
26898
+ }, WO = { class: "empty-icon" }, GO = {
27050
26899
  key: 1,
27051
26900
  class: "message-row assistant"
27052
- }, sk = {
26901
+ }, KO = {
27053
26902
  key: 0,
27054
26903
  class: "message-avatar"
27055
- }, ck = { class: "message-content" }, lk = {
26904
+ }, qO = { class: "message-content" }, JO = {
27056
26905
  key: 2,
27057
26906
  class: "error-bar"
27058
- }, uk = { class: "error-text" }, dk = ["title"], fk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26907
+ }, YO = { class: "error-text" }, XO = ["title"], ZO = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27059
26908
  __name: "MessageList",
27060
26909
  props: {
27061
26910
  showAvatar: { type: Boolean },
@@ -27063,9 +26912,9 @@ app.mount('#app');
27063
26912
  },
27064
26913
  setup(e) {
27065
26914
  let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l, icons: u, messages: d } = zS(), { state: f, retry: p, regenerate: m } = t, h = Qs(() => f.messages.length > 0), g = Qs(() => f.messages.some((e) => e.role === "user")), _ = Qs(() => f.messages[f.messages.length - 1]?.role === "assistant");
27066
- return (t, v) => (Y(), X("div", rk, [
27067
- h.value ? Q("", !0) : (Y(), X("div", ik, [Z("div", ak, [fs(xw, { icon: K(u).empty }, null, 8, ["icon"])]), Z("p", null, [fs(Cw, { text: K(d).emptyGreeting }, null, 8, ["text"])])])),
27068
- (Y(!0), X(J, null, sa(K(f).messages, (t, c) => (Y(), as(nk, {
26915
+ return (t, v) => (Y(), X("div", HO, [
26916
+ h.value ? Q("", !0) : (Y(), X("div", UO, [Z("div", WO, [fs(xw, { icon: K(u).empty }, null, 8, ["icon"])]), Z("p", null, [fs(Cw, { text: K(d).emptyGreeting }, null, 8, ["text"])])])),
26917
+ (Y(!0), X(J, null, sa(K(f).messages, (t, c) => (Y(), as(VO, {
27069
26918
  key: c,
27070
26919
  message: t,
27071
26920
  index: c,
@@ -27095,10 +26944,10 @@ app.mount('#app');
27095
26944
  "onCopy",
27096
26945
  "onRegenerate"
27097
26946
  ]))), 128)),
27098
- K(f).loading && !_.value ? (Y(), X("div", ok, [e.showAvatar ? (Y(), X("div", sk, [fs(KO, {
26947
+ K(f).loading && !_.value ? (Y(), X("div", GO, [e.showAvatar ? (Y(), X("div", KO, [fs(jO, {
27099
26948
  role: "assistant",
27100
26949
  glyph: K(u).assistantAvatar
27101
- }, null, 8, ["glyph"])])) : Q("", !0), Z("div", ck, [fs(IO, {
26950
+ }, null, 8, ["glyph"])])) : Q("", !0), Z("div", qO, [fs(xO, {
27102
26951
  content: "",
27103
26952
  role: "assistant",
27104
26953
  "is-pending-assistant": !0,
@@ -27106,8 +26955,8 @@ app.mount('#app');
27106
26955
  "show-cursor": !1,
27107
26956
  messages: K(d)
27108
26957
  }, null, 8, ["show-typing", "messages"])])])) : Q("", !0),
27109
- K(f).error ? (Y(), X("div", lk, [
27110
- Z("span", uk, W(K(f).error), 1),
26958
+ K(f).error ? (Y(), X("div", JO, [
26959
+ Z("span", YO, W(K(f).error), 1),
27111
26960
  g.value ? (Y(), X("button", {
27112
26961
  key: 0,
27113
26962
  class: "retry-btn",
@@ -27118,58 +26967,58 @@ app.mount('#app');
27118
26967
  class: "undo-btn",
27119
26968
  title: K(d).undoTitle,
27120
26969
  onClick: v[1] ||= (...e) => K(l) && K(l)(...e)
27121
- }, [fs(Cw, { text: K(d).undo }, null, 8, ["text"])], 8, dk)) : Q("", !0)
26970
+ }, [fs(Cw, { text: K(d).undo }, null, 8, ["text"])], 8, XO)) : Q("", !0)
27122
26971
  ])) : Q("", !0)
27123
26972
  ]));
27124
26973
  }
27125
- }), [["__scopeId", "data-v-113939bc"]]), pk = {
26974
+ }), [["__scopeId", "data-v-113939bc"]]), QO = {
27126
26975
  key: 0,
27127
26976
  class: "queued-bar"
27128
- }, mk = { class: "queued-head" }, hk = { class: "queued-icon" }, gk = { class: "queued-title" }, _k = { class: "queued-count" }, vk = { class: "queued-idx" }, yk = { class: "queued-text" }, bk = ["title", "onClick"], xk = ["title", "onClick"], Sk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
26977
+ }, $O = { class: "queued-head" }, ek = { class: "queued-icon" }, tk = { class: "queued-title" }, nk = { class: "queued-count" }, rk = { class: "queued-idx" }, ik = { class: "queued-text" }, ak = ["title", "onClick"], ok = ["title", "onClick"], sk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27129
26978
  __name: "QueuedBar",
27130
26979
  setup(e) {
27131
26980
  let { chat: t, editQueued: n, icons: r, messages: i } = zS(), { queuedTasks: a, removeQueuedTask: o } = t;
27132
- return (e, t) => K(a).length ? (Y(), X("div", pk, [Z("div", mk, [
27133
- Z("span", hk, [fs(xw, { icon: K(r).queued }, null, 8, ["icon"])]),
27134
- Z("span", gk, W(K(i).queuedTitle), 1),
27135
- Z("span", _k, W(K(a).length), 1)
26981
+ return (e, t) => K(a).length ? (Y(), X("div", QO, [Z("div", $O, [
26982
+ Z("span", ek, [fs(xw, { icon: K(r).queued }, null, 8, ["icon"])]),
26983
+ Z("span", tk, W(K(i).queuedTitle), 1),
26984
+ Z("span", nk, W(K(a).length), 1)
27136
26985
  ]), (Y(!0), X(J, null, sa(K(a), (e, t) => (Y(), X("div", {
27137
26986
  key: t,
27138
26987
  class: "queued-item"
27139
26988
  }, [
27140
- Z("span", vk, W(t + 1), 1),
27141
- Z("span", yk, W(e), 1),
26989
+ Z("span", rk, W(t + 1), 1),
26990
+ Z("span", ik, W(e), 1),
27142
26991
  Z("button", {
27143
26992
  class: "queued-act",
27144
26993
  title: K(i).queuedEditTitle,
27145
26994
  onClick: (e) => K(n)(t)
27146
- }, [fs(xw, { icon: K(r).queuedEdit }, null, 8, ["icon"])], 8, bk),
26995
+ }, [fs(xw, { icon: K(r).queuedEdit }, null, 8, ["icon"])], 8, ak),
27147
26996
  Z("button", {
27148
26997
  class: "queued-act queued-del",
27149
26998
  title: K(i).removeQueuedTitle,
27150
26999
  onClick: (e) => K(o)(t)
27151
- }, "✕", 8, xk)
27000
+ }, "✕", 8, ok)
27152
27001
  ]))), 128))])) : Q("", !0);
27153
27002
  }
27154
- }), [["__scopeId", "data-v-7b61eb04"]]), Ck = {
27003
+ }), [["__scopeId", "data-v-7b61eb04"]]), ck = {
27155
27004
  key: 0,
27156
27005
  class: "approval-bar"
27157
- }, wk = { class: "approval-head" }, Tk = { class: "approval-title" }, Ek = {
27006
+ }, lk = { class: "approval-head" }, uk = { class: "approval-title" }, dk = {
27158
27007
  key: 0,
27159
27008
  class: "approval-question"
27160
- }, Dk = {
27009
+ }, fk = {
27161
27010
  key: 1,
27162
27011
  class: "approval-context"
27163
- }, Ok = {
27012
+ }, pk = {
27164
27013
  key: 2,
27165
27014
  class: "approval-recommend"
27166
- }, kk = {
27015
+ }, mk = {
27167
27016
  key: 3,
27168
27017
  class: "approval-options"
27169
- }, Ak = ["onClick"], jk = { class: "approval-actions" }, Mk = { class: "approval-head" }, Nk = { class: "approval-title" }, Pk = {
27018
+ }, hk = ["onClick"], gk = { class: "approval-actions" }, _k = { class: "approval-head" }, vk = { class: "approval-title" }, yk = {
27170
27019
  key: 0,
27171
27020
  class: "approval-args"
27172
- }, Fk = { class: "approval-actions" }, Ik = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27021
+ }, bk = { class: "approval-actions" }, xk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27173
27022
  __name: "ApprovalBar",
27174
27023
  setup(e) {
27175
27024
  let t = zS(), { pendingApproval: n, resolveApproval: r } = t.chat, i = t.messages, a = /* @__PURE__ */ Cn(!1);
@@ -27189,17 +27038,17 @@ app.mount('#app');
27189
27038
  return String(e);
27190
27039
  }
27191
27040
  });
27192
- return (e, l) => K(n) ? (Y(), X("div", Ck, [o.value ? (Y(), X(J, { key: 0 }, [
27193
- Z("div", wk, [l[5] ||= Z("span", { class: "approval-icon" }, "❓", -1), Z("span", Tk, W(K(i).humanConfirmTitle), 1)]),
27194
- K(n).args?.question ? (Y(), X("div", Ek, W(K(n).args.question), 1)) : Q("", !0),
27195
- K(n).args?.context ? (Y(), X("div", Dk, W(K(n).args.context), 1)) : Q("", !0),
27196
- K(n).args?.recommendation ? (Y(), X("div", Ok, [fs(xw, { icon: K(t).icons.recommend }, null, 8, ["icon"]), _s(W(K(i).recommendPrefix) + W(K(n).args.recommendation), 1)])) : Q("", !0),
27197
- s.value.length ? (Y(), X("div", kk, [(Y(!0), X(J, null, sa(s.value, (e) => (Y(), X("button", {
27041
+ return (e, l) => K(n) ? (Y(), X("div", ck, [o.value ? (Y(), X(J, { key: 0 }, [
27042
+ Z("div", lk, [l[5] ||= Z("span", { class: "approval-icon" }, "❓", -1), Z("span", uk, W(K(i).humanConfirmTitle), 1)]),
27043
+ K(n).args?.question ? (Y(), X("div", dk, W(K(n).args.question), 1)) : Q("", !0),
27044
+ K(n).args?.context ? (Y(), X("div", fk, W(K(n).args.context), 1)) : Q("", !0),
27045
+ K(n).args?.recommendation ? (Y(), X("div", pk, [fs(xw, { icon: K(t).icons.recommend }, null, 8, ["icon"]), _s(W(K(i).recommendPrefix) + W(K(n).args.recommendation), 1)])) : Q("", !0),
27046
+ s.value.length ? (Y(), X("div", mk, [(Y(!0), X(J, null, sa(s.value, (e) => (Y(), X("button", {
27198
27047
  key: e,
27199
27048
  class: "approval-opt",
27200
27049
  onClick: (t) => K(r)(e)
27201
- }, W(e), 9, Ak))), 128))])) : Q("", !0),
27202
- Z("div", jk, [Z("button", {
27050
+ }, W(e), 9, hk))), 128))])) : Q("", !0),
27051
+ Z("div", gk, [Z("button", {
27203
27052
  class: "approval-deny",
27204
27053
  onClick: l[0] ||= (e) => K(r)(!1)
27205
27054
  }, [fs(Cw, { text: K(i).deny }, null, 8, ["text"])]), s.value.length ? Q("", !0) : (Y(), X("button", {
@@ -27208,17 +27057,17 @@ app.mount('#app');
27208
27057
  onClick: l[1] ||= (e) => K(r)(!0)
27209
27058
  }, [fs(Cw, { text: K(i).approve }, null, 8, ["text"])]))])
27210
27059
  ], 64)) : (Y(), X(J, { key: 1 }, [
27211
- Z("div", Mk, [
27060
+ Z("div", _k, [
27212
27061
  l[6] ||= Z("span", { class: "approval-icon" }, "✋", -1),
27213
- Z("span", Nk, [_s(W(K(i).toolConfirmPrefix), 1), Z("code", null, W(K(n).toolName), 1)]),
27062
+ Z("span", vk, [_s(W(K(i).toolConfirmPrefix), 1), Z("code", null, W(K(n).toolName), 1)]),
27214
27063
  c.value ? (Y(), X("button", {
27215
27064
  key: 0,
27216
27065
  class: "approval-toggle",
27217
27066
  onClick: l[2] ||= (e) => a.value = !a.value
27218
27067
  }, W(a.value ? K(i).collapseArgs : K(i).viewArgs) + W(a.value ? " ▴" : " ▾"), 1)) : Q("", !0)
27219
27068
  ]),
27220
- c.value && a.value ? (Y(), X("pre", Pk, W(c.value), 1)) : Q("", !0),
27221
- Z("div", Fk, [Z("button", {
27069
+ c.value && a.value ? (Y(), X("pre", yk, W(c.value), 1)) : Q("", !0),
27070
+ Z("div", bk, [Z("button", {
27222
27071
  class: "approval-deny",
27223
27072
  onClick: l[3] ||= (e) => K(r)(!1)
27224
27073
  }, [fs(Cw, { text: K(i).deny }, null, 8, ["text"])]), Z("button", {
@@ -27227,13 +27076,13 @@ app.mount('#app');
27227
27076
  }, [fs(Cw, { text: K(i).approve }, null, 8, ["text"])])])
27228
27077
  ], 64))])) : Q("", !0);
27229
27078
  }
27230
- }), [["__scopeId", "data-v-8566d3cd"]]), Lk = {
27079
+ }), [["__scopeId", "data-v-8566d3cd"]]), Sk = {
27231
27080
  key: 0,
27232
27081
  class: "conflict-bar"
27233
- }, Rk = { class: "conflict-head" }, zk = { class: "conflict-icon" }, Bk = { class: "conflict-title" }, Vk = { class: "conflict-detail" }, Hk = {
27082
+ }, Ck = { class: "conflict-head" }, wk = { class: "conflict-icon" }, Tk = { class: "conflict-title" }, Ek = { class: "conflict-detail" }, Dk = {
27234
27083
  key: 0,
27235
27084
  class: "conflict-diff"
27236
- }, Uk = { class: "conflict-diff-col" }, Wk = { class: "conflict-diff-label" }, Gk = { class: "conflict-diff-pre" }, Kk = { class: "conflict-diff-col" }, qk = { class: "conflict-diff-label" }, Jk = { class: "conflict-diff-pre" }, Yk = { class: "conflict-actions" }, Xk = ["title"], Zk = ["title"], Qk = ["title"], $k = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27085
+ }, Ok = { class: "conflict-diff-col" }, kk = { class: "conflict-diff-label" }, Ak = { class: "conflict-diff-pre" }, jk = { class: "conflict-diff-col" }, Mk = { class: "conflict-diff-label" }, Nk = { class: "conflict-diff-pre" }, Pk = { class: "conflict-actions" }, Fk = ["title"], Ik = ["title"], Lk = ["title"], Rk = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27237
27086
  __name: "ConflictBar",
27238
27087
  props: {
27239
27088
  pendingConflict: {},
@@ -27265,52 +27114,52 @@ app.mount('#app');
27265
27114
  return String(e);
27266
27115
  }
27267
27116
  });
27268
- return (t, a) => e.pendingConflict ? (Y(), X("div", Lk, [
27269
- Z("div", Rk, [Z("span", zk, [fs(xw, { icon: e.icons.conflict }, null, 8, ["icon"])]), Z("span", Bk, [
27117
+ return (t, a) => e.pendingConflict ? (Y(), X("div", Sk, [
27118
+ Z("div", Ck, [Z("span", wk, [fs(xw, { icon: e.icons.conflict }, null, 8, ["icon"])]), Z("span", Tk, [
27270
27119
  _s(W(e.messages.conflictTitlePrefix), 1),
27271
27120
  Z("code", null, W(e.pendingConflict.path), 1),
27272
27121
  _s(W(e.messages.conflictTitleSuffix), 1)
27273
27122
  ])]),
27274
- Z("div", Vk, W(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
27123
+ Z("div", Ek, W(e.messages.conflictDetailTemplate.replace("{op}", e.pendingConflict.op === "delete" ? e.messages.conflictOpDelete : e.messages.conflictOpWrite)), 1),
27275
27124
  Z("button", {
27276
27125
  class: "conflict-toggle",
27277
27126
  onClick: a[0] ||= (e) => n.value = !n.value
27278
27127
  }, W(n.value ? e.messages.collapseDiff : e.messages.viewDiff) + W(n.value ? " ▴" : " ▾"), 1),
27279
- n.value ? (Y(), X("div", Hk, [Z("div", Uk, [Z("div", Wk, W(e.messages.agentValueLabel), 1), Z("pre", Gk, W(r.value || e.messages.deleteNoValue), 1)]), Z("div", Kk, [Z("div", qk, W(e.messages.currentValueLabel), 1), Z("pre", Jk, W(i.value), 1)])])) : Q("", !0),
27280
- Z("div", Yk, [
27128
+ n.value ? (Y(), X("div", Dk, [Z("div", Ok, [Z("div", kk, W(e.messages.agentValueLabel), 1), Z("pre", Ak, W(r.value || e.messages.deleteNoValue), 1)]), Z("div", jk, [Z("div", Mk, W(e.messages.currentValueLabel), 1), Z("pre", Nk, W(i.value), 1)])])) : Q("", !0),
27129
+ Z("div", Pk, [
27281
27130
  Z("button", {
27282
27131
  class: "conflict-keep",
27283
27132
  onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
27284
27133
  title: e.messages.keepExternalTitle
27285
- }, [fs(Cw, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, Xk),
27134
+ }, [fs(Cw, { text: e.messages.keepExternal }, null, 8, ["text"])], 8, Fk),
27286
27135
  Z("button", {
27287
27136
  class: "conflict-overwrite",
27288
27137
  onClick: a[2] ||= (t) => e.onResolve?.("overwrite"),
27289
27138
  title: e.messages.overwriteTitle
27290
- }, [fs(Cw, { text: e.messages.overwrite }, null, 8, ["text"])], 8, Zk),
27139
+ }, [fs(Cw, { text: e.messages.overwrite }, null, 8, ["text"])], 8, Ik),
27291
27140
  Z("button", {
27292
27141
  class: "conflict-restore",
27293
27142
  onClick: a[3] ||= (t) => e.onResolve?.("restore"),
27294
27143
  title: e.messages.restoreTitle
27295
- }, [fs(Cw, { text: e.messages.restore }, null, 8, ["text"])], 8, Qk)
27144
+ }, [fs(Cw, { text: e.messages.restore }, null, 8, ["text"])], 8, Lk)
27296
27145
  ])
27297
27146
  ])) : Q("", !0);
27298
27147
  }
27299
- }), [["__scopeId", "data-v-8263b7d4"]]), eA = { class: "chat-footer" }, tA = ["title"], nA = {
27148
+ }), [["__scopeId", "data-v-8263b7d4"]]), zk = { class: "chat-footer" }, Bk = ["title"], Vk = {
27300
27149
  key: 0,
27301
27150
  class: "drop-hint"
27302
- }, rA = {
27151
+ }, Hk = {
27303
27152
  key: 1,
27304
27153
  class: "focus-chips"
27305
- }, iA = ["title", "onClick"], aA = { class: "focus-chip-icon" }, oA = { class: "focus-chip-path" }, sA = ["title", "onClick"], cA = {
27154
+ }, Uk = ["title", "onClick"], Wk = { class: "focus-chip-icon" }, Gk = { class: "focus-chip-path" }, Kk = ["title", "onClick"], qk = {
27306
27155
  key: 2,
27307
27156
  class: "img-chips",
27308
27157
  "data-test": "img-chips"
27309
- }, lA = ["title"], uA = ["src", "alt"], dA = ["onClick"], fA = {
27158
+ }, Jk = ["title"], Yk = ["src", "alt"], Xk = ["onClick"], Zk = {
27310
27159
  key: 3,
27311
27160
  class: "img-error",
27312
27161
  "data-test": "img-error"
27313
- }, pA = ["placeholder", "rows"], mA = { class: "input-actions" }, hA = { class: "send-hint" }, gA = ["title"], _A = {
27162
+ }, Qk = ["placeholder", "rows"], $k = { class: "input-actions" }, eA = { class: "send-hint" }, tA = ["title"], nA = {
27314
27163
  key: 1,
27315
27164
  width: "15",
27316
27165
  height: "15",
@@ -27320,13 +27169,13 @@ app.mount('#app');
27320
27169
  "stroke-width": "2",
27321
27170
  "stroke-linecap": "round",
27322
27171
  "stroke-linejoin": "round"
27323
- }, vA = ["disabled", "title"], yA = {
27172
+ }, rA = ["disabled", "title"], iA = {
27324
27173
  key: 0,
27325
27174
  width: "16",
27326
27175
  height: "16",
27327
27176
  viewBox: "0 0 24 24",
27328
27177
  fill: "currentColor"
27329
- }, bA = {
27178
+ }, aA = {
27330
27179
  key: 2,
27331
27180
  width: "18",
27332
27181
  height: "18",
@@ -27334,7 +27183,7 @@ app.mount('#app');
27334
27183
  fill: "none",
27335
27184
  stroke: "currentColor",
27336
27185
  "stroke-width": "2"
27337
- }, xA = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27186
+ }, oA = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27338
27187
  __name: "ChatInput",
27339
27188
  props: {
27340
27189
  placeholder: {},
@@ -27358,35 +27207,35 @@ app.mount('#app');
27358
27207
  }
27359
27208
  n.length && h(n);
27360
27209
  };
27361
- return (t, h) => (Y(), X("div", eA, [K(a) ? (Y(), X("button", {
27210
+ return (t, h) => (Y(), X("div", zk, [K(a) ? (Y(), X("button", {
27362
27211
  key: 0,
27363
27212
  class: "undo-foot-btn",
27364
27213
  title: K(d).undoTitle,
27365
27214
  onClick: h[0] ||= (...e) => K(o) && K(o)(...e)
27366
- }, W(K(d).undo), 9, tA)) : Q("", !0), Z("div", {
27215
+ }, W(K(d).undo), 9, Bk)) : Q("", !0), Z("div", {
27367
27216
  class: U(["chat-input-wrap", { "drag-over": b.value }]),
27368
27217
  onDragover: h[4] ||= yl((e) => b.value = !0, ["prevent"]),
27369
27218
  onDragleave: h[5] ||= (e) => b.value = !1,
27370
27219
  onDrop: yl(C, ["prevent"])
27371
27220
  }, [
27372
- b.value ? (Y(), X("div", nA, W(K(d).imageDropHint), 1)) : Q("", !0),
27373
- K(s).length ? (Y(), X("div", rA, [(Y(!0), X(J, null, sa(K(s), (e) => (Y(), X("span", {
27221
+ b.value ? (Y(), X("div", Vk, W(K(d).imageDropHint), 1)) : Q("", !0),
27222
+ K(s).length ? (Y(), X("div", Hk, [(Y(!0), X(J, null, sa(K(s), (e) => (Y(), X("span", {
27374
27223
  key: e.path,
27375
27224
  class: "focus-chip",
27376
27225
  title: K(d).focusChipTitlePrefix + e.path + K(d).focusChipTitleHint,
27377
27226
  onClick: (t) => K(l)(e)
27378
27227
  }, [
27379
- Z("span", aA, [fs(xw, { icon: K(u).focus }, null, 8, ["icon"])]),
27380
- Z("code", oA, W(e.path), 1),
27228
+ Z("span", Wk, [fs(xw, { icon: K(u).focus }, null, 8, ["icon"])]),
27229
+ Z("code", Gk, W(e.path), 1),
27381
27230
  Z("button", {
27382
27231
  type: "button",
27383
27232
  class: "focus-chip-x",
27384
27233
  "data-test": "focus-clear",
27385
27234
  title: K(d).removeFocus,
27386
27235
  onClick: yl((t) => K(c)(e.path), ["stop"])
27387
- }, "✕", 8, sA)
27388
- ], 8, iA))), 128))])) : Q("", !0),
27389
- K(m).length ? (Y(), X("div", cA, [(Y(!0), X(J, null, sa(K(m), (e) => (Y(), X("span", {
27236
+ }, "✕", 8, Kk)
27237
+ ], 8, Uk))), 128))])) : Q("", !0),
27238
+ K(m).length ? (Y(), X("div", qk, [(Y(!0), X(J, null, sa(K(m), (e) => (Y(), X("span", {
27390
27239
  key: e.id,
27391
27240
  class: "img-chip",
27392
27241
  title: e.name || K(d).imageAlt
@@ -27394,13 +27243,13 @@ app.mount('#app');
27394
27243
  class: "img-chip-thumb",
27395
27244
  src: e.dataUri,
27396
27245
  alt: e.name || K(d).imageAlt
27397
- }, null, 8, uA), Z("button", {
27246
+ }, null, 8, Yk), Z("button", {
27398
27247
  type: "button",
27399
27248
  class: "img-chip-x",
27400
27249
  "data-test": "img-chip-x",
27401
27250
  onClick: (t) => K(g)(e.id)
27402
- }, "✕", 8, dA)], 8, lA))), 128))])) : Q("", !0),
27403
- K(_) ? (Y(), X("div", fA, W(K(_)), 1)) : Q("", !0),
27251
+ }, "✕", 8, Xk)], 8, Jk))), 128))])) : Q("", !0),
27252
+ K(_) ? (Y(), X("div", Zk, W(K(_)), 1)) : Q("", !0),
27404
27253
  Xr(Z("textarea", {
27405
27254
  "onUpdate:modelValue": h[1] ||= (e) => /* @__PURE__ */ Sn(n) ? n.value = e : null,
27406
27255
  class: U(["chat-input", {
@@ -27411,9 +27260,9 @@ app.mount('#app');
27411
27260
  rows: e.inputRows,
27412
27261
  onKeydown: h[2] ||= (...e) => K(i) && K(i)(...e),
27413
27262
  onPaste: w
27414
- }, null, 42, pA), [[gl, K(n)]]),
27415
- Z("div", mA, [
27416
- Z("span", hA, W(K(d).sendHint), 1),
27263
+ }, null, 42, Qk), [[gl, K(n)]]),
27264
+ Z("div", $k, [
27265
+ Z("span", eA, W(K(d).sendHint), 1),
27417
27266
  Z("button", {
27418
27267
  class: "attach-btn",
27419
27268
  title: K(d).attachImageTitle,
@@ -27422,7 +27271,7 @@ app.mount('#app');
27422
27271
  }, [K(u).attachImage ? (Y(), as(xw, {
27423
27272
  key: 0,
27424
27273
  icon: K(u).attachImage
27425
- }, null, 8, ["icon"])) : (Y(), X("svg", _A, [...h[6] ||= [Z("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" }, null, -1)]]))], 8, gA),
27274
+ }, null, 8, ["icon"])) : (Y(), X("svg", nA, [...h[6] ||= [Z("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" }, null, -1)]]))], 8, tA),
27426
27275
  Z("input", {
27427
27276
  ref_key: "fileInput",
27428
27277
  ref: y,
@@ -27438,7 +27287,7 @@ app.mount('#app');
27438
27287
  disabled: !K(f).loading && !K(n).trim() && !K(m).length && !K(v),
27439
27288
  title: K(f).loading ? K(d).stopTitle : K(d).sendTitle,
27440
27289
  onClick: h[3] ||= (e) => K(f).loading ? K(p)() : K(r)()
27441
- }, [K(f).loading ? (Y(), X("svg", yA, [...h[7] ||= [Z("rect", {
27290
+ }, [K(f).loading ? (Y(), X("svg", iA, [...h[7] ||= [Z("rect", {
27442
27291
  x: "6",
27443
27292
  y: "6",
27444
27293
  width: "12",
@@ -27447,214 +27296,214 @@ app.mount('#app');
27447
27296
  }, null, -1)]])) : K(u).send ? (Y(), as(xw, {
27448
27297
  key: 1,
27449
27298
  icon: K(u).send
27450
- }, null, 8, ["icon"])) : (Y(), X("svg", bA, [...h[8] ||= [Z("line", {
27299
+ }, null, 8, ["icon"])) : (Y(), X("svg", aA, [...h[8] ||= [Z("line", {
27451
27300
  x1: "22",
27452
27301
  y1: "2",
27453
27302
  x2: "11",
27454
27303
  y2: "13"
27455
- }, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, vA)
27304
+ }, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, rA)
27456
27305
  ])
27457
27306
  ], 34)]));
27458
27307
  }
27459
- }), [["__scopeId", "data-v-335e3aeb"]]), SA = {
27308
+ }), [["__scopeId", "data-v-335e3aeb"]]), sA = {
27460
27309
  key: 0,
27461
27310
  class: "debug-drawer"
27462
- }, CA = { class: "drawer-header" }, wA = { class: "tab-group" }, TA = { class: "header-actions" }, EA = ["title"], DA = ["title"], OA = ["title"], kA = {
27311
+ }, cA = { class: "drawer-header" }, lA = { class: "tab-group" }, uA = { class: "header-actions" }, dA = ["title"], fA = ["title"], pA = ["title"], mA = {
27463
27312
  key: 0,
27464
27313
  class: "drawer-filters"
27465
- }, AA = ["onClick"], jA = { class: "chip-count" }, MA = { class: "chip-count" }, NA = {
27314
+ }, hA = ["onClick"], gA = { class: "chip-count" }, _A = { class: "chip-count" }, vA = {
27466
27315
  key: 0,
27467
27316
  class: "trace-panel"
27468
- }, PA = {
27317
+ }, yA = {
27469
27318
  key: 0,
27470
27319
  class: "trace-empty"
27471
- }, FA = { class: "trace-metrics" }, IA = { class: "metric-card" }, LA = { class: "metric-card" }, RA = { class: "metric-card" }, zA = { class: "metric-card" }, BA = {
27320
+ }, bA = { class: "trace-metrics" }, xA = { class: "metric-card" }, SA = { class: "metric-card" }, CA = { class: "metric-card" }, wA = { class: "metric-card" }, TA = {
27472
27321
  key: 0,
27473
27322
  class: "metric-card"
27474
- }, VA = {
27323
+ }, EA = {
27475
27324
  key: 1,
27476
27325
  class: "metric-card"
27477
- }, HA = { class: "trace-spans" }, UA = { class: "span-ico" }, WA = { class: "span-name" }, GA = {
27326
+ }, DA = { class: "trace-spans" }, OA = { class: "span-ico" }, kA = { class: "span-name" }, AA = {
27478
27327
  key: 0,
27479
27328
  class: "span-dur"
27480
- }, KA = {
27329
+ }, jA = {
27481
27330
  key: 1,
27482
27331
  class: "span-status"
27483
- }, qA = {
27332
+ }, MA = {
27484
27333
  key: 1,
27485
27334
  class: "context-panel"
27486
- }, JA = {
27335
+ }, NA = {
27487
27336
  key: 0,
27488
27337
  class: "trace-empty"
27489
- }, YA = { class: "ctx-overview" }, XA = { class: "ctx-occupancy" }, ZA = ["title"], QA = ["title"], $A = { class: "ctx-pct" }, ej = { class: "ctx-kv-row" }, tj = { class: "ctx-kv" }, nj = {
27338
+ }, PA = { class: "ctx-overview" }, FA = { class: "ctx-occupancy" }, IA = ["title"], LA = ["title"], RA = { class: "ctx-pct" }, zA = { class: "ctx-kv-row" }, BA = { class: "ctx-kv" }, VA = {
27490
27339
  key: 0,
27491
27340
  class: "ctx-kv"
27492
- }, rj = {
27341
+ }, HA = {
27493
27342
  key: 1,
27494
27343
  class: "ctx-kv"
27495
- }, ij = { class: "ctx-section-title" }, aj = ["title"], oj = { class: "ctx-cat-bar" }, sj = { class: "ctx-cat-tokens" }, cj = {
27344
+ }, UA = { class: "ctx-section-title" }, WA = ["title"], GA = { class: "ctx-cat-bar" }, KA = { class: "ctx-cat-tokens" }, qA = {
27496
27345
  key: 0,
27497
27346
  class: "ctx-compression"
27498
- }, lj = { class: "ctx-section-title" }, uj = { class: "ctx-kv-row" }, dj = { class: "ctx-kv" }, fj = { class: "ctx-kv" }, pj = { class: "ctx-kv" }, mj = {
27347
+ }, JA = { class: "ctx-section-title" }, YA = { class: "ctx-kv-row" }, XA = { class: "ctx-kv" }, ZA = { class: "ctx-kv" }, QA = { class: "ctx-kv" }, $A = {
27499
27348
  key: 0,
27500
27349
  class: "ctx-kv"
27501
- }, hj = {
27350
+ }, ej = {
27502
27351
  key: 2,
27503
27352
  class: "subagent-panel"
27504
- }, gj = {
27353
+ }, tj = {
27505
27354
  key: 0,
27506
27355
  class: "sub-section"
27507
- }, _j = { class: "sub-section-title" }, vj = {
27356
+ }, nj = { class: "sub-section-title" }, rj = {
27508
27357
  key: 1,
27509
27358
  class: "trace-empty"
27510
- }, yj = {
27359
+ }, ij = {
27511
27360
  key: 0,
27512
27361
  class: "sub-section"
27513
- }, bj = { class: "sub-section-title" }, xj = { class: "sub-head" }, Sj = { class: "sub-label" }, Cj = { class: "sub-steps-badge" }, wj = { class: "sub-task" }, Tj = {
27362
+ }, aj = { class: "sub-section-title" }, oj = { class: "sub-head" }, sj = { class: "sub-label" }, cj = { class: "sub-steps-badge" }, lj = { class: "sub-task" }, uj = {
27514
27363
  key: 1,
27515
27364
  class: "sub-section"
27516
- }, Ej = { class: "sub-section-title" }, Dj = { class: "sub-head" }, Oj = { class: "sub-label" }, kj = {
27365
+ }, dj = { class: "sub-section-title" }, fj = { class: "sub-head" }, pj = { class: "sub-label" }, mj = {
27517
27366
  key: 0,
27518
27367
  class: "sub-dur"
27519
- }, Aj = ["onClick"], jj = { class: "sub-task" }, Mj = {
27368
+ }, hj = ["onClick"], gj = { class: "sub-task" }, _j = {
27520
27369
  key: 0,
27521
27370
  class: "sub-result"
27522
- }, Nj = {
27371
+ }, vj = {
27523
27372
  key: 1,
27524
27373
  class: "sub-steps-list"
27525
- }, Pj = { class: "sub-step-kind" }, Fj = { class: "sub-step-name" }, Ij = { class: "sub-step-ts" }, Lj = {
27374
+ }, yj = { class: "sub-step-kind" }, bj = { class: "sub-step-name" }, xj = { class: "sub-step-ts" }, Sj = {
27526
27375
  key: 0,
27527
27376
  class: "empty"
27528
- }, Rj = ["onClick"], zj = { class: "log-group-title" }, Bj = { class: "log-group-meta" }, Vj = {
27377
+ }, Cj = ["onClick"], wj = { class: "log-group-title" }, Tj = { class: "log-group-meta" }, Ej = {
27529
27378
  key: 0,
27530
27379
  class: "lg-badge"
27531
- }, Hj = {
27380
+ }, Dj = {
27532
27381
  key: 1,
27533
27382
  class: "lg-badge"
27534
- }, Uj = {
27383
+ }, Oj = {
27535
27384
  key: 2,
27536
27385
  class: "lg-badge err"
27537
- }, Wj = { class: "log-group-body" }, Gj = { class: "log-head" }, Kj = {
27386
+ }, kj = { class: "log-group-body" }, Aj = { class: "log-head" }, jj = {
27538
27387
  key: 0,
27539
27388
  class: "log-source"
27540
- }, qj = { class: "log-time" }, Jj = { class: "log-body" }, Yj = { class: "kv-grid" }, Xj = { class: "kv" }, Zj = { class: "k" }, Qj = { class: "v" }, $j = { class: "kv" }, eM = { class: "k" }, tM = { class: "v" }, nM = { class: "kv" }, rM = { class: "v" }, iM = { class: "kv" }, aM = { class: "k" }, oM = { class: "v" }, sM = { class: "section-label" }, cM = { class: "chip-row" }, lM = { class: "section-label" }, uM = { class: "msg-list" }, dM = { class: "msg-text" }, fM = { class: "badge-row" }, pM = { class: "badge" }, mM = {
27389
+ }, Mj = { class: "log-time" }, Nj = { class: "log-body" }, Pj = { class: "kv-grid" }, Fj = { class: "kv" }, Ij = { class: "k" }, Lj = { class: "v" }, Rj = { class: "kv" }, zj = { class: "k" }, Bj = { class: "v" }, Vj = { class: "kv" }, Hj = { class: "v" }, Uj = { class: "kv" }, Wj = { class: "k" }, Gj = { class: "v" }, Kj = { class: "section-label" }, qj = { class: "chip-row" }, Jj = { class: "section-label" }, Yj = { class: "msg-list" }, Xj = { class: "msg-text" }, Zj = { class: "badge-row" }, Qj = { class: "badge" }, $j = {
27541
27390
  key: 0,
27542
27391
  class: "badge muted"
27543
- }, hM = { class: "badge muted" }, gM = {
27392
+ }, eM = { class: "badge muted" }, tM = {
27544
27393
  key: 1,
27545
27394
  class: "badge muted"
27546
- }, _M = ["onClick"], vM = ["title", "onClick"], yM = ["onClick"], bM = ["title", "onClick"], xM = { class: "msg-detail" }, SM = {
27395
+ }, nM = ["onClick"], rM = ["title", "onClick"], iM = ["onClick"], aM = ["title", "onClick"], oM = { class: "msg-detail" }, sM = {
27547
27396
  key: 0,
27548
27397
  class: "msg-text"
27549
- }, CM = { class: "tc-inline-name" }, wM = { class: "tc-inline-args" }, TM = {
27398
+ }, cM = { class: "tc-inline-name" }, lM = { class: "tc-inline-args" }, uM = {
27550
27399
  key: 1,
27551
27400
  class: "tc-id"
27552
- }, EM = {
27401
+ }, dM = {
27553
27402
  key: 1,
27554
27403
  class: "log-raw"
27555
- }, DM = { class: "badge-row" }, OM = { class: "badge" }, kM = {
27404
+ }, fM = { class: "badge-row" }, pM = { class: "badge" }, mM = {
27556
27405
  key: 0,
27557
27406
  class: "badge warn"
27558
- }, AM = {
27407
+ }, hM = {
27559
27408
  key: 0,
27560
27409
  class: "resp-content"
27561
- }, jM = {
27410
+ }, gM = {
27562
27411
  key: 1,
27563
27412
  class: "tc-list"
27564
- }, MM = { class: "tc-name" }, NM = { class: "tc-args" }, PM = {
27413
+ }, _M = { class: "tc-name" }, vM = { class: "tc-args" }, yM = {
27565
27414
  key: 2,
27566
27415
  class: "usage-row"
27567
- }, FM = { class: "usage" }, IM = { class: "usage" }, LM = { class: "usage" }, RM = { class: "tc-name" }, zM = {
27416
+ }, bM = { class: "usage" }, xM = { class: "usage" }, SM = { class: "usage" }, CM = { class: "tc-name" }, wM = {
27568
27417
  key: 0,
27569
27418
  class: "tc-dur"
27570
- }, BM = ["title", "onClick"], VM = { class: "tc-args" }, HM = { class: "tc-result-sep" }, UM = { class: "tc-args tc-result" }, WM = {
27419
+ }, TM = ["title", "onClick"], EM = { class: "tc-args" }, DM = { class: "tc-result-sep" }, OM = { class: "tc-args tc-result" }, kM = {
27571
27420
  key: 1,
27572
27421
  class: "tc-card inline"
27573
- }, GM = { class: "tc-name" }, KM = {
27422
+ }, AM = { class: "tc-name" }, jM = {
27574
27423
  key: 0,
27575
27424
  class: "tc-dur running"
27576
- }, qM = { class: "tc-args" }, JM = {
27425
+ }, MM = { class: "tc-args" }, NM = {
27577
27426
  key: 4,
27578
27427
  class: "err-box"
27579
- }, YM = { class: "log-footer" }, XM = ["onClick"], ZM = ["onClick"], QM = {
27428
+ }, PM = { class: "log-footer" }, FM = ["onClick"], IM = ["onClick"], LM = {
27580
27429
  key: 0,
27581
27430
  class: "log-raw"
27582
- }, $M = {
27431
+ }, RM = {
27583
27432
  key: 0,
27584
27433
  class: "empty"
27585
- }, eN = {
27434
+ }, zM = {
27586
27435
  key: 1,
27587
27436
  class: "flow-section"
27588
- }, tN = { class: "flow-section-title" }, nN = { class: "flow-ico" }, rN = { class: "flow-label" }, iN = { class: "flow-detail" }, aN = { class: "flow-time" }, oN = { class: "flow-round-head" }, sN = { class: "flow-round-body" }, cN = { class: "flow-ico" }, lN = { class: "flow-label" }, uN = { class: "flow-detail" }, dN = { class: "flow-time" }, fN = {
27437
+ }, BM = { class: "flow-section-title" }, VM = { class: "flow-ico" }, HM = { class: "flow-label" }, UM = { class: "flow-detail" }, WM = { class: "flow-time" }, GM = { class: "flow-round-head" }, KM = { class: "flow-round-body" }, qM = { class: "flow-ico" }, JM = { class: "flow-label" }, YM = { class: "flow-detail" }, XM = { class: "flow-time" }, ZM = {
27589
27438
  key: 5,
27590
27439
  class: "info-body"
27591
- }, pN = {
27440
+ }, QM = {
27592
27441
  key: 0,
27593
27442
  class: "empty"
27594
- }, mN = { class: "info-section" }, hN = { class: "info-title" }, gN = { class: "kv-grid" }, _N = { class: "kv" }, vN = { class: "v" }, yN = { class: "kv" }, bN = { class: "k" }, xN = { class: "v" }, SN = { class: "kv" }, CN = { class: "k" }, wN = { class: "v" }, TN = { class: "kv" }, EN = { class: "k" }, DN = { class: "v" }, ON = {
27443
+ }, $M = { class: "info-section" }, eN = { class: "info-title" }, tN = { class: "kv-grid" }, nN = { class: "kv" }, rN = { class: "v" }, iN = { class: "kv" }, aN = { class: "k" }, oN = { class: "v" }, sN = { class: "kv" }, cN = { class: "k" }, lN = { class: "v" }, uN = { class: "kv" }, dN = { class: "k" }, fN = { class: "v" }, pN = {
27595
27444
  class: "kv",
27596
27445
  style: { "margin-top": "6px" }
27597
- }, kN = { class: "k" }, AN = {
27446
+ }, mN = { class: "k" }, hN = {
27598
27447
  class: "v",
27599
27448
  style: { "font-size": "11px" }
27600
- }, jN = { class: "info-section" }, MN = { class: "info-title" }, NN = { class: "info-name" }, PN = { class: "info-desc" }, FN = {
27449
+ }, gN = { class: "info-section" }, _N = { class: "info-title" }, vN = { class: "info-name" }, yN = { class: "info-desc" }, bN = {
27601
27450
  key: 0,
27602
27451
  class: "info-section"
27603
- }, IN = { class: "info-title" }, LN = { class: "info-hint" }, RN = ["onClick"], zN = { class: "info-desc" }, BN = {
27452
+ }, xN = { class: "info-title" }, SN = { class: "info-hint" }, CN = ["onClick"], wN = { class: "info-desc" }, TN = {
27604
27453
  key: 0,
27605
27454
  class: "skill-content"
27606
- }, VN = {
27455
+ }, EN = {
27607
27456
  key: 0,
27608
27457
  class: "skill-loading"
27609
- }, HN = {
27458
+ }, DN = {
27610
27459
  key: 1,
27611
27460
  class: "skill-error"
27612
- }, UN = {
27461
+ }, ON = {
27613
27462
  key: 2,
27614
27463
  class: "skill-pre"
27615
- }, WN = {
27464
+ }, kN = {
27616
27465
  key: 1,
27617
27466
  class: "info-section"
27618
- }, GN = { class: "info-title" }, KN = { class: "info-item" }, qN = { class: "info-name" }, JN = { class: "info-desc" }, YN = { class: "info-section" }, XN = { class: "info-title" }, ZN = { class: "kv-grid" }, QN = { class: "kv" }, $N = { class: "k" }, eP = { class: "v" }, tP = { class: "kv" }, nP = { class: "k" }, rP = { class: "v" }, iP = { class: "kv" }, aP = { class: "k" }, oP = { class: "v" }, sP = { class: "kv" }, cP = { class: "k" }, lP = {
27467
+ }, AN = { class: "info-title" }, jN = { class: "info-item" }, MN = { class: "info-name" }, NN = { class: "info-desc" }, PN = { class: "info-section" }, FN = { class: "info-title" }, IN = { class: "kv-grid" }, LN = { class: "kv" }, RN = { class: "k" }, zN = { class: "v" }, BN = { class: "kv" }, VN = { class: "k" }, HN = { class: "v" }, UN = { class: "kv" }, WN = { class: "k" }, GN = { class: "v" }, KN = { class: "kv" }, qN = { class: "k" }, JN = {
27619
27468
  class: "v",
27620
27469
  style: { "font-size": "11px" }
27621
- }, uP = {
27470
+ }, YN = {
27622
27471
  key: 2,
27623
27472
  class: "info-section"
27624
- }, dP = { class: "info-title" }, fP = { class: "info-name" }, pP = { class: "src-tag mcp" }, mP = { class: "info-desc" }, hP = {
27473
+ }, XN = { class: "info-title" }, ZN = { class: "info-name" }, QN = { class: "src-tag mcp" }, $N = { class: "info-desc" }, eP = {
27625
27474
  key: 3,
27626
27475
  class: "info-section"
27627
- }, gP = { class: "info-title" }, _P = { class: "kv-grid" }, vP = { class: "kv" }, yP = { class: "k" }, bP = { class: "v" }, xP = { class: "kv" }, SP = { class: "k" }, CP = { class: "v" }, wP = { class: "kv" }, TP = { class: "k" }, EP = { class: "v" }, DP = {
27476
+ }, tP = { class: "info-title" }, nP = { class: "kv-grid" }, rP = { class: "kv" }, iP = { class: "k" }, aP = { class: "v" }, oP = { class: "kv" }, sP = { class: "k" }, cP = { class: "v" }, lP = { class: "kv" }, uP = { class: "k" }, dP = { class: "v" }, fP = {
27628
27477
  key: 0,
27629
27478
  class: "kv"
27630
- }, OP = { class: "k" }, kP = {
27479
+ }, pP = { class: "k" }, mP = {
27631
27480
  class: "v",
27632
27481
  style: { "font-size": "11px" }
27633
- }, AP = {
27482
+ }, hP = {
27634
27483
  key: 4,
27635
27484
  class: "info-section"
27636
- }, jP = { class: "info-title" }, MP = {
27485
+ }, gP = { class: "info-title" }, _P = {
27637
27486
  key: 5,
27638
27487
  class: "info-section"
27639
- }, NP = { class: "info-title" }, PP = { class: "info-pre" }, FP = {
27488
+ }, vP = { class: "info-title" }, yP = { class: "info-pre" }, bP = {
27640
27489
  key: 6,
27641
27490
  class: "info-section"
27642
- }, IP = { class: "info-title" }, LP = {
27491
+ }, xP = { class: "info-title" }, SP = {
27643
27492
  class: "todo-tag",
27644
27493
  style: { background: "#6366f1" }
27645
- }, RP = {
27494
+ }, CP = {
27646
27495
  key: 7,
27647
27496
  class: "info-section"
27648
- }, zP = { class: "info-title" }, BP = { class: "info-kv" }, VP = { class: "kv" }, HP = { class: "k" }, UP = { class: "v" }, WP = { class: "kv" }, GP = { class: "k" }, KP = { class: "v" }, qP = { class: "kv" }, JP = { class: "k" }, YP = { class: "v" }, XP = { class: "kv" }, ZP = { class: "k" }, QP = { class: "v" }, $P = { class: "kv" }, eF = { class: "k" }, tF = {
27497
+ }, wP = { class: "info-title" }, TP = { class: "info-kv" }, EP = { class: "kv" }, DP = { class: "k" }, OP = { class: "v" }, kP = { class: "kv" }, AP = { class: "k" }, jP = { class: "v" }, MP = { class: "kv" }, NP = { class: "k" }, PP = { class: "v" }, FP = { class: "kv" }, IP = { class: "k" }, LP = { class: "v" }, RP = { class: "kv" }, zP = { class: "k" }, BP = {
27649
27498
  class: "v",
27650
27499
  style: { "font-size": "11px" }
27651
- }, nF = {
27500
+ }, VP = {
27652
27501
  key: 0,
27653
27502
  class: "kv"
27654
- }, rF = { class: "k" }, iF = {
27503
+ }, HP = { class: "k" }, UP = {
27655
27504
  class: "v",
27656
27505
  style: { "font-size": "11px" }
27657
- }, aF = 400, oF = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27506
+ }, WP = 400, GP = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
27658
27507
  __name: "DebugDrawer",
27659
27508
  props: {
27660
27509
  logs: { default: () => [] },
@@ -28094,8 +27943,8 @@ app.mount('#app');
28094
27943
  }
28095
27944
  }
28096
27945
  return (t, n) => (Y(), as(_i, { to: "body" }, [fs(gc, { name: "drawer" }, {
28097
- default: Jr(() => [e.visible ? (Y(), X("div", SA, [Z("div", { class: U(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
28098
- Z("div", CA, [Z("div", wA, [
27946
+ default: Jr(() => [e.visible ? (Y(), X("div", sA, [Z("div", { class: U(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
27947
+ Z("div", cA, [Z("div", lA, [
28099
27948
  Z("button", {
28100
27949
  class: U(["tab-btn", { active: ie.value === "logs" }]),
28101
27950
  onClick: n[0] ||= (e) => se("logs")
@@ -28124,33 +27973,33 @@ app.mount('#app');
28124
27973
  class: U(["tab-btn", { active: ie.value === "info" }]),
28125
27974
  onClick: n[5] ||= (e) => se("info")
28126
27975
  }, "🧬 " + W(y.value.debugTabInfo), 3)) : Q("", !0)
28127
- ]), Z("div", TA, [
27976
+ ]), Z("div", uA, [
28128
27977
  Z("button", {
28129
27978
  class: "hd-btn",
28130
27979
  title: y.value.debugCopyReport,
28131
27980
  onClick: v
28132
- }, W(g.value === "report" ? "✓" : "📋"), 9, EA),
27981
+ }, W(g.value === "report" ? "✓" : "📋"), 9, dA),
28133
27982
  ie.value === "logs" ? (Y(), X("button", {
28134
27983
  key: 0,
28135
27984
  class: "hd-btn",
28136
27985
  title: y.value.debugClearLogs,
28137
27986
  onClick: B
28138
- }, "🗑️", 8, DA)) : Q("", !0),
27987
+ }, "🗑️", 8, fA)) : Q("", !0),
28139
27988
  Z("button", {
28140
27989
  class: "hd-btn",
28141
27990
  title: y.value.close,
28142
27991
  onClick: re
28143
- }, "✕", 8, OA)
27992
+ }, "✕", 8, pA)
28144
27993
  ])]),
28145
- ie.value === "logs" ? (Y(), X("div", kA, [(Y(!0), X(J, null, sa(b.value, (e, t) => (Y(), X("button", {
27994
+ ie.value === "logs" ? (Y(), X("div", mA, [(Y(!0), X(J, null, sa(b.value, (e, t) => (Y(), X("button", {
28146
27995
  key: t,
28147
27996
  class: U(["filter-chip", { active: i.value === t }]),
28148
27997
  style: De({ "--chip-color": e.color }),
28149
27998
  onClick: (e) => i.value = t
28150
- }, [_s(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", jA, W(C.value[t] || 0), 1)], 14, AA))), 128)), Z("button", {
27999
+ }, [_s(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", gA, W(C.value[t] || 0), 1)], 14, hA))), 128)), Z("button", {
28151
28000
  class: U(["filter-chip all", { active: i.value === "all" }]),
28152
28001
  onClick: n[6] ||= (e) => i.value = "all"
28153
- }, [_s(W(y.value.debugFilterAll) + " ", 1), Z("span", MA, W(C.value.all || 0), 1)], 2)])) : Q("", !0),
28002
+ }, [_s(W(y.value.debugFilterAll) + " ", 1), Z("span", _A, W(C.value.all || 0), 1)], 2)])) : Q("", !0),
28154
28003
  Z("div", {
28155
28004
  class: "drawer-body",
28156
28005
  ref_key: "drawerBodyEl",
@@ -28164,24 +28013,24 @@ app.mount('#app');
28164
28013
  ref_key: "drawerContentsEl",
28165
28014
  ref: c
28166
28015
  }, [
28167
- ie.value === "trace" ? (Y(), X("div", NA, [ge.value ? (Y(), X(J, { key: 1 }, [Z("div", FA, [
28168
- Z("div", IA, [Z("span", null, W(y.value.debugMetricRounds), 1), Z("b", null, W(ge.value.rounds), 1)]),
28169
- Z("div", LA, [Z("span", null, W(y.value.debugMetricTotal), 1), Z("b", null, W(ge.value.totalDurationMs) + "ms", 1)]),
28170
- Z("div", RA, [Z("span", null, W(y.value.debugMetricAvg), 1), Z("b", null, W(ge.value.avgRoundMs) + "ms", 1)]),
28171
- Z("div", zA, [Z("span", null, W(y.value.debugMetricTools), 1), Z("b", null, W(ge.value.toolCalls) + "(✅" + W(Math.round(ge.value.toolSuccessRate * 100)) + "%)", 1)]),
28172
- ge.value.compressions ? (Y(), X("div", BA, [Z("span", null, W(y.value.debugMetricCompressions), 1), Z("b", null, W(ge.value.compressions), 1)])) : Q("", !0),
28173
- ge.value.totalTokens ? (Y(), X("div", VA, [n[7] ||= Z("span", null, "Token", -1), Z("b", null, W(ge.value.totalTokens.total), 1)])) : Q("", !0)
28174
- ]), Z("div", HA, [(Y(!0), X(J, null, sa(he.value, (e) => (Y(), X("div", {
28016
+ ie.value === "trace" ? (Y(), X("div", vA, [ge.value ? (Y(), X(J, { key: 1 }, [Z("div", bA, [
28017
+ Z("div", xA, [Z("span", null, W(y.value.debugMetricRounds), 1), Z("b", null, W(ge.value.rounds), 1)]),
28018
+ Z("div", SA, [Z("span", null, W(y.value.debugMetricTotal), 1), Z("b", null, W(ge.value.totalDurationMs) + "ms", 1)]),
28019
+ Z("div", CA, [Z("span", null, W(y.value.debugMetricAvg), 1), Z("b", null, W(ge.value.avgRoundMs) + "ms", 1)]),
28020
+ Z("div", wA, [Z("span", null, W(y.value.debugMetricTools), 1), Z("b", null, W(ge.value.toolCalls) + "(✅" + W(Math.round(ge.value.toolSuccessRate * 100)) + "%)", 1)]),
28021
+ ge.value.compressions ? (Y(), X("div", TA, [Z("span", null, W(y.value.debugMetricCompressions), 1), Z("b", null, W(ge.value.compressions), 1)])) : Q("", !0),
28022
+ ge.value.totalTokens ? (Y(), X("div", EA, [n[7] ||= Z("span", null, "Token", -1), Z("b", null, W(ge.value.totalTokens.total), 1)])) : Q("", !0)
28023
+ ]), Z("div", DA, [(Y(!0), X(J, null, sa(he.value, (e) => (Y(), X("div", {
28175
28024
  key: e.id,
28176
28025
  class: U(["trace-span", [e.type, e.status]])
28177
28026
  }, [
28178
- Z("span", UA, W(Te(e.type)), 1),
28179
- Z("span", WA, W(e.name), 1),
28180
- e.durationMs ? (Y(), X("span", GA, W(me(e.durationMs)), 1)) : Q("", !0),
28181
- e.status === "error" ? (Y(), X("span", KA, "❌")) : Q("", !0)
28182
- ], 2))), 128))])], 64)) : (Y(), X("div", PA, W(y.value.debugTraceEmpty), 1))])) : Q("", !0),
28183
- ie.value === "context" ? (Y(), X("div", qA, [_e.value ? (Y(), X(J, { key: 1 }, [
28184
- Z("div", YA, [Z("div", XA, [Z("div", {
28027
+ Z("span", OA, W(Te(e.type)), 1),
28028
+ Z("span", kA, W(e.name), 1),
28029
+ e.durationMs ? (Y(), X("span", AA, W(me(e.durationMs)), 1)) : Q("", !0),
28030
+ e.status === "error" ? (Y(), X("span", jA, "❌")) : Q("", !0)
28031
+ ], 2))), 128))])], 64)) : (Y(), X("div", yA, W(y.value.debugTraceEmpty), 1))])) : Q("", !0),
28032
+ ie.value === "context" ? (Y(), X("div", MA, [_e.value ? (Y(), X(J, { key: 1 }, [
28033
+ Z("div", PA, [Z("div", FA, [Z("div", {
28185
28034
  class: "ctx-bar-track",
28186
28035
  title: `${y.value.debugCtxOccupancy} ${Math.round(_e.value.occupancy * 100)}%`
28187
28036
  }, [Z("div", {
@@ -28192,12 +28041,12 @@ app.mount('#app');
28192
28041
  class: "ctx-threshold-mark",
28193
28042
  style: De({ left: Math.min(_e.value.thresholdRatio * 100, 100) + "%" }),
28194
28043
  title: y.value.debugCtxThreshold
28195
- }, null, 12, QA)) : Q("", !0)], 8, ZA), Z("span", $A, W(Math.round(_e.value.occupancy * 100)) + "%", 1)]), Z("div", ej, [
28196
- Z("span", tj, W(y.value.debugCtxTokens) + " " + W(_e.value.totalTokens) + " token", 1),
28197
- _e.value.contextWindow ? (Y(), X("span", nj, W(y.value.debugCtxWindow) + " " + W(_e.value.contextWindow), 1)) : Q("", !0),
28198
- _e.value.thresholdRatio > 0 ? (Y(), X("span", rj, W(y.value.debugCtxThresholdPct) + " " + W(Math.round(_e.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
28044
+ }, null, 12, LA)) : Q("", !0)], 8, IA), Z("span", RA, W(Math.round(_e.value.occupancy * 100)) + "%", 1)]), Z("div", zA, [
28045
+ Z("span", BA, W(y.value.debugCtxTokens) + " " + W(_e.value.totalTokens) + " token", 1),
28046
+ _e.value.contextWindow ? (Y(), X("span", VA, W(y.value.debugCtxWindow) + " " + W(_e.value.contextWindow), 1)) : Q("", !0),
28047
+ _e.value.thresholdRatio > 0 ? (Y(), X("span", HA, W(y.value.debugCtxThresholdPct) + " " + W(Math.round(_e.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
28199
28048
  ])]),
28200
- Z("div", ij, W(y.value.debugCtxCategories), 1),
28049
+ Z("div", UA, W(y.value.debugCtxCategories), 1),
28201
28050
  (Y(!0), X(J, null, sa(_e.value.categories, (e) => (Y(), X("div", {
28202
28051
  key: e.key,
28203
28052
  class: "ctx-cat"
@@ -28205,62 +28054,62 @@ app.mount('#app');
28205
28054
  Z("span", {
28206
28055
  class: "ctx-cat-label",
28207
28056
  title: e.label
28208
- }, W(e.label), 9, aj),
28209
- Z("div", oj, [Z("div", {
28057
+ }, W(e.label), 9, WA),
28058
+ Z("div", GA, [Z("div", {
28210
28059
  class: "ctx-cat-fill",
28211
28060
  style: De({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
28212
28061
  }, null, 4)]),
28213
- Z("span", sj, [_s(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
28062
+ Z("span", KA, [_s(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
28214
28063
  ]))), 128)),
28215
- _e.value.compression ? (Y(), X("div", cj, [Z("div", lj, W(y.value.debugCtxLastCompression), 1), Z("div", uj, [
28216
- Z("span", dj, W(y.value.debugCtxSummarized) + " " + W(_e.value.compression.roundsSummarized) + "/" + W(_e.value.compression.roundsTotal) + W(y.value.debugCtxRoundsSuffix), 1),
28217
- Z("span", fj, W(y.value.debugCtxRecalled) + " " + W(_e.value.compression.roundsRecalled), 1),
28218
- Z("span", pj, W(_e.value.compression.strategy), 1),
28219
- _e.value.compression.decision ? (Y(), X("span", mj, "🤖 " + W(y.value.debugCtxAgentDecision) + W(Ee(_e.value.compression.decision)), 1)) : Q("", !0)
28064
+ _e.value.compression ? (Y(), X("div", qA, [Z("div", JA, W(y.value.debugCtxLastCompression), 1), Z("div", YA, [
28065
+ Z("span", XA, W(y.value.debugCtxSummarized) + " " + W(_e.value.compression.roundsSummarized) + "/" + W(_e.value.compression.roundsTotal) + W(y.value.debugCtxRoundsSuffix), 1),
28066
+ Z("span", ZA, W(y.value.debugCtxRecalled) + " " + W(_e.value.compression.roundsRecalled), 1),
28067
+ Z("span", QA, W(_e.value.compression.strategy), 1),
28068
+ _e.value.compression.decision ? (Y(), X("span", $A, "🤖 " + W(y.value.debugCtxAgentDecision) + W(Ee(_e.value.compression.decision)), 1)) : Q("", !0)
28220
28069
  ])])) : Q("", !0)
28221
- ], 64)) : (Y(), X("div", JA, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
28222
- ie.value === "subagent" ? (Y(), X("div", hj, [xe.value.length ? (Y(), X("div", gj, [Z("div", _j, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(xe.value.length) + ")", 1), (Y(!0), X(J, null, sa(xe.value, ([e, t]) => (Y(), X("div", {
28070
+ ], 64)) : (Y(), X("div", NA, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
28071
+ ie.value === "subagent" ? (Y(), X("div", ej, [xe.value.length ? (Y(), X("div", tj, [Z("div", nj, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(xe.value.length) + ")", 1), (Y(!0), X(J, null, sa(xe.value, ([e, t]) => (Y(), X("div", {
28223
28072
  key: "lock-" + e,
28224
28073
  class: "sub-task"
28225
- }, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !ye.value.length && !be.value.length ? (Y(), X("div", vj, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [ye.value.length ? (Y(), X("div", yj, [Z("div", bj, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(ye.value.length) + ")", 1), (Y(!0), X(J, null, sa(ye.value, (e, t) => (Y(), X("div", {
28074
+ }, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !ye.value.length && !be.value.length ? (Y(), X("div", rj, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [ye.value.length ? (Y(), X("div", ij, [Z("div", aj, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(ye.value.length) + ")", 1), (Y(!0), X(J, null, sa(ye.value, (e, t) => (Y(), X("div", {
28226
28075
  key: "a" + t,
28227
28076
  class: U(["sub-card", e.status])
28228
- }, [Z("div", xj, [
28077
+ }, [Z("div", oj, [
28229
28078
  Z("span", {
28230
28079
  class: "sub-status",
28231
28080
  style: De({ background: Se.value[e.status] && Se.value[e.status].color || "#9ca3af" })
28232
28081
  }, W(Se.value[e.status] && Se.value[e.status].label || e.status), 5),
28233
- Z("span", Sj, W(e.label), 1),
28234
- Z("span", Cj, W(e.steps.length) + W(y.value.debugStepsCountSuffix), 1)
28235
- ]), Z("div", wj, W(pe(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), be.value.length ? (Y(), X("div", Tj, [Z("div", Ej, "🕐 " + W(y.value.debugSubHistoryTitle) + " (" + W(be.value.length) + ")", 1), (Y(!0), X(J, null, sa(be.value, (e, t) => (Y(), X("div", {
28082
+ Z("span", sj, W(e.label), 1),
28083
+ Z("span", cj, W(e.steps.length) + W(y.value.debugStepsCountSuffix), 1)
28084
+ ]), Z("div", lj, W(pe(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), be.value.length ? (Y(), X("div", uj, [Z("div", dj, "🕐 " + W(y.value.debugSubHistoryTitle) + " (" + W(be.value.length) + ")", 1), (Y(!0), X(J, null, sa(be.value, (e, t) => (Y(), X("div", {
28236
28085
  key: "h" + t,
28237
28086
  class: U(["sub-card", e.status])
28238
28087
  }, [
28239
- Z("div", Dj, [
28088
+ Z("div", fj, [
28240
28089
  Z("span", {
28241
28090
  class: "sub-status",
28242
28091
  style: De({ background: Se.value[e.status] && Se.value[e.status].color || "#9ca3af" })
28243
28092
  }, W(Se.value[e.status] && Se.value[e.status].label || e.status), 5),
28244
- Z("span", Oj, W(e.label), 1),
28245
- e.durationMs == null ? Q("", !0) : (Y(), X("span", kj, W(me(e.durationMs)), 1)),
28093
+ Z("span", pj, W(e.label), 1),
28094
+ e.durationMs == null ? Q("", !0) : (Y(), X("span", mj, W(me(e.durationMs)), 1)),
28246
28095
  e.steps.length ? (Y(), X("button", {
28247
28096
  key: 1,
28248
28097
  class: "sub-toggle",
28249
28098
  onClick: (e) => we(t)
28250
- }, W(Ce.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, Aj)) : Q("", !0)
28099
+ }, W(Ce.value.has(t) ? y.value.collapse : y.value.debugStepsBtn), 9, hj)) : Q("", !0)
28251
28100
  ]),
28252
- Z("div", jj, W(pe(e.task, 80)), 1),
28253
- e.resultPreview ? (Y(), X("div", Mj, W(e.resultPreview), 1)) : Q("", !0),
28254
- Ce.value.has(t) && e.steps.length ? (Y(), X("div", Nj, [(Y(!0), X(J, null, sa(e.steps, (e, t) => (Y(), X("div", {
28101
+ Z("div", gj, W(pe(e.task, 80)), 1),
28102
+ e.resultPreview ? (Y(), X("div", _j, W(e.resultPreview), 1)) : Q("", !0),
28103
+ Ce.value.has(t) && e.steps.length ? (Y(), X("div", vj, [(Y(!0), X(J, null, sa(e.steps, (e, t) => (Y(), X("div", {
28255
28104
  key: t,
28256
28105
  class: "sub-step"
28257
28106
  }, [
28258
- Z("span", Pj, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
28259
- Z("span", Fj, W(e.name), 1),
28260
- Z("span", Ij, W(F(e.ts)), 1)
28107
+ Z("span", yj, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
28108
+ Z("span", bj, W(e.name), 1),
28109
+ Z("span", xj, W(F(e.ts)), 1)
28261
28110
  ]))), 128))])) : Q("", !0)
28262
28111
  ], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
28263
- ie.value === "logs" ? (Y(), X(J, { key: 3 }, [S.value.length === 0 ? (Y(), X("div", Lj, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, sa(k.value, (e) => (Y(), X("div", {
28112
+ ie.value === "logs" ? (Y(), X(J, { key: 3 }, [S.value.length === 0 ? (Y(), X("div", Sj, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, sa(k.value, (e) => (Y(), X("div", {
28264
28113
  key: e.key,
28265
28114
  class: "log-group"
28266
28115
  }, [Z("div", {
@@ -28268,211 +28117,211 @@ app.mount('#app');
28268
28117
  onClick: (t) => N(e.key)
28269
28118
  }, [
28270
28119
  Z("span", { class: U(["log-group-arrow", { open: ee(e.key) }]) }, "▶", 2),
28271
- Z("span", zj, W(te(e)), 1),
28272
- Z("span", Bj, [
28120
+ Z("span", wj, W(te(e)), 1),
28121
+ Z("span", Tj, [
28273
28122
  _s(W(F(e.firstTs)), 1),
28274
28123
  e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [_s(" ~ " + W(F(e.lastTs)), 1)], 64)) : Q("", !0),
28275
28124
  _s(" · " + W(me(e.lastTs - e.firstTs)), 1)
28276
28125
  ]),
28277
- e.toolCount ? (Y(), X("span", Vj, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
28278
- e.tokens == null ? Q("", !0) : (Y(), X("span", Hj, "Σ " + W(e.tokens) + " tok", 1)),
28279
- e.errorCount ? (Y(), X("span", Uj, "❌ " + W(e.errorCount), 1)) : Q("", !0)
28280
- ], 10, Rj), Xr(Z("div", Wj, [(Y(!0), X(J, null, sa(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => (Y(), X("div", {
28126
+ e.toolCount ? (Y(), X("span", Ej, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
28127
+ e.tokens == null ? Q("", !0) : (Y(), X("span", Dj, "Σ " + W(e.tokens) + " tok", 1)),
28128
+ e.errorCount ? (Y(), X("span", Oj, "❌ " + W(e.errorCount), 1)) : Q("", !0)
28129
+ ], 10, Cj), Xr(Z("div", kj, [(Y(!0), X(J, null, sa(e.entries, ({ log: e, pairCall: t, prevMsgCount: r, uid: i }) => (Y(), X("div", {
28281
28130
  key: i,
28282
28131
  class: "log-item"
28283
28132
  }, [
28284
- Z("div", Gj, [
28133
+ Z("div", Aj, [
28285
28134
  Z("span", {
28286
28135
  class: "log-type",
28287
28136
  style: De({ background: b.value[e.type].color })
28288
28137
  }, W(b.value[e.type].icon) + " " + W(b.value[e.type].label), 5),
28289
- e.source ? (Y(), X("span", Kj, "↳ " + W(e.source), 1)) : Q("", !0),
28290
- Z("span", qj, W(F(e.timestamp)), 1)
28138
+ e.source ? (Y(), X("span", jj, "↳ " + W(e.source), 1)) : Q("", !0),
28139
+ Z("span", Mj, W(F(e.timestamp)), 1)
28291
28140
  ]),
28292
- Z("div", Jj, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
28293
- Z("div", Yj, [
28294
- Z("div", Xj, [Z("span", Zj, W(y.value.debugModel), 1), Z("span", Qj, W(e.data.model), 1)]),
28295
- Z("div", $j, [Z("span", eM, W(y.value.debugTemperature), 1), Z("span", tM, W(e.data.temperature), 1)]),
28296
- Z("div", nM, [n[8] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", rM, W(e.data.maxTokens), 1)]),
28297
- Z("div", iM, [Z("span", aM, W(y.value.debugMessageCount), 1), Z("span", oM, W(e.data.totalMessages), 1)])
28141
+ Z("div", Nj, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
28142
+ Z("div", Pj, [
28143
+ Z("div", Fj, [Z("span", Ij, W(y.value.debugModel), 1), Z("span", Lj, W(e.data.model), 1)]),
28144
+ Z("div", Rj, [Z("span", zj, W(y.value.debugTemperature), 1), Z("span", Bj, W(e.data.temperature), 1)]),
28145
+ Z("div", Vj, [n[8] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", Hj, W(e.data.maxTokens), 1)]),
28146
+ Z("div", Uj, [Z("span", Wj, W(y.value.debugMessageCount), 1), Z("span", Gj, W(e.data.totalMessages), 1)])
28298
28147
  ]),
28299
- Z("div", sM, W(y.value.debugToolsLabel) + " (" + W(e.data.tools?.length || 0) + ")", 1),
28300
- Z("div", cM, [(Y(!0), X(J, null, sa(e.data.tools, (e) => (Y(), X("span", {
28148
+ Z("div", Kj, W(y.value.debugToolsLabel) + " (" + W(e.data.tools?.length || 0) + ")", 1),
28149
+ Z("div", qj, [(Y(!0), X(J, null, sa(e.data.tools, (e) => (Y(), X("span", {
28301
28150
  key: e,
28302
28151
  class: "tool-chip"
28303
28152
  }, W(e), 1))), 128))]),
28304
- Z("div", lM, W(y.value.debugContextMessages), 1),
28305
- Z("div", uM, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
28153
+ Z("div", Jj, W(y.value.debugContextMessages), 1),
28154
+ Z("div", Yj, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
28306
28155
  key: t,
28307
28156
  class: "msg-row"
28308
28157
  }, [Z("span", {
28309
28158
  class: "msg-role",
28310
28159
  style: De({ background: z(e.type).color })
28311
- }, W(z(e.type).label), 5), Z("span", dM, W(e.content), 1)]))), 128))])
28312
- ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", fM, [
28313
- Z("span", pM, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
28314
- e.data.model ? (Y(), X("span", mM, W(e.data.model), 1)) : Q("", !0),
28315
- Z("span", hM, [_s(W((e.data.messages || []).length) + W(y.value.debugMsgCountSuffix), 1), r != null && r < (e.data.messages || []).length ? (Y(), X(J, { key: 0 }, [_s("(+" + W((e.data.messages || []).length - r) + ")", 1)], 64)) : Q("", !0)]),
28316
- e.data.tools?.length ? (Y(), X("span", gM, W(e.data.tools.length) + W(y.value.debugToolCountSuffix), 1)) : Q("", !0),
28160
+ }, W(z(e.type).label), 5), Z("span", Xj, W(e.content), 1)]))), 128))])
28161
+ ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", Zj, [
28162
+ Z("span", Qj, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
28163
+ e.data.model ? (Y(), X("span", $j, W(e.data.model), 1)) : Q("", !0),
28164
+ Z("span", eM, [_s(W((e.data.messages || []).length) + W(y.value.debugMsgCountSuffix), 1), r != null && r < (e.data.messages || []).length ? (Y(), X(J, { key: 0 }, [_s("(+" + W((e.data.messages || []).length - r) + ")", 1)], 64)) : Q("", !0)]),
28165
+ e.data.tools?.length ? (Y(), X("span", tM, W(e.data.tools.length) + W(y.value.debugToolCountSuffix), 1)) : Q("", !0),
28317
28166
  r != null && r > 0 ? (Y(), X("button", {
28318
28167
  key: 2,
28319
28168
  class: "view-toggle only-new-btn",
28320
28169
  onClick: (e) => h(i)
28321
- }, W(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, _M)) : Q("", !0),
28170
+ }, W(m.value.has(i) ? y.value.debugShowAll : y.value.debugOnlyNew), 9, nM)) : Q("", !0),
28322
28171
  Z("button", {
28323
28172
  class: "view-toggle copy-btn",
28324
28173
  title: y.value.copy,
28325
28174
  onClick: (t) => _(R(e.data.messages), "req" + i)
28326
- }, W(g.value === "req" + i ? "✓" : "📋"), 9, vM),
28175
+ }, W(g.value === "req" + i ? "✓" : "📋"), 9, rM),
28327
28176
  Z("button", {
28328
28177
  class: "view-toggle",
28329
28178
  onClick: (e) => L(i)
28330
- }, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, yM)
28331
- ]), d.value.has(i) ? (Y(), X("pre", EM, [Z("code", null, W(R(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, sa([P(e, r, m.value.has(i))], (e) => (Y(), X("div", {
28179
+ }, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, iM)
28180
+ ]), d.value.has(i) ? (Y(), X("pre", dM, [Z("code", null, W(R(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, sa([P(e, r, m.value.has(i))], (e) => (Y(), X("div", {
28332
28181
  key: e.base,
28333
28182
  class: "msg-list"
28334
28183
  }, [(Y(!0), X(J, null, sa(e.list, (t, n) => (Y(), X("div", {
28335
28184
  key: n,
28336
- class: U(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length > aF }]),
28337
- title: String(t.content ?? "").length > aF ? f.value.has(i + ":" + (e.base + n)) ? y.value.collapse : y.value.expand : void 0,
28338
- onClick: (r) => String(t.content ?? "").length > aF && p(i + ":" + (e.base + n))
28185
+ class: U(["msg-row", { clamped: !f.value.has(i + ":" + (e.base + n)) && String(t.content ?? "").length > WP }]),
28186
+ title: String(t.content ?? "").length > WP ? f.value.has(i + ":" + (e.base + n)) ? y.value.collapse : y.value.expand : void 0,
28187
+ onClick: (r) => String(t.content ?? "").length > WP && p(i + ":" + (e.base + n))
28339
28188
  }, [Z("span", {
28340
28189
  class: "msg-role",
28341
28190
  style: De({ background: z(t.role).color })
28342
- }, W(z(t.role).label), 5), Z("div", xM, [
28343
- t.content ? (Y(), X("span", SM, W(t.content), 1)) : Q("", !0),
28191
+ }, W(z(t.role).label), 5), Z("div", oM, [
28192
+ t.content ? (Y(), X("span", sM, W(t.content), 1)) : Q("", !0),
28344
28193
  (Y(!0), X(J, null, sa(t.tool_calls || [], (e, t) => (Y(), X("div", {
28345
28194
  key: t,
28346
28195
  class: "tc-inline"
28347
- }, [Z("span", CM, "🔧 " + W(e.function?.name || e.name), 1), Z("code", wM, W(e.function?.arguments ?? e.args), 1)]))), 128)),
28348
- t.tool_call_id ? (Y(), X("span", TM, "↳ tool_call_id: " + W(t.tool_call_id), 1)) : Q("", !0)
28349
- ])], 10, bM))), 128))]))), 128))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
28350
- Z("div", DM, [Z("span", OM, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1), e.data.toolCalls?.length ? (Y(), X("span", kM, "🔧 " + W(e.data.toolCalls.length) + W(y.value.debugToolCallsSuffix), 1)) : Q("", !0)]),
28351
- e.data.content ? (Y(), X("div", AM, W(e.data.content), 1)) : Q("", !0),
28352
- e.data.toolCalls?.length ? (Y(), X("div", jM, [(Y(!0), X(J, null, sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
28196
+ }, [Z("span", cM, "🔧 " + W(e.function?.name || e.name), 1), Z("code", lM, W(e.function?.arguments ?? e.args), 1)]))), 128)),
28197
+ t.tool_call_id ? (Y(), X("span", uM, "↳ tool_call_id: " + W(t.tool_call_id), 1)) : Q("", !0)
28198
+ ])], 10, aM))), 128))]))), 128))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
28199
+ Z("div", fM, [Z("span", pM, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1), e.data.toolCalls?.length ? (Y(), X("span", mM, "🔧 " + W(e.data.toolCalls.length) + W(y.value.debugToolCallsSuffix), 1)) : Q("", !0)]),
28200
+ e.data.content ? (Y(), X("div", hM, W(e.data.content), 1)) : Q("", !0),
28201
+ e.data.toolCalls?.length ? (Y(), X("div", gM, [(Y(!0), X(J, null, sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
28353
28202
  key: t,
28354
28203
  class: "tc-card"
28355
- }, [Z("div", MM, "🔧 " + W(e.name), 1), Z("pre", NM, W(R(e.args)), 1)]))), 128))])) : Q("", !0),
28356
- e.data.usage ? (Y(), X("div", PM, [
28357
- Z("span", FM, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
28358
- Z("span", IM, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
28359
- Z("span", LM, "total: " + W(e.data.usage.total_tokens ?? "-"), 1)
28204
+ }, [Z("div", _M, "🔧 " + W(e.name), 1), Z("pre", vM, W(R(e.args)), 1)]))), 128))])) : Q("", !0),
28205
+ e.data.usage ? (Y(), X("div", yM, [
28206
+ Z("span", bM, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
28207
+ Z("span", xM, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
28208
+ Z("span", SM, "total: " + W(e.data.usage.total_tokens ?? "-"), 1)
28360
28209
  ])) : Q("", !0)
28361
28210
  ], 64)) : e.type === "tool_call" || e.type === "tool_result" ? (Y(), X(J, { key: 3 }, [t ? (Y(), X("div", {
28362
28211
  key: 0,
28363
28212
  class: U(["tc-card inline paired", { error: e.data.status === "error" }])
28364
28213
  }, [
28365
- Z("div", RM, [
28214
+ Z("div", CM, [
28366
28215
  _s(W(e.data.status === "error" ? "❌" : "✅") + " " + W(e.data.name) + " ", 1),
28367
- e.data.durationMs == null ? Q("", !0) : (Y(), X("span", zM, W(me(e.data.durationMs)), 1)),
28216
+ e.data.durationMs == null ? Q("", !0) : (Y(), X("span", wM, W(me(e.data.durationMs)), 1)),
28368
28217
  Z("button", {
28369
28218
  class: "view-toggle copy-btn",
28370
28219
  title: y.value.copy,
28371
28220
  onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
28372
- }, W(g.value === "res" + i ? "✓" : "📋"), 9, BM)
28221
+ }, W(g.value === "res" + i ? "✓" : "📋"), 9, TM)
28373
28222
  ]),
28374
- Z("pre", VM, W(R(t.data.args)), 1),
28375
- Z("div", HM, "↓ " + W(y.value.resultLabel), 1),
28376
- Z("pre", UM, W(e.data.result), 1)
28377
- ], 2)) : (Y(), X("div", WM, [Z("div", GM, [_s(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", KM, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", qM, W(e.type === "tool_call" ? R(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", JM, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
28378
- Z("div", YM, [Z("button", {
28223
+ Z("pre", EM, W(R(t.data.args)), 1),
28224
+ Z("div", DM, "↓ " + W(y.value.resultLabel), 1),
28225
+ Z("pre", OM, W(e.data.result), 1)
28226
+ ], 2)) : (Y(), X("div", kM, [Z("div", AM, [_s(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", jM, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", MM, W(e.type === "tool_call" ? R(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", NM, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
28227
+ Z("div", PM, [Z("button", {
28379
28228
  class: "raw-toggle",
28380
28229
  onClick: (e) => I(i)
28381
- }, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, XM), Z("button", {
28230
+ }, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, FM), Z("button", {
28382
28231
  class: "raw-toggle",
28383
28232
  onClick: (t) => K(AS)(R(e.data))
28384
- }, W(y.value.copy), 9, ZM)]),
28385
- a.value.has(i) ? (Y(), X("pre", QM, [Z("code", null, W(R(e.data)), 1)])) : Q("", !0)
28233
+ }, W(y.value.copy), 9, IM)]),
28234
+ a.value.has(i) ? (Y(), X("pre", LM, [Z("code", null, W(R(e.data)), 1)])) : Q("", !0)
28386
28235
  ]))), 128))], 512), [[Pc, ee(e.key)]])]))), 128))], 64)) : ie.value === "flow" ? (Y(), X(J, { key: 4 }, [
28387
- x.value.length ? Q("", !0) : (Y(), X("div", $M, W(y.value.debugFlowEmpty), 1)),
28388
- fe.value.pre.length ? (Y(), X("div", eN, [Z("div", tN, "⚙️ " + W(y.value.debugFlowPrep), 1), (Y(!0), X(J, null, sa(fe.value.pre, (e, t) => (Y(), X("div", {
28236
+ x.value.length ? Q("", !0) : (Y(), X("div", RM, W(y.value.debugFlowEmpty), 1)),
28237
+ fe.value.pre.length ? (Y(), X("div", zM, [Z("div", BM, "⚙️ " + W(y.value.debugFlowPrep), 1), (Y(!0), X(J, null, sa(fe.value.pre, (e, t) => (Y(), X("div", {
28389
28238
  key: "p" + t,
28390
28239
  class: U(["flow-node", e.type])
28391
28240
  }, [
28392
- Z("span", nN, W(b.value[e.type]?.icon), 1),
28393
- Z("span", rN, W(b.value[e.type]?.label), 1),
28394
- Z("span", iN, W(Oe(e)), 1),
28395
- Z("span", aN, W(F(e.timestamp)), 1)
28241
+ Z("span", VM, W(b.value[e.type]?.icon), 1),
28242
+ Z("span", HM, W(b.value[e.type]?.label), 1),
28243
+ Z("span", UM, W(Oe(e)), 1),
28244
+ Z("span", WM, W(F(e.timestamp)), 1)
28396
28245
  ], 2))), 128))])) : Q("", !0),
28397
28246
  (Y(!0), X(J, null, sa(fe.value.rounds, (e) => (Y(), X("div", {
28398
28247
  key: e.round,
28399
28248
  class: "flow-round"
28400
- }, [Z("div", oN, "🔁 " + W(y.value.debugRoundPrefix) + W(e.round) + W(y.value.debugRoundSuffix), 1), Z("div", sN, [(Y(!0), X(J, null, sa(e.items, (e, t) => (Y(), X("div", {
28249
+ }, [Z("div", GM, "🔁 " + W(y.value.debugRoundPrefix) + W(e.round) + W(y.value.debugRoundSuffix), 1), Z("div", KM, [(Y(!0), X(J, null, sa(e.items, (e, t) => (Y(), X("div", {
28401
28250
  key: t,
28402
28251
  class: U(["flow-node", e.type])
28403
28252
  }, [
28404
- Z("span", cN, W(b.value[e.type]?.icon), 1),
28405
- Z("span", lN, W(b.value[e.type]?.label), 1),
28406
- Z("span", uN, W(Oe(e)), 1),
28407
- Z("span", dN, W(F(e.timestamp)), 1)
28253
+ Z("span", qM, W(b.value[e.type]?.icon), 1),
28254
+ Z("span", JM, W(b.value[e.type]?.label), 1),
28255
+ Z("span", YM, W(Oe(e)), 1),
28256
+ Z("span", XM, W(F(e.timestamp)), 1)
28408
28257
  ], 2))), 128))])]))), 128))
28409
- ], 64)) : (Y(), X("div", fN, [V.value ? (Y(), X(J, { key: 1 }, [
28410
- Z("div", mN, [
28411
- Z("div", hN, W(y.value.debugInfoBasic), 1),
28412
- Z("div", gN, [
28413
- Z("div", _N, [n[9] ||= Z("span", { class: "k" }, "ID", -1), Z("span", vN, W(V.value.id), 1)]),
28414
- Z("div", yN, [Z("span", bN, W(y.value.debugModel), 1), Z("span", xN, W(V.value.model || "-"), 1)]),
28415
- Z("div", SN, [Z("span", CN, W(y.value.debugToolCount), 1), Z("span", wN, W(V.value.tools.length), 1)]),
28416
- Z("div", TN, [Z("span", EN, W(y.value.debugMiddleware), 1), Z("span", DN, W(V.value.middleware.length), 1)])
28258
+ ], 64)) : (Y(), X("div", ZM, [V.value ? (Y(), X(J, { key: 1 }, [
28259
+ Z("div", $M, [
28260
+ Z("div", eN, W(y.value.debugInfoBasic), 1),
28261
+ Z("div", tN, [
28262
+ Z("div", nN, [n[9] ||= Z("span", { class: "k" }, "ID", -1), Z("span", rN, W(V.value.id), 1)]),
28263
+ Z("div", iN, [Z("span", aN, W(y.value.debugModel), 1), Z("span", oN, W(V.value.model || "-"), 1)]),
28264
+ Z("div", sN, [Z("span", cN, W(y.value.debugToolCount), 1), Z("span", lN, W(V.value.tools.length), 1)]),
28265
+ Z("div", uN, [Z("span", dN, W(y.value.debugMiddleware), 1), Z("span", fN, W(V.value.middleware.length), 1)])
28417
28266
  ]),
28418
- Z("div", ON, [Z("span", kN, W(y.value.debugMiddlewareStack), 1), Z("span", AN, W(V.value.middleware.join(" → ") || "-"), 1)])
28267
+ Z("div", pN, [Z("span", mN, W(y.value.debugMiddlewareStack), 1), Z("span", hN, W(V.value.middleware.join(" → ") || "-"), 1)])
28419
28268
  ]),
28420
- Z("div", jN, [Z("div", MN, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(V.value.tools.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.tools, (e) => (Y(), X("div", {
28269
+ Z("div", gN, [Z("div", _N, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(V.value.tools.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.tools, (e) => (Y(), X("div", {
28421
28270
  key: e.name,
28422
28271
  class: "info-item"
28423
- }, [Z("div", NN, [_s(W(e.name), 1), e.source ? (Y(), X("span", {
28272
+ }, [Z("div", vN, [_s(W(e.name), 1), e.source ? (Y(), X("span", {
28424
28273
  key: 0,
28425
28274
  class: U(["src-tag", de(e.source)])
28426
- }, W(e.source), 3)) : Q("", !0)]), Z("div", PN, W(e.description), 1)]))), 128))]),
28427
- V.value.skills.length ? (Y(), X("div", FN, [Z("div", IN, [_s("📘 " + W(y.value.debugSkillsTitle) + " (" + W(V.value.skills.length) + ")", 1), Z("span", LN, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, sa(V.value.skills, (e) => (Y(), X("div", {
28275
+ }, W(e.source), 3)) : Q("", !0)]), Z("div", yN, W(e.description), 1)]))), 128))]),
28276
+ V.value.skills.length ? (Y(), X("div", bN, [Z("div", xN, [_s("📘 " + W(y.value.debugSkillsTitle) + " (" + W(V.value.skills.length) + ")", 1), Z("span", SN, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, sa(V.value.skills, (e) => (Y(), X("div", {
28428
28277
  key: e.name,
28429
28278
  class: "info-item"
28430
28279
  }, [
28431
28280
  Z("div", {
28432
28281
  class: "info-name skill-toggle",
28433
28282
  onClick: (t) => ae(e.name)
28434
- }, [Z("span", { class: U(["skill-arrow", { open: !!H.value[e.name] }]) }, "▶", 2), _s(" " + W(e.name), 1)], 8, RN),
28435
- Z("div", zN, W(e.description), 1),
28436
- H.value[e.name] ? (Y(), X("div", BN, [H.value[e.name].loading ? (Y(), X("div", VN, W(y.value.debugLoading), 1)) : H.value[e.name].error ? (Y(), X("div", HN, W(H.value[e.name].error), 1)) : H.value[e.name].content ? (Y(), X("pre", UN, W(H.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
28283
+ }, [Z("span", { class: U(["skill-arrow", { open: !!H.value[e.name] }]) }, "▶", 2), _s(" " + W(e.name), 1)], 8, CN),
28284
+ Z("div", wN, W(e.description), 1),
28285
+ H.value[e.name] ? (Y(), X("div", TN, [H.value[e.name].loading ? (Y(), X("div", EN, W(y.value.debugLoading), 1)) : H.value[e.name].error ? (Y(), X("div", DN, W(H.value[e.name].error), 1)) : H.value[e.name].content ? (Y(), X("pre", ON, W(H.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
28437
28286
  ]))), 128))])) : Q("", !0),
28438
- V.value.data ? (Y(), X("div", WN, [Z("div", GN, "📊 " + W(y.value.debugDataTitle), 1), Z("div", KN, [Z("div", qN, W(V.value.data.description || y.value.debugDataFallback), 1), Z("div", JN, W(y.value.debugSchemaPrefix) + W(V.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
28439
- Z("div", YN, [Z("div", XN, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", ZN, [
28440
- Z("div", QN, [Z("span", $N, W(y.value.debugEnabled), 1), Z("span", eP, W(V.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
28441
- Z("div", tP, [Z("span", nP, W(y.value.debugMaxDepth), 1), Z("span", rP, W(V.value.subagent.maxDepth), 1)]),
28442
- Z("div", iP, [Z("span", aP, W(y.value.debugMaxParallel), 1), Z("span", oP, W(V.value.subagent.maxParallel), 1)]),
28443
- Z("div", sP, [Z("span", cP, W(y.value.debugExtraTools), 1), Z("span", lP, W(V.value.subagent.allowedTools.length ? V.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
28287
+ V.value.data ? (Y(), X("div", kN, [Z("div", AN, "📊 " + W(y.value.debugDataTitle), 1), Z("div", jN, [Z("div", MN, W(V.value.data.description || y.value.debugDataFallback), 1), Z("div", NN, W(y.value.debugSchemaPrefix) + W(V.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
28288
+ Z("div", PN, [Z("div", FN, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", IN, [
28289
+ Z("div", LN, [Z("span", RN, W(y.value.debugEnabled), 1), Z("span", zN, W(V.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
28290
+ Z("div", BN, [Z("span", VN, W(y.value.debugMaxDepth), 1), Z("span", HN, W(V.value.subagent.maxDepth), 1)]),
28291
+ Z("div", UN, [Z("span", WN, W(y.value.debugMaxParallel), 1), Z("span", GN, W(V.value.subagent.maxParallel), 1)]),
28292
+ Z("div", KN, [Z("span", qN, W(y.value.debugExtraTools), 1), Z("span", JN, W(V.value.subagent.allowedTools.length ? V.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
28444
28293
  ])]),
28445
- V.value.mcp?.servers?.length ? (Y(), X("div", uP, [Z("div", dP, "🔌 MCP (" + W(V.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.mcp.servers, (e) => (Y(), X("div", {
28294
+ V.value.mcp?.servers?.length ? (Y(), X("div", YN, [Z("div", XN, "🔌 MCP (" + W(V.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.mcp.servers, (e) => (Y(), X("div", {
28446
28295
  key: e.name,
28447
28296
  class: "info-item"
28448
- }, [Z("div", fP, [_s(W(e.name) + " ", 1), Z("span", pP, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", mP, W(e.url), 1)]))), 128))])) : Q("", !0),
28449
- V.value.verify ? (Y(), X("div", hP, [Z("div", gP, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", _P, [
28450
- Z("div", vP, [Z("span", yP, W(y.value.debugEnabled), 1), Z("span", bP, W(V.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
28451
- Z("div", xP, [Z("span", SP, W(y.value.debugMaxAttempts), 1), Z("span", CP, W(V.value.verify.maxAttempts), 1)]),
28452
- Z("div", wP, [Z("span", TP, W(y.value.debugAdversarial), 1), Z("span", EP, W(V.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
28453
- V.value.verify.adversarial ? (Y(), X("div", DP, [Z("span", OP, W(y.value.debugAdversarialModel), 1), Z("span", kP, W(V.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
28297
+ }, [Z("div", ZN, [_s(W(e.name) + " ", 1), Z("span", QN, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", $N, W(e.url), 1)]))), 128))])) : Q("", !0),
28298
+ V.value.verify ? (Y(), X("div", eP, [Z("div", tP, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", nP, [
28299
+ Z("div", rP, [Z("span", iP, W(y.value.debugEnabled), 1), Z("span", aP, W(V.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
28300
+ Z("div", oP, [Z("span", sP, W(y.value.debugMaxAttempts), 1), Z("span", cP, W(V.value.verify.maxAttempts), 1)]),
28301
+ Z("div", lP, [Z("span", uP, W(y.value.debugAdversarial), 1), Z("span", dP, W(V.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
28302
+ V.value.verify.adversarial ? (Y(), X("div", fP, [Z("span", pP, W(y.value.debugAdversarialModel), 1), Z("span", mP, W(V.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
28454
28303
  ])])) : Q("", !0),
28455
- V.value.todos.length ? (Y(), X("div", AP, [Z("div", jP, "📋 " + W(y.value.debugTodosTitle) + " (" + W(V.value.todos.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.todos, (e, t) => (Y(), X("div", {
28304
+ V.value.todos.length ? (Y(), X("div", hP, [Z("div", gP, "📋 " + W(y.value.debugTodosTitle) + " (" + W(V.value.todos.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.todos, (e, t) => (Y(), X("div", {
28456
28305
  key: t,
28457
28306
  class: "info-todo"
28458
28307
  }, [Z("span", {
28459
28308
  class: "todo-tag",
28460
28309
  style: De({ background: ce.value[e.status] && ce.value[e.status].color || "#9ca3af" })
28461
28310
  }, W(le(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
28462
- V.value.memory ? (Y(), X("div", MP, [Z("div", NP, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", PP, W(V.value.memory), 1)])) : Q("", !0),
28463
- V.value.preferences?.length ? (Y(), X("div", FP, [Z("div", IP, "🎯 " + W(y.value.debugPrefsTitle) + " (" + W(V.value.preferences.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.preferences, (e) => (Y(), X("div", {
28311
+ V.value.memory ? (Y(), X("div", _P, [Z("div", vP, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", yP, W(V.value.memory), 1)])) : Q("", !0),
28312
+ V.value.preferences?.length ? (Y(), X("div", bP, [Z("div", xP, "🎯 " + W(y.value.debugPrefsTitle) + " (" + W(V.value.preferences.length) + ")", 1), (Y(!0), X(J, null, sa(V.value.preferences, (e) => (Y(), X("div", {
28464
28313
  key: e.id,
28465
28314
  class: "info-todo"
28466
- }, [Z("span", LP, W(ue(e.topic)), 1), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
28467
- V.value.lastCompression ? (Y(), X("div", RP, [Z("div", zP, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", BP, [
28468
- Z("div", VP, [Z("span", HP, W(y.value.debugTriggered), 1), Z("span", UP, W(V.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
28469
- Z("div", WP, [Z("span", GP, W(y.value.debugRoundsSummarized), 1), Z("span", KP, W(V.value.lastCompression.roundsSummarized) + " / " + W(V.value.lastCompression.roundsTotal), 1)]),
28470
- Z("div", qP, [Z("span", JP, W(y.value.debugCtxRecalled), 1), Z("span", YP, W(V.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
28471
- Z("div", XP, [Z("span", ZP, W(y.value.debugMessageCount), 1), Z("span", QP, W(V.value.lastCompression.originalMessages) + " → " + W(V.value.lastCompression.compressedMessages), 1)]),
28472
- Z("div", $P, [Z("span", eF, W(y.value.debugStrategy), 1), Z("span", tF, W(V.value.lastCompression.strategy), 1)]),
28473
- V.value.lastCompression.decision ? (Y(), X("div", nF, [Z("span", rF, W(y.value.debugDecision), 1), Z("span", iF, "🤖 " + W(Ee(V.value.lastCompression.decision)), 1)])) : Q("", !0)
28315
+ }, [Z("span", SP, W(ue(e.topic)), 1), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
28316
+ V.value.lastCompression ? (Y(), X("div", CP, [Z("div", wP, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", TP, [
28317
+ Z("div", EP, [Z("span", DP, W(y.value.debugTriggered), 1), Z("span", OP, W(V.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
28318
+ Z("div", kP, [Z("span", AP, W(y.value.debugRoundsSummarized), 1), Z("span", jP, W(V.value.lastCompression.roundsSummarized) + " / " + W(V.value.lastCompression.roundsTotal), 1)]),
28319
+ Z("div", MP, [Z("span", NP, W(y.value.debugCtxRecalled), 1), Z("span", PP, W(V.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
28320
+ Z("div", FP, [Z("span", IP, W(y.value.debugMessageCount), 1), Z("span", LP, W(V.value.lastCompression.originalMessages) + " → " + W(V.value.lastCompression.compressedMessages), 1)]),
28321
+ Z("div", RP, [Z("span", zP, W(y.value.debugStrategy), 1), Z("span", BP, W(V.value.lastCompression.strategy), 1)]),
28322
+ V.value.lastCompression.decision ? (Y(), X("div", VP, [Z("span", HP, W(y.value.debugDecision), 1), Z("span", UP, "🤖 " + W(Ee(V.value.lastCompression.decision)), 1)])) : Q("", !0)
28474
28323
  ])])) : Q("", !0)
28475
- ], 64)) : (Y(), X("div", pN, W(y.value.debugNoInfo), 1))]))
28324
+ ], 64)) : (Y(), X("div", QM, W(y.value.debugNoInfo), 1))]))
28476
28325
  ], 512)], 512)], 512)
28477
28326
  ], 2), Z("div", {
28478
28327
  class: "drawer-mask",
@@ -28481,16 +28330,16 @@ app.mount('#app');
28481
28330
  _: 1
28482
28331
  })]));
28483
28332
  }
28484
- }), [["__scopeId", "data-v-79cbe6e0"]]), sF = { class: "skill-panel" }, cF = { class: "skill-header" }, lF = { class: "skill-title" }, uF = ["title"], dF = { class: "skill-section" }, fF = { class: "section-title" }, pF = ["title"], mF = { class: "field" }, hF = { class: "field-label" }, gF = ["disabled", "placeholder"], _F = { class: "field" }, vF = { class: "field-label" }, yF = ["placeholder"], bF = { class: "field field-textarea" }, xF = { class: "field-label" }, SF = ["placeholder"], CF = {
28333
+ }), [["__scopeId", "data-v-79cbe6e0"]]), KP = { class: "skill-panel" }, qP = { class: "skill-header" }, JP = { class: "skill-title" }, YP = ["title"], XP = { class: "skill-section" }, ZP = { class: "section-title" }, QP = ["title"], $P = { class: "field" }, eF = { class: "field-label" }, tF = ["disabled", "placeholder"], nF = { class: "field" }, rF = { class: "field-label" }, iF = ["placeholder"], aF = { class: "field field-textarea" }, oF = { class: "field-label" }, sF = ["placeholder"], cF = {
28485
28334
  key: 0,
28486
28335
  class: "skill-error"
28487
- }, wF = { class: "skill-section" }, TF = { class: "section-title" }, EF = {
28336
+ }, lF = { class: "skill-section" }, uF = { class: "section-title" }, dF = {
28488
28337
  key: 0,
28489
28338
  class: "empty-hint"
28490
- }, DF = {
28339
+ }, fF = {
28491
28340
  key: 1,
28492
28341
  class: "skill-list"
28493
- }, OF = { class: "skill-actions" }, kF = ["title", "onClick"], AF = ["title", "onClick"], jF = { class: "skill-hint" }, MF = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
28342
+ }, pF = { class: "skill-actions" }, mF = ["title", "onClick"], hF = ["title", "onClick"], gF = { class: "skill-hint" }, _F = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
28494
28343
  __name: "SkillPanel",
28495
28344
  props: {
28496
28345
  visible: { type: Boolean },
@@ -28545,55 +28394,55 @@ app.mount('#app');
28545
28394
  key: 0,
28546
28395
  class: "skill-mask",
28547
28396
  onClick: n[4] ||= yl((e) => r("close"), ["self"])
28548
- }, [Z("div", sF, [
28549
- Z("div", cF, [Z("span", lF, W(e.messages.skillPanelTitle), 1), Z("button", {
28397
+ }, [Z("div", KP, [
28398
+ Z("div", qP, [Z("span", JP, W(e.messages.skillPanelTitle), 1), Z("button", {
28550
28399
  class: "skill-close",
28551
28400
  title: e.messages.close,
28552
28401
  onClick: n[0] ||= (e) => r("close")
28553
- }, "✕", 8, uF)]),
28554
- Z("div", dF, [
28555
- Z("div", fF, [_s(W(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (Y(), X("button", {
28402
+ }, "✕", 8, YP)]),
28403
+ Z("div", XP, [
28404
+ Z("div", ZP, [_s(W(u.value ? `${e.messages.skillEditingPrefix}${u.value}` : e.messages.skillCreateNew) + " ", 1), u.value ? (Y(), X("button", {
28556
28405
  key: 0,
28557
28406
  class: "btn btn-ghost btn-cancel",
28558
28407
  title: e.messages.skillCancelEdit,
28559
28408
  onClick: h
28560
- }, W(e.messages.skillCancelEdit), 9, pF)) : Q("", !0)]),
28561
- Z("label", mF, [Z("span", hF, W(e.messages.skillNameLabel), 1), Xr(Z("input", {
28409
+ }, W(e.messages.skillCancelEdit), 9, QP)) : Q("", !0)]),
28410
+ Z("label", $P, [Z("span", eF, W(e.messages.skillNameLabel), 1), Xr(Z("input", {
28562
28411
  "onUpdate:modelValue": n[1] ||= (e) => i.value = e,
28563
28412
  disabled: !!u.value,
28564
28413
  placeholder: e.messages.skillNamePlaceholder,
28565
28414
  class: "field-input"
28566
- }, null, 8, gF), [[gl, i.value]])]),
28567
- Z("label", _F, [Z("span", vF, W(e.messages.skillDescLabel), 1), Xr(Z("input", {
28415
+ }, null, 8, tF), [[gl, i.value]])]),
28416
+ Z("label", nF, [Z("span", rF, W(e.messages.skillDescLabel), 1), Xr(Z("input", {
28568
28417
  "onUpdate:modelValue": n[2] ||= (e) => a.value = e,
28569
28418
  placeholder: e.messages.skillDescPlaceholder,
28570
28419
  class: "field-input"
28571
- }, null, 8, yF), [[gl, a.value]])]),
28572
- Z("label", bF, [Z("span", xF, W(e.messages.skillContentLabel), 1), Xr(Z("textarea", {
28420
+ }, null, 8, iF), [[gl, a.value]])]),
28421
+ Z("label", aF, [Z("span", oF, W(e.messages.skillContentLabel), 1), Xr(Z("textarea", {
28573
28422
  "onUpdate:modelValue": n[3] ||= (e) => o.value = e,
28574
28423
  placeholder: e.messages.skillContentPlaceholder,
28575
28424
  rows: "6",
28576
28425
  class: "field-input"
28577
- }, null, 8, SF), [[gl, o.value]])]),
28578
- s.value ? (Y(), X("div", CF, W(s.value), 1)) : Q("", !0),
28426
+ }, null, 8, sF), [[gl, o.value]])]),
28427
+ s.value ? (Y(), X("div", cF, W(s.value), 1)) : Q("", !0),
28579
28428
  Z("button", {
28580
28429
  class: "btn btn-primary",
28581
28430
  onClick: f
28582
28431
  }, W(u.value ? e.messages.skillSave : e.messages.skillAdd), 1)
28583
28432
  ]),
28584
- Z("div", wF, [Z("div", TF, W(e.messages.skillCreatedTitle) + "(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", DF, [(Y(!0), X(J, null, sa(c.value, (t) => (Y(), X("li", {
28433
+ Z("div", lF, [Z("div", uF, W(e.messages.skillCreatedTitle) + "(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", fF, [(Y(!0), X(J, null, sa(c.value, (t) => (Y(), X("li", {
28585
28434
  key: t,
28586
28435
  class: "skill-item"
28587
- }, [Z("span", { class: U(["skill-name", { active: u.value === t }]) }, W(t), 3), Z("span", OF, [Z("button", {
28436
+ }, [Z("span", { class: U(["skill-name", { active: u.value === t }]) }, W(t), 3), Z("span", pF, [Z("button", {
28588
28437
  class: "btn btn-ghost btn-edit",
28589
28438
  title: e.messages.skillEditTitle,
28590
28439
  onClick: (e) => m(t)
28591
- }, W(e.messages.skillEditBtn), 9, kF), Z("button", {
28440
+ }, W(e.messages.skillEditBtn), 9, mF), Z("button", {
28592
28441
  class: "btn btn-ghost btn-del",
28593
28442
  title: e.messages.skillDeleteTitle,
28594
28443
  onClick: (e) => p(t)
28595
- }, W(e.messages.skillDeleteBtn), 9, AF)])]))), 128))])) : (Y(), X("div", EF, W(e.messages.skillEmpty), 1))]),
28596
- Z("div", jF, [
28444
+ }, W(e.messages.skillDeleteBtn), 9, hF)])]))), 128))])) : (Y(), X("div", dF, W(e.messages.skillEmpty), 1))]),
28445
+ Z("div", gF, [
28597
28446
  _s(" 💡 " + W(e.messages.skillHintA) + " ", 1),
28598
28447
  n[5] ||= Z("code", null, "load_skill(name)", -1),
28599
28448
  _s(" " + W(e.messages.skillHintB) + " ", 1),
@@ -28604,7 +28453,7 @@ app.mount('#app');
28604
28453
  _: 1
28605
28454
  })]));
28606
28455
  }
28607
- }), [["__scopeId", "data-v-fcd21121"]]), NF = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
28456
+ }), [["__scopeId", "data-v-fcd21121"]]), vF = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
28608
28457
  __name: "ChatDialog",
28609
28458
  props: {
28610
28459
  fetchResponse: {},
@@ -28616,6 +28465,7 @@ app.mount('#app');
28616
28465
  initialMessages: {},
28617
28466
  onPersist: {},
28618
28467
  onQueuedCleared: {},
28468
+ onBeforeRegenerate: {},
28619
28469
  onClear: {},
28620
28470
  getInfo: {},
28621
28471
  exportDiagnostics: {},
@@ -28669,6 +28519,7 @@ app.mount('#app');
28669
28519
  onPersist: n.onPersist,
28670
28520
  onClear: n.onClear,
28671
28521
  onQueuedCleared: n.onQueuedCleared,
28522
+ onBeforeRegenerate: n.onBeforeRegenerate,
28672
28523
  getInfo: n.getInfo,
28673
28524
  canUndo: n.canUndo,
28674
28525
  onUndo: n.onUndo,
@@ -28791,7 +28642,7 @@ app.mount('#app');
28791
28642
  key: 0,
28792
28643
  name: "cs-slide"
28793
28644
  }, {
28794
- default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(fk, {
28645
+ default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(ZO, {
28795
28646
  "show-avatar": e.showAvatar,
28796
28647
  "show-typing": e.showTyping
28797
28648
  }, null, 8, ["show-avatar", "show-typing"]), [[Pc, K(a)]])], !0)]),
@@ -28800,15 +28651,15 @@ app.mount('#app');
28800
28651
  h("queued") ? ca(t.$slots, "queued", {
28801
28652
  key: 1,
28802
28653
  chat: K(i)
28803
- }, () => [fs(Sk)], !0) : Q("", !0),
28654
+ }, () => [fs(sk)], !0) : Q("", !0),
28804
28655
  h("approval") ? ca(t.$slots, "approval", {
28805
28656
  key: 2,
28806
28657
  chat: K(i)
28807
- }, () => [fs(Ik)], !0) : Q("", !0),
28658
+ }, () => [fs(xk)], !0) : Q("", !0),
28808
28659
  h("conflict") ? ca(t.$slots, "conflict", {
28809
28660
  key: 3,
28810
28661
  chat: K(i)
28811
- }, () => [fs($k, {
28662
+ }, () => [fs(Rk, {
28812
28663
  "pending-conflict": e.pendingConflict,
28813
28664
  "on-resolve": e.onResolveConflict,
28814
28665
  icons: K(i).icons,
@@ -28824,7 +28675,7 @@ app.mount('#app');
28824
28675
  key: 2,
28825
28676
  name: "cs-slide"
28826
28677
  }, {
28827
- default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(xA, {
28678
+ default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(oA, {
28828
28679
  placeholder: e.placeholder || K(i).messages.inputPlaceholder,
28829
28680
  "input-rows": e.inputRows
28830
28681
  }, null, 8, ["placeholder", "input-rows"])], !0)]),
@@ -28833,7 +28684,7 @@ app.mount('#app');
28833
28684
  h("debug") ? ca(t.$slots, "debug", {
28834
28685
  key: 3,
28835
28686
  chat: K(i)
28836
- }, () => [fs(oF, {
28687
+ }, () => [fs(GP, {
28837
28688
  visible: K(o),
28838
28689
  "onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ Sn(o) ? o.value = e : null,
28839
28690
  logs: e.debugLogs,
@@ -28859,7 +28710,7 @@ app.mount('#app');
28859
28710
  h("skill") ? ca(t.$slots, "skill", {
28860
28711
  key: 4,
28861
28712
  chat: K(i)
28862
- }, () => [fs(MF, {
28713
+ }, () => [fs(_F, {
28863
28714
  visible: K(s),
28864
28715
  "on-add-skill": e.onAddSkill,
28865
28716
  "on-remove-skill": e.onRemoveSkill,
@@ -28878,13 +28729,13 @@ app.mount('#app');
28878
28729
  ])], !0) : Q("", !0)
28879
28730
  ], 6)], 64));
28880
28731
  }
28881
- }), [["__scopeId", "data-v-14ff18cb"]]);
28732
+ }), [["__scopeId", "data-v-bab14a6c"]]);
28882
28733
  //#endregion
28883
28734
  //#region src/core/sdk/mountChatDialog.ts
28884
- function PF(e) {
28735
+ function yF(e) {
28885
28736
  let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
28886
28737
  return r = Tl(/* @__PURE__ */ Fi({ setup() {
28887
- return () => $s(NF, {
28738
+ return () => $s(vF, {
28888
28739
  fetchStream: e.streaming ? t.stream : void 0,
28889
28740
  fetchResponse: e.streaming ? void 0 : (e, n) => {
28890
28741
  if (n) {
@@ -28909,6 +28760,7 @@ function PF(e) {
28909
28760
  t.afterRound(), t.store && await t.store.flush();
28910
28761
  },
28911
28762
  onClear: () => t.resetSession(),
28763
+ onBeforeRegenerate: () => t.clearCodeReuse?.(),
28912
28764
  onQueuedCleared: (e) => {
28913
28765
  let n = t.agent?.debugLogs;
28914
28766
  n && (n.value.push({
@@ -28991,7 +28843,7 @@ function PF(e) {
28991
28843
  }
28992
28844
  //#endregion
28993
28845
  //#region src/core/sdk/ragSubagent.ts
28994
- function FF(e, t, n, r, i) {
28846
+ function bF(e, t, n, r, i) {
28995
28847
  let a = [];
28996
28848
  e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
28997
28849
  let o = [];
@@ -29006,7 +28858,7 @@ function FF(e, t, n, r, i) {
29006
28858
 
29007
28859
  你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
29008
28860
  }
29009
- function IF(e, t, n, r, i) {
28861
+ function xF(e, t, n, r, i) {
29010
28862
  let a = [], o = [];
29011
28863
  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)
29012
28864
 
@@ -29023,12 +28875,12 @@ ${a.join("\n")}
29023
28875
  ## 何时用何源
29024
28876
  ${o.join("\n")}`;
29025
28877
  }
29026
- var LF = {
28878
+ var SF = {
29027
28879
  name: "rag-search",
29028
28880
  description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
29029
- getContent: () => IF(!0, !0, !0, "search_docs", "load_doc")
28881
+ getContent: () => xF(!0, !0, !0, "search_docs", "load_doc")
29030
28882
  };
29031
- function RF(e, n, i) {
28883
+ function CF(e, n, i) {
29032
28884
  return r(async ({ query: e, topK: t }) => {
29033
28885
  try {
29034
28886
  let r = await n(e, { topK: t ?? i });
@@ -29045,7 +28897,7 @@ function RF(e, n, i) {
29045
28897
  })
29046
28898
  });
29047
28899
  }
29048
- function zF(e, n) {
28900
+ function wF(e, n) {
29049
28901
  return r(async ({ source: e }) => {
29050
28902
  try {
29051
28903
  let t = await n(e), r = Array.isArray(t) ? t : [t];
@@ -29059,19 +28911,19 @@ function zF(e, n) {
29059
28911
  schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
29060
28912
  });
29061
28913
  }
29062
- function BF(e) {
28914
+ function TF(e) {
29063
28915
  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;
29064
28916
  if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
29065
28917
  let p = [];
29066
- t && p.push(RF(s, t, o)), n && p.push(zF(c, n)), f && p.push(...f);
28918
+ t && p.push(CF(s, t, o)), n && p.push(wF(c, n)), f && p.push(...f);
29067
28919
  let m = r ? [
29068
28920
  "vfs_grep",
29069
28921
  "vfs_read",
29070
28922
  "vfs_json_read"
29071
- ] : void 0, h = FF(r, !!t, !!n, s, c), g = {
28923
+ ] : void 0, h = bF(r, !!t, !!n, s, c), g = {
29072
28924
  name: "rag-search",
29073
- description: LF.description,
29074
- getContent: () => IF(r, !!t, !!n, s, c)
28925
+ description: SF.description,
28926
+ getContent: () => xF(r, !!t, !!n, s, c)
29075
28927
  };
29076
28928
  return {
29077
28929
  id: i,
@@ -29085,9 +28937,170 @@ function BF(e) {
29085
28937
  };
29086
28938
  }
29087
28939
  //#endregion
28940
+ //#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
28941
+ var EF = { class: "code-preview-modal" }, DF = { class: "preview-header" }, OF = { class: "preview-title" }, kF = { class: "preview-tabs" }, AF = ["disabled"], jF = { class: "preview-actions" }, MF = ["title"], NF = {
28942
+ key: 0,
28943
+ viewBox: "0 0 16 16",
28944
+ fill: "none",
28945
+ "aria-hidden": "true"
28946
+ }, PF = {
28947
+ key: 1,
28948
+ viewBox: "0 0 16 16",
28949
+ fill: "none",
28950
+ "aria-hidden": "true"
28951
+ }, FF = ["title"], IF = ["title"], LF = { class: "preview-body" }, RF = ["srcdoc"], zF = {
28952
+ key: 1,
28953
+ class: "preview-source"
28954
+ }, BF = /*#__PURE__*/ bw(/* @__PURE__ */ Fi({
28955
+ __name: "CodePreview",
28956
+ props: {
28957
+ code: {},
28958
+ lang: {},
28959
+ messages: { default: () => NS }
28960
+ },
28961
+ emits: ["close"],
28962
+ setup(e, { emit: t }) {
28963
+ let n = e, r = t, i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn("preview"), o = /* @__PURE__ */ Cn(!1), s = Qs(() => {
28964
+ let e = n.lang.toLowerCase();
28965
+ return [
28966
+ "html",
28967
+ "htm",
28968
+ "vue",
28969
+ "javascript",
28970
+ "js",
28971
+ "css"
28972
+ ].includes(e);
28973
+ }), c = Qs(() => {
28974
+ let e = n.lang.toLowerCase();
28975
+ if (e === "html" || e === "htm") return n.code;
28976
+ if (e === "vue") return l(n.code);
28977
+ if (e === "javascript" || e === "js") return `<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{font-family:sans-serif;padding:16px}</style></head><body><div id="app"></div><script>${n.code}<\/script></body></html>`;
28978
+ if (e === "css") {
28979
+ let e = n.messages;
28980
+ return `<!DOCTYPE html><html><head><meta charset="utf-8"><style>${n.code}</style></head><body><div class="demo"><h1>${e.codeDemoTitle}</h1><p>${e.codeDemoText}</p><button>${e.codeDemoButton}</button><input placeholder="${e.codeDemoInput}"/></div></body></html>`;
28981
+ }
28982
+ return n.code;
28983
+ });
28984
+ function l(e) {
28985
+ let t = e.replace(/<\/script>/g, "<\\/script>");
28986
+ return `<!DOCTYPE html><html><head><meta charset="utf-8">
28987
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"><\/script>
28988
+ <script src="https://unpkg.com/@vue/compiler-dom@3/dist/compiler-dom.global.js"><\/script>
28989
+ <style>body{margin:0;font-family:sans-serif}body>div{padding:16px}</style>
28990
+ </head><body><div id="app"></div>
28991
+ <script>
28992
+ const { createApp, defineComponent } = Vue;
28993
+ const src = ${JSON.stringify(t)};
28994
+ // 提取三段
28995
+ function extract(re){const m=src.match(re);return m?m[1]:''}
28996
+ const template=extract(/<template>([\\s\\S]*?)<\\/template>/);
28997
+ const scriptContent=extract(/<script>([\\s\\S]*?)<\\/script>/);
28998
+ const styleContent=extract(/<style[^>]*>([\\s\\S]*?)<\\/style>/);
28999
+ if(styleContent){const s=document.createElement('style');s.textContent=styleContent;document.head.appendChild(s);}
29000
+ let options={};
29001
+ try{ const fn=new Function(scriptContent+';\\nreturn {data:typeof data!=="undefined"?data:()=>({}),methods:typeof methods!=="undefined"?methods:{},computed:typeof computed!=="undefined"?computed:{},mounted:typeof mounted!=="undefined"?mounted:undefined}'); options=fn(); }catch(e){ console.error(e); }
29002
+ const app=createApp({template:template||'<div></div>',...options});
29003
+ app.mount('#app');
29004
+ <\/script></body></html>`;
29005
+ }
29006
+ ni(() => a.value, async () => {
29007
+ await sr(), a.value === "preview" && i.value && (i.value.srcdoc = c.value);
29008
+ }, { immediate: !0 });
29009
+ function u() {
29010
+ AS(n.code).then((e) => {
29011
+ e && (o.value = !0, setTimeout(() => o.value = !1, 1500));
29012
+ });
29013
+ }
29014
+ function d() {
29015
+ let e = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), t = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title>代码预览 · " + e(n.lang) + "</title><style>html,body{margin:0;height:100%;background:#fff}iframe{border:none;width:100%;height:100%}</style></head><body><iframe sandbox=\"allow-scripts allow-modals allow-popups allow-forms\" srcdoc=\"" + e(c.value) + "\"></iframe></body></html>", r = new Blob([t], { type: "text/html" }), i = URL.createObjectURL(r);
29016
+ window.open(i, "_blank", "noopener,noreferrer"), setTimeout(() => URL.revokeObjectURL(i), 1e4);
29017
+ }
29018
+ return (t, n) => (Y(), X("div", {
29019
+ class: "code-preview-overlay",
29020
+ onClick: n[3] ||= yl((e) => r("close"), ["self"])
29021
+ }, [Z("div", EF, [Z("div", DF, [
29022
+ Z("span", OF, W(e.messages.codePreviewTitlePrefix) + W(e.lang), 1),
29023
+ Z("div", kF, [Z("button", {
29024
+ class: U({ active: a.value === "preview" }),
29025
+ disabled: !s.value,
29026
+ onClick: n[0] ||= (e) => a.value = "preview"
29027
+ }, W(e.messages.codePreviewTab), 11, AF), Z("button", {
29028
+ class: U({ active: a.value === "source" }),
29029
+ onClick: n[1] ||= (e) => a.value = "source"
29030
+ }, W(e.messages.codeSourceTab), 3)]),
29031
+ Z("div", jF, [
29032
+ Z("button", {
29033
+ class: U(["icon-btn", { done: o.value }]),
29034
+ title: o.value ? e.messages.copied : e.messages.codeCopyTitle,
29035
+ onClick: u
29036
+ }, [o.value ? (Y(), X("svg", NF, [...n[4] ||= [Z("path", {
29037
+ d: "M3 8.5l3 3 7-7",
29038
+ stroke: "currentColor",
29039
+ "stroke-width": "1.6",
29040
+ "stroke-linecap": "round",
29041
+ "stroke-linejoin": "round"
29042
+ }, null, -1)]])) : (Y(), X("svg", PF, [...n[5] ||= [Z("rect", {
29043
+ x: "5.5",
29044
+ y: "5.5",
29045
+ width: "8",
29046
+ height: "8",
29047
+ rx: "1.5",
29048
+ stroke: "currentColor",
29049
+ "stroke-width": "1.3"
29050
+ }, null, -1), Z("path", {
29051
+ 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",
29052
+ stroke: "currentColor",
29053
+ "stroke-width": "1.3"
29054
+ }, null, -1)]]))], 10, MF),
29055
+ Z("button", {
29056
+ class: "icon-btn",
29057
+ title: e.messages.codeOpenTitle,
29058
+ onClick: d
29059
+ }, [...n[6] ||= [Z("svg", {
29060
+ viewBox: "0 0 16 16",
29061
+ fill: "none",
29062
+ "aria-hidden": "true"
29063
+ }, [Z("path", {
29064
+ d: "M6 3H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-2",
29065
+ stroke: "currentColor",
29066
+ "stroke-width": "1.3",
29067
+ "stroke-linecap": "round"
29068
+ }), Z("path", {
29069
+ d: "M9 2.5h4.5V7M13 3l-6 6",
29070
+ stroke: "currentColor",
29071
+ "stroke-width": "1.3",
29072
+ "stroke-linecap": "round",
29073
+ "stroke-linejoin": "round"
29074
+ })], -1)]], 8, FF),
29075
+ Z("button", {
29076
+ class: "icon-btn",
29077
+ title: e.messages.close,
29078
+ onClick: n[2] ||= (e) => r("close")
29079
+ }, [...n[7] ||= [Z("svg", {
29080
+ viewBox: "0 0 16 16",
29081
+ fill: "none",
29082
+ "aria-hidden": "true"
29083
+ }, [Z("path", {
29084
+ d: "M4 4l8 8M12 4l-8 8",
29085
+ stroke: "currentColor",
29086
+ "stroke-width": "1.4",
29087
+ "stroke-linecap": "round"
29088
+ })], -1)]], 8, IF)
29089
+ ])
29090
+ ]), Z("div", LF, [a.value === "preview" && s.value ? (Y(), X("iframe", {
29091
+ key: 0,
29092
+ ref_key: "iframeRef",
29093
+ ref: i,
29094
+ class: "preview-iframe",
29095
+ sandbox: "allow-scripts allow-modals allow-popups allow-forms",
29096
+ srcdoc: c.value
29097
+ }, null, 8, RF)) : (Y(), X("pre", zF, [Z("code", null, W(e.code), 1)]))])])]));
29098
+ }
29099
+ }), [["__scopeId", "data-v-27eac25e"]]);
29100
+ //#endregion
29088
29101
  //#region src/core/index.ts
29089
29102
  function VF(e) {
29090
- return xv(e, PF);
29103
+ return xv(e, yF);
29091
29104
  }
29092
29105
  //#endregion
29093
- export { Ik as ApprovalBar, og as CAPABILITIES, lg as CONTEXT_PRESETS, NF as ChatDialog, Xw as ChatHeader, xA as ChatInput, jO as CodePreview, bh as CompressDecisionSchema, $k as ConflictBar, l_ as DEFAULT_COMPUTED_STYLES, jS as DEFAULT_DIALOG_ICONS, J_ as DEFAULT_MAX_PREFERENCES, hp as DEFAULT_PROMPT_SOFT_CAP, mm as DEFAULT_SYSTEM_PROMPT, hm as DEFAULT_SYSTEM_PROMPT_EN, oF as DebugDrawer, sT as FocusBar, oO as HLJS_BLOCK_MAX_CHARS, jm as HTML_VOID_TAGS, Vf as HUMAN_CONFIRM_TOOL_NAME, xw as IconGlyph, Bl as ImageInputError, PS as MESSAGES_EN_US, NS as MESSAGES_ZH_CN, ou as MIN_CONTEXT_WINDOW, NO as MessageContent, fk as MessageList, nk as MessageRow, Sk as QueuedBar, mp as SOFT_CAP_MIN_WINDOW, cp as STOP_WORDS, MF as SkillPanel, Ld as UNSAFE_KEYS, j_ as actionsToInspectInfo, A_ as actionsToTools, Il as agentError, sm as analyzeContext, Zd as applyPatchToClone, ef as applyPatchToLive, Fl as asAgentError, m_ as buildCssPath, gm as buildDataPrompt, sh as buildDiagnosticsReport, ov as buildExtractPrompt, dh as buildHtmlFragmentSkill, cv as buildPreferencePrompt, _m as buildSystemPrompt, LS as chatContextKey, Kg as commitSetToBind, Zl as compressImage, pm as connectMcp, C as constructLlmFromConfig, S as constructOpenLlmSync, AS as copyText, Zu as createAgent, Bf as createApprovalMiddleware, RS as createChatContext, VF as createChatSdk, Zf as createCheckpointManager, Qf as createCheckpointMiddleware, Mh as createConflictManager, cm as createContextInspectorMiddleware, e_ as createDataOps, ph as createHtmlFormatCheck, gh as createHtmlSubagent, Wf as createHumanConfirmMiddleware, Uf as createHumanConfirmTool, $h as createMemoryBackend, Nf as createMemoryMiddleware, Q_ as createPreferenceStore, lv as createPreferencesMiddleware, y as createProxyLlm, BF as createRagSubagent, _f as createSandboxRunner, cg as createSdkEvents, pv as createSerialRunner, rg as createSessionStore, W_ as createSkillStore, Rp as createSubagentMiddleware, xp as createSubagentTracker, Vp as createSubagentsMiddleware, R_ as createUsageHintsMiddleware, Hp as createVerifyMiddleware, xm as createVfs, tg as createWebStorageBackend, Jp as createWriteBackCheck, Ud as deepClone, P_ as defineDataToolset, yf as defineSkill, _h as defineTool, Hd as deleteByPath, xh as deriveTitle, md as describeSchemaNode, Mu as detectGarbledToolCall, Iu as detectTransitionalReply, af as diffObjects, y_ as domInfoTool, b_ as domInspectSkill, v_ as domSearchTool, o_ as domToStructure, c_ as domTools, N_ as domToolsStatic, f_ as ensureDomListenerRecorder, up as estimateMessageTokens, dp as estimateRoundTokens, cu as estimateTokens, iv as extractExplicitPreference, T as extractReasoningDelta, Dd as extractSchemaHint, lm as extractText, w as extractTextDelta, E as extractUsage, n_ as fetchDocTools, M_ as fetchTools, rf as findStrippedKeys, hd as formatConstraints, jl as formatZodIssues, Bd as getByPath, s_ as getDomTool, __ as getElementInfo, C_ as getEnvSummary, p_ as getRecordedListeners, td as getSchemaAtPath, Qu as getSchemaTopKeys, du as getTraceMetrics, Yd as hashValue, fh as htmlFragmentSkill, Sd as htmlOrchestratorPrompt, fp as indexSummarize, E_ as inspectEnvTool, D_ as inspectTools, Sh as isChatModel, Cu as isContextLengthError, lw as isIconHtml, $u as isPathAllowed, Gh as isQuotaError, Rd as isUnsafePath, Cg as jpEval, Nl as jsonParseError, Kd as limitDepth, av as looksLikePreferenceSignal, fO as markedToHtml, ah as maskUrlCredentials, Wd as maybeParseValue, $d as moveByPath, x as normalizeBaseUrl, O as normalizeUsage, uu as offloadPassThroughChars, lu as offloadThresholdChars, sv as parsePreferenceJson, xd as presets, cd as projectBySchema, sd as projectBySchemaDeep, Gd as projectFields, pp as recallRounds, pO as renderMarkdownHtml, gd as renderSchemaHint, _d as renderSchemaOverview, bd as renderSchemaShallow, sg as resolveCapabilities, dg as resolveContextOptions, ag as resolveDialogConfig, MS as resolveDialogIcons, IS as resolveDialogMessages, jh as resolveLlm, su as resolveModelCaps, gp as resolvePromptSoftCap, ig as resolveStorage, nf as restoreInPlace, tf as restoreLive, Pl as routeError, vf as runHostScript, Dg as runSandboxedScript, zd as safeMerge, S_ as safeSerialize, qd as safeStringify, Nu as sanitizeGarbledContent, pw as sanitizeIconHtml, gw as sanitizeMessageHtml, h_ as searchDom, Tg as searchJson, F_ as selectBuiltinTools, Vd as setByPath, _p as shouldTriggerCompression, ch as stringifyDiagnosticsReport, b as stripStainlessFetch, Cd as systemPromptHelpers, lp as tokenize, $ as toolError, ed as unwrapSchema, kS as useChat, zS as useChatContext, Nm as validateHtmlFormat, Xd as watchFieldsHash, e as z, Ml as zodError };
29106
+ export { xk as ApprovalBar, og as CAPABILITIES, lg as CONTEXT_PRESETS, vF as ChatDialog, Xw as ChatHeader, oA as ChatInput, BF as CodePreview, bh as CompressDecisionSchema, Rk as ConflictBar, l_ as DEFAULT_COMPUTED_STYLES, jS as DEFAULT_DIALOG_ICONS, J_ as DEFAULT_MAX_PREFERENCES, hp as DEFAULT_PROMPT_SOFT_CAP, mm as DEFAULT_SYSTEM_PROMPT, hm as DEFAULT_SYSTEM_PROMPT_EN, GP as DebugDrawer, sT as FocusBar, oO as HLJS_BLOCK_MAX_CHARS, jm as HTML_VOID_TAGS, Vf as HUMAN_CONFIRM_TOOL_NAME, xw as IconGlyph, Bl as ImageInputError, PS as MESSAGES_EN_US, NS as MESSAGES_ZH_CN, ou as MIN_CONTEXT_WINDOW, vO as MessageContent, ZO as MessageList, VO as MessageRow, sk as QueuedBar, mp as SOFT_CAP_MIN_WINDOW, cp as STOP_WORDS, _F as SkillPanel, Ld as UNSAFE_KEYS, j_ as actionsToInspectInfo, A_ as actionsToTools, Il as agentError, sm as analyzeContext, Zd as applyPatchToClone, ef as applyPatchToLive, Fl as asAgentError, m_ as buildCssPath, gm as buildDataPrompt, sh as buildDiagnosticsReport, ov as buildExtractPrompt, dh as buildHtmlFragmentSkill, cv as buildPreferencePrompt, _m as buildSystemPrompt, LS as chatContextKey, Kg as commitSetToBind, Zl as compressImage, pm as connectMcp, C as constructLlmFromConfig, S as constructOpenLlmSync, AS as copyText, Zu as createAgent, Bf as createApprovalMiddleware, RS as createChatContext, VF as createChatSdk, Zf as createCheckpointManager, Qf as createCheckpointMiddleware, Mh as createConflictManager, cm as createContextInspectorMiddleware, e_ as createDataOps, ph as createHtmlFormatCheck, gh as createHtmlSubagent, Wf as createHumanConfirmMiddleware, Uf as createHumanConfirmTool, $h as createMemoryBackend, Nf as createMemoryMiddleware, Q_ as createPreferenceStore, lv as createPreferencesMiddleware, y as createProxyLlm, TF as createRagSubagent, _f as createSandboxRunner, cg as createSdkEvents, pv as createSerialRunner, rg as createSessionStore, W_ as createSkillStore, Rp as createSubagentMiddleware, xp as createSubagentTracker, Vp as createSubagentsMiddleware, R_ as createUsageHintsMiddleware, Hp as createVerifyMiddleware, xm as createVfs, tg as createWebStorageBackend, Jp as createWriteBackCheck, Ud as deepClone, P_ as defineDataToolset, yf as defineSkill, _h as defineTool, Hd as deleteByPath, xh as deriveTitle, md as describeSchemaNode, Mu as detectGarbledToolCall, Iu as detectTransitionalReply, af as diffObjects, y_ as domInfoTool, b_ as domInspectSkill, v_ as domSearchTool, o_ as domToStructure, c_ as domTools, N_ as domToolsStatic, f_ as ensureDomListenerRecorder, up as estimateMessageTokens, dp as estimateRoundTokens, cu as estimateTokens, iv as extractExplicitPreference, T as extractReasoningDelta, Dd as extractSchemaHint, lm as extractText, w as extractTextDelta, E as extractUsage, n_ as fetchDocTools, M_ as fetchTools, rf as findStrippedKeys, hd as formatConstraints, jl as formatZodIssues, Bd as getByPath, s_ as getDomTool, __ as getElementInfo, C_ as getEnvSummary, p_ as getRecordedListeners, td as getSchemaAtPath, Qu as getSchemaTopKeys, du as getTraceMetrics, Yd as hashValue, fh as htmlFragmentSkill, Sd as htmlOrchestratorPrompt, fp as indexSummarize, E_ as inspectEnvTool, D_ as inspectTools, Sh as isChatModel, Cu as isContextLengthError, lw as isIconHtml, $u as isPathAllowed, Gh as isQuotaError, Rd as isUnsafePath, Cg as jpEval, Nl as jsonParseError, Kd as limitDepth, av as looksLikePreferenceSignal, fO as markedToHtml, ah as maskUrlCredentials, Wd as maybeParseValue, $d as moveByPath, x as normalizeBaseUrl, O as normalizeUsage, uu as offloadPassThroughChars, lu as offloadThresholdChars, sv as parsePreferenceJson, xd as presets, cd as projectBySchema, sd as projectBySchemaDeep, Gd as projectFields, pp as recallRounds, pO as renderMarkdownHtml, gd as renderSchemaHint, _d as renderSchemaOverview, bd as renderSchemaShallow, sg as resolveCapabilities, dg as resolveContextOptions, ag as resolveDialogConfig, MS as resolveDialogIcons, IS as resolveDialogMessages, jh as resolveLlm, su as resolveModelCaps, gp as resolvePromptSoftCap, ig as resolveStorage, nf as restoreInPlace, tf as restoreLive, Pl as routeError, vf as runHostScript, Dg as runSandboxedScript, zd as safeMerge, S_ as safeSerialize, qd as safeStringify, Nu as sanitizeGarbledContent, pw as sanitizeIconHtml, gw as sanitizeMessageHtml, h_ as searchDom, Tg as searchJson, F_ as selectBuiltinTools, Vd as setByPath, _p as shouldTriggerCompression, ch as stringifyDiagnosticsReport, b as stripStainlessFetch, Cd as systemPromptHelpers, lp as tokenize, $ as toolError, ed as unwrapSchema, kS as useChat, zS as useChatContext, Nm as validateHtmlFormat, Xd as watchFieldsHash, e as z, Ml as zodError };