@omg-dev/app 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-Cjj_DiYL.js} +33 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
  7. package/dist-lib/{TermView-CWr-zJmM.js → TermView-B4V-DyD-.js} +521 -530
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CUiDTHFP.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
  29. package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-CLYU5z7h.js → embedded-PUsgcSTE.js} +10592 -10725
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  61. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  62. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  63. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  64. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  65. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  66. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  67. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  68. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  69. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  70. package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
  71. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  72. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  73. package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-DY4vFlfs.js} +82 -83
  74. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  75. package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-B-ruG8li.js} +233 -236
  76. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  77. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  78. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  79. package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-BQy3geXs.js} +290 -297
  80. package/dist-lib/styles.css +1 -1
  81. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  82. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  83. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  84. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  85. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  86. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  87. package/package.json +4 -3
  88. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  89. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  90. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  91. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  92. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  93. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  94. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  95. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  96. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  97. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  98. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  99. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  100. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  101. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  102. package/dist-lib/index-DcwavxA1.js +0 -5062
  103. package/dist-lib/index-JkCQXUYs.js +0 -16566
  104. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  105. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  106. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  107. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  108. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  109. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  110. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  111. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  112. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  113. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { memo as t } from "react";
3
- import { F as i } from "./File-B-qYa2zY.js";
3
+ import { F as i } from "./File-DQRr5F_e.js";
4
4
  import { P as m } from "./types-BSXdE6DF.js";
5
5
  function n({ file: e, themeType: o }) {
6
6
  return /* @__PURE__ */ r(
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as i, Fragment as te } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as s, Fragment as te } from "react/jsx-runtime";
2
2
  import { memo as ne, useState as m, useRef as T, useCallback as v, useEffect as C, useMemo as q, Suspense as U } from "react";
3
3
  import { createPortal as re } from "react-dom";
4
4
  import { cn as y } from "cnfast";
5
- import { y as oe, a2 as W, a3 as se, X as I, a4 as ie, a5 as ae, L as H, a6 as le, x as de, C as ce, a7 as L } from "./embedded-CLYU5z7h.js";
6
- import { c as me } from "./create-BrnHvSDE.js";
5
+ import { z as oe, a3 as W, a4 as se, X as I, a5 as ie, a6 as ae, L as H, a7 as le, x as de, C as ce, a8 as L } from "./embedded-PUsgcSTE.js";
6
+ import { c as me } from "./create-CBk9uwJH.js";
7
7
  /**
8
8
  * @license lucide-react v0.577.0 - ISC
9
9
  *
@@ -15,42 +15,42 @@ const ue = [
15
15
  ["path", { d: "M12 3v14", key: "7cf3v8" }],
16
16
  ["path", { d: "M5 21h14", key: "11awu3" }]
17
17
  ], pe = oe("arrow-up-from-line", ue), fe = 6e4;
18
- function he({ displayPath: n, original: s, edited: o, note: c }) {
19
- if (s === o) return { ok: !1, reason: "unchanged" };
20
- const t = me(n, s, o, void 0, void 0, { context: 3 });
18
+ function he({ displayPath: n, original: o, edited: i, note: c }) {
19
+ if (o === i) return { ok: !1, reason: "unchanged" };
20
+ const t = me(n, o, i, void 0, void 0, { context: 3 });
21
21
  return t.length > fe ? { ok: !1, reason: "too-large" } : { ok: !0, patch: t, message: xe(n, t, c) };
22
22
  }
23
- function xe(n, s, o) {
24
- const c = o == null ? void 0 : o.trim(), t = [
23
+ function xe(n, o, i) {
24
+ const c = i?.trim(), t = [
25
25
  `I edited \`${n}\` in the file viewer. Apply this patch to the file exactly as written — do not reformat it, improve it, or make any other change:`,
26
26
  "",
27
27
  "```diff",
28
- s.trimEnd(),
28
+ o.trimEnd(),
29
29
  "```"
30
30
  ];
31
31
  return c && t.push("", c), t.join(`
32
32
  `);
33
33
  }
34
- const ge = L("session-file-tree", () => import("./FileTreePane-BG2k7gTc.js")), be = L("session-file-viewer", () => import("./FileViewer-Clmf04v1.js")), ve = L("session-file-editor", () => import("./FileEditor-BIz0qCyW.js"));
34
+ const ge = L("session-file-tree", () => import("./FileTreePane-J8P-OiHb.js")), be = L("session-file-viewer", () => import("./FileViewer-DRrfus7c.js")), ve = L("session-file-editor", () => import("./FileEditor-BrI3dfcp.js"));
35
35
  async function _(n) {
36
- const s = await W(n), o = await s.json().catch(() => ({}));
37
- if (!s.ok) throw new Error((o == null ? void 0 : o.error) || `${s.status}`);
38
- return o;
36
+ const o = await W(n), i = await o.json().catch(() => ({}));
37
+ if (!o.ok) throw new Error(i?.error || `${o.status}`);
38
+ return i;
39
39
  }
40
40
  function ye() {
41
- const n = () => typeof document < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", [s, o] = m(n);
41
+ const n = () => typeof document < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", [o, i] = m(n);
42
42
  return C(() => {
43
- const c = new MutationObserver(() => o(n()));
43
+ const c = new MutationObserver(() => i(n()));
44
44
  return c.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }), () => c.disconnect();
45
- }, []), s;
45
+ }, []), o;
46
46
  }
47
- const N = ({ label: n }) => /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2 py-8 text-[12px] text-muted-foreground", children: [
47
+ const N = ({ label: n }) => /* @__PURE__ */ s("div", { className: "flex items-center justify-center gap-2 py-8 text-[12px] text-muted-foreground", children: [
48
48
  /* @__PURE__ */ e(H, { className: "size-3.5 animate-spin" }),
49
49
  " ",
50
50
  n
51
51
  ] });
52
- function ke({ tree: n, onNavigate: s }) {
53
- const o = T(null), c = q(() => {
52
+ function ke({ tree: n, onNavigate: o }) {
53
+ const i = T(null), c = q(() => {
54
54
  const t = n.root.split("/").filter(Boolean);
55
55
  return t.map((h, k) => {
56
56
  const x = "/" + t.slice(0, k + 1).join("/");
@@ -58,20 +58,20 @@ function ke({ tree: n, onNavigate: s }) {
58
58
  });
59
59
  }, [n.root, n.ceiling]);
60
60
  return C(() => {
61
- const t = o.current;
61
+ const t = i.current;
62
62
  t && (t.scrollLeft = t.scrollWidth);
63
63
  }, [c]), /* @__PURE__ */ e(
64
64
  "nav",
65
65
  {
66
- ref: o,
66
+ ref: i,
67
67
  className: "flex min-w-0 items-center gap-0.5 overflow-x-auto whitespace-nowrap font-mono text-[11px] text-muted-foreground [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
68
- children: c.map((t, h) => /* @__PURE__ */ i("span", { className: "flex shrink-0 items-center gap-0.5", children: [
68
+ children: c.map((t, h) => /* @__PURE__ */ s("span", { className: "flex shrink-0 items-center gap-0.5", children: [
69
69
  h > 0 ? /* @__PURE__ */ e(ce, { className: "size-3 opacity-50" }) : null,
70
70
  t.browsable && t.abs !== n.root ? /* @__PURE__ */ e(
71
71
  "button",
72
72
  {
73
73
  type: "button",
74
- onClick: () => s(t.abs),
74
+ onClick: () => o(t.abs),
75
75
  className: "rounded px-1 py-1 transition-colors hover:bg-muted hover:text-foreground md:py-0.5",
76
76
  children: t.name
77
77
  }
@@ -80,48 +80,48 @@ function ke({ tree: n, onNavigate: s }) {
80
80
  }
81
81
  );
82
82
  }
83
- function we({ sid: n, onClose: s }) {
84
- const [o, c] = m(null), [t, h] = m(null), [k, x] = m(null), [g, j] = m(null), [a, S] = m(null), [R, $] = m(null), [J, P] = m(!1), [u, w] = m(!1), [z, A] = m(""), [p, f] = m({ kind: "idle" }), [V, E] = m("tree"), M = ye(), b = T(null), X = v((r) => {
83
+ function we({ sid: n, onClose: o }) {
84
+ const [i, c] = m(null), [t, h] = m(null), [k, x] = m(null), [g, j] = m(null), [l, z] = m(null), [R, $] = m(null), [J, P] = m(!1), [u, w] = m(!1), [S, A] = m(""), [p, f] = m({ kind: "idle" }), [V, E] = m("tree"), M = ye(), b = T(null), X = v((r) => {
85
85
  b.current = r;
86
86
  }, []), F = T(null);
87
87
  C(() => {
88
88
  let r = !0;
89
89
  h(null), x(null);
90
- const d = o ? `?root=${encodeURIComponent(o)}` : "";
91
- return _(`/api/sessions/${n}/tree${d}`).then((l) => r && h(l.tree)).catch((l) => r && x(l instanceof Error ? l.message : String(l))), () => {
90
+ const d = i ? `?root=${encodeURIComponent(i)}` : "";
91
+ return _(`/api/sessions/${n}/tree${d}`).then((a) => r && h(a.tree)).catch((a) => r && x(a instanceof Error ? a.message : String(a))), () => {
92
92
  r = !1;
93
93
  };
94
- }, [n, o]), C(() => {
95
- const r = (l) => l.key === "Escape" && s();
94
+ }, [n, i]), C(() => {
95
+ const r = (a) => a.key === "Escape" && o();
96
96
  window.addEventListener("keydown", r);
97
97
  const d = document.body.style.overflow;
98
98
  return document.body.style.overflow = "hidden", () => {
99
99
  window.removeEventListener("keydown", r), document.body.style.overflow = d;
100
100
  };
101
- }, [s]);
101
+ }, [o]);
102
102
  const D = v(
103
103
  (r) => {
104
- t && (E("file"), r !== F.current && (F.current = r, j(r), w(!1), f({ kind: "idle" }), A(""), b.current = null, S(null), $(null), P(!0), _(
104
+ t && (E("file"), r !== F.current && (F.current = r, j(r), w(!1), f({ kind: "idle" }), A(""), b.current = null, z(null), $(null), P(!0), _(
105
105
  `/api/sessions/${n}/file?path=${encodeURIComponent(`${t.root}/${r}`)}`
106
106
  ).then((d) => {
107
- S(d.file), b.current = d.file.contents;
107
+ z(d.file), b.current = d.file.contents;
108
108
  }).catch((d) => $(d instanceof Error ? d.message : String(d))).finally(() => P(!1))));
109
109
  },
110
110
  [n, t]
111
111
  ), O = v((r) => {
112
- c(r), F.current = null, j(null), S(null), w(!1), E("tree");
112
+ c(r), F.current = null, j(null), z(null), w(!1), E("tree");
113
113
  }, []), K = v(() => E("tree"), []), Y = q(
114
- () => a ? { ...a, contents: b.current ?? a.contents } : null,
114
+ () => l ? { ...l, contents: b.current ?? l.contents } : null,
115
115
  // eslint-disable-next-line react-hooks/exhaustive-deps -- `editing` is the
116
116
  // intended trigger; draftRef is a ref and deliberately not reactive.
117
- [a, u]
117
+ [l, u]
118
118
  ), G = v(async () => {
119
- if (!a || b.current === null) return;
120
- const r = g ?? a.name, d = he({
119
+ if (!l || b.current === null) return;
120
+ const r = g ?? l.name, d = he({
121
121
  displayPath: r,
122
- original: a.contents,
122
+ original: l.contents,
123
123
  edited: b.current,
124
- note: z
124
+ note: S
125
125
  });
126
126
  if (!d.ok) {
127
127
  f({
@@ -132,25 +132,25 @@ function we({ sid: n, onClose: s }) {
132
132
  }
133
133
  f({ kind: "sending" });
134
134
  try {
135
- const l = await W(`/api/sessions/${n}/send`, {
135
+ const a = await W(`/api/sessions/${n}/send`, {
136
136
  method: "POST",
137
137
  headers: { "Content-Type": "application/json" },
138
138
  // Queued rather than steered: the agent finishes its current turn and
139
139
  // then picks the edit up, instead of having its thought interrupted.
140
140
  body: JSON.stringify({ text: d.message, mode: "queue" })
141
- }), ee = await l.json().catch(() => ({}));
142
- if (!l.ok) {
141
+ }), ee = await a.json().catch(() => ({}));
142
+ if (!a.ok) {
143
143
  f({
144
144
  kind: "error",
145
- message: l.status === 409 ? "This session isn't running, so there's no agent to apply the edit. Resume it and try again." : ee.error || `Couldn't send (${l.status})`
145
+ message: a.status === 409 ? "This session isn't running, so there's no agent to apply the edit. Resume it and try again." : ee.error || `Couldn't send (${a.status})`
146
146
  });
147
147
  return;
148
148
  }
149
149
  f({ kind: "sent" }), w(!1);
150
- } catch (l) {
151
- f({ kind: "error", message: l instanceof Error ? l.message : String(l) });
150
+ } catch (a) {
151
+ f({ kind: "error", message: a instanceof Error ? a.message : String(a) });
152
152
  }
153
- }, [n, a, g, z]), Q = !!g && V === "file", B = p.kind === "sent" || p.kind === "error" ? "banner" : u ? "editor" : "content", Z = /* @__PURE__ */ e(
153
+ }, [n, l, g, S]), Q = !!g && V === "file", B = p.kind === "sent" || p.kind === "error" ? "banner" : u ? "editor" : "content", Z = /* @__PURE__ */ e(
154
154
  "div",
155
155
  {
156
156
  role: "dialog",
@@ -161,20 +161,20 @@ function we({ sid: n, onClose: s }) {
161
161
  top: "var(--lfg-visual-offset-top, 0px)",
162
162
  height: "var(--lfg-visual-height, var(--lfg-app-height, 100dvh))"
163
163
  },
164
- onClick: s,
165
- children: /* @__PURE__ */ i(
164
+ onClick: o,
165
+ children: /* @__PURE__ */ s(
166
166
  "div",
167
167
  {
168
168
  className: "relative mx-auto flex h-full w-full max-w-6xl flex-col overflow-hidden bg-background md:my-6 md:h-[calc(100%-3rem)] md:rounded-2xl md:border md:border-border md:shadow-2xl",
169
169
  onClick: (r) => r.stopPropagation(),
170
170
  children: [
171
- /* @__PURE__ */ i("header", { className: "flex items-center gap-2 border-b border-border px-3 py-2 pt-[calc(0.5rem+env(safe-area-inset-top,0px))] md:gap-3 md:px-4 md:py-3 md:pt-3", children: [
171
+ /* @__PURE__ */ s("header", { className: "flex items-center gap-2 border-b border-border px-3 py-2 pt-[calc(0.5rem+env(safe-area-inset-top,0px))] md:gap-3 md:px-4 md:py-3 md:pt-3", children: [
172
172
  /* @__PURE__ */ e(se, { className: "size-4 shrink-0 text-[var(--primary)]" }),
173
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
173
+ /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
174
174
  /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-foreground", children: "Files" }),
175
175
  t ? /* @__PURE__ */ e(ke, { tree: t, onNavigate: O }) : null
176
176
  ] }),
177
- t != null && t.parent ? /* @__PURE__ */ i(
177
+ t?.parent ? /* @__PURE__ */ s(
178
178
  "button",
179
179
  {
180
180
  type: "button",
@@ -190,17 +190,17 @@ function we({ sid: n, onClose: s }) {
190
190
  "button",
191
191
  {
192
192
  type: "button",
193
- onClick: s,
193
+ onClick: o,
194
194
  "aria-label": "Close files",
195
195
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground md:size-auto md:p-1.5",
196
196
  children: /* @__PURE__ */ e(I, { className: "size-5 md:size-4" })
197
197
  }
198
198
  )
199
199
  ] }),
200
- /* @__PURE__ */ i("div", { className: "flex min-h-0 flex-1 flex-col md:flex-row", children: [
201
- /* @__PURE__ */ i("aside", { className: "flex min-h-0 flex-1 flex-col overflow-hidden border-border md:h-auto md:w-72 md:flex-none md:border-r", children: [
202
- t != null && t.truncated ? /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border bg-[var(--warning)]/10 px-3 py-1.5 text-[11px] text-[var(--warning)]", children: "This directory is very large — the listing was truncated." }) : null,
203
- /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-hidden pb-[var(--lfg-safe-bottom,0px)] md:pb-0", children: k ? /* @__PURE__ */ i("div", { className: "px-3 py-2 text-[12px] text-[var(--destructive)]", children: [
200
+ /* @__PURE__ */ s("div", { className: "flex min-h-0 flex-1 flex-col md:flex-row", children: [
201
+ /* @__PURE__ */ s("aside", { className: "flex min-h-0 flex-1 flex-col overflow-hidden border-border md:h-auto md:w-72 md:flex-none md:border-r", children: [
202
+ t?.truncated ? /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border bg-[var(--warning)]/10 px-3 py-1.5 text-[11px] text-[var(--warning)]", children: "This directory is very large — the listing was truncated." }) : null,
203
+ /* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-hidden pb-[var(--lfg-safe-bottom,0px)] md:pb-0", children: k ? /* @__PURE__ */ s("div", { className: "px-3 py-2 text-[12px] text-[var(--destructive)]", children: [
204
204
  "Could not list files: ",
205
205
  k
206
206
  ] }) : t ? /* @__PURE__ */ e(U, { fallback: /* @__PURE__ */ e(N, { label: "Loading tree…" }), children: /* @__PURE__ */ e(
@@ -220,8 +220,8 @@ function we({ sid: n, onClose: s }) {
220
220
  "min-h-0 min-w-0 flex-col bg-background md:static md:flex md:flex-1",
221
221
  Q ? "absolute inset-0 z-20 flex" : "hidden"
222
222
  ),
223
- children: g ? /* @__PURE__ */ i(te, { children: [
224
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2 border-b border-border px-2 py-2 pt-[calc(0.5rem+env(safe-area-inset-top,0px))] md:px-3 md:pt-2", children: [
223
+ children: g ? /* @__PURE__ */ s(te, { children: [
224
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-border px-2 py-2 pt-[calc(0.5rem+env(safe-area-inset-top,0px))] md:px-3 md:pt-2", children: [
225
225
  /* @__PURE__ */ e(
226
226
  "button",
227
227
  {
@@ -233,7 +233,7 @@ function we({ sid: n, onClose: s }) {
233
233
  }
234
234
  ),
235
235
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate font-mono text-[12px] text-foreground", children: g }),
236
- a && !a.binary ? /* @__PURE__ */ i(
236
+ l && !l.binary ? /* @__PURE__ */ s(
237
237
  "button",
238
238
  {
239
239
  type: "button",
@@ -255,14 +255,14 @@ function we({ sid: n, onClose: s }) {
255
255
  "button",
256
256
  {
257
257
  type: "button",
258
- onClick: s,
258
+ onClick: o,
259
259
  "aria-label": "Close files",
260
260
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground md:hidden",
261
261
  children: /* @__PURE__ */ e(I, { className: "size-5" })
262
262
  }
263
263
  )
264
264
  ] }),
265
- /* @__PURE__ */ i(
265
+ /* @__PURE__ */ s(
266
266
  "div",
267
267
  {
268
268
  className: y(
@@ -270,15 +270,15 @@ function we({ sid: n, onClose: s }) {
270
270
  B === "content" && "pb-[var(--lfg-safe-bottom,0px)] md:pb-0"
271
271
  ),
272
272
  children: [
273
- R ? /* @__PURE__ */ i("div", { className: "px-3 py-2 text-[12px] text-[var(--destructive)]", children: [
273
+ R ? /* @__PURE__ */ s("div", { className: "px-3 py-2 text-[12px] text-[var(--destructive)]", children: [
274
274
  "Could not open: ",
275
275
  R
276
- ] }) : J || !a ? /* @__PURE__ */ e(N, { label: "Opening…" }) : a.binary ? /* @__PURE__ */ e("div", { className: "px-3 py-3 text-[12px] text-muted-foreground", children: "Binary file — not shown." }) : /* @__PURE__ */ e(U, { fallback: /* @__PURE__ */ e(N, { label: u ? "Loading editor…" : "Rendering…" }), children: u ? /* @__PURE__ */ e(ve, { file: Y ?? a, themeType: M, onChange: X }) : /* @__PURE__ */ e(be, { file: a, themeType: M }) }),
277
- a != null && a.truncated ? /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-[11px] text-[var(--warning)]", children: "File truncated — only the first megabyte is shown." }) : null
276
+ ] }) : J || !l ? /* @__PURE__ */ e(N, { label: "Opening…" }) : l.binary ? /* @__PURE__ */ e("div", { className: "px-3 py-3 text-[12px] text-muted-foreground", children: "Binary file — not shown." }) : /* @__PURE__ */ e(U, { fallback: /* @__PURE__ */ e(N, { label: u ? "Loading editor…" : "Rendering…" }), children: u ? /* @__PURE__ */ e(ve, { file: Y ?? l, themeType: M, onChange: X }) : /* @__PURE__ */ e(be, { file: l, themeType: M }) }),
277
+ l?.truncated ? /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-[11px] text-[var(--warning)]", children: "File truncated — only the first megabyte is shown." }) : null
278
278
  ]
279
279
  }
280
280
  ),
281
- u ? /* @__PURE__ */ i(
281
+ u ? /* @__PURE__ */ s(
282
282
  "div",
283
283
  {
284
284
  className: y(
@@ -289,16 +289,16 @@ function we({ sid: n, onClose: s }) {
289
289
  /* @__PURE__ */ e(
290
290
  "textarea",
291
291
  {
292
- value: z,
292
+ value: S,
293
293
  onChange: (r) => A(r.target.value),
294
294
  rows: 2,
295
295
  placeholder: "Optional: anything else the agent should do alongside this edit",
296
296
  className: "w-full resize-none rounded-lg border border-border bg-card px-2.5 py-2 text-[12px] text-foreground outline-none placeholder:text-muted-foreground focus:border-[var(--primary)]/50"
297
297
  }
298
298
  ),
299
- /* @__PURE__ */ i("div", { className: "flex flex-col gap-2 md:flex-row md:items-center", children: [
299
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2 md:flex-row md:items-center", children: [
300
300
  /* @__PURE__ */ e("p", { className: "min-w-0 flex-1 text-[11px] text-muted-foreground", children: "Your edit is sent to the agent as a patch — it applies the change, so nothing here writes to disk behind its back." }),
301
- /* @__PURE__ */ i(
301
+ /* @__PURE__ */ s(
302
302
  "button",
303
303
  {
304
304
  type: "button",
@@ -315,7 +315,7 @@ function we({ sid: n, onClose: s }) {
315
315
  ]
316
316
  }
317
317
  ) : null,
318
- p.kind === "sent" ? /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 border-t border-[var(--success)]/40 bg-[var(--success)]/10 px-3 py-2 pb-[max(var(--lfg-safe-bottom,0px),0.5rem)] text-[12px] text-foreground md:pb-2", children: [
318
+ p.kind === "sent" ? /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-t border-[var(--success)]/40 bg-[var(--success)]/10 px-3 py-2 pb-[max(var(--lfg-safe-bottom,0px),0.5rem)] text-[12px] text-foreground md:pb-2", children: [
319
319
  /* @__PURE__ */ e(de, { className: "size-3.5 text-[var(--success)]" }),
320
320
  " Patch queued — the agent will apply it on its next turn."
321
321
  ] }) : null,