react-semaphor 0.1.421 → 0.1.423
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +2 -2
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +913 -712
- package/dist/chunks/{analyze-result-contract-sWcmvBOA.js → analyze-result-contract-D7pjjYPy.js} +45 -46
- package/dist/chunks/{analyze-result-contract-B5Eeu7vD.js → analyze-result-contract-DpDcImgk.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-CscmhyuZ.js → calendar-preferences-dialog-CTmeASaM.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-cN3_2C-u.js → calendar-preferences-dialog-t5ET6MON.js} +3 -3
- package/dist/chunks/card-config-utils-15sRtebL.js +1 -0
- package/dist/chunks/card-config-utils-BYZ5MJOh.js +16 -0
- package/dist/chunks/dashboard-briefing-launcher-Cavd0QJb.js +3401 -0
- package/dist/chunks/dashboard-briefing-launcher-S2akO-ub.js +26 -0
- package/dist/chunks/dashboard-controls-BJLrErjW.js +2322 -0
- package/dist/chunks/dashboard-controls-DzbP8AXA.js +52 -0
- package/dist/chunks/dashboard-json-5tWb5KD6.js +1 -0
- package/dist/chunks/{dashboard-json-Cxhw2TZc.js → dashboard-json-Do2-pdPZ.js} +12 -11
- package/dist/chunks/{edit-dashboard-visual-BigSJ3-x.js → edit-dashboard-visual-Cw6bq4_w.js} +7058 -6989
- package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +178 -0
- package/dist/chunks/index-BPM3gDRw.js +1406 -0
- package/dist/chunks/{index-CH2ZzQo4.js → index-yHe0SeLO.js} +81534 -75430
- package/dist/chunks/{switch-TbCsyhv9.js → switch-2bh3Hka1.js} +620 -633
- package/dist/chunks/{switch-CiOjVyVI.js → switch-DMT7qf_R.js} +24 -24
- package/dist/chunks/{update-policy-2MZ-Vf7v.js → update-policy-BCJc0oI5.js} +1 -1
- package/dist/chunks/{update-policy-qpyAkOyO.js → update-policy-C1pmhLz9.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BzcJWNzh.js → use-create-flow-overlay-state-5MDbZcs1.js} +515 -544
- package/dist/chunks/use-create-flow-overlay-state-BNczg9Gj.js +11 -0
- package/dist/chunks/{validators-Dj1Y-46V.js → validators-DMlVbd1p.js} +1 -1
- package/dist/chunks/{validators-D0pfj3jJ.js → validators-PXkij33j.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +2 -2
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +108 -108
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +165 -340
- package/dist/data-app-codegen-node/index.js +761 -952
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +91 -95
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +1 -1
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +168 -164
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +0 -4
- package/dist/types/briefings.d.ts +2388 -7
- package/dist/types/dashboard-assistant.d.ts +0 -1
- package/dist/types/data-app-sdk-validation.d.ts +0 -1
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/main.d.ts +70 -10
- package/dist/types/types.d.ts +4 -8
- package/package.json +1 -1
- package/dist/chunks/dashboard-briefing-launcher-BYTBNetR.js +0 -9077
- package/dist/chunks/dashboard-briefing-launcher-DmZkzIC3.js +0 -80
- package/dist/chunks/dashboard-controls-9DFeKIP4.js +0 -52
- package/dist/chunks/dashboard-controls-PhzuaTBj.js +0 -2280
- package/dist/chunks/dashboard-json-DyRHI3mL.js +0 -1
- package/dist/chunks/edit-dashboard-visual-3_jiBXsu.js +0 -178
- package/dist/chunks/index-BKDQw0aK.js +0 -1346
- package/dist/chunks/use-create-flow-overlay-state-DUQmgb9H.js +0 -21
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { useContext as
|
|
2
|
+
import * as Zn from "react";
|
|
3
|
+
import { useContext as qn, useState as x, useRef as oe, useMemo as ze, useEffect as W, useCallback as Ot } from "react";
|
|
4
4
|
import * as Xn from "react-dom/client";
|
|
5
|
-
import {
|
|
6
|
-
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, e as me, R as ma, d as _t } from "../chunks/switch-
|
|
5
|
+
import { aK as ea, aL as ta, aM as Ir, aN as jr, aO as zr, aP as ra, aQ as Wr, aR as Hr, aS as Jr, aT as Vr, aU as _r, aV as Ur, aW as Kr, aX as na, aY as aa, aZ as oa, a_ as Ht, a$ as on, x as Gr, b0 as sa, b1 as Vt, b2 as sn, b3 as ia, b4 as la } from "../chunks/index-yHe0SeLO.js";
|
|
6
|
+
import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, e as me, R as ma, d as _t } from "../chunks/switch-2bh3Hka1.js";
|
|
7
7
|
import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
|
|
8
8
|
import { c as $e, X as Je } from "../chunks/x-CXDkqdur.js";
|
|
9
9
|
import { S as fa } from "../chunks/save-DgMfP0j8.js";
|
|
@@ -161,7 +161,7 @@ const ka = $e("PanelLeft", [
|
|
|
161
161
|
reasoningEffort: "low"
|
|
162
162
|
},
|
|
163
163
|
{ id: "gpt-4.1-mini", label: "GPT-4.1 mini", model: "gpt-4.1-mini" }
|
|
164
|
-
], Qr = "semaphor-data-app-builder-transcript",
|
|
164
|
+
], Qr = "semaphor-data-app-builder-transcript", Yr = "semaphor-data-app-builder-preview-url", Zr = "semaphor-data-app-builder-bridge-url", qr = "semaphor-data-app-builder-project-dir", Lt = "http://semaphor-data-app.localhost:8088", Xr = "http://localhost:8787", It = "/Users/rohit/code/sandbox/semaphor-data-apps/data-app", We = 3, Aa = 18, jt = 12;
|
|
165
165
|
function he(e, a) {
|
|
166
166
|
return `${e}:${a}`;
|
|
167
167
|
}
|
|
@@ -445,10 +445,10 @@ async function Fa(e, {
|
|
|
445
445
|
contentType: z.contentType
|
|
446
446
|
})
|
|
447
447
|
}
|
|
448
|
-
),
|
|
448
|
+
), Z = await O(ve, "Data App publish upload");
|
|
449
449
|
if (!ve.ok)
|
|
450
450
|
throw new Error(
|
|
451
|
-
|
|
451
|
+
Z.error || `Upload failed for ${z.path}.`
|
|
452
452
|
);
|
|
453
453
|
}
|
|
454
454
|
l == null || l({
|
|
@@ -597,7 +597,7 @@ function Ea(e) {
|
|
|
597
597
|
e
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Kt(e) {
|
|
601
601
|
return e < 1e3 ? `${e}ms` : `${(e / 1e3).toFixed(e < 1e4 ? 1 : 0)}s`;
|
|
602
602
|
}
|
|
603
603
|
function Oa(e) {
|
|
@@ -768,7 +768,7 @@ function st(e, a) {
|
|
|
768
768
|
s.set(d.id, d);
|
|
769
769
|
return Array.from(s.values());
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function Ka(e, a) {
|
|
772
772
|
return !a || !Ve(a) ? e : !e || !Ve(e) ? a : {
|
|
773
773
|
schemaVersion: "data-app-intent/v1",
|
|
774
774
|
app: {
|
|
@@ -825,7 +825,7 @@ function an(e, a) {
|
|
|
825
825
|
intentManifest: h || void 0
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Ga({
|
|
829
829
|
files: e,
|
|
830
830
|
selectedPath: a,
|
|
831
831
|
onSelect: s
|
|
@@ -918,7 +918,7 @@ function Qa({
|
|
|
918
918
|
] })
|
|
919
919
|
] });
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Ya({
|
|
922
922
|
plan: e,
|
|
923
923
|
changedFiles: a
|
|
924
924
|
}) {
|
|
@@ -967,9 +967,9 @@ function ko({
|
|
|
967
967
|
adapters: l
|
|
968
968
|
}) {
|
|
969
969
|
var v, B;
|
|
970
|
-
const p =
|
|
970
|
+
const p = qn(ea), h = typeof window > "u" ? void 0 : window.location.origin, g = d || ((v = p.tokenProps) == null ? void 0 : v.apiServiceUrl) || h, S = (B = p.authToken) == null ? void 0 : B.accessToken, [f, R] = x(() => fe("builder-session"));
|
|
971
971
|
return /* @__PURE__ */ r("main", { className: "flex h-full min-h-0 w-full min-w-0 flex-1 flex-col self-stretch bg-muted/40 text-foreground", children: /* @__PURE__ */ r(
|
|
972
|
-
|
|
972
|
+
Za,
|
|
973
973
|
{
|
|
974
974
|
adapters: l,
|
|
975
975
|
apiServiceUrl: g,
|
|
@@ -984,7 +984,7 @@ function ko({
|
|
|
984
984
|
f
|
|
985
985
|
) });
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function Za({
|
|
988
988
|
adapters: e,
|
|
989
989
|
apiServiceUrl: a,
|
|
990
990
|
accessToken: s,
|
|
@@ -996,22 +996,22 @@ function Ya({
|
|
|
996
996
|
onRestart: S
|
|
997
997
|
}) {
|
|
998
998
|
var Or, Lr;
|
|
999
|
-
const [f, R] = x(Lt), [v, B] = x(Xr), [b, E] = x(It), [j, L] = x(!1), [F, z] = x(Lt), [ve,
|
|
999
|
+
const [f, R] = x(Lt), [v, B] = x(Xr), [b, E] = x(It), [j, L] = x(!1), [F, z] = x(Lt), [ve, Z] = x(0), [A] = x(p), [_e, ct] = x(
|
|
1000
1000
|
l || ""
|
|
1001
|
-
), [ut, Ue] = x([]), [De, Pe] = x([]), [
|
|
1001
|
+
), [ut, Ue] = x([]), [De, Pe] = x([]), [q, ge] = x([]), [Qt, Ke] = x(null), [X, Ge] = x(!1), [ee, Yt] = x(!1), [Fe, un] = x(!0), [pn, se] = x("idle"), [hn, ie] = x(null), [Zt, qt] = x(null), [Xt, Qe] = x(() => Date.now()), [Me, er] = x(null), [pt, mn] = x("gpt-5.5-low"), Y = oe(null), K = oe(null), ht = oe([]), mt = oe(null), ft = oe(null), tr = oe(null), [be, ke] = x(!1), [rr, le] = x(null), [nr, gt] = x(!1), [ar, or] = x(!1), [Te, bt] = x("idle"), [sr, ir] = x(
|
|
1002
1002
|
null
|
|
1003
|
-
), [fn, lr] = x(""), [gn, dr] = x([]), [xt, cr] = x([]), [wt, ur] = x(null), [pr, bn] = x([]), [xn, wn] = x(null), [yt, hr] = x(null), [vt, mr] = x(null), [xe,
|
|
1003
|
+
), [fn, lr] = x(""), [gn, dr] = x([]), [xt, cr] = x([]), [wt, ur] = x(null), [pr, bn] = x([]), [xn, wn] = x(null), [yt, hr] = x(null), [vt, mr] = x(null), [xe, Ye] = x(
|
|
1004
1004
|
d || null
|
|
1005
|
-
), [
|
|
1005
|
+
), [Ze, kt] = x("idle"), [fr, Nt] = x("idle"), [gr, br] = x(null), [xr, wr] = x(null), [St, Ne] = x(null), [de, J] = x(null), [yr, qe] = x(null), [Xe, At] = x(null), [Ct, et] = x(!1), [Rt, vr] = x(""), [kr, Bt] = x(null), [Nr, Sr] = x(!1), Ee = oe(
|
|
1006
1006
|
null
|
|
1007
1007
|
), $t = oe(null), Se = oe(null), Ar = (e == null ? void 0 : e.readStatus) || Ra, tt = (e == null ? void 0 : e.runTurn) || Ba, Dt = (e == null ? void 0 : e.saveDraft) || Da, yn = (e == null ? void 0 : e.loadApp) || Pa, Pt = (e == null ? void 0 : e.publish) || Fa, V = ze(() => Ca(pt), [pt]), vn = ze(
|
|
1008
|
-
() =>
|
|
1008
|
+
() => q.find(
|
|
1009
1009
|
(t) => t.type === "run" && t.id === Qt
|
|
1010
1010
|
),
|
|
1011
|
-
[Qt,
|
|
1011
|
+
[Qt, q]
|
|
1012
1012
|
), Ft = ze(
|
|
1013
|
-
() => [...
|
|
1014
|
-
[
|
|
1013
|
+
() => [...q].reverse().find((t) => t.type === "run"),
|
|
1014
|
+
[q]
|
|
1015
1015
|
), Mt = ze(() => {
|
|
1016
1016
|
const t = F.includes("?") ? "&" : "?";
|
|
1017
1017
|
return `${F}${t}dataAppBuilderRefresh=${ve}`;
|
|
@@ -1020,8 +1020,8 @@ function Ya({
|
|
|
1020
1020
|
const t = window.setInterval(() => Qe(Date.now()), 500);
|
|
1021
1021
|
return () => window.clearInterval(t);
|
|
1022
1022
|
}, []), W(() => {
|
|
1023
|
-
ht.current =
|
|
1024
|
-
}, [
|
|
1023
|
+
ht.current = q;
|
|
1024
|
+
}, [q]), W(() => {
|
|
1025
1025
|
if (!Ct) return;
|
|
1026
1026
|
const t = () => {
|
|
1027
1027
|
et(!1);
|
|
@@ -1031,7 +1031,7 @@ function Ya({
|
|
|
1031
1031
|
};
|
|
1032
1032
|
}, [Ct]), W(() => {
|
|
1033
1033
|
L(!1);
|
|
1034
|
-
const t = window.localStorage.getItem(he(
|
|
1034
|
+
const t = window.localStorage.getItem(he(Yr, h)) || Lt, n = window.localStorage.getItem(he(Zr, h)) || Xr, i = window.localStorage.getItem(he(qr, h)) || It, o = window.localStorage.getItem(
|
|
1035
1035
|
he(Qr, h)
|
|
1036
1036
|
);
|
|
1037
1037
|
if (R(t), z(t), B(n), E(i), L(!0), o)
|
|
@@ -1042,29 +1042,29 @@ function Ya({
|
|
|
1042
1042
|
}
|
|
1043
1043
|
}, [h]), W(() => {
|
|
1044
1044
|
window.localStorage.setItem(
|
|
1045
|
-
he(
|
|
1045
|
+
he(Yr, h),
|
|
1046
1046
|
f
|
|
1047
1047
|
);
|
|
1048
1048
|
}, [f, h]), W(() => {
|
|
1049
1049
|
window.localStorage.setItem(
|
|
1050
|
-
he(
|
|
1050
|
+
he(Zr, h),
|
|
1051
1051
|
v
|
|
1052
1052
|
);
|
|
1053
1053
|
}, [v, h]), W(() => {
|
|
1054
1054
|
window.localStorage.setItem(
|
|
1055
|
-
he(
|
|
1055
|
+
he(qr, h),
|
|
1056
1056
|
b
|
|
1057
1057
|
);
|
|
1058
1058
|
}, [b, h]), W(() => {
|
|
1059
1059
|
var t;
|
|
1060
1060
|
window.localStorage.setItem(
|
|
1061
1061
|
he(Qr, h),
|
|
1062
|
-
JSON.stringify(
|
|
1062
|
+
JSON.stringify(q.map(oo))
|
|
1063
1063
|
), (t = mt.current) == null || t.scrollTo({
|
|
1064
1064
|
top: mt.current.scrollHeight,
|
|
1065
1065
|
behavior: "smooth"
|
|
1066
1066
|
});
|
|
1067
|
-
}, [
|
|
1067
|
+
}, [q, h]), W(() => {
|
|
1068
1068
|
Se.current = yt;
|
|
1069
1069
|
}, [yt]);
|
|
1070
1070
|
const Tt = Ot(
|
|
@@ -1091,14 +1091,14 @@ function Ya({
|
|
|
1091
1091
|
if (A !== "bridge" || !a) return;
|
|
1092
1092
|
const t = new AbortController();
|
|
1093
1093
|
return Tt(t.signal).then(() => {
|
|
1094
|
-
|
|
1094
|
+
Z((n) => n + 1);
|
|
1095
1095
|
}).catch((n) => {
|
|
1096
1096
|
t.signal.aborted || (gt(!1), le(
|
|
1097
1097
|
n instanceof Error ? n.message : "Bridge could not sync runtime context."
|
|
1098
1098
|
));
|
|
1099
1099
|
}), () => t.abort();
|
|
1100
1100
|
}, [a, A, Tt]), W(() => {
|
|
1101
|
-
|
|
1101
|
+
Ye(d || null);
|
|
1102
1102
|
}, [d]), W(() => {
|
|
1103
1103
|
if (!d || !j || $t.current === `${d}:${A}:${b}`)
|
|
1104
1104
|
return;
|
|
@@ -1115,7 +1115,7 @@ function Ya({
|
|
|
1115
1115
|
{ apiServiceUrl: a, accessToken: s, signal: t.signal }
|
|
1116
1116
|
);
|
|
1117
1117
|
if (t.signal.aborted) return;
|
|
1118
|
-
|
|
1118
|
+
Ye(o.id);
|
|
1119
1119
|
const u = Ja(o);
|
|
1120
1120
|
if (!u) {
|
|
1121
1121
|
J({
|
|
@@ -1139,7 +1139,7 @@ function Ya({
|
|
|
1139
1139
|
snapshot: u.sourceSnapshot,
|
|
1140
1140
|
targetProjectDir: k,
|
|
1141
1141
|
signal: t.signal
|
|
1142
|
-
}), w &&
|
|
1142
|
+
}), w && Z((C) => C + 1)), A === "bridge" && k !== b && E(k), t.signal.aborted) return;
|
|
1143
1143
|
J({
|
|
1144
1144
|
state: "done",
|
|
1145
1145
|
label: "Data App opened",
|
|
@@ -1207,14 +1207,14 @@ function Ya({
|
|
|
1207
1207
|
};
|
|
1208
1208
|
}, [s, a, Ar]);
|
|
1209
1209
|
const rt = Ot(
|
|
1210
|
-
async (t =
|
|
1210
|
+
async (t = K.current) => {
|
|
1211
1211
|
if (!t) return;
|
|
1212
1212
|
const n = await t.compileBrowserSandboxPreviewHtml();
|
|
1213
|
-
lr(n.html), dr(n.diagnostics), cr(n.warnings || []), ur(n.cssMode || null),
|
|
1213
|
+
lr(n.html), dr(n.diagnostics), cr(n.warnings || []), ur(n.cssMode || null), Z((i) => i + 1);
|
|
1214
1214
|
},
|
|
1215
1215
|
[]
|
|
1216
1216
|
), Oe = Ot(
|
|
1217
|
-
(t =
|
|
1217
|
+
(t = K.current, n = Se.current) => {
|
|
1218
1218
|
var m;
|
|
1219
1219
|
if (!t) return;
|
|
1220
1220
|
const i = t.listBrowserSandboxFiles(), o = t.readBrowserSandboxWorkspaceContext(), u = n && i.some((k) => k.path === n) ? n : ((m = i[0]) == null ? void 0 : m.path) || null;
|
|
@@ -1229,13 +1229,13 @@ function Ya({
|
|
|
1229
1229
|
let t = !1;
|
|
1230
1230
|
async function n() {
|
|
1231
1231
|
bt("loading"), ir(null), window.__SEMAPHOR_BROWSER_SANDBOX_VENDOR__ = {
|
|
1232
|
-
React:
|
|
1232
|
+
React: Zn,
|
|
1233
1233
|
ReactDOMClient: Xn
|
|
1234
1234
|
};
|
|
1235
1235
|
try {
|
|
1236
1236
|
const i = await ot();
|
|
1237
1237
|
if (t) return;
|
|
1238
|
-
|
|
1238
|
+
K.current = i, bt("ready"), await rt(i), Oe(i);
|
|
1239
1239
|
} catch (i) {
|
|
1240
1240
|
if (t) return;
|
|
1241
1241
|
bt("failed"), ir(
|
|
@@ -1248,13 +1248,13 @@ function Ya({
|
|
|
1248
1248
|
};
|
|
1249
1249
|
}, [A, Oe, rt]);
|
|
1250
1250
|
function kn(t) {
|
|
1251
|
-
const n =
|
|
1251
|
+
const n = K.current;
|
|
1252
1252
|
hr(t), Se.current = t, mr(
|
|
1253
1253
|
n && n.readBrowserSandboxFiles([t])[0] || null
|
|
1254
1254
|
);
|
|
1255
1255
|
}
|
|
1256
1256
|
async function Cr() {
|
|
1257
|
-
const t =
|
|
1257
|
+
const t = K.current;
|
|
1258
1258
|
!t || X || (t.resetBrowserSandbox(), await rt(t), Oe(t), M(
|
|
1259
1259
|
"Browser Sandbox reset to the approved starter template. Existing generated browser files were replaced in local browser storage.",
|
|
1260
1260
|
"guidance"
|
|
@@ -1262,7 +1262,7 @@ function Ya({
|
|
|
1262
1262
|
}
|
|
1263
1263
|
async function Nn() {
|
|
1264
1264
|
if (X || ee) return;
|
|
1265
|
-
if (At(null),
|
|
1265
|
+
if (At(null), qe(null), vr(""), Bt(null), A === "browser") {
|
|
1266
1266
|
await Cr();
|
|
1267
1267
|
return;
|
|
1268
1268
|
}
|
|
@@ -1284,7 +1284,7 @@ function Ya({
|
|
|
1284
1284
|
);
|
|
1285
1285
|
if (!i.ok || !o.ok)
|
|
1286
1286
|
throw new Error(o.error || "Bridge could not reset the app.");
|
|
1287
|
-
z(f),
|
|
1287
|
+
z(f), Z((u) => u + 1), J({
|
|
1288
1288
|
state: "done",
|
|
1289
1289
|
label: "App reset",
|
|
1290
1290
|
detail: "Blank template restored and typecheck passed."
|
|
@@ -1368,12 +1368,12 @@ function Ya({
|
|
|
1368
1368
|
function Rn(t) {
|
|
1369
1369
|
var i;
|
|
1370
1370
|
t.intentManifest && At(
|
|
1371
|
-
(o) =>
|
|
1371
|
+
(o) => Ka(o, t.intentManifest)
|
|
1372
1372
|
);
|
|
1373
1373
|
const n = (i = t.artifacts) == null ? void 0 : i.find(
|
|
1374
1374
|
(o) => o.type === "dataset_inspector"
|
|
1375
1375
|
);
|
|
1376
|
-
n &&
|
|
1376
|
+
n && qe(n);
|
|
1377
1377
|
}
|
|
1378
1378
|
function Rr(t) {
|
|
1379
1379
|
se({
|
|
@@ -1400,7 +1400,7 @@ function Ya({
|
|
|
1400
1400
|
createdAt: i,
|
|
1401
1401
|
attachments: t.attachments
|
|
1402
1402
|
}
|
|
1403
|
-
]),
|
|
1403
|
+
]), qt(i), se("context"), ie("Preparing app context and available files."), Gn({ ...t, prompt: n });
|
|
1404
1404
|
}
|
|
1405
1405
|
async function Bn(t) {
|
|
1406
1406
|
if (!t.type.startsWith("image/")) {
|
|
@@ -1477,7 +1477,7 @@ function Ya({
|
|
|
1477
1477
|
}
|
|
1478
1478
|
ke(!0), le(
|
|
1479
1479
|
t ? "Loading inspector in the preview…" : "Click an element in the preview. Press Esc to cancel."
|
|
1480
|
-
), t ? (z(f),
|
|
1480
|
+
), t ? (z(f), Z((n) => n + 1)) : window.setTimeout(() => at("inspect-enable"), 50);
|
|
1481
1481
|
} catch (t) {
|
|
1482
1482
|
ke(!1), le(null), M(
|
|
1483
1483
|
t instanceof Error ? t.message : String(t),
|
|
@@ -1549,7 +1549,7 @@ function Ya({
|
|
|
1549
1549
|
const i = n === "browser" ? "Browser Sandbox" : "Local Bridge", o = (u = t.changedFiles) != null && u.length ? t.changedFiles.join(", ") : "no files";
|
|
1550
1550
|
return t.ok ? `${i} applied the revision and validation passed. Changed files: ${o}. The preview has been refreshed; inspect the file tree and run card for the exact file plan.` : `${i} could not finish the revision cleanly. Changed files: ${o}. The run card includes the validation output so you can ask a follow-up repair question or switch runtimes.`;
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function G(t, n) {
|
|
1553
1553
|
Cn(
|
|
1554
1554
|
t,
|
|
1555
1555
|
(i) => i.map((o) => {
|
|
@@ -1581,15 +1581,15 @@ function Ya({
|
|
|
1581
1581
|
}
|
|
1582
1582
|
async function Ln(t, n, i) {
|
|
1583
1583
|
var k, w, C, y;
|
|
1584
|
-
(k =
|
|
1584
|
+
(k = Y.current) == null || k.abort();
|
|
1585
1585
|
const o = new AbortController(), u = Date.now();
|
|
1586
|
-
|
|
1586
|
+
Y.current = o, Ge(!0), Ke(n), Qe(u), G(n, "reading");
|
|
1587
1587
|
const m = window.setTimeout(() => {
|
|
1588
1588
|
o.abort();
|
|
1589
1589
|
}, 18e4);
|
|
1590
1590
|
try {
|
|
1591
|
-
let N =
|
|
1592
|
-
N || (N = await ot(),
|
|
1591
|
+
let N = K.current;
|
|
1592
|
+
N || (N = await ot(), K.current = N);
|
|
1593
1593
|
const I = N.readBrowserSandboxWorkspaceContext(), $ = (C = (w = I.files) == null ? void 0 : w.editable) != null && C.length ? tn(
|
|
1594
1594
|
I.files.editable,
|
|
1595
1595
|
Se.current,
|
|
@@ -1602,7 +1602,7 @@ function Ya({
|
|
|
1602
1602
|
const pe = [];
|
|
1603
1603
|
for (let ne = 0; ne < We; ne += 1) {
|
|
1604
1604
|
const te = Le.length > 0 || ne > 0, Ie = te ? `repair-${ne + 1}` : "initial";
|
|
1605
|
-
|
|
1605
|
+
G(n, te ? "repairing" : "generating");
|
|
1606
1606
|
const _ = ue || (await tt(
|
|
1607
1607
|
{
|
|
1608
1608
|
projectId: h,
|
|
@@ -1620,12 +1620,12 @@ function Ya({
|
|
|
1620
1620
|
)).revision;
|
|
1621
1621
|
if (ue = void 0, !_)
|
|
1622
1622
|
throw new Error("Data App Builder did not return a revision.");
|
|
1623
|
-
|
|
1623
|
+
G(n, "writing");
|
|
1624
1624
|
const we = N.applyBrowserSandboxRevision({
|
|
1625
1625
|
..._,
|
|
1626
1626
|
attemptLabel: Ie
|
|
1627
1627
|
});
|
|
1628
|
-
pe.push(...we.attempts || []),
|
|
1628
|
+
pe.push(...we.attempts || []), G(n, "typechecking");
|
|
1629
1629
|
let D = {
|
|
1630
1630
|
...we,
|
|
1631
1631
|
attempts: [...pe],
|
|
@@ -1645,7 +1645,7 @@ function Ya({
|
|
|
1645
1645
|
};
|
|
1646
1646
|
if (we.ok) {
|
|
1647
1647
|
const P = await N.compileBrowserSandboxPreviewHtml();
|
|
1648
|
-
if (lr(P.html), dr(P.diagnostics), cr(P.warnings || []), ur(P.cssMode || null),
|
|
1648
|
+
if (lr(P.html), dr(P.diagnostics), cr(P.warnings || []), ur(P.cssMode || null), Z((U) => U + 1), Oe(N), P.diagnostics.length > 0) {
|
|
1649
1649
|
const U = {
|
|
1650
1650
|
command: "browser sandbox preview compile",
|
|
1651
1651
|
durationMs: 0,
|
|
@@ -1679,7 +1679,7 @@ function Ya({
|
|
|
1679
1679
|
}
|
|
1680
1680
|
if (!Q)
|
|
1681
1681
|
throw new Error("The browser runtime loop ended without a validation result.");
|
|
1682
|
-
|
|
1682
|
+
G(n, Q.ok ? "complete" : "failed"), nt(n, {
|
|
1683
1683
|
status: Q.ok ? "done" : "failed",
|
|
1684
1684
|
result: Q,
|
|
1685
1685
|
error: Q.error,
|
|
@@ -1702,16 +1702,16 @@ function Ya({
|
|
|
1702
1702
|
}), M(
|
|
1703
1703
|
`Browser Sandbox stopped before it could validate the app: ${$}`,
|
|
1704
1704
|
"blocked"
|
|
1705
|
-
),
|
|
1705
|
+
), G(n, "failed");
|
|
1706
1706
|
} finally {
|
|
1707
|
-
|
|
1707
|
+
Ge(!1), Ke(null), Y.current = null, window.clearTimeout(m);
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
async function In(t, n, i) {
|
|
1711
1711
|
var k, w, C, y;
|
|
1712
|
-
(k =
|
|
1712
|
+
(k = Y.current) == null || k.abort();
|
|
1713
1713
|
const o = new AbortController(), u = Date.now();
|
|
1714
|
-
|
|
1714
|
+
Y.current = o, Ge(!0), Ke(n), Qe(u), G(n, "reading");
|
|
1715
1715
|
const m = window.setTimeout(() => {
|
|
1716
1716
|
o.abort();
|
|
1717
1717
|
}, 18e4);
|
|
@@ -1818,19 +1818,19 @@ function Ya({
|
|
|
1818
1818
|
const we = [];
|
|
1819
1819
|
for (let D = 0; D < We; D += 1) {
|
|
1820
1820
|
const T = te.length > 0 || D > 0, P = T ? `repair-${D + 1}` : "initial";
|
|
1821
|
-
|
|
1821
|
+
G(n, T ? "repairing" : "generating");
|
|
1822
1822
|
const U = await Ae({
|
|
1823
1823
|
currentFiles: Ie,
|
|
1824
1824
|
workspaceContext: ue,
|
|
1825
1825
|
diagnostics: te,
|
|
1826
1826
|
repair: T
|
|
1827
1827
|
});
|
|
1828
|
-
|
|
1828
|
+
G(n, "writing");
|
|
1829
1829
|
const ae = await Ce({
|
|
1830
1830
|
...U,
|
|
1831
1831
|
attemptLabel: P
|
|
1832
1832
|
});
|
|
1833
|
-
if (z(f),
|
|
1833
|
+
if (z(f), Z((je) => je + 1), we.push(...ae.attempts || []), _ = {
|
|
1834
1834
|
...ae,
|
|
1835
1835
|
attempts: [...we],
|
|
1836
1836
|
filePlan: U.plan,
|
|
@@ -1839,14 +1839,14 @@ function Ya({
|
|
|
1839
1839
|
contextChars: ne,
|
|
1840
1840
|
generatedFileCount: U.files.length,
|
|
1841
1841
|
generatedChars: U.files.reduce(
|
|
1842
|
-
(je,
|
|
1842
|
+
(je, Yn) => je + Yn.contents.length,
|
|
1843
1843
|
0
|
|
1844
1844
|
),
|
|
1845
1845
|
repairAttempts: we.filter(
|
|
1846
1846
|
(je) => je.label.startsWith("repair")
|
|
1847
1847
|
).length
|
|
1848
1848
|
}
|
|
1849
|
-
},
|
|
1849
|
+
}, G(n, "typechecking"), ae.ok || D === We - 1)
|
|
1850
1850
|
break;
|
|
1851
1851
|
Ie = (((y = ae.changedFiles) == null ? void 0 : y.length) || 0) > 0 ? await I(
|
|
1852
1852
|
Q = Array.from(
|
|
@@ -1859,7 +1859,7 @@ function Ya({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
if (!_)
|
|
1861
1861
|
throw new Error("The app-builder loop ended without a validation result.");
|
|
1862
|
-
|
|
1862
|
+
G(n, _.ok ? "complete" : "failed"), nt(n, {
|
|
1863
1863
|
status: _.ok ? "done" : "failed",
|
|
1864
1864
|
result: _,
|
|
1865
1865
|
error: _.error,
|
|
@@ -1882,15 +1882,15 @@ function Ya({
|
|
|
1882
1882
|
}), M(
|
|
1883
1883
|
`Local Bridge stopped before it could validate the app: ${$}`,
|
|
1884
1884
|
"blocked"
|
|
1885
|
-
),
|
|
1885
|
+
), G(n, "failed");
|
|
1886
1886
|
} finally {
|
|
1887
|
-
|
|
1887
|
+
Ge(!1), Ke(null), Y.current = null, window.clearTimeout(m);
|
|
1888
1888
|
}
|
|
1889
1889
|
}
|
|
1890
1890
|
async function jn(t) {
|
|
1891
1891
|
var u, m;
|
|
1892
|
-
let n =
|
|
1893
|
-
n || (n = await ot(),
|
|
1892
|
+
let n = K.current;
|
|
1893
|
+
n || (n = await ot(), K.current = n);
|
|
1894
1894
|
const i = n.readBrowserSandboxWorkspaceContext(), o = (m = (u = i.files) == null ? void 0 : u.editable) != null && m.length ? tn(
|
|
1895
1895
|
i.files.editable,
|
|
1896
1896
|
Se.current,
|
|
@@ -1902,7 +1902,7 @@ function Ya({
|
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
1904
1904
|
async function zn(t) {
|
|
1905
|
-
const n =
|
|
1905
|
+
const n = K.current;
|
|
1906
1906
|
return n ? n.readBrowserSandboxFiles(t) : [];
|
|
1907
1907
|
}
|
|
1908
1908
|
async function Et(t, n) {
|
|
@@ -2113,8 +2113,8 @@ function Ya({
|
|
|
2113
2113
|
}
|
|
2114
2114
|
async function _n() {
|
|
2115
2115
|
var u, m, k, w;
|
|
2116
|
-
let t =
|
|
2117
|
-
t || (t = await ot(),
|
|
2116
|
+
let t = K.current;
|
|
2117
|
+
t || (t = await ot(), K.current = t);
|
|
2118
2118
|
const n = t.readBrowserSandboxWorkspaceContext(), i = (m = (u = n.files) == null ? void 0 : u.snapshot) != null && m.length ? n.files.snapshot : [
|
|
2119
2119
|
...((k = n.files) == null ? void 0 : k.source) || [],
|
|
2120
2120
|
...((w = n.files) == null ? void 0 : w.root) || []
|
|
@@ -2186,7 +2186,7 @@ function Ya({
|
|
|
2186
2186
|
},
|
|
2187
2187
|
{ apiServiceUrl: a, accessToken: s, signal: t.signal }
|
|
2188
2188
|
);
|
|
2189
|
-
return
|
|
2189
|
+
return Ye(w.dataAppId), br(w.savedAt || (/* @__PURE__ */ new Date()).toISOString()), kt("saved"), J({
|
|
2190
2190
|
state: "done",
|
|
2191
2191
|
label: "Draft saved",
|
|
2192
2192
|
detail: "Semaphor has the latest source snapshot."
|
|
@@ -2228,7 +2228,7 @@ function Ya({
|
|
|
2228
2228
|
);
|
|
2229
2229
|
return o;
|
|
2230
2230
|
}
|
|
2231
|
-
async function
|
|
2231
|
+
async function Kn() {
|
|
2232
2232
|
if (!Pt) {
|
|
2233
2233
|
M(
|
|
2234
2234
|
"Publish is not configured in this host yet.",
|
|
@@ -2236,7 +2236,7 @@ function Ya({
|
|
|
2236
2236
|
);
|
|
2237
2237
|
return;
|
|
2238
2238
|
}
|
|
2239
|
-
if (
|
|
2239
|
+
if (Ze === "saving" && !Ee.current) {
|
|
2240
2240
|
M("Save draft is already in progress.", "blocked");
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
@@ -2302,7 +2302,7 @@ function Ya({
|
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
);
|
|
2305
|
-
|
|
2305
|
+
Ye(o.dataAppId), wr(o.publishedAt || (/* @__PURE__ */ new Date()).toISOString()), Nt("published"), J({
|
|
2306
2306
|
state: "done",
|
|
2307
2307
|
label: "Published",
|
|
2308
2308
|
detail: `Version ${o.version ?? o.versionId} is ready.`
|
|
@@ -2319,10 +2319,10 @@ function Ya({
|
|
|
2319
2319
|
}), M(`Publish failed: ${u}`, "blocked");
|
|
2320
2320
|
}
|
|
2321
2321
|
}
|
|
2322
|
-
async function
|
|
2322
|
+
async function Gn(t) {
|
|
2323
2323
|
var m, k;
|
|
2324
2324
|
const { attachments: n, prompt: i } = t, o = new AbortController();
|
|
2325
|
-
|
|
2325
|
+
Y.current = o, Yt(!0);
|
|
2326
2326
|
const u = window.setTimeout(() => {
|
|
2327
2327
|
o.abort();
|
|
2328
2328
|
}, 18e4);
|
|
@@ -2451,7 +2451,7 @@ function Ya({
|
|
|
2451
2451
|
createdAt: I,
|
|
2452
2452
|
startedAt: I
|
|
2453
2453
|
}
|
|
2454
|
-
]),
|
|
2454
|
+
]), Y.current = null, A === "browser" ? Ln(i, N, y.revision) : In(i, N, y.revision);
|
|
2455
2455
|
} catch (w) {
|
|
2456
2456
|
const C = w instanceof DOMException && w.name === "AbortError";
|
|
2457
2457
|
M(
|
|
@@ -2459,7 +2459,7 @@ function Ya({
|
|
|
2459
2459
|
"blocked"
|
|
2460
2460
|
);
|
|
2461
2461
|
} finally {
|
|
2462
|
-
|
|
2462
|
+
Yt(!1), se("idle"), ie(null), qt(null), Y.current === o && (Y.current = null), window.clearTimeout(u);
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
function Qn(t) {
|
|
@@ -2519,7 +2519,7 @@ function Ya({
|
|
|
2519
2519
|
] }),
|
|
2520
2520
|
/* @__PURE__ */ c(_r, { children: [
|
|
2521
2521
|
/* @__PURE__ */ r(Ur, { children: "Cancel" }),
|
|
2522
|
-
/* @__PURE__ */ r(
|
|
2522
|
+
/* @__PURE__ */ r(Kr, { onClick: S, children: "Discard" })
|
|
2523
2523
|
] })
|
|
2524
2524
|
] })
|
|
2525
2525
|
] }) : null })
|
|
@@ -2530,7 +2530,7 @@ function Ya({
|
|
|
2530
2530
|
ref: mt,
|
|
2531
2531
|
className: "min-h-0 flex-1 overflow-y-auto px-3 py-4",
|
|
2532
2532
|
children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
|
|
2533
|
-
|
|
2533
|
+
q.length === 0 && /* @__PURE__ */ c("div", { children: [
|
|
2534
2534
|
/* @__PURE__ */ r("p", { className: "text-[12.5px] font-medium text-foreground", children: "Start with a question or a build instruction" }),
|
|
2535
2535
|
/* @__PURE__ */ r("p", { className: "mt-1 text-[11.5px] leading-relaxed text-muted-foreground", children: "Ask about the current files, or describe the app you want." }),
|
|
2536
2536
|
/* @__PURE__ */ r("div", { className: "mt-3 grid gap-1.5", children: Na.slice(0, 3).map((t) => /* @__PURE__ */ c(
|
|
@@ -2547,12 +2547,12 @@ function Ya({
|
|
|
2547
2547
|
t.id
|
|
2548
2548
|
)) })
|
|
2549
2549
|
] }),
|
|
2550
|
-
|
|
2550
|
+
q.map(
|
|
2551
2551
|
(t) => t.type === "user" ? /* @__PURE__ */ r(ao, { message: t }, t.id) : t.type === "assistant" ? /* @__PURE__ */ r(
|
|
2552
2552
|
so,
|
|
2553
2553
|
{
|
|
2554
2554
|
message: t,
|
|
2555
|
-
onOpenDatasetInspector:
|
|
2555
|
+
onOpenDatasetInspector: qe
|
|
2556
2556
|
},
|
|
2557
2557
|
t.id
|
|
2558
2558
|
) : /* @__PURE__ */ r(
|
|
@@ -2569,7 +2569,7 @@ function Ya({
|
|
|
2569
2569
|
{
|
|
2570
2570
|
phase: pn,
|
|
2571
2571
|
detail: hn,
|
|
2572
|
-
elapsedMs:
|
|
2572
|
+
elapsedMs: Zt ? Math.max(0, Xt - Zt) : 0
|
|
2573
2573
|
}
|
|
2574
2574
|
)
|
|
2575
2575
|
] })
|
|
@@ -2611,7 +2611,7 @@ function Ya({
|
|
|
2611
2611
|
}
|
|
2612
2612
|
),
|
|
2613
2613
|
ut.length > 0 ? /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5 border-t border-border px-2 py-2", children: ut.map((t) => /* @__PURE__ */ r(
|
|
2614
|
-
|
|
2614
|
+
Gt,
|
|
2615
2615
|
{
|
|
2616
2616
|
attachment: t,
|
|
2617
2617
|
onRemove: $n
|
|
@@ -2713,7 +2713,7 @@ function Ya({
|
|
|
2713
2713
|
title: "Stop the current run",
|
|
2714
2714
|
onClick: () => {
|
|
2715
2715
|
var t;
|
|
2716
|
-
return (t =
|
|
2716
|
+
return (t = Y.current) == null ? void 0 : t.abort();
|
|
2717
2717
|
},
|
|
2718
2718
|
children: [
|
|
2719
2719
|
/* @__PURE__ */ r(Je, { className: "h-3 w-3" }),
|
|
@@ -2865,7 +2865,7 @@ function Ya({
|
|
|
2865
2865
|
title: "Refresh manifest",
|
|
2866
2866
|
"aria-label": "Refresh manifest",
|
|
2867
2867
|
onClick: () => void Tr(),
|
|
2868
|
-
children: /* @__PURE__ */ r(
|
|
2868
|
+
children: /* @__PURE__ */ r(Gr, { className: "h-3.5 w-3.5" })
|
|
2869
2869
|
}
|
|
2870
2870
|
)
|
|
2871
2871
|
] }),
|
|
@@ -2902,7 +2902,7 @@ function Ya({
|
|
|
2902
2902
|
] }),
|
|
2903
2903
|
/* @__PURE__ */ c(_r, { children: [
|
|
2904
2904
|
/* @__PURE__ */ r(Ur, { children: "Cancel" }),
|
|
2905
|
-
/* @__PURE__ */ r(
|
|
2905
|
+
/* @__PURE__ */ r(Kr, { onClick: () => void Nn(), children: "Reset app" })
|
|
2906
2906
|
] })
|
|
2907
2907
|
] })
|
|
2908
2908
|
] }),
|
|
@@ -2913,11 +2913,11 @@ function Ya({
|
|
|
2913
2913
|
variant: "ghost",
|
|
2914
2914
|
size: "xs",
|
|
2915
2915
|
className: "gap-1.5 text-muted-foreground",
|
|
2916
|
-
disabled: X || ee ||
|
|
2916
|
+
disabled: X || ee || Ze === "saving" || A !== "bridge" || !Dt,
|
|
2917
2917
|
title: "Save the current local source snapshot as a Semaphor draft",
|
|
2918
2918
|
onClick: () => void Er(),
|
|
2919
2919
|
children: [
|
|
2920
|
-
|
|
2920
|
+
Ze === "saving" ? /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(fa, { className: "h-3.5 w-3.5" }),
|
|
2921
2921
|
"Save draft"
|
|
2922
2922
|
]
|
|
2923
2923
|
}
|
|
@@ -2929,9 +2929,9 @@ function Ya({
|
|
|
2929
2929
|
variant: "ghost",
|
|
2930
2930
|
size: "xs",
|
|
2931
2931
|
className: "gap-1.5 text-muted-foreground",
|
|
2932
|
-
disabled: X || ee ||
|
|
2932
|
+
disabled: X || ee || Ze === "saving" || fr === "publishing" || A !== "bridge" || !Pt,
|
|
2933
2933
|
title: "Build, upload, and publish the current Data App",
|
|
2934
|
-
onClick: () => void
|
|
2934
|
+
onClick: () => void Kn(),
|
|
2935
2935
|
children: [
|
|
2936
2936
|
fr === "publishing" ? /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(ba, { className: "h-3.5 w-3.5" }),
|
|
2937
2937
|
"Publish"
|
|
@@ -3032,9 +3032,9 @@ function Ya({
|
|
|
3032
3032
|
title: "Reload the live preview",
|
|
3033
3033
|
"aria-label": "Reload the live preview",
|
|
3034
3034
|
onClick: () => {
|
|
3035
|
-
A === "browser" ? (rt(), Oe()) : (z(f),
|
|
3035
|
+
A === "browser" ? (rt(), Oe()) : (z(f), Z((t) => t + 1));
|
|
3036
3036
|
},
|
|
3037
|
-
children: /* @__PURE__ */ r(
|
|
3037
|
+
children: /* @__PURE__ */ r(Gr, { className: "h-3.5 w-3.5" })
|
|
3038
3038
|
}
|
|
3039
3039
|
)
|
|
3040
3040
|
] })
|
|
@@ -3069,7 +3069,7 @@ function Ya({
|
|
|
3069
3069
|
/* @__PURE__ */ r("span", { className: "ml-auto font-mono text-[10px] text-muted-foreground", children: pr.length })
|
|
3070
3070
|
] }),
|
|
3071
3071
|
/* @__PURE__ */ r("div", { className: "max-h-72 shrink-0 overflow-y-auto border-b border-border p-2", children: /* @__PURE__ */ r(
|
|
3072
|
-
|
|
3072
|
+
Ga,
|
|
3073
3073
|
{
|
|
3074
3074
|
files: pr,
|
|
3075
3075
|
selectedPath: yt,
|
|
@@ -3096,7 +3096,7 @@ function Ya({
|
|
|
3096
3096
|
lo,
|
|
3097
3097
|
{
|
|
3098
3098
|
artifact: yr,
|
|
3099
|
-
onClose: () =>
|
|
3099
|
+
onClose: () => qe(null)
|
|
3100
3100
|
}
|
|
3101
3101
|
) : null
|
|
3102
3102
|
] })
|
|
@@ -3129,7 +3129,7 @@ function Wt({
|
|
|
3129
3129
|
)
|
|
3130
3130
|
] });
|
|
3131
3131
|
}
|
|
3132
|
-
function
|
|
3132
|
+
function qa({ code: e, lang: a }) {
|
|
3133
3133
|
const [s, d] = x(!1);
|
|
3134
3134
|
return /* @__PURE__ */ c("div", { className: "my-2 overflow-hidden rounded-[6px] border border-border", children: [
|
|
3135
3135
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 border-b border-border bg-muted/40 px-2.5 py-1", children: [
|
|
@@ -3203,7 +3203,7 @@ function ro(e) {
|
|
|
3203
3203
|
const h = a.slice(0, p).trim();
|
|
3204
3204
|
h && /^[A-Za-z0-9_.+-]{1,16}$/.test(h) && (d = h, l = a.slice(p + 1));
|
|
3205
3205
|
}
|
|
3206
|
-
return l = l.replace(/^\n/, "").replace(/\s+$/, ""), /* @__PURE__ */ r(
|
|
3206
|
+
return l = l.replace(/^\n/, "").replace(/\s+$/, ""), /* @__PURE__ */ r(qa, { code: l, lang: d }, s);
|
|
3207
3207
|
}
|
|
3208
3208
|
return /* @__PURE__ */ r("span", { children: to(a, s) }, s);
|
|
3209
3209
|
});
|
|
@@ -3273,7 +3273,7 @@ function no({
|
|
|
3273
3273
|
}
|
|
3274
3274
|
),
|
|
3275
3275
|
S.attachments.length > 0 ? /* @__PURE__ */ r("div", { className: "mt-1.5 flex flex-wrap gap-1.5", children: S.attachments.map((R) => /* @__PURE__ */ r(
|
|
3276
|
-
|
|
3276
|
+
Gt,
|
|
3277
3277
|
{
|
|
3278
3278
|
attachment: R,
|
|
3279
3279
|
onRemove: (v) => s(S.id, v)
|
|
@@ -3290,10 +3290,10 @@ function ao({ message: e }) {
|
|
|
3290
3290
|
var a;
|
|
3291
3291
|
return /* @__PURE__ */ c("div", { className: "ml-auto max-w-[88%] rounded-[6px] rounded-br-[2px] bg-foreground/10 px-3 py-2 text-[13px] leading-relaxed text-foreground", children: [
|
|
3292
3292
|
/* @__PURE__ */ r("div", { children: e.content }),
|
|
3293
|
-
(a = e.attachments) != null && a.length ? /* @__PURE__ */ r("div", { className: "mt-2 flex flex-wrap gap-1.5", children: e.attachments.map((s) => /* @__PURE__ */ r(
|
|
3293
|
+
(a = e.attachments) != null && a.length ? /* @__PURE__ */ r("div", { className: "mt-2 flex flex-wrap gap-1.5", children: e.attachments.map((s) => /* @__PURE__ */ r(Gt, { attachment: s }, s.id)) }) : null
|
|
3294
3294
|
] });
|
|
3295
3295
|
}
|
|
3296
|
-
function
|
|
3296
|
+
function Gt({
|
|
3297
3297
|
attachment: e,
|
|
3298
3298
|
onRemove: a
|
|
3299
3299
|
}) {
|
|
@@ -3528,7 +3528,7 @@ function co({
|
|
|
3528
3528
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
3529
3529
|
/* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground" }),
|
|
3530
3530
|
/* @__PURE__ */ r("span", { className: "text-[12.5px] font-medium text-foreground", children: d }),
|
|
3531
|
-
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground", children:
|
|
3531
|
+
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground", children: Kt(s) })
|
|
3532
3532
|
] }),
|
|
3533
3533
|
/* @__PURE__ */ r("div", { className: "mt-1 flex items-center justify-between gap-3", children: /* @__PURE__ */ r("span", { className: "text-[11px] leading-relaxed text-muted-foreground", children: l }) })
|
|
3534
3534
|
] });
|
|
@@ -3569,7 +3569,7 @@ function uo({
|
|
|
3569
3569
|
d,
|
|
3570
3570
|
" ·",
|
|
3571
3571
|
" ",
|
|
3572
|
-
|
|
3572
|
+
Kt(h)
|
|
3573
3573
|
] })
|
|
3574
3574
|
] }),
|
|
3575
3575
|
/* @__PURE__ */ c("div", { className: "space-y-2.5 border-t border-border/60 px-2.5 py-2", children: [
|
|
@@ -3630,7 +3630,7 @@ function uo({
|
|
|
3630
3630
|
e.result.changedFiles.join(", ")
|
|
3631
3631
|
] }) : null,
|
|
3632
3632
|
/* @__PURE__ */ r(
|
|
3633
|
-
|
|
3633
|
+
Ya,
|
|
3634
3634
|
{
|
|
3635
3635
|
plan: e.result.filePlan,
|
|
3636
3636
|
changedFiles: e.result.changedFiles
|
|
@@ -3669,7 +3669,7 @@ function po({
|
|
|
3669
3669
|
(a || 0) + 1,
|
|
3670
3670
|
" / ",
|
|
3671
3671
|
We
|
|
3672
|
-
] }) : /* @__PURE__ */ r("span", { children:
|
|
3672
|
+
] }) : /* @__PURE__ */ r("span", { children: Kt(e) }) })
|
|
3673
3673
|
] });
|
|
3674
3674
|
}
|
|
3675
3675
|
function ho({ state: e }) {
|