@omg-dev/app 0.5.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-CirRyMnC.js} +54 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-W4QKB0HL.js} +64 -64
- package/dist-lib/{TermView-CWr-zJmM.js → TermView-CoD-VkHs.js} +495 -520
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CRzDKNTH.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-OER8HHRF.js} +152 -131
- package/dist-lib/computer-page-D9cSNLa9.js +8990 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-CLYU5z7h.js → embedded-DqTPdMCh.js} +10561 -10581
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/keyboard-Yfa1ETse.js +21 -0
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-bjDJmwq6.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-D2zDt9P7.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-Cr7dCCc2.js} +232 -235
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-Qq9_RgFv.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- 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-
|
|
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
|
|
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 {
|
|
6
|
-
import { c as me } from "./create-
|
|
5
|
+
import { f as oe, a3 as W, a4 as se, X as I, a5 as ie, a6 as ae, L as H, a7 as le, y as de, C as ce, a8 as L } from "./embedded-DqTPdMCh.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:
|
|
19
|
-
if (
|
|
20
|
-
const t = me(n,
|
|
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,
|
|
24
|
-
const c =
|
|
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
|
-
|
|
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-
|
|
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
|
|
37
|
-
if (!
|
|
38
|
-
return
|
|
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", [
|
|
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(() =>
|
|
43
|
+
const c = new MutationObserver(() => i(n()));
|
|
44
44
|
return c.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }), () => c.disconnect();
|
|
45
|
-
}, []),
|
|
45
|
+
}, []), o;
|
|
46
46
|
}
|
|
47
|
-
const N = ({ label: n }) => /* @__PURE__ */
|
|
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:
|
|
53
|
-
const
|
|
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 =
|
|
61
|
+
const t = i.current;
|
|
62
62
|
t && (t.scrollLeft = t.scrollWidth);
|
|
63
63
|
}, [c]), /* @__PURE__ */ e(
|
|
64
64
|
"nav",
|
|
65
65
|
{
|
|
66
|
-
ref:
|
|
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__ */
|
|
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: () =>
|
|
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,25 +80,25 @@ function ke({ tree: n, onNavigate: s }) {
|
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
function we({ sid: n, onClose:
|
|
84
|
-
const [
|
|
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, 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) => {
|
|
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 =
|
|
91
|
-
return _(`/api/sessions/${n}/tree${d}`).then((
|
|
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,
|
|
95
|
-
const r = (
|
|
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
|
-
}, [
|
|
101
|
+
}, [o]);
|
|
102
102
|
const D = v(
|
|
103
103
|
(r) => {
|
|
104
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), _(
|
|
@@ -111,15 +111,15 @@ function we({ sid: n, onClose: s }) {
|
|
|
111
111
|
), O = v((r) => {
|
|
112
112
|
c(r), F.current = null, j(null), S(null), w(!1), E("tree");
|
|
113
113
|
}, []), K = v(() => E("tree"), []), Y = q(
|
|
114
|
-
() =>
|
|
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
|
-
[
|
|
117
|
+
[l, u]
|
|
118
118
|
), G = v(async () => {
|
|
119
|
-
if (!
|
|
120
|
-
const r = g ??
|
|
119
|
+
if (!l || b.current === null) return;
|
|
120
|
+
const r = g ?? l.name, d = he({
|
|
121
121
|
displayPath: r,
|
|
122
|
-
original:
|
|
122
|
+
original: l.contents,
|
|
123
123
|
edited: b.current,
|
|
124
124
|
note: z
|
|
125
125
|
});
|
|
@@ -132,25 +132,25 @@ function we({ sid: n, onClose: s }) {
|
|
|
132
132
|
}
|
|
133
133
|
f({ kind: "sending" });
|
|
134
134
|
try {
|
|
135
|
-
const
|
|
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
|
|
142
|
-
if (!
|
|
141
|
+
}), ee = await a.json().catch(() => ({}));
|
|
142
|
+
if (!a.ok) {
|
|
143
143
|
f({
|
|
144
144
|
kind: "error",
|
|
145
|
-
message:
|
|
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 (
|
|
151
|
-
f({ kind: "error", message:
|
|
150
|
+
} catch (a) {
|
|
151
|
+
f({ kind: "error", message: a instanceof Error ? a.message : String(a) });
|
|
152
152
|
}
|
|
153
|
-
}, [n,
|
|
153
|
+
}, [n, l, g, z]), 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:
|
|
165
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
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:
|
|
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__ */
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
t
|
|
203
|
-
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-hidden pb-[var(--lfg-safe-bottom,0px)] md:pb-0", children: k ? /* @__PURE__ */
|
|
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__ */
|
|
224
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
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 || !
|
|
277
|
-
|
|
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__ */
|
|
281
|
+
u ? /* @__PURE__ */ s(
|
|
282
282
|
"div",
|
|
283
283
|
{
|
|
284
284
|
className: y(
|
|
@@ -296,9 +296,9 @@ function we({ sid: n, onClose: s }) {
|
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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,
|