@kvman/kvcoder 0.1.12 → 0.1.13

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.
@@ -2455,7 +2455,7 @@ var bi = { class: "kvc-picker" }, xi = [
2455
2455
  ], 8, Ei),
2456
2456
  a("p", Ni, E(D(f).t("kvcoder.ui.modelsCount", {
2457
2457
  shown: w.value.shown,
2458
- total: w.value.total
2458
+ count: w.value.total
2459
2459
  })), 1)
2460
2460
  ], 40, Ci)) : r("v-if", !0)]));
2461
2461
  }
@@ -3577,21 +3577,25 @@ function Xo(e, t) {
3577
3577
  }));
3578
3578
  return i(), n;
3579
3579
  }
3580
- var Zo = /* @__PURE__ */ new Set([
3580
+ var Zo = /* @__PURE__ */ new Set(["read", "read-files"]), Qo = /* @__PURE__ */ new Set([
3581
3581
  "search",
3582
3582
  "find",
3583
3583
  "list"
3584
- ]), Qo = /* @__PURE__ */ new Set([
3584
+ ]), $o = /* @__PURE__ */ new Set([
3585
3585
  "write",
3586
3586
  "edit",
3587
3587
  "undo",
3588
3588
  "assemble",
3589
3589
  "part"
3590
3590
  ]);
3591
- function $o(e) {
3592
- return e.connector === "fs" && e.command === "read" ? "read" : e.connector === "fs" && e.command !== void 0 && Zo.has(e.command) ? "searched" : e.connector === "fs" && e.command !== void 0 && Qo.has(e.command) ? "changed" : e.line === void 0 ? "other" : "ran";
3591
+ function es(e) {
3592
+ return e.connector === "fs" && e.command !== void 0 && Zo.has(e.command) ? "read" : e.connector === "fs" && e.command !== void 0 && Qo.has(e.command) ? "searched" : e.connector === "fs" && e.command !== void 0 && $o.has(e.command) ? "changed" : e.line === void 0 ? "other" : "ran";
3593
3593
  }
3594
- function es(e, t) {
3594
+ function ts(e, t) {
3595
+ let n = e.fields?.files, r = (Array.isArray(n) ? n.map((e) => Y(e).path) : [e.fields?.path]).filter((e) => typeof e == "string" && e !== "");
3596
+ return r.length === 0 ? [t] : r;
3597
+ }
3598
+ function ns(e, t) {
3595
3599
  let n = {
3596
3600
  read: 0,
3597
3601
  searched: 0,
@@ -3599,35 +3603,51 @@ function es(e, t) {
3599
3603
  ran: 0,
3600
3604
  other: 0,
3601
3605
  failed: 0
3602
- }, r = 0;
3603
- for (let i of e) {
3604
- if (!Jo(i, t)) continue;
3605
- let e = Do(i, t);
3606
- n[$o(e)] += 1, e.failed && qo(e.output).kind !== "invalid" && (n.failed += 1), r += (e.writtenMs ?? 0) + (e.durationMs ?? 0);
3606
+ }, r = {
3607
+ read: /* @__PURE__ */ new Set(),
3608
+ changed: /* @__PURE__ */ new Set()
3609
+ }, i = 0;
3610
+ for (let a of e) {
3611
+ if (!Jo(a, t)) continue;
3612
+ let e = Do(a, t), o = es(e);
3613
+ if (o === "read" || o === "changed") for (let t of ts(e, a.id)) r[o].add(t);
3614
+ else n[o] += 1;
3615
+ e.failed && qo(e.output).kind !== "invalid" && (n.failed += 1), i += (e.writtenMs ?? 0) + (e.durationMs ?? 0);
3607
3616
  }
3608
3617
  return {
3609
- tally: n,
3610
- ms: r,
3618
+ tally: {
3619
+ ...n,
3620
+ read: r.read.size,
3621
+ changed: r.changed.size
3622
+ },
3623
+ ms: i,
3611
3624
  failed: n.failed > 0
3612
3625
  };
3613
3626
  }
3614
- function ts(e, t) {
3615
- return [
3616
- "read",
3617
- "searched",
3618
- "changed",
3619
- "ran",
3620
- "other",
3621
- "failed"
3622
- ].filter((e) => t[e] > 0).map((n) => e(`kvcoder.ui.fold.${n}`, { count: t[n] })).join(" · ");
3627
+ var rs = [
3628
+ "read",
3629
+ "searched",
3630
+ "changed",
3631
+ "ran",
3632
+ "other"
3633
+ ];
3634
+ function is(e, t, n = Ye()) {
3635
+ let r = rs.filter((e) => t[e] > 0).map((n) => e(`kvcoder.ui.fold.${n}`, { count: t[n] })), i = r.length === 0 ? "" : r.reduce((t, n) => e("kvcoder.ui.fold.list", {
3636
+ first: t,
3637
+ next: n
3638
+ })), a = i.charAt(0).toLocaleUpperCase(n) + i.slice(1);
3639
+ return t.failed > 0 ? {
3640
+ words: a,
3641
+ failed: e("kvcoder.ui.fold.failed", { count: t.failed })
3642
+ } : { words: a };
3623
3643
  }
3624
3644
  //#endregion
3625
3645
  //#region web/src/RememberThis.vue?vue&type=script&setup=true&lang.ts
3626
- var ns = { class: "kvc-remember" }, rs = ["aria-label"], is = {
3646
+ var as = { class: "kvc-remember" }, os = ["aria-label"], ss = {
3627
3647
  class: "kvc-muted",
3628
3648
  dir: "auto",
3629
3649
  style: { "white-space": "pre-wrap" }
3630
- }, as = { class: "kvc-connector-actions" }, os = ["disabled"], ss = /* @__PURE__ */ c({
3650
+ }, cs = { class: "kvc-connector-actions" }, ls = ["disabled"], us = /* @__PURE__ */ c({
3631
3651
  __name: "RememberThis",
3632
3652
  props: { text: {} },
3633
3653
  setup(e) {
@@ -3647,7 +3667,7 @@ var ns = { class: "kvc-remember" }, rs = ["aria-label"], is = {
3647
3667
  o.value = !1;
3648
3668
  }
3649
3669
  }
3650
- return (e, c) => (_(), i("span", ns, [r.value ? (_(), i("span", {
3670
+ return (e, c) => (_(), i("span", as, [r.value ? (_(), i("span", {
3651
3671
  key: 1,
3652
3672
  class: "kvc-confirm",
3653
3673
  role: "alertdialog",
@@ -3656,8 +3676,8 @@ var ns = { class: "kvc-remember" }, rs = ["aria-label"], is = {
3656
3676
  onKeydown: c[2] ||= N((e) => r.value = !1, ["escape"])
3657
3677
  }, [
3658
3678
  a("span", null, E(D(n).t("kvcoder.ui.remember.question")), 1),
3659
- a("span", is, E(t.text), 1),
3660
- a("span", as, [a("button", {
3679
+ a("span", ss, E(t.text), 1),
3680
+ a("span", cs, [a("button", {
3661
3681
  type: "button",
3662
3682
  class: "kvc-button",
3663
3683
  "data-test": "remember-cancel",
@@ -3668,8 +3688,8 @@ var ns = { class: "kvc-remember" }, rs = ["aria-label"], is = {
3668
3688
  disabled: o.value,
3669
3689
  "data-test": "remember-add",
3670
3690
  onClick: s
3671
- }, E(D(n).t("kvcoder.ui.remember.add")), 9, os)])
3672
- ], 40, rs)) : (_(), i("button", {
3691
+ }, E(D(n).t("kvcoder.ui.remember.add")), 9, ls)])
3692
+ ], 40, os)) : (_(), i("button", {
3673
3693
  key: 0,
3674
3694
  type: "button",
3675
3695
  class: "kvc-text-button kvc-muted",
@@ -3680,7 +3700,7 @@ var ns = { class: "kvc-remember" }, rs = ["aria-label"], is = {
3680
3700
  });
3681
3701
  //#endregion
3682
3702
  //#region web/src/question-options.ts
3683
- function cs(e) {
3703
+ function ds(e) {
3684
3704
  return (Array.isArray(e.options) ? e.options : []).map((e) => {
3685
3705
  let t = Y(e);
3686
3706
  return {
@@ -3692,56 +3712,56 @@ function cs(e) {
3692
3712
  }
3693
3713
  //#endregion
3694
3714
  //#region web/src/AnsweredCard.vue?vue&type=script&setup=true&lang.ts
3695
- var ls = ["aria-label"], us = {
3715
+ var fs = ["aria-label"], ps = {
3696
3716
  class: "kvc-card-row",
3697
3717
  style: { "font-weight": "600" }
3698
- }, ds = {
3718
+ }, ms = {
3699
3719
  dir: "auto",
3700
3720
  "data-test": "answered-prompt"
3701
- }, fs = { class: "kvc-card-body" }, ps = {
3721
+ }, hs = { class: "kvc-card-body" }, gs = {
3702
3722
  key: 0,
3703
3723
  class: "kvc-muted",
3704
3724
  "data-test": "answered-skipped"
3705
- }, ms = ["data-chosen", "data-test"], hs = {
3725
+ }, _s = ["data-chosen", "data-test"], vs = {
3706
3726
  key: 1,
3707
3727
  class: "kvc-answered-gap",
3708
3728
  "aria-hidden": "true"
3709
- }, gs = { style: {
3729
+ }, ys = { style: {
3710
3730
  display: "flex",
3711
3731
  "flex-direction": "column"
3712
- } }, _s = { dir: "auto" }, vs = {
3732
+ } }, bs = { dir: "auto" }, xs = {
3713
3733
  key: 0,
3714
3734
  class: "kvc-muted",
3715
3735
  dir: "auto"
3716
- }, ys = {
3736
+ }, Ss = {
3717
3737
  key: 2,
3718
3738
  class: "kvc-sr"
3719
- }, bs = {
3739
+ }, Cs = {
3720
3740
  key: 0,
3721
3741
  class: "kvc-answered-option",
3722
3742
  "data-chosen": "true",
3723
3743
  "data-test": "answered-other"
3724
- }, xs = { style: {
3744
+ }, ws = { style: {
3725
3745
  display: "flex",
3726
3746
  "flex-direction": "column"
3727
- } }, Ss = { class: "kvc-muted" }, Cs = {
3747
+ } }, Ts = { class: "kvc-muted" }, Es = {
3728
3748
  dir: "auto",
3729
3749
  style: { "white-space": "pre-wrap" }
3730
- }, ws = {
3750
+ }, Ds = {
3731
3751
  key: 2,
3732
3752
  class: "kvc-chip",
3733
3753
  style: { "align-self": "flex-start" },
3734
3754
  "data-test": "answered-confirmed"
3735
- }, Ts = {
3755
+ }, Os = {
3736
3756
  key: 3,
3737
3757
  dir: "auto",
3738
3758
  style: { "white-space": "pre-wrap" },
3739
3759
  "data-test": "answered-text"
3740
- }, Es = /* @__PURE__ */ c({
3760
+ }, ks = /* @__PURE__ */ c({
3741
3761
  __name: "AnsweredCard",
3742
3762
  props: { answered: {} },
3743
3763
  setup(o) {
3744
- let c = o, l = J(), u = t(() => String(c.answered.question.prompt ?? "")), d = t(() => c.answered.answer.dismissed === !0), f = t(() => Array.isArray(c.answered.answer.selected) ? c.answered.answer.selected : []), p = t(() => cs(c.answered.question).map((e) => ({
3764
+ let c = o, l = J(), u = t(() => String(c.answered.question.prompt ?? "")), d = t(() => c.answered.answer.dismissed === !0), f = t(() => Array.isArray(c.answered.answer.selected) ? c.answered.answer.selected : []), p = t(() => ds(c.answered.question).map((e) => ({
3745
3765
  ...e,
3746
3766
  chosen: f.value.includes(e.id)
3747
3767
  }))), m = t(() => typeof c.answered.answer.other == "string" ? c.answered.answer.other : ""), h = t(() => typeof c.answered.answer.text == "string" ? c.answered.answer.text : "");
@@ -3749,11 +3769,11 @@ var ls = ["aria-label"], us = {
3749
3769
  class: "kvc-card",
3750
3770
  "data-test": "answered-card",
3751
3771
  "aria-label": u.value
3752
- }, [a("div", us, [s(D(le), {
3772
+ }, [a("div", ps, [s(D(le), {
3753
3773
  size: 18,
3754
3774
  "aria-hidden": "true",
3755
3775
  class: "kvc-ok"
3756
- }), a("span", ds, E(u.value), 1)]), a("div", fs, [d.value ? (_(), i("span", ps, E(D(l).t("kvcoder.ui.skipped")), 1)) : c.answered.kind === "choice" ? (_(), i(e, { key: 1 }, [(_(!0), i(e, null, b(p.value, (e) => (_(), i("div", {
3776
+ }), a("span", ms, E(u.value), 1)]), a("div", hs, [d.value ? (_(), i("span", gs, E(D(l).t("kvcoder.ui.skipped")), 1)) : c.answered.kind === "choice" ? (_(), i(e, { key: 1 }, [(_(!0), i(e, null, b(p.value, (e) => (_(), i("div", {
3757
3777
  key: e.id,
3758
3778
  class: "kvc-answered-option",
3759
3779
  "data-chosen": e.chosen,
@@ -3764,19 +3784,19 @@ var ls = ["aria-label"], us = {
3764
3784
  size: 16,
3765
3785
  "aria-hidden": "true",
3766
3786
  class: "kvc-ok"
3767
- })) : (_(), i("span", hs)),
3768
- a("span", gs, [a("span", _s, E(e.label), 1), e.description ? (_(), i("span", vs, E(e.description), 1)) : r("v-if", !0)]),
3769
- e.chosen ? (_(), i("span", ys, E(D(l).t("kvcoder.ui.chosen")), 1)) : r("v-if", !0)
3770
- ], 8, ms))), 128)), m.value === "" ? r("v-if", !0) : (_(), i("div", bs, [s(D(W), {
3787
+ })) : (_(), i("span", vs)),
3788
+ a("span", ys, [a("span", bs, E(e.label), 1), e.description ? (_(), i("span", xs, E(e.description), 1)) : r("v-if", !0)]),
3789
+ e.chosen ? (_(), i("span", Ss, E(D(l).t("kvcoder.ui.chosen")), 1)) : r("v-if", !0)
3790
+ ], 8, _s))), 128)), m.value === "" ? r("v-if", !0) : (_(), i("div", Cs, [s(D(W), {
3771
3791
  size: 16,
3772
3792
  "aria-hidden": "true",
3773
3793
  class: "kvc-ok"
3774
- }), a("span", xs, [a("span", Ss, E(D(l).t("kvcoder.ui.other")), 1), a("span", Cs, E(m.value), 1)])]))], 64)) : c.answered.kind === "confirm" ? (_(), i("span", ws, E(D(l).t(c.answered.answer.confirmed === !0 ? "kvcoder.ui.yes" : "kvcoder.ui.no")), 1)) : (_(), i("span", Ts, E(h.value), 1))])], 8, ls));
3794
+ }), a("span", ws, [a("span", Ts, E(D(l).t("kvcoder.ui.other")), 1), a("span", Es, E(m.value), 1)])]))], 64)) : c.answered.kind === "confirm" ? (_(), i("span", Ds, E(D(l).t(c.answered.answer.confirmed === !0 ? "kvcoder.ui.yes" : "kvcoder.ui.no")), 1)) : (_(), i("span", Os, E(h.value), 1))])], 8, fs));
3775
3795
  }
3776
- }), Ds = {
3796
+ }), As = {
3777
3797
  class: "kvc-card kvc-card-row",
3778
3798
  "data-test": "artifact-card"
3779
- }, Os = {
3799
+ }, js = {
3780
3800
  style: {
3781
3801
  flex: "1 1 auto",
3782
3802
  "min-inline-size": "0",
@@ -3785,13 +3805,13 @@ var ls = ["aria-label"], us = {
3785
3805
  "white-space": "nowrap"
3786
3806
  },
3787
3807
  "data-test": "artifact-card-title"
3788
- }, ks = {
3808
+ }, Ms = {
3789
3809
  class: "kvc-chip",
3790
3810
  "data-test": "artifact-card-format"
3791
- }, As = {
3811
+ }, Ns = {
3792
3812
  class: "kvc-muted",
3793
3813
  "data-test": "artifact-card-version"
3794
- }, js = /* @__PURE__ */ c({
3814
+ }, Ps = /* @__PURE__ */ c({
3795
3815
  __name: "ArtifactCard",
3796
3816
  props: {
3797
3817
  id: {},
@@ -3802,14 +3822,14 @@ var ls = ["aria-label"], us = {
3802
3822
  emits: ["open"],
3803
3823
  setup(e, { emit: t }) {
3804
3824
  let n = e, r = t, o = J();
3805
- return (e, t) => (_(), i("div", Ds, [
3825
+ return (e, t) => (_(), i("div", As, [
3806
3826
  s(D(we), {
3807
3827
  size: 16,
3808
3828
  "aria-hidden": "true"
3809
3829
  }),
3810
- a("span", Os, E(n.title), 1),
3811
- a("span", ks, E(D(o).t(`kvcoder.ui.artifacts.format.${n.format}`)), 1),
3812
- a("span", As, E(D(o).t("kvcoder.ui.artifacts.version", { version: n.version })), 1),
3830
+ a("span", js, E(n.title), 1),
3831
+ a("span", Ms, E(D(o).t(`kvcoder.ui.artifacts.format.${n.format}`)), 1),
3832
+ a("span", Ns, E(D(o).t("kvcoder.ui.artifacts.version", { version: n.version })), 1),
3813
3833
  a("button", {
3814
3834
  type: "button",
3815
3835
  class: "kvc-button",
@@ -3821,24 +3841,24 @@ var ls = ["aria-label"], us = {
3821
3841
  });
3822
3842
  //#endregion
3823
3843
  //#region web/src/call-results.ts
3824
- function Ms(e) {
3844
+ function Fs(e) {
3825
3845
  let { replacements: t, firstChangedLine: n } = Y(e);
3826
3846
  return typeof t == "number" && typeof n == "number" ? {
3827
3847
  replacements: t,
3828
3848
  firstChangedLine: n
3829
3849
  } : void 0;
3830
3850
  }
3831
- function Ns(e) {
3851
+ function Is(e) {
3832
3852
  let { fromLine: t, content: n } = Y(e);
3833
3853
  return typeof t == "number" && typeof n == "string" ? {
3834
3854
  fromLine: t,
3835
3855
  content: n
3836
3856
  } : void 0;
3837
3857
  }
3838
- function Ps(e) {
3858
+ function Ls(e) {
3839
3859
  let { path: t, error: n, notRead: r, unchanged: i } = Y(e);
3840
3860
  if (typeof t != "string") return [];
3841
- let a = Ns(e);
3861
+ let a = Is(e);
3842
3862
  if (a !== void 0) return [{
3843
3863
  path: t,
3844
3864
  read: a
@@ -3855,11 +3875,11 @@ function Ps(e) {
3855
3875
  state: "unchanged"
3856
3876
  }] : [];
3857
3877
  }
3858
- function Fs(e) {
3878
+ function Rs(e) {
3859
3879
  let t = Y(e).files;
3860
- return Array.isArray(t) ? t.flatMap(Ps) : void 0;
3880
+ return Array.isArray(t) ? t.flatMap(Ls) : void 0;
3861
3881
  }
3862
- function Is(e) {
3882
+ function zs(e) {
3863
3883
  let { name: t, kind: n, bytes: r } = Y(e);
3864
3884
  return typeof t == "string" && (n === "file" || n === "folder") && typeof r == "number" ? [{
3865
3885
  name: t,
@@ -3867,15 +3887,15 @@ function Is(e) {
3867
3887
  bytes: r
3868
3888
  }] : [];
3869
3889
  }
3870
- function Ls(e) {
3890
+ function Bs(e) {
3871
3891
  let t = Y(e).entries;
3872
- return Array.isArray(t) ? t.flatMap(Is) : void 0;
3892
+ return Array.isArray(t) ? t.flatMap(zs) : void 0;
3873
3893
  }
3874
- function Rs(e) {
3894
+ function Vs(e) {
3875
3895
  let t = Y(e).paths;
3876
3896
  return Array.isArray(t) ? t.filter((e) => typeof e == "string") : void 0;
3877
3897
  }
3878
- function zs(e) {
3898
+ function Hs(e) {
3879
3899
  let { path: t, matches: n, count: r } = Y(e);
3880
3900
  if (typeof t != "string") return [];
3881
3901
  if (typeof r == "number") return [{
@@ -3898,17 +3918,17 @@ function zs(e) {
3898
3918
  count: i.filter((e) => !e.context).length
3899
3919
  }];
3900
3920
  }
3901
- var Bs = [
3921
+ var Us = [
3902
3922
  "running",
3903
3923
  "succeeded",
3904
3924
  "failed",
3905
3925
  "cancelled",
3906
3926
  "interrupted"
3907
3927
  ];
3908
- function Vs(e, t) {
3909
- return Bs.some((e) => e === t) ? e(`kvcoder.ui.jobs.status.${t}`) : t;
3928
+ function Ws(e, t) {
3929
+ return Us.some((e) => e === t) ? e(`kvcoder.ui.jobs.status.${t}`) : t;
3910
3930
  }
3911
- function Hs(e) {
3931
+ function Gs(e) {
3912
3932
  let { kind: t, call: n, status: r, startedAt: i, endedAt: a, exitCode: o, output: s, problem: c } = Y(e);
3913
3933
  if (typeof n != "string" || typeof r != "string") return;
3914
3934
  let l = typeof i == "string" && typeof a == "string" ? Date.parse(a) - Date.parse(i) : NaN;
@@ -3922,36 +3942,36 @@ function Hs(e) {
3922
3942
  ...c === void 0 ? {} : { problem: c }
3923
3943
  };
3924
3944
  }
3925
- function Us(e) {
3945
+ function Ks(e) {
3926
3946
  let t = Y(e).files;
3927
- return Array.isArray(t) ? t.flatMap(zs) : void 0;
3947
+ return Array.isArray(t) ? t.flatMap(Hs) : void 0;
3928
3948
  }
3929
3949
  //#endregion
3930
3950
  //#region web/src/edit-diff.ts
3931
- var Ws = 3;
3932
- function Gs(e) {
3951
+ var qs = 3;
3952
+ function Js(e) {
3933
3953
  if (e === "") return [];
3934
3954
  let t = e.split("\n");
3935
3955
  return e.endsWith("\n") ? t.slice(0, -1) : t;
3936
3956
  }
3937
- function Ks(e, t) {
3957
+ function Ys(e, t) {
3938
3958
  let n = 0;
3939
3959
  for (; n < e.length && n < t.length && e[n] === t[n];) n += 1;
3940
3960
  return n;
3941
3961
  }
3942
- function qs(e, t) {
3943
- let n = Gs(e), r = Gs(t), i = Ks(n, r), a = Ks(n.slice(i).reverse(), r.slice(i).reverse()), o = (e, t) => t.map((t) => ({
3962
+ function Xs(e, t) {
3963
+ let n = Js(e), r = Js(t), i = Ys(n, r), a = Ys(n.slice(i).reverse(), r.slice(i).reverse()), o = (e, t) => t.map((t) => ({
3944
3964
  kind: e,
3945
3965
  text: t
3946
3966
  }));
3947
3967
  return [
3948
- ...o("context", n.slice(Math.max(i - Ws, 0), i)),
3968
+ ...o("context", n.slice(Math.max(i - qs, 0), i)),
3949
3969
  ...o("removed", n.slice(i, n.length - a)),
3950
3970
  ...o("added", r.slice(i, r.length - a)),
3951
- ...o("context", n.slice(n.length - a, n.length - a + Ws))
3971
+ ...o("context", n.slice(n.length - a, n.length - a + qs))
3952
3972
  ];
3953
3973
  }
3954
- function Js(e) {
3974
+ function Zs(e) {
3955
3975
  return {
3956
3976
  added: e.filter((e) => e.kind === "added").length,
3957
3977
  removed: e.filter((e) => e.kind === "removed").length
@@ -3959,7 +3979,7 @@ function Js(e) {
3959
3979
  }
3960
3980
  //#endregion
3961
3981
  //#region web/src/mcp-steps.ts
3962
- function Ys(e) {
3982
+ function Qs(e) {
3963
3983
  let t = e.steps;
3964
3984
  return Array.isArray(t) ? t.map((e, t) => {
3965
3985
  let { tool: n, arguments: r } = Y(e), i = `${t + 1}.`;
@@ -3975,7 +3995,7 @@ function Ys(e) {
3975
3995
  }
3976
3996
  //#endregion
3977
3997
  //#region web/src/call-summary.ts
3978
- function Xs(e) {
3998
+ function $s(e) {
3979
3999
  if (e !== void 0 && /^\s*[[{]/.test(e)) try {
3980
4000
  return JSON.parse(e);
3981
4001
  } catch (e) {
@@ -3983,12 +4003,12 @@ function Xs(e) {
3983
4003
  throw e;
3984
4004
  }
3985
4005
  }
3986
- var Zs = 1024;
3987
- function Qs(e, t) {
3988
- return t < Zs ? e("kvcoder.ui.call.bytes", { count: t }) : t < Zs * Zs ? e("kvcoder.ui.call.kilobytes", { count: (t / Zs).toFixed(1) }) : e("kvcoder.ui.call.megabytes", { count: (t / (Zs * Zs)).toFixed(1) });
4006
+ var ec = 1024;
4007
+ function tc(e, t) {
4008
+ return t < ec ? e("kvcoder.ui.call.bytes", { count: t }) : t < ec * ec ? e("kvcoder.ui.call.kilobytes", { count: (t / ec).toFixed(1) }) : e("kvcoder.ui.call.megabytes", { count: (t / (ec * ec)).toFixed(1) });
3989
4009
  }
3990
4010
  var Q = (e) => typeof e == "string" && e !== "" ? e : void 0;
3991
- function $s(e) {
4011
+ function nc(e) {
3992
4012
  let t = e.edits;
3993
4013
  return Array.isArray(t) ? t.flatMap((e) => {
3994
4014
  let { oldText: t, newText: n } = Y(e);
@@ -3998,41 +4018,41 @@ function $s(e) {
3998
4018
  }] : [];
3999
4019
  }) : [];
4000
4020
  }
4001
- function ec(e) {
4002
- let t = $s(e).map((e) => Js(qs(e.oldText, e.newText)));
4021
+ function rc(e) {
4022
+ let t = nc(e).map((e) => Zs(Xs(e.oldText, e.newText)));
4003
4023
  return `+${t.reduce((e, t) => e + t.added, 0)} −${t.reduce((e, t) => e + t.removed, 0)}`;
4004
4024
  }
4005
- function tc(e, t) {
4006
- if (typeof t.bytes == "number" && typeof t.created == "boolean") return e(t.created ? "kvcoder.ui.call.created" : "kvcoder.ui.call.replaced", { size: Qs(e, t.bytes) });
4025
+ function ic(e, t) {
4026
+ if (typeof t.bytes == "number" && typeof t.created == "boolean") return e(t.created ? "kvcoder.ui.call.created" : "kvcoder.ui.call.replaced", { size: tc(e, t.bytes) });
4007
4027
  }
4008
- function nc(e, t) {
4028
+ function ac(e, t) {
4009
4029
  let { fromLine: n, totalLines: r, content: i } = t;
4010
4030
  if (typeof n != "number" || typeof r != "number" || typeof i != "string") return;
4011
- let a = Gs(i).length;
4031
+ let a = Js(i).length;
4012
4032
  return a === 0 ? void 0 : e("kvcoder.ui.call.lines", {
4013
4033
  from: n,
4014
4034
  to: n + a - 1,
4015
4035
  total: r
4016
4036
  });
4017
4037
  }
4018
- function rc(e, t) {
4038
+ function oc(e, t) {
4019
4039
  let n = t.entries;
4020
4040
  if (Array.isArray(n)) return e(t.truncated === !0 ? "kvcoder.ui.call.entriesFirst" : "kvcoder.ui.call.entries", { count: n.length });
4021
4041
  }
4022
- function ic(e, t) {
4042
+ function sc(e, t) {
4023
4043
  let n = t.paths;
4024
4044
  if (Array.isArray(n)) return e(t.truncated === !0 ? "kvcoder.ui.call.filesFirst" : "kvcoder.ui.call.files", { count: n.length });
4025
4045
  }
4026
- function ac(e, t) {
4027
- let n = Us(t);
4046
+ function cc(e, t) {
4047
+ let n = Ks(t);
4028
4048
  if (n === void 0) return;
4029
4049
  let r = n.reduce((e, t) => e + t.count, 0);
4030
- return e(t.truncated === !0 ? "kvcoder.ui.call.matchesFirst" : "kvcoder.ui.call.matches", {
4031
- matches: r,
4032
- files: n.length
4050
+ return e("kvcoder.ui.call.matches", {
4051
+ matches: e(t.truncated === !0 ? "kvcoder.ui.call.matchesFirst" : "kvcoder.ui.call.matchCount", { count: r }),
4052
+ files: e("kvcoder.ui.call.files", { count: n.length })
4033
4053
  });
4034
4054
  }
4035
- var oc = (e, t, n) => Array.isArray(n) ? e(t, { count: n.length }) : void 0;
4055
+ var lc = (e, t, n) => Array.isArray(n) ? e(t, { count: n.length }) : void 0;
4036
4056
  function $(e, t, n) {
4037
4057
  return {
4038
4058
  ...e === void 0 ? {} : { words: e },
@@ -4040,7 +4060,7 @@ function $(e, t, n) {
4040
4060
  ...n === void 0 ? {} : { outcome: n }
4041
4061
  };
4042
4062
  }
4043
- function sc(e) {
4063
+ function uc(e) {
4044
4064
  let t = e.files;
4045
4065
  if (!Array.isArray(t)) return;
4046
4066
  let n = t.flatMap((e) => {
@@ -4049,43 +4069,43 @@ function sc(e) {
4049
4069
  });
4050
4070
  return n.length === 0 ? void 0 : n.join(", ");
4051
4071
  }
4052
- function cc(e, t, n, r) {
4072
+ function dc(e, t, n, r) {
4053
4073
  let i = r === void 0 ? void 0 : Y(r), a = Q(n.path);
4054
- if (t === "edit") return $(e("kvcoder.ui.call.edit"), a, i === void 0 ? void 0 : ec(n));
4055
- if (t === "write") return $(e("kvcoder.ui.call.write"), a, i === void 0 ? void 0 : tc(e, i));
4056
- if (t === "read") return $(e("kvcoder.ui.call.read"), a, i === void 0 ? void 0 : nc(e, i));
4057
- if (t === "read-files") return $(e("kvcoder.ui.call.read"), sc(n), i === void 0 ? void 0 : oc(e, "kvcoder.ui.call.files", i.files));
4058
- if (t === "list") return $(e("kvcoder.ui.call.list"), a ?? ".", i === void 0 ? void 0 : rc(e, i));
4059
- if (t === "find") return $(e("kvcoder.ui.call.find"), Q(n.pattern), i === void 0 ? void 0 : ic(e, i));
4060
- if (t === "search") return $(e("kvcoder.ui.call.search"), Q(n.pattern), i === void 0 ? void 0 : ac(e, i));
4061
- }
4062
- function lc(e, t, n, r) {
4074
+ if (t === "edit") return $(e("kvcoder.ui.call.edit"), a, i === void 0 ? void 0 : rc(n));
4075
+ if (t === "write") return $(e("kvcoder.ui.call.write"), a, i === void 0 ? void 0 : ic(e, i));
4076
+ if (t === "read") return $(e("kvcoder.ui.call.read"), a, i === void 0 ? void 0 : ac(e, i));
4077
+ if (t === "read-files") return $(e("kvcoder.ui.call.read"), uc(n), i === void 0 ? void 0 : lc(e, "kvcoder.ui.call.files", i.files));
4078
+ if (t === "list") return $(e("kvcoder.ui.call.list"), a ?? ".", i === void 0 ? void 0 : oc(e, i));
4079
+ if (t === "find") return $(e("kvcoder.ui.call.find"), Q(n.pattern), i === void 0 ? void 0 : sc(e, i));
4080
+ if (t === "search") return $(e("kvcoder.ui.call.search"), Q(n.pattern), i === void 0 ? void 0 : cc(e, i));
4081
+ }
4082
+ function fc(e, t, n, r) {
4063
4083
  let i = Q(n.server), a = [i, Q(n.tool)].filter((e) => e !== void 0).join(" · ");
4064
4084
  if (t === "call") return $(void 0, a === "" ? void 0 : a);
4065
- if (t === "run") return $(void 0, [i, Ys(n).flatMap((e) => e.tool === void 0 ? [] : [e.tool]).join(", ")].filter((e) => e !== void 0 && e !== "").join(" · "));
4066
- if (t === "tools") return $(e("kvcoder.ui.call.tools"), a === "" ? void 0 : a, oc(e, "kvcoder.ui.call.toolCount", Y(r).tools));
4085
+ if (t === "run") return $(void 0, [i, Qs(n).flatMap((e) => e.tool === void 0 ? [] : [e.tool]).join(", ")].filter((e) => e !== void 0 && e !== "").join(" · "));
4086
+ if (t === "tools") return $(e("kvcoder.ui.call.tools"), a === "" ? void 0 : a, lc(e, "kvcoder.ui.call.toolCount", Y(r).tools));
4067
4087
  }
4068
- function uc(e, t, n, r) {
4069
- if (t === "list") return $(e("kvcoder.ui.call.backgroundRuns"), void 0, oc(e, "kvcoder.ui.call.runCount", r));
4088
+ function pc(e, t, n, r) {
4089
+ if (t === "list") return $(e("kvcoder.ui.call.backgroundRuns"), void 0, lc(e, "kvcoder.ui.call.runCount", r));
4070
4090
  if (t === "output" || t === "wait") {
4071
- let i = Hs(r);
4072
- return $(e(`kvcoder.ui.call.${t}`), Q(n.id), i === void 0 ? void 0 : Vs(e, i.status));
4091
+ let i = Gs(r);
4092
+ return $(e(`kvcoder.ui.call.${t}`), Q(n.id), i === void 0 ? void 0 : Ws(e, i.status));
4073
4093
  }
4074
4094
  if (t === "stop") return $(e("kvcoder.ui.call.stop"), Q(n.id));
4075
4095
  }
4076
- function dc(e, t, n, r) {
4096
+ function mc(e, t, n, r) {
4077
4097
  let i = Q(Y(r).progress), a = n.steps, o = Array.isArray(a) ? a.flatMap((e) => Q(Y(e).id) === void 0 ? [] : [String(Y(e).id)]).join(", ") : void 0;
4078
4098
  return t === "set" ? $(e("kvcoder.ui.call.mapSet"), Q(n.goal), i) : t === "detail" ? $(e("kvcoder.ui.call.mapDetail"), Q(n.id), i) : t === "update" ? $(e("kvcoder.ui.call.mapUpdate"), o === "" ? void 0 : o, i) : t === "note" ? $(e("kvcoder.ui.call.mapNote"), Q(n.text)) : t === "get" ? $(e("kvcoder.ui.call.mapGet"), void 0, i) : void 0;
4079
4099
  }
4080
- function fc(e, t, n) {
4100
+ function hc(e, t, n) {
4081
4101
  let { connector: r, command: i } = t, a = t.fields ?? {};
4082
4102
  if (r !== void 0 && i !== void 0) {
4083
4103
  if (t.line !== void 0) return { subject: `$ ${t.line}` };
4084
4104
  if (i === "help") return $(e("kvcoder.ui.call.help"), [r, Q(a.command)].filter((e) => e !== void 0).join(" "));
4085
- if (r === "fs") return cc(e, i, a, n);
4086
- if (r === "mcp") return lc(e, i, a, n);
4087
- if (r === "background") return uc(e, i, a, n);
4088
- if (r === "execution-map") return dc(e, i, a, n);
4105
+ if (r === "fs") return dc(e, i, a, n);
4106
+ if (r === "mcp") return fc(e, i, a, n);
4107
+ if (r === "background") return pc(e, i, a, n);
4108
+ if (r === "execution-map") return mc(e, i, a, n);
4089
4109
  if (r === "delegate" && i === "run") return $(e("kvcoder.ui.call.delegate"), [Q(a.worker), Q(a.title)].filter((e) => e !== void 0).join(" · "));
4090
4110
  if (r === "artifact" && i === "get") return $(e("kvcoder.ui.call.readArtifact"), Q(a.id));
4091
4111
  if (r === "web" && i === "fetch") return $(e("kvcoder.ui.call.fetch"), Q(a.url));
@@ -4094,44 +4114,44 @@ function fc(e, t, n) {
4094
4114
  }
4095
4115
  //#endregion
4096
4116
  //#region web/src/field-rows.ts
4097
- var pc = "—", mc = (e) => e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean", hc = (e) => e === null ? pc : String(e);
4098
- function gc(e) {
4117
+ var gc = "—", _c = (e) => e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean", vc = (e) => e === null ? gc : String(e);
4118
+ function yc(e) {
4099
4119
  return typeof e == "object" && e && !Array.isArray(e) ? Object.fromEntries(Object.entries(e)) : void 0;
4100
4120
  }
4101
- function _c(e) {
4102
- let t = gc(e);
4121
+ function bc(e) {
4122
+ let t = yc(e);
4103
4123
  if (t === void 0) return;
4104
4124
  let n = {};
4105
4125
  for (let [e, r] of Object.entries(t)) {
4106
- if (!mc(r)) return;
4126
+ if (!_c(r)) return;
4107
4127
  n[e] = r;
4108
4128
  }
4109
4129
  return n;
4110
4130
  }
4111
- function vc(e) {
4131
+ function xc(e) {
4112
4132
  let t = [...new Set(e.flatMap((e) => Object.keys(e)))];
4113
4133
  return {
4114
4134
  kind: "table",
4115
4135
  columns: t,
4116
- rows: e.map((e) => t.map((t) => t in e ? hc(e[t] ?? null) : ""))
4136
+ rows: e.map((e) => t.map((t) => t in e ? vc(e[t] ?? null) : ""))
4117
4137
  };
4118
4138
  }
4119
- function yc(e) {
4139
+ function Sc(e) {
4120
4140
  if (e.length === 0) return { kind: "empty" };
4121
- if (e.every(mc)) return {
4141
+ if (e.every(_c)) return {
4122
4142
  kind: "items",
4123
- items: e.map(hc)
4143
+ items: e.map(vc)
4124
4144
  };
4125
- let t = e.map(_c).filter((e) => e !== void 0);
4126
- return t.length === e.length ? vc(t) : {
4145
+ let t = e.map(bc).filter((e) => e !== void 0);
4146
+ return t.length === e.length ? xc(t) : {
4127
4147
  kind: "rows",
4128
4148
  rows: e.map((e, t) => ({
4129
4149
  name: String(t + 1),
4130
- value: bc(e)
4150
+ value: Cc(e)
4131
4151
  }))
4132
4152
  };
4133
4153
  }
4134
- function bc(e) {
4154
+ function Cc(e) {
4135
4155
  if (typeof e == "string") return e.includes("\n") ? {
4136
4156
  kind: "block",
4137
4157
  text: e
@@ -4143,27 +4163,27 @@ function bc(e) {
4143
4163
  kind: "text",
4144
4164
  text: String(e)
4145
4165
  };
4146
- if (Array.isArray(e)) return yc(e);
4147
- let t = gc(e);
4166
+ if (Array.isArray(e)) return Sc(e);
4167
+ let t = yc(e);
4148
4168
  return t === void 0 || Object.keys(t).length === 0 ? { kind: "empty" } : {
4149
4169
  kind: "rows",
4150
- rows: xc(t)
4170
+ rows: wc(t)
4151
4171
  };
4152
4172
  }
4153
- function xc(e) {
4173
+ function wc(e) {
4154
4174
  return Object.entries(e).map(([e, t]) => ({
4155
4175
  name: e,
4156
- value: bc(t)
4176
+ value: Cc(t)
4157
4177
  }));
4158
4178
  }
4159
- function Sc(e, t) {
4179
+ function Tc(e, t) {
4160
4180
  return t || e.length <= 12 ? e : e.slice(0, 12);
4161
4181
  }
4162
- var Cc = (e) => Gs(e).map((e) => ({ text: e })), wc = (e, t) => Gs(e).map((e, n) => ({
4182
+ var Ec = (e) => Js(e).map((e) => ({ text: e })), Dc = (e, t) => Js(e).map((e, n) => ({
4163
4183
  text: e,
4164
4184
  number: t + n
4165
4185
  }));
4166
- function Tc(e, t) {
4186
+ function Oc(e, t) {
4167
4187
  return t || e.length <= 17 ? e : [
4168
4188
  ...e.slice(0, 12),
4169
4189
  "⋯",
@@ -4172,7 +4192,7 @@ function Tc(e, t) {
4172
4192
  }
4173
4193
  //#endregion
4174
4194
  //#region web/src/FoldButton.vue?vue&type=script&setup=true&lang.ts
4175
- var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4195
+ var kc = ["aria-expanded"], Ac = /* @__PURE__ */ c({
4176
4196
  __name: "FoldButton",
4177
4197
  props: {
4178
4198
  count: {},
@@ -4189,123 +4209,123 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4189
4209
  "aria-expanded": n.open,
4190
4210
  "data-test": "show-all",
4191
4211
  onClick: t[0] ||= (e) => a("toggle")
4192
- }, E(n.open ? D(o).t("kvcoder.ui.call.showFewer") : D(o).t("kvcoder.ui.call.showAll", { count: n.count })), 9, Ec)) : r("v-if", !0);
4212
+ }, E(n.open ? D(o).t("kvcoder.ui.call.showFewer") : D(o).t("kvcoder.ui.call.showAll", { count: n.count })), 9, kc)) : r("v-if", !0);
4193
4213
  }
4194
- }), Oc = { class: "kvc-code-lines" }, kc = ["dir", "data-kind"], Ac = {
4214
+ }), jc = { class: "kvc-code-lines" }, Mc = ["dir", "data-kind"], Nc = {
4195
4215
  key: 0,
4196
4216
  class: "kvc-line-number",
4197
4217
  "data-test": "call-line-number"
4198
- }, jc = {
4218
+ }, Pc = {
4199
4219
  key: 1,
4200
4220
  class: "kvc-line-mark",
4201
4221
  "aria-hidden": "true"
4202
- }, Mc = {
4222
+ }, Fc = {
4203
4223
  class: "kvc-line-text",
4204
4224
  dir: "auto",
4205
4225
  "data-test": "call-line-text"
4206
- }, Nc = /* @__PURE__ */ c({
4226
+ }, Ic = /* @__PURE__ */ c({
4207
4227
  __name: "FoldedLines",
4208
4228
  props: { lines: {} },
4209
4229
  setup(n) {
4210
- let o = n, c = y(!1), l = t(() => Sc(o.lines, c.value)), u = t(() => o.lines.some((e) => e.number !== void 0)), d = t(() => o.lines.some((e) => e.kind !== void 0)), f = {
4230
+ let o = n, c = y(!1), l = t(() => Tc(o.lines, c.value)), u = t(() => o.lines.some((e) => e.number !== void 0)), d = t(() => o.lines.some((e) => e.kind !== void 0)), f = {
4211
4231
  context: " ",
4212
4232
  removed: "−",
4213
4233
  added: "+"
4214
4234
  };
4215
- return (t, n) => (_(), i("div", Oc, [(_(!0), i(e, null, b(l.value, (e, t) => (_(), i("div", {
4235
+ return (t, n) => (_(), i("div", jc, [(_(!0), i(e, null, b(l.value, (e, t) => (_(), i("div", {
4216
4236
  key: t,
4217
4237
  class: "kvc-code-line",
4218
4238
  dir: u.value || d.value ? "ltr" : void 0,
4219
4239
  "data-kind": e.kind,
4220
4240
  "data-test": "call-line-row"
4221
4241
  }, [
4222
- u.value ? (_(), i("span", Ac, E(e.number), 1)) : r("v-if", !0),
4223
- d.value ? (_(), i("span", jc, E(f[e.kind ?? "context"]), 1)) : r("v-if", !0),
4224
- a("span", Mc, [s(Z, { text: e.text }, null, 8, ["text"])])
4225
- ], 8, kc))), 128)), s(Dc, {
4242
+ u.value ? (_(), i("span", Nc, E(e.number), 1)) : r("v-if", !0),
4243
+ d.value ? (_(), i("span", Pc, E(f[e.kind ?? "context"]), 1)) : r("v-if", !0),
4244
+ a("span", Fc, [s(Z, { text: e.text }, null, 8, ["text"])])
4245
+ ], 8, Mc))), 128)), s(Ac, {
4226
4246
  count: o.lines.length,
4227
4247
  open: c.value,
4228
4248
  onToggle: n[0] ||= (e) => c.value = !c.value
4229
4249
  }, null, 8, ["count", "open"])]));
4230
4250
  }
4231
- }), Pc = {
4251
+ }), Lc = {
4232
4252
  key: 0,
4233
4253
  dir: "auto",
4234
4254
  "data-test": "field-text"
4235
- }, Fc = {
4255
+ }, Rc = {
4236
4256
  key: 1,
4237
4257
  class: "kvc-muted",
4238
4258
  "data-test": "field-empty"
4239
- }, Ic = {
4259
+ }, zc = {
4240
4260
  key: 3,
4241
4261
  class: "kvc-field-table"
4242
- }, Lc = { "data-test": "field-table" }, Rc = {
4262
+ }, Bc = { "data-test": "field-table" }, Vc = {
4243
4263
  key: 4,
4244
4264
  class: "kvc-field-items",
4245
4265
  "data-test": "field-items"
4246
- }, zc = {
4266
+ }, Hc = {
4247
4267
  key: 5,
4248
4268
  class: "kvc-fields",
4249
4269
  "data-test": "call-fields"
4250
- }, Bc = ["data-name"], Vc = {
4270
+ }, Uc = ["data-name"], Wc = {
4251
4271
  class: "kvc-muted",
4252
4272
  dir: "ltr"
4253
- }, Hc = { "data-test": "field-value" }, Uc = /* @__PURE__ */ c({
4273
+ }, Gc = { "data-test": "field-value" }, Kc = /* @__PURE__ */ c({
4254
4274
  __name: "FieldsView",
4255
4275
  props: { value: {} },
4256
4276
  setup(r) {
4257
- let o = r, c = y(!1), l = t(() => o.value.kind === "table" ? Sc(o.value.rows, c.value) : []), u = t(() => o.value.kind === "items" ? Sc(o.value.items, c.value) : []);
4277
+ let o = r, c = y(!1), l = t(() => o.value.kind === "table" ? Tc(o.value.rows, c.value) : []), u = t(() => o.value.kind === "items" ? Tc(o.value.items, c.value) : []);
4258
4278
  return (t, r) => {
4259
4279
  let d = S("FieldsView", !0);
4260
- return o.value.kind === "text" ? (_(), i("span", Pc, [s(Z, { text: o.value.text }, null, 8, ["text"])])) : o.value.kind === "empty" ? (_(), i("span", Fc, "—")) : o.value.kind === "block" ? (_(), n(Nc, {
4280
+ return o.value.kind === "text" ? (_(), i("span", Lc, [s(Z, { text: o.value.text }, null, 8, ["text"])])) : o.value.kind === "empty" ? (_(), i("span", Rc, "—")) : o.value.kind === "block" ? (_(), n(Ic, {
4261
4281
  key: 2,
4262
4282
  class: "kvc-field-block",
4263
- lines: D(Cc)(o.value.text),
4283
+ lines: D(Ec)(o.value.text),
4264
4284
  "data-test": "field-block"
4265
- }, null, 8, ["lines"])) : o.value.kind === "table" ? (_(), i("div", Ic, [a("table", Lc, [a("thead", null, [a("tr", null, [(_(!0), i(e, null, b(o.value.columns, (e) => (_(), i("th", {
4285
+ }, null, 8, ["lines"])) : o.value.kind === "table" ? (_(), i("div", zc, [a("table", Bc, [a("thead", null, [a("tr", null, [(_(!0), i(e, null, b(o.value.columns, (e) => (_(), i("th", {
4266
4286
  key: e,
4267
4287
  scope: "col",
4268
4288
  dir: "ltr"
4269
4289
  }, E(e), 1))), 128))])]), a("tbody", null, [(_(!0), i(e, null, b(l.value, (t, n) => (_(), i("tr", { key: n }, [(_(!0), i(e, null, b(t, (e, t) => (_(), i("td", {
4270
4290
  key: t,
4271
4291
  dir: "auto"
4272
- }, [s(Z, { text: e }, null, 8, ["text"])]))), 128))]))), 128))])]), s(Dc, {
4292
+ }, [s(Z, { text: e }, null, 8, ["text"])]))), 128))]))), 128))])]), s(Ac, {
4273
4293
  count: o.value.rows.length,
4274
4294
  open: c.value,
4275
4295
  onToggle: r[0] ||= (e) => c.value = !c.value
4276
- }, null, 8, ["count", "open"])])) : o.value.kind === "items" ? (_(), i("div", Rc, [(_(!0), i(e, null, b(u.value, (e, t) => (_(), i("div", {
4296
+ }, null, 8, ["count", "open"])])) : o.value.kind === "items" ? (_(), i("div", Vc, [(_(!0), i(e, null, b(u.value, (e, t) => (_(), i("div", {
4277
4297
  key: t,
4278
4298
  dir: "auto"
4279
- }, [s(Z, { text: e }, null, 8, ["text"])]))), 128)), s(Dc, {
4299
+ }, [s(Z, { text: e }, null, 8, ["text"])]))), 128)), s(Ac, {
4280
4300
  count: o.value.items.length,
4281
4301
  open: c.value,
4282
4302
  onToggle: r[1] ||= (e) => c.value = !c.value
4283
- }, null, 8, ["count", "open"])])) : (_(), i("dl", zc, [(_(!0), i(e, null, b(o.value.rows, (e) => (_(), i("div", {
4303
+ }, null, 8, ["count", "open"])])) : (_(), i("dl", Hc, [(_(!0), i(e, null, b(o.value.rows, (e) => (_(), i("div", {
4284
4304
  key: e.name,
4285
4305
  class: "kvc-field-row",
4286
4306
  "data-name": e.name,
4287
4307
  "data-test": "field-row"
4288
- }, [a("dt", Vc, E(e.name), 1), a("dd", Hc, [s(d, { value: e.value }, null, 8, ["value"])])], 8, Bc))), 128))]));
4308
+ }, [a("dt", Wc, E(e.name), 1), a("dd", Gc, [s(d, { value: e.value }, null, 8, ["value"])])], 8, Uc))), 128))]));
4289
4309
  };
4290
4310
  }
4291
- }), Wc = ["aria-label"], Gc = ["aria-label"], Kc = {
4311
+ }), qc = ["aria-label"], Jc = ["aria-label"], Yc = {
4292
4312
  class: "kvc-mono",
4293
4313
  dir: "ltr",
4294
4314
  "data-test": "call-step-tool"
4295
- }, qc = { class: "kvc-step-arguments" }, Jc = ["aria-label"], Yc = /* @__PURE__ */ c({
4315
+ }, Xc = { class: "kvc-step-arguments" }, Zc = ["aria-label"], Qc = /* @__PURE__ */ c({
4296
4316
  __name: "CallRequest",
4297
4317
  props: { view: {} },
4298
4318
  setup(o) {
4299
- let c = o, l = J(), u = t(() => io(c.view)), d = t(() => c.view.fields ?? {}), f = t(() => $s(d.value).map((e) => qs(e.oldText, e.newText))), p = t(() => typeof d.value.content == "string" ? d.value.content : ""), m = t(() => typeof d.value.task == "string" ? d.value.task : ""), h = t(() => u.value === "mcp-run" ? Ys(d.value) : []), g = t(() => u.value === "mcp-call" ? Y(d.value.arguments) : u.value === "fields" ? d.value : {});
4300
- return (t, o) => u.value === "edit" ? (_(!0), i(e, { key: 0 }, b(f.value, (e, t) => (_(), n(Nc, {
4319
+ let c = o, l = J(), u = t(() => io(c.view)), d = t(() => c.view.fields ?? {}), f = t(() => nc(d.value).map((e) => Xs(e.oldText, e.newText))), p = t(() => typeof d.value.content == "string" ? d.value.content : ""), m = t(() => typeof d.value.task == "string" ? d.value.task : ""), h = t(() => u.value === "mcp-run" ? Qs(d.value) : []), g = t(() => u.value === "mcp-call" ? Y(d.value.arguments) : u.value === "fields" ? d.value : {});
4320
+ return (t, o) => u.value === "edit" ? (_(!0), i(e, { key: 0 }, b(f.value, (e, t) => (_(), n(Ic, {
4301
4321
  key: t,
4302
4322
  class: "kvc-block",
4303
4323
  lines: e,
4304
4324
  "data-test": "call-diff"
4305
- }, null, 8, ["lines"]))), 128)) : u.value === "write" ? (_(), n(Nc, {
4325
+ }, null, 8, ["lines"]))), 128)) : u.value === "write" ? (_(), n(Ic, {
4306
4326
  key: 1,
4307
4327
  class: "kvc-block",
4308
- lines: D(wc)(p.value, 1),
4328
+ lines: D(Dc)(p.value, 1),
4309
4329
  "data-test": "call-content"
4310
4330
  }, null, 8, ["lines"])) : u.value === "line" ? (_(), i("pre", {
4311
4331
  key: 2,
@@ -4313,7 +4333,7 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4313
4333
  dir: "ltr",
4314
4334
  "aria-label": D(l).t("kvcoder.ui.command"),
4315
4335
  "data-test": "call-payload"
4316
- }, "$ " + E(c.view.line), 9, Wc)) : h.value.length > 0 ? (_(), i("ol", {
4336
+ }, "$ " + E(c.view.line), 9, qc)) : h.value.length > 0 ? (_(), i("ol", {
4317
4337
  key: 3,
4318
4338
  class: "kvc-block kvc-steps",
4319
4339
  "aria-label": D(l).t("kvcoder.ui.call.payload"),
@@ -4321,10 +4341,10 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4321
4341
  }, [(_(!0), i(e, null, b(h.value, (e, t) => (_(), i("li", {
4322
4342
  key: t,
4323
4343
  "data-test": "call-step"
4324
- }, [a("span", Kc, E(e.label), 1), a("div", qc, [s(Uc, { value: D(bc)(e.arguments) }, null, 8, ["value"])])]))), 128))], 8, Gc)) : u.value === "delegate" ? (_(), n(Nc, {
4344
+ }, [a("span", Yc, E(e.label), 1), a("div", Xc, [s(Kc, { value: D(Cc)(e.arguments) }, null, 8, ["value"])])]))), 128))], 8, Jc)) : u.value === "delegate" ? (_(), n(Ic, {
4325
4345
  key: 4,
4326
4346
  class: "kvc-block kvc-prose-lines",
4327
- lines: D(Cc)(m.value),
4347
+ lines: D(Ec)(m.value),
4328
4348
  "aria-label": D(l).t("kvcoder.ui.call.task"),
4329
4349
  "data-test": "call-task"
4330
4350
  }, null, 8, ["lines", "aria-label"])) : Object.keys(g.value).length > 0 ? (_(), i("div", {
@@ -4332,19 +4352,19 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4332
4352
  class: "kvc-block",
4333
4353
  "aria-label": D(l).t("kvcoder.ui.call.payload"),
4334
4354
  "data-test": "call-payload-fields"
4335
- }, [s(Uc, { value: D(bc)(g.value) }, null, 8, ["value"])], 8, Jc)) : r("v-if", !0);
4355
+ }, [s(Kc, { value: D(Cc)(g.value) }, null, 8, ["value"])], 8, Zc)) : r("v-if", !0);
4336
4356
  }
4337
- }), Xc = { class: "kvc-output-block" }, Zc = ["aria-label"], Qc = /* @__PURE__ */ c({
4357
+ }), $c = { class: "kvc-output-block" }, el = ["aria-label"], tl = /* @__PURE__ */ c({
4338
4358
  __name: "FoldedOutput",
4339
4359
  props: { output: {} },
4340
4360
  setup(e) {
4341
- let n = e, r = J(), o = y(!1), c = t(() => n.output.split("\n")), l = t(() => Tc(c.value, o.value).join("\n"));
4342
- return (e, t) => (_(), i("div", Xc, [a("pre", {
4361
+ let n = e, r = J(), o = y(!1), c = t(() => n.output.split("\n")), l = t(() => Oc(c.value, o.value).join("\n"));
4362
+ return (e, t) => (_(), i("div", $c, [a("pre", {
4343
4363
  class: "kvc-output",
4344
4364
  dir: "auto",
4345
4365
  "aria-label": D(r).t("kvcoder.ui.output"),
4346
4366
  "data-test": "call-output"
4347
- }, [s(Z, { text: l.value }, null, 8, ["text"])], 8, Zc), s(Dc, {
4367
+ }, [s(Z, { text: l.value }, null, 8, ["text"])], 8, el), s(Ac, {
4348
4368
  count: c.value.length,
4349
4369
  open: o.value,
4350
4370
  over: D(12) + D(5),
@@ -4355,21 +4375,21 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4355
4375
  "over"
4356
4376
  ])]));
4357
4377
  }
4358
- }), $c = {
4378
+ }), nl = {
4359
4379
  class: "kvc-block kvc-run-row",
4360
4380
  "data-test": "run-row"
4361
- }, el = {
4381
+ }, rl = {
4362
4382
  class: "kvc-run-call",
4363
4383
  dir: "auto",
4364
4384
  "data-test": "run-call"
4365
- }, tl = {
4385
+ }, il = {
4366
4386
  class: "kvc-chip",
4367
4387
  "data-test": "run-status"
4368
- }, nl = {
4388
+ }, al = {
4369
4389
  key: 0,
4370
4390
  class: "kvc-muted",
4371
4391
  "data-test": "run-time"
4372
- }, rl = ["aria-label"], il = ["aria-label"], al = ["aria-label"], ol = ["aria-label"], sl = /* @__PURE__ */ c({
4392
+ }, ol = ["aria-label"], sl = ["aria-label"], cl = ["aria-label"], ll = ["aria-label"], ul = /* @__PURE__ */ c({
4373
4393
  __name: "RunOutput",
4374
4394
  props: { run: {} },
4375
4395
  setup(c) {
@@ -4379,79 +4399,79 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4379
4399
  params: { text: f.value ?? "" }
4380
4400
  }));
4381
4401
  return (t, c) => (_(), i(e, null, [
4382
- a("div", $c, [
4383
- a("span", el, E(l.run.call), 1),
4384
- a("span", tl, [o(E(D(Vs)(D(u).t, l.run.status)), 1), l.run.exitCode === void 0 ? r("v-if", !0) : (_(), i(e, { key: 0 }, [o(" · " + E(D(u).t("kvcoder.ui.exitCode", { code: l.run.exitCode })), 1)], 64))]),
4385
- l.run.ranMs === void 0 ? r("v-if", !0) : (_(), i("span", nl, E(D(qe)(D(u).t, l.run.ranMs)), 1))
4402
+ a("div", nl, [
4403
+ a("span", rl, E(l.run.call), 1),
4404
+ a("span", il, [o(E(D(Ws)(D(u).t, l.run.status)), 1), l.run.exitCode === void 0 ? r("v-if", !0) : (_(), i(e, { key: 0 }, [o(" · " + E(D(u).t("kvcoder.ui.exitCode", { code: l.run.exitCode })), 1)], 64))]),
4405
+ l.run.ranMs === void 0 ? r("v-if", !0) : (_(), i("span", al, E(D(qe)(D(u).t, l.run.ranMs)), 1))
4386
4406
  ]),
4387
4407
  p.value === void 0 ? l.run.problem === void 0 ? r("v-if", !0) : (_(), i("div", {
4388
4408
  key: 1,
4389
4409
  class: "kvc-block kvc-error",
4390
4410
  "aria-label": D(u).t("kvcoder.ui.call.error"),
4391
4411
  "data-test": "run-problem"
4392
- }, [s(Uc, { value: D(bc)(l.run.problem) }, null, 8, ["value"])], 8, il)) : (_(), i("pre", {
4412
+ }, [s(Kc, { value: D(Cc)(l.run.problem) }, null, 8, ["value"])], 8, sl)) : (_(), i("pre", {
4393
4413
  key: 0,
4394
4414
  class: "kvc-block kvc-error",
4395
4415
  dir: "auto",
4396
4416
  "aria-label": D(u).t("kvcoder.ui.call.error"),
4397
4417
  "data-test": "run-problem"
4398
- }, [s(Z, { text: p.value }, null, 8, ["text"])], 8, rl)),
4418
+ }, [s(Z, { text: p.value }, null, 8, ["text"])], 8, ol)),
4399
4419
  f.value === void 0 && l.run.output !== void 0 ? (_(), i("div", {
4400
4420
  key: 2,
4401
4421
  class: "kvc-block",
4402
4422
  "aria-label": D(u).t("kvcoder.ui.output"),
4403
4423
  "data-test": "call-result-fields"
4404
- }, [s(Uc, { value: D(bc)(l.run.output) }, null, 8, ["value"])], 8, al)) : l.run.answer && f.value ? (_(), i("div", {
4424
+ }, [s(Kc, { value: D(Cc)(l.run.output) }, null, 8, ["value"])], 8, cl)) : l.run.answer && f.value ? (_(), i("div", {
4405
4425
  key: 3,
4406
4426
  class: "kvc-block",
4407
4427
  "aria-label": D(u).t("kvcoder.ui.call.answer"),
4408
4428
  "data-test": "call-answer"
4409
- }, [(_(), n(C(D(u).View), { view: m.value }, null, 8, ["view"]))], 8, ol)) : f.value ? (_(), n(Qc, {
4429
+ }, [(_(), n(C(D(u).View), { view: m.value }, null, 8, ["view"]))], 8, ll)) : f.value ? (_(), n(tl, {
4410
4430
  key: 4,
4411
4431
  output: f.value
4412
4432
  }, null, 8, ["output"])) : r("v-if", !0)
4413
4433
  ], 64));
4414
4434
  }
4415
- }), cl = {
4435
+ }), dl = {
4416
4436
  key: 0,
4417
4437
  class: "kvc-muted kvc-call-parts",
4418
4438
  "data-test": "call-replacements"
4419
- }, ll = {
4439
+ }, fl = {
4420
4440
  key: 2,
4421
4441
  class: "kvc-block kvc-entries",
4422
4442
  "data-test": "call-entries"
4423
- }, ul = ["data-kind"], dl = {
4443
+ }, pl = ["data-kind"], ml = {
4424
4444
  class: "kvc-mono",
4425
4445
  dir: "auto",
4426
4446
  "data-test": "call-entry-name"
4427
- }, fl = {
4447
+ }, hl = {
4428
4448
  key: 0,
4429
4449
  class: "kvc-muted",
4430
4450
  "data-test": "call-entry-size"
4431
- }, pl = {
4451
+ }, gl = {
4432
4452
  key: 3,
4433
4453
  class: "kvc-block kvc-entries",
4434
4454
  "data-test": "call-paths"
4435
- }, ml = {
4455
+ }, _l = {
4436
4456
  class: "kvc-mono",
4437
4457
  dir: "auto"
4438
- }, hl = {
4458
+ }, vl = {
4439
4459
  class: "kvc-mono kvc-file-path",
4440
4460
  "data-test": "call-file-path"
4441
- }, gl = {
4461
+ }, yl = {
4442
4462
  key: 1,
4443
4463
  class: "kvc-muted kvc-call-parts",
4444
4464
  "data-test": "call-file-count"
4445
- }, _l = {
4465
+ }, bl = {
4446
4466
  class: "kvc-mono kvc-file-path",
4447
4467
  dir: "auto",
4448
4468
  "data-test": "call-file-path"
4449
- }, vl = {
4469
+ }, xl = {
4450
4470
  key: 1,
4451
4471
  class: "kvc-muted kvc-call-parts",
4452
4472
  dir: "auto",
4453
4473
  "data-test": "call-read-file-note"
4454
- }, yl = ["aria-label"], bl = ["aria-label"], xl = /* @__PURE__ */ c({
4474
+ }, Sl = ["aria-label"], Cl = ["aria-label"], wl = /* @__PURE__ */ c({
4455
4475
  __name: "CallResult",
4456
4476
  props: {
4457
4477
  view: {},
@@ -4459,7 +4479,7 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4459
4479
  result: {}
4460
4480
  },
4461
4481
  setup(o) {
4462
- let c = o, l = J(), u = t(() => io(c.view)), d = t(() => u.value === "edit" ? Ms(c.result) : void 0), f = t(() => u.value === "read" ? Ns(c.result) : void 0), p = t(() => u.value === "read-files" ? Fs(c.result) : void 0), m = (e) => e.error ?? l.t(e.state === "notRead" ? "kvcoder.ui.call.fileNotRead" : "kvcoder.ui.call.fileUnchanged"), h = t(() => u.value === "list" ? Ls(c.result) : void 0), g = t(() => u.value === "search" ? Us(c.result) : void 0), v = t(() => u.value === "find" ? Rs(c.result) : void 0), x = y(!1), S = t(() => Sc(v.value ?? [], x.value)), w = t(() => u.value === "run-output" ? Hs(c.result) : void 0), T = y(!1), O = t(() => Sc(h.value ?? [], T.value)), k = t(() => ({
4482
+ let c = o, l = J(), u = t(() => io(c.view)), d = t(() => u.value === "edit" ? Fs(c.result) : void 0), f = t(() => u.value === "read" ? Is(c.result) : void 0), p = t(() => u.value === "read-files" ? Rs(c.result) : void 0), m = (e) => e.error ?? l.t(e.state === "notRead" ? "kvcoder.ui.call.fileNotRead" : "kvcoder.ui.call.fileUnchanged"), h = t(() => u.value === "list" ? Bs(c.result) : void 0), g = t(() => u.value === "search" ? Ks(c.result) : void 0), v = t(() => u.value === "find" ? Vs(c.result) : void 0), x = y(!1), S = t(() => Tc(v.value ?? [], x.value)), w = t(() => u.value === "run-output" ? Gs(c.result) : void 0), T = y(!1), O = t(() => Tc(h.value ?? [], T.value)), k = t(() => ({
4463
4483
  type: "markdown",
4464
4484
  text: "kvcoder.markdown",
4465
4485
  params: { text: c.output }
@@ -4469,46 +4489,46 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4469
4489
  class: "kvc-block",
4470
4490
  "aria-label": D(l).t("kvcoder.ui.call.answer"),
4471
4491
  "data-test": "call-answer"
4472
- }, [(_(), n(C(D(l).View), { view: k.value }, null, 8, ["view"]))], 8, yl)) : A.value ? (_(), i("div", {
4492
+ }, [(_(), n(C(D(l).View), { view: k.value }, null, 8, ["view"]))], 8, Sl)) : A.value ? (_(), i("div", {
4473
4493
  key: 9,
4474
4494
  class: "kvc-block",
4475
4495
  "aria-label": D(l).t("kvcoder.ui.output"),
4476
4496
  "data-test": "call-result-fields"
4477
- }, [s(Uc, { value: D(bc)(c.result) }, null, 8, ["value"])], 8, bl)) : c.output === "" ? r("v-if", !0) : (_(), n(Qc, {
4497
+ }, [s(Kc, { value: D(Cc)(c.result) }, null, 8, ["value"])], 8, Cl)) : c.output === "" ? r("v-if", !0) : (_(), n(tl, {
4478
4498
  key: 10,
4479
4499
  output: c.output
4480
- }, null, 8, ["output"])) : (_(), n(sl, {
4500
+ }, null, 8, ["output"])) : (_(), n(ul, {
4481
4501
  key: 7,
4482
4502
  run: w.value
4483
4503
  }, null, 8, ["run"])) : (_(!0), i(e, { key: 5 }, b(p.value, (e, t) => (_(), i("div", {
4484
4504
  key: `${t}:${e.path}`,
4485
4505
  class: "kvc-block",
4486
4506
  "data-test": "call-read-file"
4487
- }, [a("div", _l, E(e.path), 1), e.read === void 0 ? (_(), i("p", vl, E(m(e)), 1)) : (_(), n(Nc, {
4507
+ }, [a("div", bl, E(e.path), 1), e.read === void 0 ? (_(), i("p", xl, E(m(e)), 1)) : (_(), n(Ic, {
4488
4508
  key: 0,
4489
- lines: D(wc)(e.read.content, e.read.fromLine)
4509
+ lines: D(Dc)(e.read.content, e.read.fromLine)
4490
4510
  }, null, 8, ["lines"]))]))), 128)) : (_(!0), i(e, { key: 4 }, b(g.value, (e) => (_(), i("div", {
4491
4511
  key: e.path,
4492
4512
  class: "kvc-block",
4493
4513
  "data-test": "call-file"
4494
- }, [a("div", hl, E(e.path), 1), e.matches.length > 0 ? (_(), n(Nc, {
4514
+ }, [a("div", vl, E(e.path), 1), e.matches.length > 0 ? (_(), n(Ic, {
4495
4515
  key: 0,
4496
4516
  lines: e.matches.map((e) => ({
4497
4517
  text: e.text,
4498
4518
  number: e.line
4499
4519
  }))
4500
- }, null, 8, ["lines"])) : (_(), i("p", gl, E(D(l).t("kvcoder.ui.call.matchCount", { count: e.count })), 1))]))), 128)) : (_(), i("div", pl, [(_(!0), i(e, null, b(S.value, (e) => (_(), i("div", {
4520
+ }, null, 8, ["lines"])) : (_(), i("p", yl, E(D(l).t("kvcoder.ui.call.matchCount", { count: e.count })), 1))]))), 128)) : (_(), i("div", gl, [(_(!0), i(e, null, b(S.value, (e) => (_(), i("div", {
4501
4521
  key: e,
4502
4522
  class: "kvc-entry",
4503
4523
  "data-test": "call-path"
4504
4524
  }, [s(D(ye), {
4505
4525
  size: 14,
4506
4526
  "aria-hidden": "true"
4507
- }), a("span", ml, E(e), 1)]))), 128)), s(Dc, {
4527
+ }), a("span", _l, E(e), 1)]))), 128)), s(Ac, {
4508
4528
  count: v.value.length,
4509
4529
  open: x.value,
4510
4530
  onToggle: o[1] ||= (e) => x.value = !x.value
4511
- }, null, 8, ["count", "open"])])) : (_(), i("div", ll, [(_(!0), i(e, null, b(O.value, (e) => (_(), i("div", {
4531
+ }, null, 8, ["count", "open"])])) : (_(), i("div", fl, [(_(!0), i(e, null, b(O.value, (e) => (_(), i("div", {
4512
4532
  key: e.name,
4513
4533
  class: "kvc-entry",
4514
4534
  "data-kind": e.kind,
@@ -4518,40 +4538,40 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4518
4538
  size: 14,
4519
4539
  "aria-hidden": "true"
4520
4540
  })),
4521
- a("span", dl, E(e.name), 1),
4522
- e.kind === "file" ? (_(), i("span", fl, E(D(Qs)(D(l).t, e.bytes)), 1)) : r("v-if", !0)
4523
- ], 8, ul))), 128)), s(Dc, {
4541
+ a("span", ml, E(e.name), 1),
4542
+ e.kind === "file" ? (_(), i("span", hl, E(D(tc)(D(l).t, e.bytes)), 1)) : r("v-if", !0)
4543
+ ], 8, pl))), 128)), s(Ac, {
4524
4544
  count: h.value.length,
4525
4545
  open: T.value,
4526
4546
  onToggle: o[0] ||= (e) => T.value = !T.value
4527
- }, null, 8, ["count", "open"])])) : (_(), n(Nc, {
4547
+ }, null, 8, ["count", "open"])])) : (_(), n(Ic, {
4528
4548
  key: 1,
4529
4549
  class: "kvc-block",
4530
- lines: D(wc)(f.value.content, f.value.fromLine),
4550
+ lines: D(Dc)(f.value.content, f.value.fromLine),
4531
4551
  "data-test": "call-content"
4532
- }, null, 8, ["lines"])) : (_(), i("p", cl, E(D(l).t("kvcoder.ui.call.replacements", {
4552
+ }, null, 8, ["lines"])) : (_(), i("p", dl, E(D(l).t("kvcoder.ui.call.replacements", {
4533
4553
  count: d.value.replacements,
4534
4554
  line: d.value.firstChangedLine
4535
4555
  })), 1));
4536
4556
  }
4537
- }), Sl = {
4557
+ }), Tl = {
4538
4558
  key: 0,
4539
4559
  class: "kvc-summary",
4540
4560
  "data-test": "call-summary"
4541
- }, Cl = {
4561
+ }, El = {
4542
4562
  key: 0,
4543
4563
  "data-test": "call-words"
4544
- }, wl = {
4564
+ }, Dl = {
4545
4565
  key: 1,
4546
4566
  class: "kvc-mono",
4547
4567
  "data-test": "call-subject"
4548
- }, Tl = ["dir"], El = {
4568
+ }, Ol = ["dir"], kl = {
4549
4569
  key: 1,
4550
4570
  class: "kvc-muted",
4551
4571
  dir: "ltr",
4552
4572
  style: { "align-self": "flex-start" },
4553
4573
  "data-test": "call-label"
4554
- }, Dl = /* @__PURE__ */ c({
4574
+ }, Al = /* @__PURE__ */ c({
4555
4575
  __name: "CallSummaryLine",
4556
4576
  props: {
4557
4577
  view: {},
@@ -4559,50 +4579,50 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4559
4579
  whole: { type: Boolean }
4560
4580
  },
4561
4581
  setup(e) {
4562
- let n = e, a = J(), o = t(() => fc(a.t, n.view, n.result)), s = t(() => /\p{L}/u.test(o.value?.outcome ?? "") ? void 0 : "ltr"), c = t(() => o.value?.subject === void 0 || n.whole === !0 ? o.value?.subject : ao(o.value.subject));
4563
- return (e, t) => o.value === void 0 ? n.view.label ? (_(), i("span", El, E(n.view.label), 1)) : r("v-if", !0) : (_(), i("span", Sl, [
4564
- o.value.words ? (_(), i("span", Cl, E(o.value.words), 1)) : r("v-if", !0),
4565
- c.value ? (_(), i("span", wl, E(c.value), 1)) : r("v-if", !0),
4582
+ let n = e, a = J(), o = t(() => hc(a.t, n.view, n.result)), s = t(() => /\p{L}/u.test(o.value?.outcome ?? "") ? void 0 : "ltr"), c = t(() => o.value?.subject === void 0 || n.whole === !0 ? o.value?.subject : ao(o.value.subject));
4583
+ return (e, t) => o.value === void 0 ? n.view.label ? (_(), i("span", kl, E(n.view.label), 1)) : r("v-if", !0) : (_(), i("span", Tl, [
4584
+ o.value.words ? (_(), i("span", El, E(o.value.words), 1)) : r("v-if", !0),
4585
+ c.value ? (_(), i("span", Dl, E(c.value), 1)) : r("v-if", !0),
4566
4586
  o.value.outcome ? (_(), i("span", {
4567
4587
  key: 2,
4568
4588
  class: "kvc-muted",
4569
4589
  dir: s.value,
4570
4590
  "data-test": "call-outcome"
4571
- }, E(o.value.outcome), 9, Tl)) : r("v-if", !0)
4591
+ }, E(o.value.outcome), 9, Ol)) : r("v-if", !0)
4572
4592
  ]));
4573
4593
  }
4574
- }), Ol = ["aria-expanded", "disabled"], kl = ["aria-label"], Al = { class: "kvc-lines" }, jl = {
4594
+ }), jl = ["aria-expanded", "disabled"], Ml = ["aria-label"], Nl = { class: "kvc-lines" }, Pl = {
4575
4595
  key: 0,
4576
4596
  style: { "font-weight": "600" },
4577
4597
  "data-test": "call-description"
4578
- }, Ml = {
4598
+ }, Fl = {
4579
4599
  key: 1,
4580
4600
  class: "kvc-oneline",
4581
4601
  "data-test": "call-line"
4582
- }, Nl = { class: "kvc-mono" }, Pl = {
4602
+ }, Il = { class: "kvc-mono" }, Ll = {
4583
4603
  key: 2,
4584
4604
  class: "kvc-chip kvc-warn",
4585
4605
  "data-test": "call-risky"
4586
- }, Fl = {
4606
+ }, Rl = {
4587
4607
  key: 3,
4588
4608
  class: "kvc-chip",
4589
4609
  "data-test": "call-background"
4590
- }, Il = {
4610
+ }, zl = {
4591
4611
  key: 4,
4592
4612
  class: "kvc-chip",
4593
4613
  "data-test": "call-not-run"
4594
- }, Ll = {
4614
+ }, Bl = {
4595
4615
  key: 5,
4596
4616
  class: "kvc-chip kvc-danger",
4597
4617
  "data-test": "call-failed"
4598
- }, Rl = {
4618
+ }, Vl = {
4599
4619
  class: "kvc-muted",
4600
4620
  "data-test": "call-time"
4601
- }, zl = {
4621
+ }, Hl = {
4602
4622
  key: 0,
4603
4623
  class: "kvc-muted kvc-call-parts",
4604
4624
  "data-test": "call-parts"
4605
- }, Bl = ["aria-expanded"], Vl = ["aria-label"], Hl = /* @__PURE__ */ c({
4625
+ }, Ul = ["aria-expanded"], Wl = ["aria-label"], Gl = /* @__PURE__ */ c({
4606
4626
  __name: "CallCard",
4607
4627
  props: {
4608
4628
  view: {},
@@ -4615,7 +4635,7 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4615
4635
  let c = o, l = J(), u = t(() => io(c.view)), d = y(!1), p = y(!1), m = t(() => c.failed === !0 && c.output !== void 0 ? qo(c.output) : void 0), h = t(() => m.value?.kind === "invalid"), g = t(() => {
4616
4636
  let e = m.value;
4617
4637
  return e === void 0 ? "" : e.kind === "error" ? e.message : l.t(`kvcoder.ui.failure.${e.kind}`);
4618
- }), v = t(() => c.failed === !0 ? void 0 : Xs(c.output)), b = t(() => c.failed === !0 && u.value !== "line"), x = t(() => c.durationMs === void 0 ? "" : qe(l.t, (c.view.writtenMs ?? 0) + c.durationMs)), S = t(() => {
4638
+ }), v = t(() => c.failed === !0 ? void 0 : $s(c.output)), b = t(() => c.failed === !0 && u.value !== "line"), x = t(() => c.durationMs === void 0 ? "" : qe(l.t, (c.view.writtenMs ?? 0) + c.durationMs)), S = t(() => {
4619
4639
  if (c.durationMs === void 0) return "";
4620
4640
  let e = qe(l.t, c.durationMs);
4621
4641
  return c.view.writtenMs === void 0 ? l.t("kvcoder.ui.callRan", { ran: e }) : l.t("kvcoder.ui.callParts", {
@@ -4641,14 +4661,14 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4641
4661
  key: 0,
4642
4662
  class: "kvc-spin",
4643
4663
  "aria-label": D(l).t("kvcoder.ui.running")
4644
- }, null, 8, kl)) : (_(), n(C(d.value ? D(G) : D(ce)), {
4664
+ }, null, 8, Ml)) : (_(), n(C(d.value ? D(G) : D(ce)), {
4645
4665
  key: 1,
4646
4666
  size: 16,
4647
4667
  "aria-hidden": "true"
4648
4668
  })),
4649
- a("span", Al, [
4650
- c.view.description ? (_(), i("span", jl, E(c.view.description), 1)) : c.view.connector === void 0 && c.view.line ? (_(), i("span", Ml, [a("span", Nl, E(D(ao)(c.view.line)), 1)])) : r("v-if", !0),
4651
- s(Dl, {
4669
+ a("span", Nl, [
4670
+ c.view.description ? (_(), i("span", Pl, E(c.view.description), 1)) : c.view.connector === void 0 && c.view.line ? (_(), i("span", Fl, [a("span", Il, E(D(ao)(c.view.line)), 1)])) : r("v-if", !0),
4671
+ s(Al, {
4652
4672
  view: c.view,
4653
4673
  result: v.value
4654
4674
  }, null, 8, ["view", "result"]),
@@ -4659,22 +4679,22 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4659
4679
  "data-test": "call-reason"
4660
4680
  }, E(g.value), 3))
4661
4681
  ]),
4662
- c.view.risky ? (_(), i("span", Pl, E(D(l).t("kvcoder.ui.call.risky")), 1)) : r("v-if", !0),
4663
- c.view.background ? (_(), i("span", Fl, E(D(l).t("kvcoder.ui.jobs.background")), 1)) : r("v-if", !0),
4664
- h.value ? (_(), i("span", Il, E(D(l).t("kvcoder.ui.callNotRun")), 1)) : c.failed ? (_(), i("span", Ll, E(D(l).t("kvcoder.ui.callFailed")), 1)) : r("v-if", !0),
4665
- a("span", Rl, E(x.value), 1)
4666
- ], 8, Ol), d.value && c.output !== void 0 ? (_(), i(e, { key: 0 }, [S.value === "" ? r("v-if", !0) : (_(), i("p", zl, E(S.value), 1)), b.value ? (_(), i(e, { key: 1 }, [a("button", {
4682
+ c.view.risky ? (_(), i("span", Ll, E(D(l).t("kvcoder.ui.call.risky")), 1)) : r("v-if", !0),
4683
+ c.view.background ? (_(), i("span", Rl, E(D(l).t("kvcoder.ui.jobs.background")), 1)) : r("v-if", !0),
4684
+ h.value ? (_(), i("span", zl, E(D(l).t("kvcoder.ui.callNotRun")), 1)) : c.failed ? (_(), i("span", Bl, E(D(l).t("kvcoder.ui.callFailed")), 1)) : r("v-if", !0),
4685
+ a("span", Vl, E(x.value), 1)
4686
+ ], 8, jl), d.value && c.output !== void 0 ? (_(), i(e, { key: 0 }, [S.value === "" ? r("v-if", !0) : (_(), i("p", Hl, E(S.value), 1)), b.value ? (_(), i(e, { key: 1 }, [a("button", {
4667
4687
  type: "button",
4668
4688
  class: "kvc-text-button kvc-fold",
4669
4689
  "aria-expanded": p.value,
4670
4690
  "data-test": "call-details",
4671
4691
  onClick: o[1] ||= (e) => p.value = !p.value
4672
- }, E(D(l).t(p.value ? "kvcoder.ui.call.hideDetails" : "kvcoder.ui.call.showDetails")), 9, Bl), p.value ? (_(), i(e, { key: 0 }, [a("pre", {
4692
+ }, E(D(l).t(p.value ? "kvcoder.ui.call.hideDetails" : "kvcoder.ui.call.showDetails")), 9, Ul), p.value ? (_(), i(e, { key: 0 }, [a("pre", {
4673
4693
  class: "kvc-block kvc-error",
4674
4694
  dir: "auto",
4675
4695
  "aria-label": D(l).t("kvcoder.ui.call.error"),
4676
4696
  "data-test": "call-error"
4677
- }, [s(Z, { text: c.output }, null, 8, ["text"])], 8, Vl), s(Yc, { view: c.view }, null, 8, ["view"])], 64)) : r("v-if", !0)], 64)) : (_(), i(e, { key: 2 }, [s(Yc, { view: c.view }, null, 8, ["view"]), s(xl, {
4697
+ }, [s(Z, { text: c.output }, null, 8, ["text"])], 8, Wl), s(Qc, { view: c.view }, null, 8, ["view"])], 64)) : r("v-if", !0)], 64)) : (_(), i(e, { key: 2 }, [s(Qc, { view: c.view }, null, 8, ["view"]), s(wl, {
4678
4698
  view: c.view,
4679
4699
  output: c.output,
4680
4700
  result: v.value
@@ -4684,59 +4704,59 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4684
4704
  "result"
4685
4705
  ])], 64))], 64)) : r("v-if", !0)], 2));
4686
4706
  }
4687
- }), Ul = {
4707
+ }), Kl = {
4688
4708
  key: 0,
4689
4709
  class: "kvc-card",
4690
4710
  "data-test": "background-result"
4691
- }, Wl = { class: "kvc-card-row" }, Gl = {
4711
+ }, ql = { class: "kvc-card-row" }, Jl = {
4692
4712
  style: {
4693
4713
  flex: "1 1 auto",
4694
4714
  "min-inline-size": "0"
4695
4715
  },
4696
4716
  "data-test": "background-title"
4697
- }, Kl = {
4717
+ }, Yl = {
4698
4718
  key: 0,
4699
4719
  class: "kvc-muted",
4700
4720
  "data-test": "background-time"
4701
- }, ql = { class: "kvc-output" }, Jl = {
4721
+ }, Xl = { class: "kvc-output" }, Zl = {
4702
4722
  key: 1,
4703
4723
  class: "kvc-card",
4704
4724
  "data-test": "kvcoder-hint"
4705
- }, Yl = { class: "kvc-card-row" }, Xl = { class: "kvc-card-body kvc-muted" }, Zl = {
4725
+ }, Ql = { class: "kvc-card-row" }, $l = { class: "kvc-card-body kvc-muted" }, eu = {
4706
4726
  key: 0,
4707
4727
  style: {
4708
4728
  display: "flex",
4709
4729
  gap: "6px",
4710
4730
  "margin-block-start": "6px"
4711
4731
  }
4712
- }, Ql = ["src", "alt"], $l = {
4732
+ }, tu = ["src", "alt"], nu = {
4713
4733
  key: 1,
4714
4734
  class: "kvc-muted",
4715
4735
  style: { display: "block" },
4716
4736
  "data-test": "queued"
4717
- }, eu = ["data-final"], tu = {
4737
+ }, ru = ["data-final"], iu = {
4718
4738
  key: 0,
4719
4739
  "data-test": "thinking"
4720
- }, nu = { class: "kvc-muted" }, ru = {
4740
+ }, au = { class: "kvc-muted" }, ou = {
4721
4741
  class: "kvc-muted",
4722
4742
  style: { "white-space": "pre-wrap" }
4723
- }, iu = {
4743
+ }, su = {
4724
4744
  key: 6,
4725
4745
  "data-test": "extension-card"
4726
- }, au = {
4746
+ }, cu = {
4727
4747
  key: 8,
4728
4748
  class: "kvc-notice",
4729
4749
  "data-test": "notice"
4730
- }, ou = {
4750
+ }, lu = {
4731
4751
  key: 9,
4732
4752
  class: "kvc-card kvc-card-row",
4733
4753
  role: "note",
4734
4754
  "data-test": "note"
4735
- }, su = {
4755
+ }, uu = {
4736
4756
  key: 10,
4737
4757
  class: "kvc-card",
4738
4758
  "data-test": "summary"
4739
- }, cu = { class: "kvc-card-row" }, lu = { class: "kvc-card-body" }, uu = /* @__PURE__ */ c({
4759
+ }, du = { class: "kvc-card-row" }, fu = { class: "kvc-card-body" }, pu = /* @__PURE__ */ c({
4740
4760
  __name: "MessageItem",
4741
4761
  props: {
4742
4762
  message: {},
@@ -4767,24 +4787,24 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4767
4787
  text: "kvcoder.markdown",
4768
4788
  params: { text: e }
4769
4789
  });
4770
- return (t, c) => D(Mo)(u.message) ? (_(), i("div", Ul, [a("details", null, [a("summary", Wl, [
4790
+ return (t, c) => D(Mo)(u.message) ? (_(), i("div", Kl, [a("details", null, [a("summary", ql, [
4771
4791
  s(D(oe), {
4772
4792
  size: 16,
4773
4793
  "aria-hidden": "true"
4774
4794
  }),
4775
- a("span", Gl, E(S.value), 1),
4776
- w.value === void 0 ? r("v-if", !0) : (_(), i("span", Kl, E(w.value), 1))
4777
- ]), a("pre", ql, E(m.value), 1)])])) : D(jo)(u.message) ? (_(), i("div", Jl, [a("details", null, [a("summary", Yl, [s(D(xe), {
4795
+ a("span", Jl, E(S.value), 1),
4796
+ w.value === void 0 ? r("v-if", !0) : (_(), i("span", Yl, E(w.value), 1))
4797
+ ]), a("pre", Xl, E(m.value), 1)])])) : D(jo)(u.message) ? (_(), i("div", Zl, [a("details", null, [a("summary", Ql, [s(D(xe), {
4778
4798
  size: 16,
4779
4799
  "aria-hidden": "true"
4780
- }), o(E(D(p).t("kvcoder.ui.toModel")), 1)]), a("div", Xl, E(m.value), 1)])])) : u.message.kind === "user" ? (_(), i("div", {
4800
+ }), o(E(D(p).t("kvcoder.ui.toModel")), 1)]), a("div", $l, E(m.value), 1)])])) : u.message.kind === "user" ? (_(), i("div", {
4781
4801
  key: 2,
4782
4802
  dir: "auto",
4783
4803
  class: f(["kvc-user", { "kvc-queued": u.message.queued }]),
4784
4804
  "data-test": "user-message"
4785
4805
  }, [
4786
4806
  a("span", null, E(D(Lo)(m.value, D(p).t("kvcoder.ui.attachedFiles"))), 1),
4787
- u.message.fileIds ? (_(), i("span", Zl, [(_(!0), i(e, null, b(u.message.fileIds, (e) => (_(), i("img", {
4807
+ u.message.fileIds ? (_(), i("span", eu, [(_(!0), i(e, null, b(u.message.fileIds, (e) => (_(), i("img", {
4788
4808
  key: e,
4789
4809
  src: A(e),
4790
4810
  alt: D(p).t("kvcoder.ui.attachment"),
@@ -4792,8 +4812,8 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4792
4812
  "block-size": "48px",
4793
4813
  "border-radius": "6px"
4794
4814
  }
4795
- }, null, 8, Ql))), 128))])) : r("v-if", !0),
4796
- u.message.queued ? (_(), i("span", $l, E(D(p).t("kvcoder.ui.queued")), 1)) : u.message.source?.kind === "user" && D(zo)(m.value).trim() !== "" ? (_(), n(ss, {
4815
+ }, null, 8, tu))), 128))])) : r("v-if", !0),
4816
+ u.message.queued ? (_(), i("span", nu, E(D(p).t("kvcoder.ui.queued")), 1)) : u.message.source?.kind === "user" && D(zo)(m.value).trim() !== "" ? (_(), n(us, {
4797
4817
  key: 2,
4798
4818
  text: D(zo)(m.value).trim()
4799
4819
  }, null, 8, ["text"])) : r("v-if", !0)
@@ -4802,10 +4822,10 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4802
4822
  class: f(["kvc-answer", { "kvc-final": u.final === !0 && m.value !== "" }]),
4803
4823
  "data-final": u.final === !0 && m.value !== "" ? "true" : void 0,
4804
4824
  "data-test": "assistant-message"
4805
- }, [h.value === "" ? r("v-if", !0) : (_(), i("details", tu, [a("summary", nu, E(D(p).t("kvcoder.ui.thought")), 1), a("p", ru, E(h.value), 1)])), m.value === "" ? r("v-if", !0) : (_(), n(C(D(p).View), {
4825
+ }, [h.value === "" ? r("v-if", !0) : (_(), i("details", iu, [a("summary", au, E(D(p).t("kvcoder.ui.thought")), 1), a("p", ou, E(h.value), 1)])), m.value === "" ? r("v-if", !0) : (_(), n(C(D(p).View), {
4806
4826
  key: 1,
4807
4827
  view: j(m.value)
4808
- }, null, 8, ["view"]))], 10, eu)) : u.message.kind === "toolResult" && v.value !== void 0 ? (_(), n(js, {
4828
+ }, null, 8, ["view"]))], 10, ru)) : u.message.kind === "toolResult" && v.value !== void 0 ? (_(), n(Ps, {
4809
4829
  key: 4,
4810
4830
  id: v.value.id,
4811
4831
  title: v.value.title,
@@ -4817,7 +4837,7 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4817
4837
  "title",
4818
4838
  "format",
4819
4839
  "version"
4820
- ])) : T.value === void 0 ? y.value === void 0 ? u.message.kind === "toolResult" ? (_(), i(e, { key: 7 }, [s(Hl, {
4840
+ ])) : T.value === void 0 ? y.value === void 0 ? u.message.kind === "toolResult" ? (_(), i(e, { key: 7 }, [s(Gl, {
4821
4841
  view: g.value,
4822
4842
  failed: g.value.failed,
4823
4843
  "duration-ms": g.value.durationMs,
@@ -4831,33 +4851,33 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4831
4851
  key: 0,
4832
4852
  "session-id": u.message.sessionId,
4833
4853
  "run-id": x.value
4834
- }, null, 8, ["session-id", "run-id"]))], 64)) : u.message.kind === "notice" ? (_(), i("div", au, E(O.value), 1)) : u.message.kind === "note" ? (_(), i("div", ou, [s(D(Ce), {
4854
+ }, null, 8, ["session-id", "run-id"]))], 64)) : u.message.kind === "notice" ? (_(), i("div", cu, E(O.value), 1)) : u.message.kind === "note" ? (_(), i("div", lu, [s(D(Ce), {
4835
4855
  size: 18,
4836
4856
  "aria-hidden": "true"
4837
- }), o(E(k.value), 1)])) : u.message.kind === "summary" ? (_(), i("details", su, [a("summary", cu, [s(D(Oe), {
4857
+ }), o(E(k.value), 1)])) : u.message.kind === "summary" ? (_(), i("details", uu, [a("summary", du, [s(D(Oe), {
4838
4858
  size: 16,
4839
4859
  "aria-hidden": "true"
4840
- }), o(E(D(p).t("kvcoder.ui.summarized")), 1)]), a("div", lu, [(_(), n(C(D(p).View), { view: j(String(u.message.content.text ?? "")) }, null, 8, ["view"]))])])) : r("v-if", !0) : (_(), i("div", iu, [(_(), n(C(D(p).View), { view: {
4860
+ }), o(E(D(p).t("kvcoder.ui.summarized")), 1)]), a("div", fu, [(_(), n(C(D(p).View), { view: j(String(u.message.content.text ?? "")) }, null, 8, ["view"]))])])) : r("v-if", !0) : (_(), i("div", su, [(_(), n(C(D(p).View), { view: {
4841
4861
  type: "custom",
4842
4862
  component: y.value.component,
4843
4863
  props: y.value.props
4844
- } }, null, 8, ["view"]))])) : (_(), n(Es, {
4864
+ } }, null, 8, ["view"]))])) : (_(), n(ks, {
4845
4865
  key: 5,
4846
4866
  answered: T.value
4847
4867
  }, null, 8, ["answered"]));
4848
4868
  }
4849
- }), du = ["aria-expanded"], fu = {
4850
- class: "kvc-oneline",
4851
- style: { flex: "1 1 auto" },
4852
- "data-test": "call-fold-words"
4853
- }, pu = {
4869
+ }), mu = ["aria-expanded"], hu = { class: "kvc-oneline kvc-fold-words" }, gu = { "data-test": "call-fold-words" }, _u = {
4870
+ key: 0,
4871
+ class: "kvc-fold-failed",
4872
+ "data-test": "call-fold-failed"
4873
+ }, vu = {
4854
4874
  class: "kvc-muted",
4855
4875
  "data-test": "call-fold-time"
4856
- }, mu = {
4876
+ }, yu = {
4857
4877
  key: 0,
4858
4878
  class: "kvc-fold-body",
4859
4879
  "data-test": "call-fold-body"
4860
- }, hu = /* @__PURE__ */ c({
4880
+ }, bu = /* @__PURE__ */ c({
4861
4881
  __name: "CallFold",
4862
4882
  props: {
4863
4883
  messages: {},
@@ -4866,9 +4886,9 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4866
4886
  running: { type: Boolean }
4867
4887
  },
4868
4888
  setup(o) {
4869
- let s = o, c = J(), l = t(() => es(s.messages, s.calls)), u = t(() => l.value.failed || s.running), d = y(u.value);
4870
- return A(u, (e) => {
4871
- e && (d.value = !0);
4889
+ let s = o, c = J(), l = t(() => ns(s.messages, s.calls)), u = t(() => is(c.t, l.value.tally)), d = t(() => l.value.failed || s.running), p = y(d.value);
4890
+ return A(d, (e) => {
4891
+ e && (p.value = !0);
4872
4892
  }), (t, o) => (_(), i("div", {
4873
4893
  class: f(["kvc-card kvc-fold-group", { "kvc-failed": l.value.failed }]),
4874
4894
  "data-test": "call-fold"
@@ -4879,17 +4899,17 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4879
4899
  "inline-size": "100%",
4880
4900
  "border-radius": "0"
4881
4901
  },
4882
- "aria-expanded": d.value,
4902
+ "aria-expanded": p.value,
4883
4903
  "data-test": "call-fold-head",
4884
- onClick: o[0] ||= (e) => d.value = !d.value
4904
+ onClick: o[0] ||= (e) => p.value = !p.value
4885
4905
  }, [
4886
- (_(), n(C(d.value ? D(G) : D(ce)), {
4906
+ (_(), n(C(p.value ? D(G) : D(ce)), {
4887
4907
  size: 16,
4888
4908
  "aria-hidden": "true"
4889
4909
  })),
4890
- a("span", fu, E(D(ts)(D(c).t, l.value.tally)), 1),
4891
- a("span", pu, E(D(qe)(D(c).t, l.value.ms)), 1)
4892
- ], 8, du), d.value ? (_(), i("div", mu, [(_(!0), i(e, null, b(s.messages, (e) => (_(), n(uu, {
4910
+ a("span", hu, [a("span", gu, E(u.value.words), 1), u.value.failed === void 0 ? r("v-if", !0) : (_(), i("span", _u, " · " + E(u.value.failed), 1))]),
4911
+ a("span", vu, E(D(qe)(D(c).t, l.value.ms)), 1)
4912
+ ], 8, mu), p.value ? (_(), i("div", yu, [(_(!0), i(e, null, b(s.messages, (e) => (_(), n(pu, {
4893
4913
  key: e.id,
4894
4914
  message: e,
4895
4915
  calls: s.calls,
@@ -4900,50 +4920,50 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4900
4920
  "finished-runs"
4901
4921
  ]))), 128))])) : r("v-if", !0)], 2));
4902
4922
  }
4903
- }), gu = {
4923
+ }), xu = {
4904
4924
  class: "kvc-card kvc-ask",
4905
4925
  "data-test": "approvals-card"
4906
- }, _u = {
4926
+ }, Su = {
4907
4927
  class: "kvc-card-row",
4908
4928
  style: { "font-weight": "600" }
4909
- }, vu = ["data-test"], yu = { class: "kvc-card-row" }, bu = { class: "kvc-lines" }, xu = {
4929
+ }, Cu = ["data-test"], wu = { class: "kvc-card-row" }, Tu = { class: "kvc-lines" }, Eu = {
4910
4930
  key: 0,
4911
4931
  style: { "font-weight": "600" },
4912
4932
  "data-test": "call-description"
4913
- }, Su = {
4933
+ }, Du = {
4914
4934
  key: 2,
4915
4935
  dir: "ltr",
4916
4936
  style: { "align-self": "flex-start" },
4917
4937
  "data-test": "call-subject"
4918
- }, Cu = {
4938
+ }, Ou = {
4919
4939
  key: 3,
4920
4940
  class: "kvc-chip",
4921
4941
  style: { "align-self": "flex-start" },
4922
4942
  "data-test": "call-background"
4923
- }, wu = {
4943
+ }, ku = {
4924
4944
  class: "kvc-card-row kvc-always",
4925
4945
  "data-test": "always"
4926
- }, Tu = ["aria-expanded", "onClick"], Eu = ["for"], Du = [
4946
+ }, Au = ["aria-expanded", "onClick"], ju = ["for"], Mu = [
4927
4947
  "id",
4928
4948
  "value",
4929
4949
  "onInput"
4930
- ], Ou = ["disabled", "onClick"], ku = ["onClick"], Au = {
4950
+ ], Nu = ["disabled", "onClick"], Pu = ["onClick"], Fu = {
4931
4951
  key: 1,
4932
4952
  class: "kvc-card-row kvc-reason",
4933
4953
  "data-test": "deny-reason"
4934
- }, ju = [
4954
+ }, Iu = [
4935
4955
  "value",
4936
4956
  "aria-label",
4937
4957
  "placeholder",
4938
4958
  "onInput"
4939
- ], Mu = ["onClick"], Nu = {
4959
+ ], Lu = ["onClick"], Ru = {
4940
4960
  class: "kvc-card-row kvc-actions",
4941
4961
  "data-test": "decision-actions"
4942
- }, Pu = ["onClick"], Fu = ["onClick"], Iu = {
4962
+ }, zu = ["onClick"], Bu = ["onClick"], Vu = {
4943
4963
  key: 0,
4944
4964
  class: "kvc-card-row kvc-actions",
4945
4965
  style: { "border-block-start": "1px solid var(--kv-color-border)" }
4946
- }, Lu = /* @__PURE__ */ c({
4966
+ }, Hu = /* @__PURE__ */ c({
4947
4967
  __name: "ApprovalsCard",
4948
4968
  props: { approvals: {} },
4949
4969
  emits: ["decide"],
@@ -4980,8 +5000,8 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4980
5000
  ...t === "" ? {} : { reason: t }
4981
5001
  });
4982
5002
  }
4983
- return (t, c) => (_(), i("section", gu, [
4984
- a("div", _u, [s(D(Ae), {
5003
+ return (t, c) => (_(), i("section", xu, [
5004
+ a("div", Su, [s(D(Ae), {
4985
5005
  size: 18,
4986
5006
  "aria-hidden": "true"
4987
5007
  }), o(E(D(d).t("kvcoder.ui.allowCommands", { count: l.approvals.length })), 1)]),
@@ -4990,30 +5010,30 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
4990
5010
  class: "kvc-approval",
4991
5011
  "data-test": `approval-${t.questionId}`
4992
5012
  }, [
4993
- a("div", yu, [a("span", bu, [
4994
- t.view.description ? (_(), i("span", xu, E(t.view.description), 1)) : r("v-if", !0),
4995
- t.view.connector === void 0 ? t.view.line ? (_(), i("span", Su, [a("span", { class: f(["kvc-mono", { "kvc-muted": t.view.description }]) }, E(t.view.line), 3)])) : r("v-if", !0) : (_(), n(Dl, {
5013
+ a("div", wu, [a("span", Tu, [
5014
+ t.view.description ? (_(), i("span", Eu, E(t.view.description), 1)) : r("v-if", !0),
5015
+ t.view.connector === void 0 ? t.view.line ? (_(), i("span", Du, [a("span", { class: f(["kvc-mono", { "kvc-muted": t.view.description }]) }, E(t.view.line), 3)])) : r("v-if", !0) : (_(), n(Al, {
4996
5016
  key: 1,
4997
5017
  view: t.view,
4998
5018
  whole: ""
4999
5019
  }, null, 8, ["view"])),
5000
- t.view.background ? (_(), i("span", Cu, E(D(d).t("kvcoder.ui.jobs.inBackground")), 1)) : r("v-if", !0)
5020
+ t.view.background ? (_(), i("span", Ou, E(D(d).t("kvcoder.ui.jobs.inBackground")), 1)) : r("v-if", !0)
5001
5021
  ])]),
5002
- D(io)(t.view) === "line" ? r("v-if", !0) : (_(), n(Yc, {
5022
+ D(io)(t.view) === "line" ? r("v-if", !0) : (_(), n(Qc, {
5003
5023
  key: 0,
5004
5024
  view: t.view
5005
5025
  }, null, 8, ["view"])),
5006
- a("div", wu, [a("button", {
5026
+ a("div", ku, [a("button", {
5007
5027
  type: "button",
5008
5028
  class: "kvc-link-button",
5009
5029
  "aria-expanded": x.has(t.questionId),
5010
5030
  "data-test": "deny-why",
5011
5031
  onClick: (e) => x.has(t.questionId) ? x.delete(t.questionId) : x.set(t.questionId, "")
5012
- }, E(D(d).t("kvcoder.ui.approval.denyWhy")), 9, Tu), h(t.view) === "line" ? (_(), i(e, { key: 0 }, [
5032
+ }, E(D(d).t("kvcoder.ui.approval.denyWhy")), 9, Au), h(t.view) === "line" ? (_(), i(e, { key: 0 }, [
5013
5033
  a("label", {
5014
5034
  class: "kvc-muted",
5015
5035
  for: `always-${t.questionId}`
5016
- }, E(D(d).t("kvcoder.ui.approval.alwaysLine")), 9, Eu),
5036
+ }, E(D(d).t("kvcoder.ui.approval.alwaysLine")), 9, ju),
5017
5037
  a("input", {
5018
5038
  id: `always-${t.questionId}`,
5019
5039
  value: S(t),
@@ -5021,22 +5041,22 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
5021
5041
  dir: "ltr",
5022
5042
  "data-test": "always-prefix",
5023
5043
  onInput: (e) => y.set(t.questionId, e.target.value)
5024
- }, null, 40, Du),
5044
+ }, null, 40, Mu),
5025
5045
  a("button", {
5026
5046
  type: "button",
5027
5047
  class: "kvc-button",
5028
5048
  disabled: S(t).trim() === "",
5029
5049
  "data-test": "always-allow",
5030
5050
  onClick: (e) => C(t)
5031
- }, E(D(d).t("kvcoder.ui.approval.always")), 9, Ou)
5051
+ }, E(D(d).t("kvcoder.ui.approval.always")), 9, Nu)
5032
5052
  ], 64)) : h(t.view) === "files" ? (_(), i("button", {
5033
5053
  key: 1,
5034
5054
  type: "button",
5035
5055
  class: "kvc-button",
5036
5056
  "data-test": "always-allow",
5037
5057
  onClick: (e) => C(t)
5038
- }, E(D(d).t("kvcoder.ui.approval.alwaysFiles")), 9, ku)) : r("v-if", !0)]),
5039
- x.has(t.questionId) ? (_(), i("div", Au, [a("textarea", {
5058
+ }, E(D(d).t("kvcoder.ui.approval.alwaysFiles")), 9, Pu)) : r("v-if", !0)]),
5059
+ x.has(t.questionId) ? (_(), i("div", Fu, [a("textarea", {
5040
5060
  value: x.get(t.questionId),
5041
5061
  class: "kvc-field",
5042
5062
  rows: "2",
@@ -5045,25 +5065,25 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
5045
5065
  placeholder: D(d).t("kvcoder.ui.approval.reason"),
5046
5066
  "data-test": "deny-reason-text",
5047
5067
  onInput: (e) => x.set(t.questionId, e.target.value)
5048
- }, null, 40, ju), a("button", {
5068
+ }, null, 40, Iu), a("button", {
5049
5069
  type: "button",
5050
5070
  class: "kvc-button",
5051
5071
  "data-test": "deny-reason-send",
5052
5072
  onClick: (e) => w(t)
5053
- }, E(D(d).t("kvcoder.ui.deny")), 9, Mu)])) : r("v-if", !0),
5054
- a("div", Nu, [a("button", {
5073
+ }, E(D(d).t("kvcoder.ui.deny")), 9, Lu)])) : r("v-if", !0),
5074
+ a("div", Ru, [a("button", {
5055
5075
  type: "button",
5056
5076
  class: "kvc-button",
5057
5077
  "data-test": "deny",
5058
5078
  onClick: (e) => p([t], !1)
5059
- }, E(D(d).t("kvcoder.ui.deny")), 9, Pu), a("button", {
5079
+ }, E(D(d).t("kvcoder.ui.deny")), 9, zu), a("button", {
5060
5080
  type: "button",
5061
5081
  class: "kvc-button kvc-primary",
5062
5082
  "data-test": "allow",
5063
5083
  onClick: (e) => p([t], !0)
5064
- }, E(D(d).t("kvcoder.ui.allow")), 9, Fu)])
5065
- ], 8, vu))), 128)),
5066
- l.approvals.length > 1 ? (_(), i("div", Iu, [a("button", {
5084
+ }, E(D(d).t("kvcoder.ui.allow")), 9, Bu)])
5085
+ ], 8, Cu))), 128)),
5086
+ l.approvals.length > 1 ? (_(), i("div", Vu, [a("button", {
5067
5087
  type: "button",
5068
5088
  class: "kvc-button",
5069
5089
  "data-test": "deny-all",
@@ -5076,13 +5096,13 @@ var Ec = ["aria-expanded"], Dc = /* @__PURE__ */ c({
5076
5096
  }, E(D(d).t("kvcoder.ui.allowAll")), 1)])) : r("v-if", !0)
5077
5097
  ]));
5078
5098
  }
5079
- }), Ru = /* @__PURE__ */ new Map();
5080
- function zu(e) {
5081
- let t = Ru.get(e);
5082
- return t === void 0 && (t = v(/* @__PURE__ */ new Map()), Ru.set(e, t)), t;
5099
+ }), Uu = /* @__PURE__ */ new Map();
5100
+ function Wu(e) {
5101
+ let t = Uu.get(e);
5102
+ return t === void 0 && (t = v(/* @__PURE__ */ new Map()), Uu.set(e, t)), t;
5083
5103
  }
5084
- function Bu(e, t, n) {
5085
- let r = zu(e), i = r.get(t);
5104
+ function Gu(e, t, n) {
5105
+ let r = Wu(e), i = r.get(t);
5086
5106
  return i === void 0 ? (i = v({
5087
5107
  text: "",
5088
5108
  selected: [],
@@ -5093,55 +5113,55 @@ function Bu(e, t, n) {
5093
5113
  owner: n
5094
5114
  }), r.set(t, i)) : n !== void 0 && i.owner === void 0 && (i.owner = n), i;
5095
5115
  }
5096
- var Vu = (e, t, n) => zu(e).get(t) === n, Hu = (e) => new Set([...zu(e)].filter(([, e]) => e.settled).map(([e]) => e));
5097
- function Uu(e) {
5116
+ var Ku = (e, t, n) => Wu(e).get(t) === n, qu = (e) => new Set([...Wu(e)].filter(([, e]) => e.settled).map(([e]) => e));
5117
+ function Ju(e) {
5098
5118
  e.text = "", e.selected = [], e.other = "", e.error = void 0, e.sending = !1, e.settled = !0;
5099
5119
  }
5100
- function Wu(e, t, n) {
5101
- let r = zu(e);
5120
+ function Yu(e, t, n) {
5121
+ let r = Wu(e);
5102
5122
  for (let [e, i] of r) {
5103
5123
  if (i.owner?.sessionId !== t) continue;
5104
5124
  let a = n.find((e) => e.id === i.owner?.turnId && e.sessionId === t);
5105
- a !== void 0 && (a.outcome === void 0 && a.endedAt === void 0 && a.pending.some((t) => t.questionId === e) || (Uu(i), r.delete(e)));
5125
+ a !== void 0 && (a.outcome === void 0 && a.endedAt === void 0 && a.pending.some((t) => t.questionId === e) || (Ju(i), r.delete(e)));
5106
5126
  }
5107
5127
  }
5108
5128
  //#endregion
5109
5129
  //#region web/src/QuestionCard.vue?vue&type=script&setup=true&lang.ts
5110
- var Gu = ["aria-label", "aria-busy"], Ku = {
5130
+ var Xu = ["aria-label", "aria-busy"], Zu = {
5111
5131
  class: "kvc-card-row",
5112
5132
  style: { "font-weight": "600" }
5113
- }, qu = { dir: "auto" }, Ju = { class: "kvc-card-body" }, Yu = {
5133
+ }, Qu = { dir: "auto" }, $u = { class: "kvc-card-body" }, ed = {
5114
5134
  key: 0,
5115
5135
  role: "status",
5116
5136
  "data-test": "answer-sending"
5117
- }, Xu = {
5137
+ }, td = {
5118
5138
  key: 1,
5119
5139
  role: "alert",
5120
5140
  "data-test": "answer-error"
5121
- }, Zu = [
5141
+ }, nd = [
5122
5142
  "disabled",
5123
5143
  "placeholder",
5124
5144
  "aria-label"
5125
- ], Qu = { class: "kvc-actions" }, $u = ["disabled"], ed = ["disabled"], td = ["data-test"], nd = [
5145
+ ], rd = { class: "kvc-actions" }, id = ["disabled"], ad = ["disabled"], od = ["data-test"], sd = [
5126
5146
  "type",
5127
5147
  "checked",
5128
5148
  "disabled",
5129
5149
  "name",
5130
5150
  "onChange"
5131
- ], rd = { style: {
5151
+ ], cd = { style: {
5132
5152
  display: "flex",
5133
5153
  "flex-direction": "column"
5134
- } }, id = { style: { "font-weight": "500" } }, ad = {
5154
+ } }, ld = { style: { "font-weight": "500" } }, ud = {
5135
5155
  key: 0,
5136
5156
  class: "kvc-muted"
5137
- }, od = [
5157
+ }, dd = [
5138
5158
  "disabled",
5139
5159
  "placeholder",
5140
5160
  "aria-label"
5141
- ], sd = { class: "kvc-actions" }, cd = ["disabled"], ld = ["disabled"], ud = {
5161
+ ], fd = { class: "kvc-actions" }, pd = ["disabled"], md = ["disabled"], hd = {
5142
5162
  key: 4,
5143
5163
  class: "kvc-actions"
5144
- }, dd = ["disabled"], fd = ["disabled"], pd = /* @__PURE__ */ c({
5164
+ }, gd = ["disabled"], _d = ["disabled"], vd = /* @__PURE__ */ c({
5145
5165
  __name: "QuestionCard",
5146
5166
  props: {
5147
5167
  questionId: {},
@@ -5150,7 +5170,7 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5150
5170
  },
5151
5171
  emits: ["answer"],
5152
5172
  setup(n, { emit: o }) {
5153
- let c = n, l = o, u = J(), d = t(() => String(c.question.kind ?? "text")), p = t(() => String(c.question.prompt ?? "")), m = t(() => cs(c.question)), h = t(() => c.question.multiple === !0), g = t(() => c.question.other === !0), v = t(() => Bu(u.workspace.value.id, c.questionId, c.owner)), y = t(() => $e(u.t, v.value.error));
5173
+ let c = n, l = o, u = J(), d = t(() => String(c.question.kind ?? "text")), p = t(() => String(c.question.prompt ?? "")), m = t(() => ds(c.question)), h = t(() => c.question.multiple === !0), g = t(() => c.question.other === !0), v = t(() => Gu(u.workspace.value.id, c.questionId, c.owner)), y = t(() => $e(u.t, v.value.error));
5154
5174
  function x(e) {
5155
5175
  !v.value.sending && !v.value.settled && l("answer", {
5156
5176
  questionId: c.questionId,
@@ -5173,12 +5193,12 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5173
5193
  "data-test": "question-card",
5174
5194
  "aria-label": p.value,
5175
5195
  "aria-busy": v.value.sending
5176
- }, [a("div", Ku, [s(D(ue), {
5196
+ }, [a("div", Zu, [s(D(ue), {
5177
5197
  size: 18,
5178
5198
  "aria-hidden": "true"
5179
- }), a("span", qu, E(p.value), 1)]), a("div", Ju, [
5180
- v.value.sending ? (_(), i("p", Yu, E(D(u).t("kvcoder.ui.answerSending")), 1)) : r("v-if", !0),
5181
- v.value.error === void 0 ? r("v-if", !0) : (_(), i("p", Xu, E(D(u).t("kvcoder.ui.answerFailed", { error: y.value })), 1)),
5199
+ }), a("span", Qu, E(p.value), 1)]), a("div", $u, [
5200
+ v.value.sending ? (_(), i("p", ed, E(D(u).t("kvcoder.ui.answerSending")), 1)) : r("v-if", !0),
5201
+ v.value.error === void 0 ? r("v-if", !0) : (_(), i("p", td, E(D(u).t("kvcoder.ui.answerFailed", { error: y.value })), 1)),
5182
5202
  d.value === "text" ? (_(), i(e, { key: 2 }, [M(a("input", {
5183
5203
  "onUpdate:modelValue": n[0] ||= (e) => v.value.text = e,
5184
5204
  disabled: v.value.sending,
@@ -5188,19 +5208,19 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5188
5208
  "aria-label": p.value,
5189
5209
  "data-test": "answer-text",
5190
5210
  onKeydown: n[1] ||= N(P((e) => x({ text: v.value.text }), ["prevent"]), ["enter"])
5191
- }, null, 40, Zu), [[k, v.value.text]]), a("div", Qu, [a("button", {
5211
+ }, null, 40, nd), [[k, v.value.text]]), a("div", rd, [a("button", {
5192
5212
  type: "button",
5193
5213
  disabled: v.value.sending,
5194
5214
  class: "kvc-button",
5195
5215
  "data-test": "skip",
5196
5216
  onClick: n[2] ||= (e) => x({ dismissed: !0 })
5197
- }, E(D(u).t("kvcoder.ui.skip")), 9, $u), a("button", {
5217
+ }, E(D(u).t("kvcoder.ui.skip")), 9, id), a("button", {
5198
5218
  type: "button",
5199
5219
  disabled: v.value.sending,
5200
5220
  class: "kvc-button kvc-primary",
5201
5221
  "data-test": "answer",
5202
5222
  onClick: n[3] ||= (e) => x({ text: v.value.text })
5203
- }, E(D(u).t(v.value.error === void 0 ? "kvcoder.ui.answer" : "kvcoder.ui.tryAgain")), 9, ed)])], 64)) : d.value === "choice" ? (_(), i(e, { key: 3 }, [
5223
+ }, E(D(u).t(v.value.error === void 0 ? "kvcoder.ui.answer" : "kvcoder.ui.tryAgain")), 9, ad)])], 64)) : d.value === "choice" ? (_(), i(e, { key: 3 }, [
5204
5224
  (_(!0), i(e, null, b(m.value, (e) => (_(), i("label", {
5205
5225
  key: e.id,
5206
5226
  class: "kvc-option",
@@ -5211,7 +5231,7 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5211
5231
  disabled: v.value.sending,
5212
5232
  name: c.questionId,
5213
5233
  onChange: (t) => S(e.id)
5214
- }, null, 40, nd), a("span", rd, [a("span", id, E(e.label), 1), e.description ? (_(), i("span", ad, E(e.description), 1)) : r("v-if", !0)])], 8, td))), 128)),
5234
+ }, null, 40, sd), a("span", cd, [a("span", ld, E(e.label), 1), e.description ? (_(), i("span", ud, E(e.description), 1)) : r("v-if", !0)])], 8, od))), 128)),
5215
5235
  g.value ? M((_(), i("input", {
5216
5236
  key: 0,
5217
5237
  "onUpdate:modelValue": n[4] ||= (e) => v.value.other = e,
@@ -5220,36 +5240,36 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5220
5240
  placeholder: D(u).t("kvcoder.ui.other"),
5221
5241
  "aria-label": D(u).t("kvcoder.ui.other"),
5222
5242
  "data-test": "answer-other"
5223
- }, null, 8, od)), [[k, v.value.other]]) : r("v-if", !0),
5224
- a("div", sd, [a("button", {
5243
+ }, null, 8, dd)), [[k, v.value.other]]) : r("v-if", !0),
5244
+ a("div", fd, [a("button", {
5225
5245
  type: "button",
5226
5246
  disabled: v.value.sending,
5227
5247
  class: "kvc-button",
5228
5248
  "data-test": "skip",
5229
5249
  onClick: n[5] ||= (e) => x({ dismissed: !0 })
5230
- }, E(D(u).t("kvcoder.ui.skip")), 9, cd), a("button", {
5250
+ }, E(D(u).t("kvcoder.ui.skip")), 9, pd), a("button", {
5231
5251
  type: "button",
5232
5252
  class: "kvc-button kvc-primary",
5233
5253
  disabled: v.value.sending || v.value.selected.length === 0 && v.value.other.trim() === "",
5234
5254
  "data-test": "answer",
5235
5255
  onClick: C
5236
- }, E(D(u).t(v.value.error === void 0 ? "kvcoder.ui.answer" : "kvcoder.ui.tryAgain")), 9, ld)])
5237
- ], 64)) : (_(), i("div", ud, [a("button", {
5256
+ }, E(D(u).t(v.value.error === void 0 ? "kvcoder.ui.answer" : "kvcoder.ui.tryAgain")), 9, md)])
5257
+ ], 64)) : (_(), i("div", hd, [a("button", {
5238
5258
  type: "button",
5239
5259
  disabled: v.value.sending,
5240
5260
  class: "kvc-button",
5241
5261
  "data-test": "answer-no",
5242
5262
  onClick: n[6] ||= (e) => x({ confirmed: !1 })
5243
- }, E(D(u).t("kvcoder.ui.no")), 9, dd), a("button", {
5263
+ }, E(D(u).t("kvcoder.ui.no")), 9, gd), a("button", {
5244
5264
  type: "button",
5245
5265
  disabled: v.value.sending,
5246
5266
  class: f(["kvc-button kvc-primary", { "kvc-danger": c.question.danger === !0 }]),
5247
5267
  "data-test": "answer-yes",
5248
5268
  onClick: n[7] ||= (e) => x({ confirmed: !0 })
5249
- }, E(D(u).t("kvcoder.ui.yes")), 11, fd)]))
5250
- ])], 8, Gu));
5269
+ }, E(D(u).t("kvcoder.ui.yes")), 11, _d)]))
5270
+ ])], 8, Xu));
5251
5271
  }
5252
- }), md = /* @__PURE__ */ c({
5272
+ }), yd = /* @__PURE__ */ c({
5253
5273
  __name: "PendingCards",
5254
5274
  props: {
5255
5275
  pending: {},
@@ -5265,7 +5285,7 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5265
5285
  questionId: String(e.questionId),
5266
5286
  view: no(Y(e.question))
5267
5287
  })));
5268
- return (t, a) => (_(), i(e, null, [(_(!0), i(e, null, b(u.value, (e) => (_(), n(pd, {
5288
+ return (t, a) => (_(), i(e, null, [(_(!0), i(e, null, b(u.value, (e) => (_(), n(vd, {
5269
5289
  key: e.questionId,
5270
5290
  "question-id": e.questionId,
5271
5291
  question: e.question,
@@ -5275,7 +5295,7 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5275
5295
  "question-id",
5276
5296
  "question",
5277
5297
  "owner"
5278
- ]))), 128)), d.value.length > 0 ? (_(), n(Lu, {
5298
+ ]))), 128)), d.value.length > 0 ? (_(), n(Hu, {
5279
5299
  key: 0,
5280
5300
  approvals: d.value,
5281
5301
  onDecide: a[1] ||= (e) => c("decide", {
@@ -5287,7 +5307,7 @@ var Gu = ["aria-label", "aria-busy"], Ku = {
5287
5307
  });
5288
5308
  //#endregion
5289
5309
  //#region web/src/use-model-groups.ts
5290
- function hd(e, t, n) {
5310
+ function bd(e, t, n) {
5291
5311
  let r = y([]);
5292
5312
  return h(async () => {
5293
5313
  try {
@@ -5300,10 +5320,10 @@ function hd(e, t, n) {
5300
5320
  }
5301
5321
  //#endregion
5302
5322
  //#region web/src/RecoveryActions.vue?vue&type=script&setup=true&lang.ts
5303
- var gd = {
5323
+ var xd = {
5304
5324
  class: "kvc-recovery",
5305
5325
  "data-test": "recovery"
5306
- }, _d = ["disabled"], vd = { class: "kvc-recovery-picker" }, yd = ["disabled"], bd = /* @__PURE__ */ c({
5326
+ }, Sd = ["disabled"], Cd = { class: "kvc-recovery-picker" }, wd = ["disabled"], Td = /* @__PURE__ */ c({
5307
5327
  __name: "RecoveryActions",
5308
5328
  props: {
5309
5329
  sessionId: {},
@@ -5311,7 +5331,7 @@ var gd = {
5311
5331
  },
5312
5332
  emits: ["sent"],
5313
5333
  setup(e, { emit: n }) {
5314
- let c = e, l = n, u = J(), d = hd(u, () => null, (e) => X(u, e));
5334
+ let c = e, l = n, u = J(), d = bd(u, () => null, (e) => X(u, e));
5315
5335
  async function f() {
5316
5336
  await u.exec("kvcoder.turn.retry", { sessionId: c.sessionId }), l("sent");
5317
5337
  }
@@ -5338,7 +5358,7 @@ var gd = {
5338
5358
  model: e
5339
5359
  }), await zi(u, e), await f();
5340
5360
  });
5341
- return (e, t) => (_(), i("div", gd, [
5361
+ return (e, t) => (_(), i("div", xd, [
5342
5362
  g.value ? r("v-if", !0) : (_(), i("button", {
5343
5363
  key: 0,
5344
5364
  type: "button",
@@ -5349,8 +5369,8 @@ var gd = {
5349
5369
  }, [s(D(De), {
5350
5370
  size: 14,
5351
5371
  "aria-hidden": "true"
5352
- }), o(E(D(u).t("kvcoder.ui.retry")), 1)], 8, _d)),
5353
- a("div", vd, [s(Fi, {
5372
+ }), o(E(D(u).t("kvcoder.ui.retry")), 1)], 8, Sd)),
5373
+ a("div", Cd, [s(Fi, {
5354
5374
  groups: D(d),
5355
5375
  current: null,
5356
5376
  empty: D(u).t("kvcoder.ui.chooseAnotherModel"),
@@ -5366,30 +5386,30 @@ var gd = {
5366
5386
  }, [s(D(De), {
5367
5387
  size: 14,
5368
5388
  "aria-hidden": "true"
5369
- }), o(E(D(u).t("kvcoder.ui.retry")), 1)], 8, yd)) : r("v-if", !0)
5389
+ }), o(E(D(u).t("kvcoder.ui.retry")), 1)], 8, wd)) : r("v-if", !0)
5370
5390
  ]));
5371
5391
  }
5372
- }), xd = {
5392
+ }), Ed = {
5373
5393
  class: "kvc-column",
5374
5394
  "data-test": "prompt-tab"
5375
- }, Sd = { style: {
5395
+ }, Dd = { style: {
5376
5396
  display: "flex",
5377
5397
  "align-items": "center",
5378
5398
  gap: "10px"
5379
- } }, Cd = { style: { flex: "1 1 auto" } }, wd = {
5399
+ } }, Od = { style: { flex: "1 1 auto" } }, kd = {
5380
5400
  key: 0,
5381
5401
  style: {
5382
5402
  margin: "0",
5383
5403
  "padding-inline-start": "20px"
5384
5404
  }
5385
- }, Td = {
5405
+ }, Ad = {
5386
5406
  key: 0,
5387
5407
  class: "kvc-chip kvc-warn"
5388
- }, Ed = {
5408
+ }, jd = {
5389
5409
  key: 1,
5390
5410
  class: "kvc-prompt",
5391
5411
  "data-test": "prompt-text"
5392
- }, Dd = /* @__PURE__ */ c({
5412
+ }, Md = /* @__PURE__ */ c({
5393
5413
  __name: "PromptTab",
5394
5414
  props: { sessionId: {} },
5395
5415
  emits: ["back"],
@@ -5405,8 +5425,8 @@ var gd = {
5405
5425
  async function f() {
5406
5426
  d.value !== null && (await navigator.clipboard.writeText(d.value.prompt), u.toast("kvcoder.ui.copied", {}, "success"));
5407
5427
  }
5408
- return (t, n) => (_(), i("div", xd, [
5409
- a("div", Sd, [
5428
+ return (t, n) => (_(), i("div", Ed, [
5429
+ a("div", Dd, [
5410
5430
  a("button", {
5411
5431
  type: "button",
5412
5432
  class: "kvc-button",
@@ -5417,7 +5437,7 @@ var gd = {
5417
5437
  class: "kvc-flip",
5418
5438
  "aria-hidden": "true"
5419
5439
  }), o(E(D(u).t("kvcoder.ui.showChat")), 1)]),
5420
- a("strong", Cd, E(D(u).t("kvcoder.ui.promptTitle")), 1),
5440
+ a("strong", Od, E(D(u).t("kvcoder.ui.promptTitle")), 1),
5421
5441
  a("button", {
5422
5442
  type: "button",
5423
5443
  class: "kvc-button",
@@ -5425,7 +5445,7 @@ var gd = {
5425
5445
  onClick: f
5426
5446
  }, [s(D(K), { size: 16 }), o(E(D(u).t("kvcoder.ui.copy")), 1)])
5427
5447
  ]),
5428
- d.value ? (_(), i("ul", wd, [(_(!0), i(e, null, b(d.value.sections, (e) => (_(), i("li", {
5448
+ d.value ? (_(), i("ul", kd, [(_(!0), i(e, null, b(d.value.sections, (e) => (_(), i("li", {
5429
5449
  key: `${e.owner}/${e.id}`,
5430
5450
  class: "kvc-muted",
5431
5451
  "data-test": "prompt-section"
@@ -5434,14 +5454,14 @@ var gd = {
5434
5454
  owner: e.owner,
5435
5455
  reach: D(u).t(`kvcoder.ui.reach.${e.reach}`),
5436
5456
  size: e.size
5437
- })) + " ", 1), e.included ? r("v-if", !0) : (_(), i("span", Td, E(D(u).t("kvcoder.ui.leftOut")), 1))]))), 128))])) : r("v-if", !0),
5438
- d.value ? (_(), i("pre", Ed, E(d.value.prompt), 1)) : r("v-if", !0)
5457
+ })) + " ", 1), e.included ? r("v-if", !0) : (_(), i("span", Ad, E(D(u).t("kvcoder.ui.leftOut")), 1))]))), 128))])) : r("v-if", !0),
5458
+ d.value ? (_(), i("pre", jd, E(d.value.prompt), 1)) : r("v-if", !0)
5439
5459
  ]));
5440
5460
  }
5441
5461
  });
5442
5462
  //#endregion
5443
5463
  //#region web/src/use-session-actions.ts
5444
- function Od(e, t, n) {
5464
+ function Nd(e, t, n) {
5445
5465
  let r = T();
5446
5466
  async function i(t) {
5447
5467
  try {
@@ -5504,12 +5524,12 @@ function Od(e, t, n) {
5504
5524
  }
5505
5525
  //#endregion
5506
5526
  //#region web/src/SessionModel.vue
5507
- var kd = /* @__PURE__ */ c({
5527
+ var Pd = /* @__PURE__ */ c({
5508
5528
  __name: "SessionModel",
5509
5529
  props: { session: {} },
5510
5530
  emits: ["changed"],
5511
5531
  setup(e, { emit: t }) {
5512
- let r = e, i = t, a = J(), o = hd(a, () => r.session.model, (e) => X(a, e)), s = Od(a, () => r.session.id, () => i("changed"));
5532
+ let r = e, i = t, a = J(), o = bd(a, () => r.session.model, (e) => X(a, e)), s = Nd(a, () => r.session.id, () => i("changed"));
5513
5533
  return (e, t) => (_(), n(Ri, {
5514
5534
  groups: D(o),
5515
5535
  model: r.session.model ?? null,
@@ -5525,32 +5545,32 @@ var kd = /* @__PURE__ */ c({
5525
5545
  "decides"
5526
5546
  ]));
5527
5547
  }
5528
- }), Ad = ["aria-label"], jd = { class: "kvc-card-row" }, Md = {
5548
+ }), Fd = ["aria-label"], Id = { class: "kvc-card-row" }, Ld = {
5529
5549
  key: 0,
5530
5550
  class: "kvc-chip kvc-mono",
5531
5551
  "data-test": "subagent-worker"
5532
- }, Nd = { class: "kvc-lines" }, Pd = {
5552
+ }, Rd = { class: "kvc-lines" }, zd = {
5533
5553
  style: { "font-weight": "600" },
5534
5554
  "data-test": "subagent-title"
5535
- }, Fd = {
5555
+ }, Bd = {
5536
5556
  key: 0,
5537
5557
  class: "kvc-muted kvc-oneline",
5538
5558
  dir: "auto",
5539
5559
  "data-test": "subagent-task"
5540
- }, Id = {
5560
+ }, Vd = {
5541
5561
  key: 1,
5542
5562
  class: "kvc-spin"
5543
- }, Ld = {
5563
+ }, Hd = {
5544
5564
  key: 0,
5545
5565
  class: "kvc-card-body"
5546
- }, Rd = {
5566
+ }, Ud = {
5547
5567
  key: 0,
5548
5568
  class: "kvc-muted",
5549
5569
  style: {
5550
5570
  margin: "0",
5551
5571
  "white-space": "pre-wrap"
5552
5572
  }
5553
- }, zd = /* @__PURE__ */ c({
5573
+ }, Wd = /* @__PURE__ */ c({
5554
5574
  __name: "SubagentCard",
5555
5575
  props: {
5556
5576
  child: {},
@@ -5564,16 +5584,16 @@ var kd = /* @__PURE__ */ c({
5564
5584
  class: "kvc-card",
5565
5585
  "data-test": "subagent-card",
5566
5586
  "aria-label": D(Xe)(D(l).t, o.child.session.title)
5567
- }, [a("div", jd, [
5587
+ }, [a("div", Id, [
5568
5588
  s(D(U), {
5569
5589
  size: 18,
5570
5590
  "aria-hidden": "true"
5571
5591
  }),
5572
- o.child.session.worker === void 0 ? r("v-if", !0) : (_(), i("span", Md, E(o.child.session.worker), 1)),
5573
- a("span", Nd, [a("span", Pd, E(D(Xe)(D(l).t, o.child.session.title)), 1), u.value ? (_(), i("span", Fd, E(u.value), 1)) : r("v-if", !0)]),
5574
- o.child.session.status === "running" ? (_(), i("span", Id)) : r("v-if", !0),
5592
+ o.child.session.worker === void 0 ? r("v-if", !0) : (_(), i("span", Ld, E(o.child.session.worker), 1)),
5593
+ a("span", Rd, [a("span", zd, E(D(Xe)(D(l).t, o.child.session.title)), 1), u.value ? (_(), i("span", Bd, E(u.value), 1)) : r("v-if", !0)]),
5594
+ o.child.session.status === "running" ? (_(), i("span", Vd)) : r("v-if", !0),
5575
5595
  a("span", { class: f(["kvc-chip", { "kvc-warn": o.child.session.status === "waiting" }]) }, E(d.value), 3)
5576
- ]), o.child.live.text !== "" || (o.child.turn?.pending.length ?? 0) > 0 ? (_(), i("div", Ld, [o.child.live.text === "" ? r("v-if", !0) : (_(), i("p", Rd, E(o.child.live.text), 1)), s(md, {
5596
+ ]), o.child.live.text !== "" || (o.child.turn?.pending.length ?? 0) > 0 ? (_(), i("div", Hd, [o.child.live.text === "" ? r("v-if", !0) : (_(), i("p", Ud, E(o.child.live.text), 1)), s(yd, {
5577
5597
  owner: o.child.turn === void 0 ? void 0 : {
5578
5598
  sessionId: o.child.session.id,
5579
5599
  turnId: o.child.turn.id
@@ -5586,22 +5606,22 @@ var kd = /* @__PURE__ */ c({
5586
5606
  "owner",
5587
5607
  "pending",
5588
5608
  "hidden"
5589
- ])])) : r("v-if", !0)], 8, Ad));
5609
+ ])])) : r("v-if", !0)], 8, Fd));
5590
5610
  }
5591
- }), Bd = ["aria-label"], Vd = { class: "kvc-card-row" }, Hd = {
5611
+ }), Gd = ["aria-label"], Kd = { class: "kvc-card-row" }, qd = {
5592
5612
  class: "kvc-chip kvc-mono",
5593
5613
  "data-test": "worker-card-name"
5594
- }, Ud = {
5614
+ }, Jd = {
5595
5615
  style: {
5596
5616
  flex: "1 1 auto",
5597
5617
  "font-weight": "500"
5598
5618
  },
5599
5619
  dir: "auto",
5600
5620
  "data-test": "worker-card-call"
5601
- }, Wd = {
5621
+ }, Yd = {
5602
5622
  class: "kvc-chip",
5603
5623
  "data-test": "worker-card-time"
5604
- }, Gd = ["disabled"], Kd = /* @__PURE__ */ c({
5624
+ }, Xd = ["disabled"], Zd = /* @__PURE__ */ c({
5605
5625
  __name: "WorkerCard",
5606
5626
  props: {
5607
5627
  sessionId: {},
@@ -5637,25 +5657,25 @@ var kd = /* @__PURE__ */ c({
5637
5657
  class: "kvc-card",
5638
5658
  "data-test": "worker-card",
5639
5659
  "aria-label": o.value.title
5640
- }, [a("div", Vd, [
5660
+ }, [a("div", Kd, [
5641
5661
  s(D(U), {
5642
5662
  size: 18,
5643
5663
  "aria-hidden": "true"
5644
5664
  }),
5645
- a("span", Hd, E(o.value.title), 1),
5646
- a("span", Ud, E(o.value.call), 1),
5665
+ a("span", qd, E(o.value.title), 1),
5666
+ a("span", Jd, E(o.value.call), 1),
5647
5667
  t[0] ||= a("span", { class: "kvc-spin" }, null, -1),
5648
- a("span", Wd, E(D(n).t("kvcoder.ui.jobs.status.running")) + " · " + E(D(fa)(D(n).t, c.value - Date.parse(o.value.startedAt))), 1),
5668
+ a("span", Yd, E(D(n).t("kvcoder.ui.jobs.status.running")) + " · " + E(D(fa)(D(n).t, c.value - Date.parse(o.value.startedAt))), 1),
5649
5669
  a("button", {
5650
5670
  type: "button",
5651
5671
  class: "kvc-button",
5652
5672
  disabled: l.value,
5653
5673
  "data-test": "worker-card-stop",
5654
5674
  onClick: d
5655
- }, E(D(n).t("kvcoder.ui.jobs.stop")), 9, Gd)
5656
- ])], 8, Bd));
5675
+ }, E(D(n).t("kvcoder.ui.jobs.stop")), 9, Xd)
5676
+ ])], 8, Gd));
5657
5677
  }
5658
- }), qd = (e) => {
5678
+ }), Qd = (e) => {
5659
5679
  let t = e.view.description ?? e.view.line;
5660
5680
  return {
5661
5681
  name: "run",
@@ -5664,8 +5684,8 @@ var kd = /* @__PURE__ */ c({
5664
5684
  complete: !0
5665
5685
  };
5666
5686
  };
5667
- function Jd(e, n, r) {
5668
- let i = t(() => Hu(e.workspace.value.id)), a = /* @__PURE__ */ new Map(), o = 0, s = !1;
5687
+ function $d(e, n, r) {
5688
+ let i = t(() => qu(e.workspace.value.id)), a = /* @__PURE__ */ new Map(), o = 0, s = !1;
5669
5689
  A([
5670
5690
  () => e.workspace.value.id,
5671
5691
  () => r()?.sessionId,
@@ -5678,7 +5698,7 @@ function Jd(e, n, r) {
5678
5698
  async function c(t, r) {
5679
5699
  let i = e.workspace.value.id, c = o, l = () => !s && o === c && e.workspace.value.id === i, u = t.map((e) => ({
5680
5700
  item: e,
5681
- draft: Bu(i, e.questionId, r)
5701
+ draft: Gu(i, e.questionId, r)
5682
5702
  }));
5683
5703
  if (u.some(({ draft: e }) => e.sending)) return;
5684
5704
  let d = u.filter(({ draft: e }) => !e.settled);
@@ -5686,18 +5706,18 @@ function Jd(e, n, r) {
5686
5706
  let f = null;
5687
5707
  for (let [t, { item: n, draft: r }] of d.entries()) {
5688
5708
  if (!l()) {
5689
- for (let e of d.slice(t)) Vu(i, e.item.questionId, e.draft) && (e.draft.sending = !1);
5709
+ for (let e of d.slice(t)) Ku(i, e.item.questionId, e.draft) && (e.draft.sending = !1);
5690
5710
  return;
5691
5711
  }
5692
- if (Vu(i, n.questionId, r)) try {
5693
- f = (await e.exec("kvcoder.question.answer", n)).jobId ?? f, Vu(i, n.questionId, r) && Uu(r);
5712
+ if (Ku(i, n.questionId, r)) try {
5713
+ f = (await e.exec("kvcoder.question.answer", n)).jobId ?? f, Ku(i, n.questionId, r) && Ju(r);
5694
5714
  } catch (o) {
5695
5715
  if (Qe(o)?.code === "kvcoder/QUESTION_NOT_FOUND") {
5696
- Vu(i, n.questionId, r) && (r.sending = !1);
5716
+ Ku(i, n.questionId, r) && (r.sending = !1);
5697
5717
  continue;
5698
5718
  }
5699
- for (let e of d.slice(t)) Vu(i, e.item.questionId, e.draft) && (e.draft.sending = !1, e.draft === r && (e.draft.error = o)), a.delete(e.item.questionId);
5700
- l() && Vu(i, n.questionId, r) && X(e, o);
5719
+ for (let e of d.slice(t)) Ku(i, e.item.questionId, e.draft) && (e.draft.sending = !1, e.draft === r && (e.draft.error = o)), a.delete(e.item.questionId);
5720
+ l() && Ku(i, n.questionId, r) && X(e, o);
5701
5721
  return;
5702
5722
  }
5703
5723
  }
@@ -5711,7 +5731,7 @@ function Jd(e, n, r) {
5711
5731
  hidden: i,
5712
5732
  answer: (e) => c([e]),
5713
5733
  decide: ({ approvals: e, confirmed: t, owner: n, remember: r, reason: i }) => {
5714
- if (t) for (let t of e) a.set(t.questionId, qd(t));
5734
+ if (t) for (let t of e) a.set(t.questionId, Qd(t));
5715
5735
  let o = {
5716
5736
  ...r === void 0 ? {} : { remember: r },
5717
5737
  ...i === void 0 ? {} : { reason: i }
@@ -5726,8 +5746,8 @@ function Jd(e, n, r) {
5726
5746
  }
5727
5747
  //#endregion
5728
5748
  //#region web/src/use-artifacts.ts
5729
- var Yd = (e) => `${e.version} ${e.updatedAt}`;
5730
- function Xd(e, t, n, r) {
5749
+ var ef = (e) => `${e.version} ${e.updatedAt}`;
5750
+ function tf(e, t, n, r) {
5731
5751
  let i = y([]), a = y(void 0), o = y(void 0), s = y(!1), c = y(void 0), l = /* @__PURE__ */ new Map(), u, d = !1, f = 0, p = !1;
5732
5752
  function g(e) {
5733
5753
  u = e, d = !1, l.clear(), c.value = void 0, i.value = [], a.value = void 0, o.value = void 0, s.value = !1;
@@ -5764,7 +5784,7 @@ function Xd(e, t, n, r) {
5764
5784
  if (p || m !== f || t() !== n || u !== n) return;
5765
5785
  if (i.value = h, !d) {
5766
5786
  d = !0;
5767
- for (let e of h) l.set(e.id, Yd(e));
5787
+ for (let e of h) l.set(e.id, ef(e));
5768
5788
  if (h.length === 0) {
5769
5789
  a.value = void 0, o.value = void 0, s.value = !1;
5770
5790
  return;
@@ -5775,8 +5795,8 @@ function Xd(e, t, n, r) {
5775
5795
  t !== void 0 && await _(n, t);
5776
5796
  return;
5777
5797
  }
5778
- let v = h.filter((e) => l.get(e.id) !== Yd(e));
5779
- for (let e of h) l.set(e.id, Yd(e));
5798
+ let v = h.filter((e) => l.get(e.id) !== ef(e));
5799
+ for (let e of h) l.set(e.id, ef(e));
5780
5800
  if (v.length > 0) {
5781
5801
  let e = [...v].sort((e, t) => e.updatedAt < t.updatedAt ? 1 : e.updatedAt > t.updatedAt ? -1 : 0)[0];
5782
5802
  e !== void 0 && (a.value = e.id, s.value = !0, c.value = {
@@ -5844,7 +5864,7 @@ function Xd(e, t, n, r) {
5844
5864
  }
5845
5865
  //#endregion
5846
5866
  //#region web/src/use-changes.ts
5847
- function Zd(e, t, n, r) {
5867
+ function nf(e, t, n, r) {
5848
5868
  let i = y(0), a = y(!1), o = T(void 0), s = 0;
5849
5869
  async function c() {
5850
5870
  let n = t(), c = s += 1;
@@ -5872,7 +5892,7 @@ function Zd(e, t, n, r) {
5872
5892
  reload: c
5873
5893
  };
5874
5894
  }
5875
- function Qd(e, t, n) {
5895
+ function rf(e, t, n) {
5876
5896
  return A(t.shown, (t) => {
5877
5897
  t && (e.shown.value = !1);
5878
5898
  }), A(n.surfaced, (t) => {
@@ -5888,7 +5908,7 @@ function Qd(e, t, n) {
5888
5908
  }
5889
5909
  //#endregion
5890
5910
  //#region web/src/use-story.ts
5891
- function $d(e, n, r, i, a) {
5911
+ function af(e, n, r, i, a) {
5892
5912
  let o = t(() => Xo(n.value, r.value)), s = t(() => {
5893
5913
  let t = /* @__PURE__ */ new Map();
5894
5914
  for (let e of n.value) (e.kind === "assistant" || e.kind === "toolResult") && e.turnId !== void 0 && t.set(e.turnId, e.id);
@@ -5919,7 +5939,7 @@ function $d(e, n, r, i, a) {
5919
5939
  }
5920
5940
  //#endregion
5921
5941
  //#region web/src/conversation-streams.ts
5922
- function ef(e, t, n, r, i) {
5942
+ function of(e, t, n, r, i) {
5923
5943
  let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakMap(), s = (e) => e.current() && a.get(e.target) === e, c = (e, t) => {
5924
5944
  s(e) && i(t);
5925
5945
  };
@@ -5971,7 +5991,7 @@ function ef(e, t, n, r, i) {
5971
5991
  }
5972
5992
  //#endregion
5973
5993
  //#region web/src/waiting-helpers.ts
5974
- async function tf(e, t) {
5994
+ async function sf(e, t) {
5975
5995
  let n = (await e.exec("kvcoder.job.list", { sessionId: t })).filter((e) => e.kind === "subagent" && e.status === "waiting"), r = await Promise.all(n.map(async (n) => {
5976
5996
  let [r, [i]] = await Promise.all([e.exec("kvcoder.session.get", { sessionId: n.id }), e.exec("kvcoder.turn.list", {
5977
5997
  sessionId: n.id,
@@ -5990,27 +6010,27 @@ async function tf(e, t) {
5990
6010
  }
5991
6011
  //#endregion
5992
6012
  //#region web/src/use-conversation.ts
5993
- var nf = 5e3, rf = 200;
5994
- function af(e, t, n, r = () => !1) {
5995
- let i = T(null), a = T([]), o = T(0), s = T([]), c = T(null), l = T(void 0), u = T(!1), d = v(oo()), f = w(/* @__PURE__ */ new Map()), p = w(/* @__PURE__ */ new Map()), m, h, _, y = !1, b = !1, x = (n) => !y && m === n && t() === n.sessionId && e.workspace.value.id === n.workspaceId, S = ef(e, d, u, () => F(), n), C = (e) => e.filter((e) => e.queued !== !0);
6013
+ var cf = 5e3, lf = 200;
6014
+ function uf(e, t, n, r = () => !1) {
6015
+ let i = T(null), a = T([]), o = T(0), s = T([]), c = T(null), l = T(void 0), u = T(!1), d = v(oo()), f = w(/* @__PURE__ */ new Map()), p = w(/* @__PURE__ */ new Map()), m, h, _, y = !1, b = !1, x = (n) => !y && m === n && t() === n.sessionId && e.workspace.value.id === n.workspaceId, S = of(e, d, u, () => F(), n), C = (e) => e.filter((e) => e.queued !== !0);
5996
6016
  async function E(t, n, r) {
5997
6017
  if (!r()) return;
5998
6018
  let i = await e.exec("kvcoder.message.list", {
5999
6019
  sessionId: t,
6000
- limit: rf
6020
+ limit: lf
6001
6021
  });
6002
6022
  r() && (a.value = i.messages, o.value = i.omitted, _ = n, b = !1);
6003
6023
  }
6004
6024
  async function D(t, n, i, s) {
6005
6025
  let c = await e.exec("kvcoder.message.list", {
6006
6026
  sessionId: t,
6007
- limit: rf,
6027
+ limit: lf,
6008
6028
  afterSeq: i
6009
6029
  });
6010
6030
  if (!s()) return;
6011
6031
  let l = C(c.messages);
6012
6032
  if (l[0] !== void 0 && l[0].seq !== i + 1) return E(t, n, s);
6013
- let u = C(a.value), d = u.at(-1)?.seq ?? i, f = [...u, ...l.filter((e) => (e.seq ?? d) > d)], p = b || r() ? 0 : Math.max(f.length - rf, 0);
6033
+ let u = C(a.value), d = u.at(-1)?.seq ?? i, f = [...u, ...l.filter((e) => (e.seq ?? d) > d)], p = b || r() ? 0 : Math.max(f.length - lf, 0);
6014
6034
  a.value = [...f.slice(p), ...c.messages.filter((e) => e.queued === !0)], o.value += p;
6015
6035
  }
6016
6036
  async function O() {
@@ -6018,7 +6038,7 @@ function af(e, t, n, r = () => !1) {
6018
6038
  if (t === void 0 || n === void 0) return;
6019
6039
  let r = await e.exec("kvcoder.message.list", {
6020
6040
  sessionId: t.sessionId,
6021
- limit: rf,
6041
+ limit: lf,
6022
6042
  beforeSeq: n
6023
6043
  });
6024
6044
  x(t) && C(a.value)[0]?.seq === n && (a.value = [...r.messages, ...a.value], o.value = r.omitted, b = !0);
@@ -6055,14 +6075,14 @@ function af(e, t, n, r = () => !1) {
6055
6075
  turn: a?.sessionId === n ? a : void 0,
6056
6076
  live: f.get(n)?.live ?? v(oo())
6057
6077
  };
6058
- Wu(t.workspaceId, n, o.turn === void 0 ? [] : [o.turn]), f.set(n, o), S.update(o.live, i.status === "running" ? i.stepJobId : void 0, () => x(t));
6078
+ Yu(t.workspaceId, n, o.turn === void 0 ? [] : [o.turn]), f.set(n, o), S.update(o.live, i.status === "running" ? i.stepJobId : void 0, () => x(t));
6059
6079
  }
6060
6080
  }
6061
6081
  async function N(t, n) {
6062
- let r = await tf(e, t.sessionId);
6082
+ let r = await sf(e, t.sessionId);
6063
6083
  if (n()) {
6064
6084
  p.clear();
6065
- for (let [e, n] of r) Wu(t.workspaceId, e, n.child.turn === void 0 ? [] : [n.child.turn]), p.set(e, n);
6085
+ for (let [e, n] of r) Yu(t.workspaceId, e, n.child.turn === void 0 ? [] : [n.child.turn]), p.set(e, n);
6066
6086
  }
6067
6087
  }
6068
6088
  async function P(t = [], n) {
@@ -6081,7 +6101,7 @@ function af(e, t, n, r = () => !1) {
6081
6101
  e.exec("kvcoder.context.get", { sessionId: r.sessionId })
6082
6102
  ]);
6083
6103
  if (!o() || a.id !== r.sessionId || (i.value !== null && i.value.status !== a.status && e.refresh(), !o())) return;
6084
- i.value = a, s.value = l, c.value = u, Wu(r.workspaceId, a.id, l);
6104
+ i.value = a, s.value = l, c.value = u, Yu(r.workspaceId, a.id, l);
6085
6105
  let f = a.status === "running" ? a.stepJobId : void 0;
6086
6106
  S.update(d, f, () => x(r), n === void 0 || n === f ? t : []);
6087
6107
  let p = M(r, a.status === "waiting" ? l[0] : void 0, o);
@@ -6105,7 +6125,7 @@ function af(e, t, n, r = () => !1) {
6105
6125
  e !== void 0 && !S.busy() && F().catch((t) => {
6106
6126
  x(e) && n(t);
6107
6127
  });
6108
- }, nf);
6128
+ }, cf);
6109
6129
  return g(() => {
6110
6130
  y = !0, m = void 0, h = void 0, S.clear(), clearInterval(L);
6111
6131
  }), A([t, () => e.workspace.value.id], () => {
@@ -6140,7 +6160,7 @@ function af(e, t, n, r = () => !1) {
6140
6160
  }
6141
6161
  //#endregion
6142
6162
  //#region web/src/use-execution-map.ts
6143
- function of(e, n, r, i, a) {
6163
+ function df(e, n, r, i, a) {
6144
6164
  let o = y(null), s = y(!1), c, l, u, d = 0, f = !1;
6145
6165
  async function p() {
6146
6166
  let t = n();
@@ -6186,15 +6206,15 @@ function of(e, n, r, i, a) {
6186
6206
  }
6187
6207
  //#endregion
6188
6208
  //#region web/src/use-follow-latest.ts
6189
- var sf = 80;
6190
- function cf(e, t, n) {
6209
+ var ff = 80;
6210
+ function pf(e, t, n) {
6191
6211
  let r = y(!1);
6192
6212
  function i() {
6193
6213
  e.value !== null && (e.value.scrollTop = e.value.scrollHeight);
6194
6214
  }
6195
6215
  function a() {
6196
6216
  let t = e.value;
6197
- t !== null && (r.value = t.scrollHeight - t.clientHeight - t.scrollTop > sf);
6217
+ t !== null && (r.value = t.scrollHeight - t.clientHeight - t.scrollTop > ff);
6198
6218
  }
6199
6219
  function o() {
6200
6220
  r.value = !1, i();
@@ -6211,7 +6231,7 @@ function cf(e, t, n) {
6211
6231
  }
6212
6232
  //#endregion
6213
6233
  //#region web/src/use-finished-runs.ts
6214
- function lf(e, t, n, r) {
6234
+ function mf(e, t, n, r) {
6215
6235
  let i = y(/* @__PURE__ */ new Map());
6216
6236
  async function a(n) {
6217
6237
  try {
@@ -6231,7 +6251,7 @@ function lf(e, t, n, r) {
6231
6251
  }
6232
6252
  //#endregion
6233
6253
  //#region web/src/use-slash-commands.ts
6234
- function uf(e) {
6254
+ function hf(e) {
6235
6255
  let t = T([]);
6236
6256
  return h(async () => {
6237
6257
  try {
@@ -6243,7 +6263,7 @@ function uf(e) {
6243
6263
  }
6244
6264
  //#endregion
6245
6265
  //#region web/src/use-workspace-session.ts
6246
- function df(e, n, r) {
6266
+ function gf(e, n, r) {
6247
6267
  let i = T(e.workspace.value.id);
6248
6268
  async function a(t) {
6249
6269
  let n;
@@ -6275,43 +6295,43 @@ function df(e, n, r) {
6275
6295
  }
6276
6296
  //#endregion
6277
6297
  //#region web/src/ConversationView.vue?vue&type=script&setup=true&lang.ts
6278
- var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6298
+ var _f = { class: "kvc-workspace" }, vf = { class: "kvc-stage" }, yf = {
6279
6299
  class: "kvc-conversation",
6280
6300
  "data-test": "conversation"
6281
- }, hf = {
6301
+ }, bf = {
6282
6302
  key: 0,
6283
6303
  class: "kvc-start",
6284
6304
  role: "alert",
6285
6305
  "data-test": "load-failure"
6286
- }, gf = { class: "kvc-start-note" }, _f = {
6306
+ }, xf = { class: "kvc-start-note" }, Sf = {
6287
6307
  class: "kvc-actions",
6288
6308
  style: { "justify-content": "center" }
6289
- }, vf = {
6309
+ }, Cf = {
6290
6310
  key: 1,
6291
6311
  class: "kvc-scrollport"
6292
- }, yf = {
6312
+ }, wf = {
6293
6313
  key: 1,
6294
6314
  class: "kvc-column"
6295
- }, bf = {
6315
+ }, Tf = {
6296
6316
  key: 0,
6297
6317
  class: "kvc-actions",
6298
6318
  style: { "justify-content": "center" }
6299
- }, xf = ["title"], Sf = {
6319
+ }, Ef = ["title"], Df = {
6300
6320
  key: 2,
6301
6321
  class: "kvc-notice",
6302
6322
  "data-test": "map-remaining"
6303
- }, Cf = {
6323
+ }, Of = {
6304
6324
  key: 4,
6305
6325
  class: "kvc-notice",
6306
6326
  "data-test": "summarizing"
6307
- }, wf = {
6327
+ }, kf = {
6308
6328
  key: 5,
6309
6329
  class: "kvc-answer",
6310
6330
  "data-test": "live-answer"
6311
- }, Tf = ["open"], Ef = { class: "kvc-muted" }, Df = {
6331
+ }, Af = ["open"], jf = { class: "kvc-muted" }, Mf = {
6312
6332
  class: "kvc-muted",
6313
6333
  style: { "white-space": "pre-wrap" }
6314
- }, Of = {
6334
+ }, Nf = {
6315
6335
  key: 8,
6316
6336
  class: "kvc-muted",
6317
6337
  style: {
@@ -6319,14 +6339,14 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6319
6339
  margin: "0"
6320
6340
  },
6321
6341
  "data-test": "waiting-hint"
6322
- }, kf = {
6342
+ }, Pf = {
6323
6343
  class: "kvc-notice",
6324
6344
  "data-test": "background-decision"
6325
- }, Af = /* @__PURE__ */ c({
6345
+ }, Ff = /* @__PURE__ */ c({
6326
6346
  __name: "ConversationView",
6327
6347
  props: { sessionId: {} },
6328
6348
  setup(c) {
6329
- let l = c, u = J(), { id: f, failed: p } = df(u, () => l.sessionId, (e) => X(u, e)), m = y("chat"), h = y(!1), g = af(u, () => f.value, p, () => h.value), { session: v, messages: x, omitted: S, turns: w, live: T, children: k, helpers: M } = g, N = Xd(u, () => f.value, () => v.value?.updatedAt, p), P = of(u, () => f.value, () => v.value?.updatedAt, N, p), F = Zd(u, () => f.value, () => v.value?.updatedAt, p), { toggleChanges: I, closePanel: L } = Qd(F, P, N), ee = t(() => F.shown.value || P.shown.value || N.open.value && N.shown.value !== void 0), R = t(() => v.value?.status === "idle" ? P.counts.value?.left ?? 0 : 0), z = t(() => To(x.value)), B = t(() => Ro(x.value)), { rows: V, rowKey: te, rowTotals: ne, runningTurnId: H, finalAnswers: ie } = $d(u.t, x, z, w, v), ae = lf(u, () => f.value, x, p), oe = /* @__PURE__ */ new Set([
6349
+ let l = c, u = J(), { id: f, failed: p } = gf(u, () => l.sessionId, (e) => X(u, e)), m = y("chat"), h = y(!1), g = uf(u, () => f.value, p, () => h.value), { session: v, messages: x, omitted: S, turns: w, live: T, children: k, helpers: M } = g, N = tf(u, () => f.value, () => v.value?.updatedAt, p), P = df(u, () => f.value, () => v.value?.updatedAt, N, p), F = nf(u, () => f.value, () => v.value?.updatedAt, p), { toggleChanges: I, closePanel: L } = rf(F, P, N), ee = t(() => F.shown.value || P.shown.value || N.open.value && N.shown.value !== void 0), R = t(() => v.value?.status === "idle" ? P.counts.value?.left ?? 0 : 0), z = t(() => To(x.value)), B = t(() => Ro(x.value)), { rows: V, rowKey: te, rowTotals: ne, runningTurnId: H, finalAnswers: ie } = af(u.t, x, z, w, v), ae = mf(u, () => f.value, x, p), oe = /* @__PURE__ */ new Set([
6330
6350
  "STEP_FAILED",
6331
6351
  "REPLY_LOST",
6332
6352
  "REPLY_INCOMPLETE",
@@ -6374,7 +6394,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6374
6394
  ].join(" ")), me = () => v.value === null || w.value[0] === void 0 ? void 0 : {
6375
6395
  sessionId: v.value.id,
6376
6396
  turnId: w.value[0].id
6377
- }, K = Jd(u, (e) => g.refresh(e), me), he = t(() => new Map(W.value.flatMap((e) => {
6397
+ }, K = $d(u, (e) => g.refresh(e), me), he = t(() => new Map(W.value.flatMap((e) => {
6378
6398
  let t = z.value.get(e.toolCallId)?.fields?.task;
6379
6399
  return typeof e.childSessionId == "string" && typeof t == "string" ? [[e.childSessionId, t]] : [];
6380
6400
  }))), ge = t(() => W.value.flatMap((e) => e.kind === "worker" && e.runId !== void 0 ? [e.runId] : [])), _e = t(() => W.value.filter((e) => e.questionId === null || !K.hidden.value.has(String(e.questionId)))), ve = t(() => {
@@ -6383,14 +6403,14 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6383
6403
  }), ye = t(() => {
6384
6404
  let e = Y(x.value.at(-1)?.content.params);
6385
6405
  return typeof e.code == "string" ? e.code : void 0;
6386
- }), be = uf(u), q = Od(u, () => f.value ?? "", () => g.refresh());
6406
+ }), be = hf(u), q = Nd(u, () => f.value ?? "", () => g.refresh());
6387
6407
  A(() => g.loadFailure.value, (e) => {
6388
6408
  Qe(e)?.code === "kvcoder/SESSION_NOT_FOUND" && p(e);
6389
6409
  });
6390
6410
  let xe = t(() => {
6391
6411
  let e = Qe(g.loadFailure.value);
6392
6412
  return e === void 0 ? u.t("kvcoder.ui.failed") : u.t(Ze(e.code), e.params);
6393
- }), Se = O("list"), Ce = cf(Se, () => [
6413
+ }), Se = O("list"), Ce = pf(Se, () => [
6394
6414
  x.value,
6395
6415
  T.text,
6396
6416
  T.thinking,
@@ -6448,7 +6468,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6448
6468
  fileIds: []
6449
6469
  }));
6450
6470
  }
6451
- return (t, c) => (_(), i("div", ff, [
6471
+ return (t, c) => (_(), i("div", _f, [
6452
6472
  s(Pr, { "session-id": D(f) }, null, 8, ["session-id"]),
6453
6473
  D(v) && D(f) !== void 0 ? (_(), n(Ya, {
6454
6474
  key: 0,
@@ -6485,20 +6505,20 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6485
6505
  "working",
6486
6506
  "onToggleChanges"
6487
6507
  ])) : r("v-if", !0),
6488
- a("div", pf, [a("section", mf, [l.sessionId === void 0 ? (_(), n(Qi, {
6508
+ a("div", vf, [a("section", yf, [l.sessionId === void 0 ? (_(), n(Qi, {
6489
6509
  key: 0,
6490
6510
  registered: D(be)
6491
- }, null, 8, ["registered"])) : D(v) && D(f) !== void 0 ? (_(), i(e, { key: 1 }, [D(g).loadFailure.value === void 0 ? (_(), i("div", vf, [a("div", {
6511
+ }, null, 8, ["registered"])) : D(v) && D(f) !== void 0 ? (_(), i(e, { key: 1 }, [D(g).loadFailure.value === void 0 ? (_(), i("div", Cf, [a("div", {
6492
6512
  ref_key: "list",
6493
6513
  ref: Se,
6494
6514
  class: "kvc-scroll",
6495
6515
  onScroll: c[11] ||= (...e) => D(Ce).onScroll && D(Ce).onScroll(...e)
6496
- }, [m.value === "prompt" ? (_(), n(Dd, {
6516
+ }, [m.value === "prompt" ? (_(), n(Md, {
6497
6517
  key: 0,
6498
6518
  "session-id": D(v).id,
6499
6519
  onBack: c[6] ||= (e) => m.value = "chat"
6500
- }, null, 8, ["session-id"])) : (_(), i("div", yf, [
6501
- D(S) > 0 ? (_(), i("div", bf, [a("button", {
6520
+ }, null, 8, ["session-id"])) : (_(), i("div", wf, [
6521
+ D(S) > 0 ? (_(), i("div", Tf, [a("button", {
6502
6522
  type: "button",
6503
6523
  class: "kvc-button",
6504
6524
  "data-test": "show-earlier",
@@ -6509,7 +6529,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6509
6529
  "data-test": "earlier",
6510
6530
  onClick: Ee
6511
6531
  }, E(D(u).t("kvcoder.ui.earlierMessages", { count: D(S) })), 1)])) : r("v-if", !0),
6512
- (_(!0), i(e, null, b(D(V), (t) => (_(), i(e, { key: D(te)(t) }, [t.kind === "fold" ? (_(), n(hu, {
6532
+ (_(!0), i(e, null, b(D(V), (t) => (_(), i(e, { key: D(te)(t) }, [t.kind === "fold" ? (_(), n(bu, {
6513
6533
  key: 0,
6514
6534
  messages: t.messages,
6515
6535
  calls: z.value,
@@ -6520,7 +6540,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6520
6540
  "calls",
6521
6541
  "finished-runs",
6522
6542
  "running"
6523
- ])) : (_(), n(uu, {
6543
+ ])) : (_(), n(pu, {
6524
6544
  key: 1,
6525
6545
  message: t.message,
6526
6546
  calls: z.value,
@@ -6537,9 +6557,9 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6537
6557
  class: "kvc-muted",
6538
6558
  title: D(ne)(t)?.tokens,
6539
6559
  "data-test": "turn-totals"
6540
- }, E(D(ne)(t)?.text), 9, xf))], 64))), 128)),
6560
+ }, E(D(ne)(t)?.text), 9, Ef))], 64))), 128)),
6541
6561
  D(v).waitingOn === "person" ? (_(), n(fi, { key: 1 })) : r("v-if", !0),
6542
- R.value > 0 ? (_(), i("div", Sf, [
6562
+ R.value > 0 ? (_(), i("div", Df, [
6543
6563
  o(E(D(u).t("kvcoder.ui.map.remaining", { count: R.value })) + " ", 1),
6544
6564
  a("button", {
6545
6565
  type: "button",
@@ -6558,7 +6578,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6558
6578
  })
6559
6579
  }, E(D(u).t("kvcoder.ui.map.continue")), 1)
6560
6580
  ])) : r("v-if", !0),
6561
- ve.value ? (_(), n(bd, {
6581
+ ve.value ? (_(), n(Td, {
6562
6582
  key: 3,
6563
6583
  "session-id": D(v).id,
6564
6584
  "failed-with": ye.value,
@@ -6566,12 +6586,12 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6566
6586
  D(Ce).resume(), D(g).refresh();
6567
6587
  }
6568
6588
  }, null, 8, ["session-id", "failed-with"])) : r("v-if", !0),
6569
- D(T).summarizing ? (_(), i("div", Cf, E(D(u).t("kvcoder.ui.summarizing")), 1)) : r("v-if", !0),
6570
- U.value && (D(T).text !== "" || D(T).thinking !== "") ? (_(), i("div", wf, [D(T).thinking === "" ? r("v-if", !0) : (_(), i("details", {
6589
+ D(T).summarizing ? (_(), i("div", Of, E(D(u).t("kvcoder.ui.summarizing")), 1)) : r("v-if", !0),
6590
+ U.value && (D(T).text !== "" || D(T).thinking !== "") ? (_(), i("div", kf, [D(T).thinking === "" ? r("v-if", !0) : (_(), i("details", {
6571
6591
  key: 0,
6572
6592
  open: D(T).text === "" && D(T).calls.length === 0,
6573
6593
  "data-test": "live-thinking"
6574
- }, [a("summary", Ef, E(D(u).t("kvcoder.ui.thinkingNow")), 1), a("p", Df, E(D(T).thinking), 1)], 8, Tf)), D(T).text === "" ? r("v-if", !0) : (_(), n(C(D(u).View), {
6594
+ }, [a("summary", jf, E(D(u).t("kvcoder.ui.thinkingNow")), 1), a("p", Mf, E(D(T).thinking), 1)], 8, Af)), D(T).text === "" ? r("v-if", !0) : (_(), n(C(D(u).View), {
6575
6595
  key: 1,
6576
6596
  view: {
6577
6597
  type: "markdown",
@@ -6588,7 +6608,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6588
6608
  key: 7,
6589
6609
  working: D(q).working.value
6590
6610
  }, null, 8, ["working"])) : r("v-if", !0),
6591
- (_(!0), i(e, null, b(D(k), ([e, t]) => (_(), n(zd, {
6611
+ (_(!0), i(e, null, b(D(k), ([e, t]) => (_(), n(Wd, {
6592
6612
  key: e,
6593
6613
  child: t,
6594
6614
  task: he.value.get(e),
@@ -6602,12 +6622,12 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6602
6622
  "onAnswer",
6603
6623
  "onDecide"
6604
6624
  ]))), 128)),
6605
- (_(!0), i(e, null, b(ge.value, (e) => (_(), n(Kd, {
6625
+ (_(!0), i(e, null, b(ge.value, (e) => (_(), n(Zd, {
6606
6626
  key: e,
6607
6627
  "session-id": D(v).id,
6608
6628
  "run-id": e
6609
6629
  }, null, 8, ["session-id", "run-id"]))), 128)),
6610
- s(md, {
6630
+ s(yd, {
6611
6631
  owner: me(),
6612
6632
  pending: W.value,
6613
6633
  hidden: D(K).hidden.value,
@@ -6620,8 +6640,8 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6620
6640
  "onAnswer",
6621
6641
  "onDecide"
6622
6642
  ]),
6623
- W.value.length > 0 ? (_(), i("p", Of, E(pe.value), 1)) : r("v-if", !0),
6624
- D(M).size > 0 ? (_(), i(e, { key: 9 }, [a("p", kf, E(D(u).t("kvcoder.ui.backgroundDecision")), 1), (_(!0), i(e, null, b(D(M), ([e, t]) => (_(), n(zd, {
6643
+ W.value.length > 0 ? (_(), i("p", Nf, E(pe.value), 1)) : r("v-if", !0),
6644
+ D(M).size > 0 ? (_(), i(e, { key: 9 }, [a("p", Pf, E(D(u).t("kvcoder.ui.backgroundDecision")), 1), (_(!0), i(e, null, b(D(M), ([e, t]) => (_(), n(Wd, {
6625
6645
  key: e,
6626
6646
  child: t.child,
6627
6647
  task: t.call,
@@ -6644,7 +6664,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6644
6664
  }, [s(D(re), {
6645
6665
  size: 16,
6646
6666
  "aria-hidden": "true"
6647
- }), o(E(D(u).t("kvcoder.ui.jumpToLatest")), 1)])) : r("v-if", !0)])) : (_(), i("div", hf, [a("p", gf, E(D(u).t("kvcoder.ui.loadFailed", { error: xe.value })), 1), a("div", _f, [a("button", {
6667
+ }), o(E(D(u).t("kvcoder.ui.jumpToLatest")), 1)])) : r("v-if", !0)])) : (_(), i("div", bf, [a("p", xf, E(D(u).t("kvcoder.ui.loadFailed", { error: xe.value })), 1), a("div", Sf, [a("button", {
6648
6668
  type: "button",
6649
6669
  class: "kvc-button kvc-primary",
6650
6670
  "data-test": "load-again",
@@ -6669,7 +6689,7 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6669
6689
  onCommand: Ae,
6670
6690
  onRegistered: je
6671
6691
  }, {
6672
- controls: j(() => [s(kd, {
6692
+ controls: j(() => [s(Pd, {
6673
6693
  session: D(v),
6674
6694
  onChanged: c[12] ||= (e) => D(g).refresh()
6675
6695
  }, null, 8, ["session"])]),
@@ -6722,13 +6742,13 @@ var ff = { class: "kvc-workspace" }, pf = { class: "kvc-stage" }, mf = {
6722
6742
  ])) : r("v-if", !0)])
6723
6743
  ]));
6724
6744
  }
6725
- }), jf = /* @__PURE__ */ c({
6745
+ }), If = /* @__PURE__ */ c({
6726
6746
  __name: "conversation",
6727
6747
  props: { sessionId: {} },
6728
6748
  setup(e) {
6729
6749
  let t = e;
6730
- return (e, r) => (_(), n(Af, { "session-id": t.sessionId }, null, 8, ["session-id"]));
6750
+ return (e, r) => (_(), n(Ff, { "session-id": t.sessionId }, null, 8, ["session-id"]));
6731
6751
  }
6732
6752
  });
6733
6753
  //#endregion
6734
- export { jf as default };
6754
+ export { If as default };