@burdenoff/microfe-cosmicintersection 2026.1030.1 → 2026.1030.3
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/cosmicintersection/CosmicIntersectionRoutes.d.ts.map +1 -1
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js +82 -77
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js.map +1 -1
- package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts +42 -0
- package/dist/cosmicintersection/lib/assistantAwareDialog.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/assistantAwareDialog.js +12 -0
- package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -0
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +185 -182
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +142 -139
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/test/i18nMock.d.ts +16 -0
- package/dist/test/i18nMock.d.ts.map +1 -0
- package/dist/test/setup.d.ts +9 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/package.json +11 -3
|
@@ -12,15 +12,16 @@ import h from "../../components/StatusBadge.js";
|
|
|
12
12
|
import "../../components/index.js";
|
|
13
13
|
import { useSelectedRecord as g } from "../../lib/useSelectedRecord.js";
|
|
14
14
|
import _ from "../../components/ResultsChart.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
15
|
+
import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as v, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as y } from "../../lib/assistantAwareDialog.js";
|
|
16
|
+
import { useMemo as b, useState as x } from "react";
|
|
17
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
18
|
+
import { BarChart3 as T, Beaker as E, Download as D, ExternalLink as O, Play as k, Sparkles as A } from "lucide-react";
|
|
19
|
+
import { Badge as j, Button as M, Dialog as N, DialogClose as P, DialogContent as F, DialogDescription as I, DialogFooter as L, DialogHeader as R, DialogTitle as z, Input as B, Label as V, Select as H, SelectContent as U, SelectItem as W, SelectTrigger as G, SelectValue as K, Switch as q, Table as ee, TableBody as te, TableCell as J, TableHead as Y, TableHeader as ne, TableRow as re, Textarea as ie } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
//#region src/cosmicintersection/pages/analyses/AnalysesPage.tsx
|
|
20
21
|
function X(e) {
|
|
21
22
|
return !!e.outputFile?.id || !!(e.results && Object.keys(e.results).length > 0);
|
|
22
23
|
}
|
|
23
|
-
var
|
|
24
|
+
var ae = [
|
|
24
25
|
{
|
|
25
26
|
value: "PENDING",
|
|
26
27
|
label: "Pending"
|
|
@@ -49,68 +50,70 @@ function Q(e) {
|
|
|
49
50
|
minute: "2-digit"
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
let { data: t, loading: n } = p(e), [r, i] =
|
|
54
|
-
return n ? /* @__PURE__ */
|
|
53
|
+
function oe({ fileId: e }) {
|
|
54
|
+
let { data: t, loading: n } = p(e), [r, i] = x(!1), a = t?.getFileDownloadUrl ?? null;
|
|
55
|
+
return n ? /* @__PURE__ */ C("span", {
|
|
55
56
|
className: "text-xs text-text-secondary",
|
|
56
57
|
children: "Resolving link…"
|
|
57
|
-
}) : a ? /* @__PURE__ */
|
|
58
|
+
}) : a ? /* @__PURE__ */ w("div", {
|
|
58
59
|
className: "space-y-2",
|
|
59
|
-
children: [r ? null : /* @__PURE__ */
|
|
60
|
+
children: [r ? null : /* @__PURE__ */ C("img", {
|
|
60
61
|
src: a,
|
|
61
62
|
alt: "Analysis output preview",
|
|
62
63
|
onError: () => i(!0),
|
|
63
64
|
className: "max-h-72 w-full rounded-card border border-border-default bg-bg-sunken object-contain"
|
|
64
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ w("a", {
|
|
65
66
|
href: a,
|
|
66
67
|
target: "_blank",
|
|
67
68
|
rel: "noopener noreferrer",
|
|
68
69
|
className: "inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ C(D, {
|
|
70
71
|
className: "size-3.5",
|
|
71
72
|
"aria-hidden": "true"
|
|
72
73
|
}), "Download output"]
|
|
73
74
|
})]
|
|
74
|
-
}) : /* @__PURE__ */
|
|
75
|
+
}) : /* @__PURE__ */ w("span", {
|
|
75
76
|
className: "text-xs text-text-secondary",
|
|
76
77
|
children: ["File ", e]
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function se({ analysis: e, onOpenChange: t }) {
|
|
80
81
|
let n = e?.results ?? null, r = !!(n && Object.keys(n).length > 0), i = !!e?.outputFile?.id;
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ C(N, {
|
|
83
|
+
...y,
|
|
82
84
|
open: !!e,
|
|
83
85
|
onOpenChange: t,
|
|
84
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ C(F, {
|
|
87
|
+
...v,
|
|
85
88
|
className: "max-h-[85vh] max-w-2xl overflow-y-auto",
|
|
86
|
-
children: e ? /* @__PURE__ */ S
|
|
87
|
-
/* @__PURE__ */
|
|
89
|
+
children: e ? /* @__PURE__ */ w(S, { children: [
|
|
90
|
+
/* @__PURE__ */ w(R, { children: [/* @__PURE__ */ w(z, {
|
|
88
91
|
className: "flex items-center gap-2",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ C(T, {
|
|
90
93
|
className: "size-5 text-text-secondary",
|
|
91
94
|
"aria-hidden": "true"
|
|
92
95
|
}), "Analysis results"]
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ w(I, { children: [e.title, e.method ? ` · ${e.method}` : ""] })] }),
|
|
97
|
+
/* @__PURE__ */ w("div", {
|
|
95
98
|
className: "space-y-5",
|
|
96
99
|
children: [
|
|
97
|
-
r && n ? /* @__PURE__ */
|
|
98
|
-
i && e.outputFile ? /* @__PURE__ */
|
|
100
|
+
r && n ? /* @__PURE__ */ C(_, { results: n }) : null,
|
|
101
|
+
i && e.outputFile ? /* @__PURE__ */ w("div", {
|
|
99
102
|
className: "space-y-2",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ C("p", {
|
|
101
104
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
102
105
|
children: "Output artifact"
|
|
103
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ C(oe, { fileId: e.outputFile.id })]
|
|
104
107
|
}) : null,
|
|
105
|
-
!r && !i ? /* @__PURE__ */
|
|
108
|
+
!r && !i ? /* @__PURE__ */ C("p", {
|
|
106
109
|
className: "rounded-card border border-border-default bg-bg-sunken px-4 py-6 text-center text-sm text-text-secondary",
|
|
107
110
|
children: "No results or output artifact has been recorded for this analysis yet."
|
|
108
111
|
}) : null
|
|
109
112
|
]
|
|
110
113
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ C(L, { children: /* @__PURE__ */ C(P, {
|
|
112
115
|
asChild: !0,
|
|
113
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ C(M, {
|
|
114
117
|
type: "button",
|
|
115
118
|
variant: "outline",
|
|
116
119
|
children: "Close"
|
|
@@ -120,7 +123,7 @@ function ie({ analysis: e, onOpenChange: t }) {
|
|
|
120
123
|
})
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function $(e, t) {
|
|
124
127
|
let n = e.trim();
|
|
125
128
|
if (!n) return {
|
|
126
129
|
ok: !0,
|
|
@@ -142,22 +145,22 @@ function ae(e, t) {
|
|
|
142
145
|
};
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
|
-
function
|
|
146
|
-
let c = s(), [l, u] =
|
|
148
|
+
function ce({ open: e, onOpenChange: n, onCompleted: r }) {
|
|
149
|
+
let c = s(), [l, u] = x(""), [d, f] = x(""), [p, m] = x(!1), [h, g] = x("NOTEBOOK"), [_, v] = x(""), { data: y, loading: b } = a({ pagination: {
|
|
147
150
|
limit: 100,
|
|
148
151
|
offset: 0
|
|
149
|
-
} }), { data:
|
|
152
|
+
} }), { data: S, loading: T } = i({ pagination: {
|
|
150
153
|
limit: 100,
|
|
151
154
|
offset: 0
|
|
152
|
-
} }), [E, { loading:
|
|
155
|
+
} }), [E, { loading: D }] = o(), O = y?.cosListNotebooks.items ?? [], A = S?.cosListDatasets.items ?? [], j = () => {
|
|
153
156
|
u(""), f(""), m(!1), g("NOTEBOOK"), v("");
|
|
154
157
|
};
|
|
155
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ C(N, {
|
|
156
159
|
open: e,
|
|
157
160
|
onOpenChange: (e) => {
|
|
158
|
-
|
|
161
|
+
D || n(e);
|
|
159
162
|
},
|
|
160
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
|
|
161
164
|
onSubmit: async (e) => {
|
|
162
165
|
e.preventDefault();
|
|
163
166
|
let i = l.trim();
|
|
@@ -175,17 +178,17 @@ function oe({ open: e, onOpenChange: n, onCompleted: r }) {
|
|
|
175
178
|
aiAssisted: p,
|
|
176
179
|
...h === "NOTEBOOK" ? { notebookId: _ } : { datasetId: _ }
|
|
177
180
|
} } });
|
|
178
|
-
a.error || !a.data?.cosRunAnalysis?.id || (t.success(c("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), c("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: i })),
|
|
181
|
+
a.error || !a.data?.cosRunAnalysis?.id || (t.success(c("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), c("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: i })), j(), n(!1), r());
|
|
179
182
|
},
|
|
180
183
|
className: "space-y-4",
|
|
181
184
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Run analysis" }), /* @__PURE__ */ C(I, { children: "Launch a new analysis against a notebook or a dataset. Exactly one source is required." })] }),
|
|
186
|
+
/* @__PURE__ */ w("div", {
|
|
184
187
|
className: "space-y-1.5",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ C(V, {
|
|
186
189
|
htmlFor: "run-title",
|
|
187
190
|
children: "Title"
|
|
188
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ C(B, {
|
|
189
192
|
id: "run-title",
|
|
190
193
|
value: l,
|
|
191
194
|
onChange: (e) => u(e.target.value),
|
|
@@ -193,102 +196,102 @@ function oe({ open: e, onOpenChange: n, onCompleted: r }) {
|
|
|
193
196
|
required: !0
|
|
194
197
|
})]
|
|
195
198
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ w("div", {
|
|
197
200
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ w("div", {
|
|
199
202
|
className: "space-y-1.5",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ C(V, {
|
|
201
204
|
htmlFor: "run-source-kind",
|
|
202
205
|
children: "Source type"
|
|
203
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ w(H, {
|
|
204
207
|
value: h,
|
|
205
208
|
onValueChange: (e) => {
|
|
206
209
|
g(e), v("");
|
|
207
210
|
},
|
|
208
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ C(G, {
|
|
209
212
|
id: "run-source-kind",
|
|
210
213
|
"aria-label": "Source type",
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
-
}), /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ C(K, {})
|
|
215
|
+
}), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
|
|
213
216
|
value: "NOTEBOOK",
|
|
214
217
|
children: "Notebook"
|
|
215
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ C(W, {
|
|
216
219
|
value: "DATASET",
|
|
217
220
|
children: "Dataset"
|
|
218
221
|
})] })]
|
|
219
222
|
})]
|
|
220
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ w("div", {
|
|
221
224
|
className: "space-y-1.5",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ C(V, {
|
|
223
226
|
htmlFor: "run-source-id",
|
|
224
227
|
children: h === "NOTEBOOK" ? "Notebook" : "Dataset"
|
|
225
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ w(H, {
|
|
226
229
|
value: _,
|
|
227
230
|
onValueChange: (e) => v(e),
|
|
228
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ C(G, {
|
|
229
232
|
id: "run-source-id",
|
|
230
233
|
"aria-label": "Analysis source",
|
|
231
|
-
children: /* @__PURE__ */
|
|
232
|
-
}), /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ C(K, { placeholder: (h === "NOTEBOOK" ? b : T) ? "Loading…" : `Select a ${h === "NOTEBOOK" ? "notebook" : "dataset"}` })
|
|
235
|
+
}), /* @__PURE__ */ C(U, { children: h === "NOTEBOOK" ? O.map((e) => /* @__PURE__ */ C(W, {
|
|
233
236
|
value: e.id,
|
|
234
237
|
children: e.title
|
|
235
|
-
}, e.id)) :
|
|
238
|
+
}, e.id)) : A.map((e) => /* @__PURE__ */ C(W, {
|
|
236
239
|
value: e.id,
|
|
237
240
|
children: e.name
|
|
238
241
|
}, e.id)) })]
|
|
239
242
|
})]
|
|
240
243
|
})]
|
|
241
244
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ w("div", {
|
|
243
246
|
className: "space-y-1.5",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ C(V, {
|
|
245
248
|
htmlFor: "run-method",
|
|
246
249
|
children: "Method"
|
|
247
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ C(B, {
|
|
248
251
|
id: "run-method",
|
|
249
252
|
value: d,
|
|
250
253
|
onChange: (e) => f(e.target.value),
|
|
251
254
|
placeholder: "e.g. gaussian-fit"
|
|
252
255
|
})]
|
|
253
256
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ w("div", {
|
|
255
258
|
className: "flex items-center gap-3",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ C(q, {
|
|
257
260
|
id: "run-ai",
|
|
258
261
|
checked: p,
|
|
259
262
|
onCheckedChange: (e) => m(e)
|
|
260
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ C(V, {
|
|
261
264
|
htmlFor: "run-ai",
|
|
262
265
|
className: "cursor-pointer",
|
|
263
266
|
children: "AI-assisted analysis"
|
|
264
267
|
})]
|
|
265
268
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
|
|
267
270
|
type: "button",
|
|
268
271
|
variant: "outline",
|
|
269
272
|
onClick: () => n(!1),
|
|
270
|
-
disabled:
|
|
273
|
+
disabled: D,
|
|
271
274
|
children: "Cancel"
|
|
272
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ w(M, {
|
|
273
276
|
type: "submit",
|
|
274
|
-
disabled:
|
|
275
|
-
children: [/* @__PURE__ */
|
|
277
|
+
disabled: D,
|
|
278
|
+
children: [/* @__PURE__ */ C(k, { className: "size-4" }), D ? "Starting…" : "Run analysis"]
|
|
276
279
|
})] })
|
|
277
280
|
]
|
|
278
281
|
}) })
|
|
279
282
|
});
|
|
280
283
|
}
|
|
281
|
-
function
|
|
282
|
-
let [a, o] =
|
|
283
|
-
return /* @__PURE__ */
|
|
284
|
+
function le({ analysis: e, onOpenChange: n, onCompleted: i }) {
|
|
285
|
+
let [a, o] = x("COMPLETED"), [c, l] = x(""), [u, d] = x(""), [p, { loading: m }] = r(), h = s();
|
|
286
|
+
return /* @__PURE__ */ C(N, {
|
|
284
287
|
open: !!e,
|
|
285
288
|
onOpenChange: (e) => {
|
|
286
289
|
m || n(e);
|
|
287
290
|
},
|
|
288
|
-
children: /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
|
|
289
292
|
onSubmit: async (r) => {
|
|
290
293
|
if (r.preventDefault(), !e) return;
|
|
291
|
-
let o =
|
|
294
|
+
let o = $(c, h);
|
|
292
295
|
if (!o.ok) {
|
|
293
296
|
t.error(h("cosmicintersection.pages.analyses.invalidResults", "Invalid results"), o.error);
|
|
294
297
|
return;
|
|
@@ -303,40 +306,40 @@ function se({ analysis: e, onOpenChange: n, onCompleted: i }) {
|
|
|
303
306
|
},
|
|
304
307
|
className: "space-y-4",
|
|
305
308
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Complete analysis" }), /* @__PURE__ */ w(I, { children: [
|
|
307
310
|
"Record the outcome for ",
|
|
308
311
|
e ? `“${e.title}”` : "this analysis",
|
|
309
312
|
". Attach results or an output artifact if you have them."
|
|
310
313
|
] })] }),
|
|
311
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ w("div", {
|
|
312
315
|
className: "space-y-1.5",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ C(V, {
|
|
314
317
|
htmlFor: "complete-status",
|
|
315
318
|
children: "Outcome"
|
|
316
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ w(H, {
|
|
317
320
|
value: a,
|
|
318
321
|
onValueChange: (e) => o(e),
|
|
319
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ C(G, {
|
|
320
323
|
id: "complete-status",
|
|
321
324
|
"aria-label": "Outcome",
|
|
322
|
-
children: /* @__PURE__ */
|
|
323
|
-
}), /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ C(K, {})
|
|
326
|
+
}), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
|
|
324
327
|
value: "COMPLETED",
|
|
325
328
|
children: "Completed"
|
|
326
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ C(W, {
|
|
327
330
|
value: "FAILED",
|
|
328
331
|
children: "Failed"
|
|
329
332
|
})] })]
|
|
330
333
|
})]
|
|
331
334
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ w("div", {
|
|
333
336
|
className: "space-y-1.5",
|
|
334
337
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ C(V, {
|
|
336
339
|
htmlFor: "complete-results",
|
|
337
340
|
children: "Results (JSON)"
|
|
338
341
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ C(ie, {
|
|
340
343
|
id: "complete-results",
|
|
341
344
|
value: c,
|
|
342
345
|
onChange: (e) => l(e.target.value),
|
|
@@ -344,25 +347,25 @@ function se({ analysis: e, onOpenChange: n, onCompleted: i }) {
|
|
|
344
347
|
className: "font-mono text-xs",
|
|
345
348
|
placeholder: "{ \"snr\": 12.4, \"detections\": 3 }"
|
|
346
349
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ C("p", {
|
|
348
351
|
className: "text-xs text-text-secondary",
|
|
349
352
|
children: "Optional structured results as a JSON object."
|
|
350
353
|
})
|
|
351
354
|
]
|
|
352
355
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ C(f, {
|
|
354
357
|
value: u,
|
|
355
358
|
onChange: (e) => d(e),
|
|
356
359
|
label: "Attach output file",
|
|
357
360
|
hint: "Optional output artifact (plots, tables, exports). Stored in workspace files."
|
|
358
361
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
|
|
360
363
|
type: "button",
|
|
361
364
|
variant: "outline",
|
|
362
365
|
onClick: () => n(!1),
|
|
363
366
|
disabled: m,
|
|
364
367
|
children: "Cancel"
|
|
365
|
-
}), /* @__PURE__ */
|
|
368
|
+
}), /* @__PURE__ */ C(M, {
|
|
366
369
|
type: "submit",
|
|
367
370
|
disabled: m,
|
|
368
371
|
children: m ? "Saving…" : "Save outcome"
|
|
@@ -371,168 +374,168 @@ function se({ analysis: e, onOpenChange: n, onCompleted: i }) {
|
|
|
371
374
|
}) })
|
|
372
375
|
});
|
|
373
376
|
}
|
|
374
|
-
function
|
|
375
|
-
let { navigate: t } = e(), r = s(), [o, f] =
|
|
377
|
+
function ue() {
|
|
378
|
+
let { navigate: t } = e(), r = s(), [o, f] = x(void 0), [p, _] = x(!1), [v, y] = x(null), { data: D, loading: N, error: P, refetch: F } = n({ status: o }), { data: I } = a({ pagination: {
|
|
376
379
|
limit: 100,
|
|
377
380
|
offset: 0
|
|
378
381
|
} }), { data: L } = i({ pagination: {
|
|
379
382
|
limit: 100,
|
|
380
383
|
offset: 0
|
|
381
|
-
} }), R =
|
|
384
|
+
} }), R = D?.cosListAnalyses ?? [], { selectedId: z, select: B } = g(), V = z ? R.find((e) => e.id === z) ?? null : null, q = (e) => B(e ? e.id : null), ie = b(() => {
|
|
382
385
|
let e = /* @__PURE__ */ new Map();
|
|
383
386
|
for (let t of I?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
|
|
384
387
|
return e;
|
|
385
|
-
}, [I]),
|
|
388
|
+
}, [I]), oe = b(() => {
|
|
386
389
|
let e = /* @__PURE__ */ new Map();
|
|
387
390
|
for (let t of L?.cosListDatasets.items ?? []) e.set(t.id, t.name);
|
|
388
391
|
return e;
|
|
389
|
-
}, [L]),
|
|
390
|
-
label:
|
|
392
|
+
}, [L]), $ = (e) => e.notebookId ? {
|
|
393
|
+
label: ie.get(e.notebookId) ?? "Notebook",
|
|
391
394
|
path: `notebooks/${e.notebookId}`
|
|
392
395
|
} : e.datasetId ? {
|
|
393
|
-
label:
|
|
396
|
+
label: oe.get(e.datasetId) ?? "Dataset",
|
|
394
397
|
path: `datasets/${e.datasetId}`
|
|
395
398
|
} : null, ue = (e) => {
|
|
396
399
|
let t = e.status === "PENDING" || e.status === "RUNNING";
|
|
397
400
|
return [...X(e) ? [{
|
|
398
401
|
key: "view-results",
|
|
399
402
|
label: "View results",
|
|
400
|
-
icon:
|
|
401
|
-
onSelect: () =>
|
|
403
|
+
icon: T,
|
|
404
|
+
onSelect: () => q(e)
|
|
402
405
|
}] : [], ...t ? [{
|
|
403
406
|
key: "complete",
|
|
404
407
|
label: "Complete…",
|
|
405
|
-
icon:
|
|
406
|
-
onSelect: () =>
|
|
408
|
+
icon: E,
|
|
409
|
+
onSelect: () => y(e)
|
|
407
410
|
}] : []];
|
|
408
|
-
}, de = /* @__PURE__ */
|
|
411
|
+
}, de = /* @__PURE__ */ w(M, {
|
|
409
412
|
type: "button",
|
|
410
413
|
onClick: () => _(!0),
|
|
411
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
|
|
412
415
|
});
|
|
413
|
-
return /* @__PURE__ */
|
|
416
|
+
return /* @__PURE__ */ w(m, {
|
|
414
417
|
title: r("cosmicintersection.pages.analyses.title", "Analyses"),
|
|
415
418
|
description: r("cosmicintersection.pages.analyses.description", "Analysis runs executed over notebooks and federated datasets."),
|
|
416
419
|
actions: de,
|
|
417
420
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ w("div", {
|
|
419
422
|
className: "space-y-4",
|
|
420
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ w("div", {
|
|
421
424
|
className: "flex flex-wrap items-center gap-3",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ C("label", {
|
|
423
426
|
className: "text-sm text-text-secondary",
|
|
424
427
|
htmlFor: "analysis-status-filter",
|
|
425
428
|
children: "Status"
|
|
426
|
-
}), /* @__PURE__ */
|
|
429
|
+
}), /* @__PURE__ */ w(H, {
|
|
427
430
|
value: o ?? Z,
|
|
428
431
|
onValueChange: (e) => f(e === Z ? void 0 : e),
|
|
429
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ C(G, {
|
|
430
433
|
id: "analysis-status-filter",
|
|
431
434
|
className: "w-48",
|
|
432
435
|
"aria-label": "Filter by status",
|
|
433
|
-
children: /* @__PURE__ */
|
|
434
|
-
}), /* @__PURE__ */
|
|
436
|
+
children: /* @__PURE__ */ C(K, {})
|
|
437
|
+
}), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
|
|
435
438
|
value: Z,
|
|
436
439
|
children: "All statuses"
|
|
437
|
-
}),
|
|
440
|
+
}), ae.map((e) => /* @__PURE__ */ C(W, {
|
|
438
441
|
value: e.value,
|
|
439
442
|
children: e.label
|
|
440
443
|
}, e.value))] })]
|
|
441
444
|
})]
|
|
442
|
-
}), N ? /* @__PURE__ */
|
|
445
|
+
}), N ? /* @__PURE__ */ C(d, {
|
|
443
446
|
variant: "rows",
|
|
444
447
|
rows: 6,
|
|
445
448
|
label: r("cosmicintersection.pages.analyses.loading", "Loading analyses…")
|
|
446
|
-
}) : P ? /* @__PURE__ */
|
|
449
|
+
}) : P ? /* @__PURE__ */ C(u, {
|
|
447
450
|
message: r("cosmicintersection.pages.analyses.error", "We could not load analyses. Please try again."),
|
|
448
451
|
onRetry: () => void F()
|
|
449
|
-
}) : R.length === 0 ? /* @__PURE__ */
|
|
450
|
-
icon:
|
|
452
|
+
}) : R.length === 0 ? /* @__PURE__ */ C(l, {
|
|
453
|
+
icon: E,
|
|
451
454
|
title: o ? r("cosmicintersection.pages.analyses.emptyFilterTitle", "No analyses match this filter.") : r("cosmicintersection.pages.analyses.emptyTitle", "No analyses yet."),
|
|
452
455
|
description: o ? r("cosmicintersection.pages.analyses.emptyFilterDescription", "Try a different status filter.") : r("cosmicintersection.pages.analyses.emptyDescription", "Run an analysis against a notebook or dataset to see results here."),
|
|
453
|
-
action: o ? void 0 : /* @__PURE__ */
|
|
456
|
+
action: o ? void 0 : /* @__PURE__ */ w(M, {
|
|
454
457
|
type: "button",
|
|
455
458
|
onClick: () => _(!0),
|
|
456
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
|
|
457
460
|
})
|
|
458
|
-
}) : /* @__PURE__ */ S
|
|
461
|
+
}) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
459
462
|
className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
463
|
+
children: /* @__PURE__ */ w(ee, { children: [/* @__PURE__ */ C(ne, { children: /* @__PURE__ */ w(re, { children: [
|
|
464
|
+
/* @__PURE__ */ C(Y, { children: "Title" }),
|
|
465
|
+
/* @__PURE__ */ C(Y, { children: "Method" }),
|
|
466
|
+
/* @__PURE__ */ C(Y, { children: "AI" }),
|
|
467
|
+
/* @__PURE__ */ C(Y, { children: "Status" }),
|
|
468
|
+
/* @__PURE__ */ C(Y, { children: "Source" }),
|
|
469
|
+
/* @__PURE__ */ C(Y, { children: "Started" }),
|
|
470
|
+
/* @__PURE__ */ C(Y, { children: "Finished" }),
|
|
471
|
+
/* @__PURE__ */ C(Y, { children: "Output" }),
|
|
472
|
+
/* @__PURE__ */ C(Y, {
|
|
470
473
|
className: "w-12 text-right",
|
|
471
474
|
children: "Actions"
|
|
472
475
|
})
|
|
473
|
-
] }) }), /* @__PURE__ */
|
|
474
|
-
let n =
|
|
475
|
-
return /* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
476
|
+
] }) }), /* @__PURE__ */ C(te, { children: R.map((e) => {
|
|
477
|
+
let n = $(e);
|
|
478
|
+
return /* @__PURE__ */ w(re, { children: [
|
|
479
|
+
/* @__PURE__ */ C(J, {
|
|
477
480
|
className: "font-medium text-text-primary",
|
|
478
481
|
children: e.title
|
|
479
482
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ C(J, {
|
|
481
484
|
className: "text-text-secondary",
|
|
482
485
|
children: e.method ?? "—"
|
|
483
486
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ C(J, { children: e.aiAssisted ? /* @__PURE__ */ w(j, {
|
|
485
488
|
variant: "secondary",
|
|
486
489
|
className: "gap-1",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
490
|
+
children: [/* @__PURE__ */ C(A, {
|
|
488
491
|
className: "size-3",
|
|
489
492
|
"aria-hidden": "true"
|
|
490
493
|
}), "AI"]
|
|
491
|
-
}) : /* @__PURE__ */
|
|
494
|
+
}) : /* @__PURE__ */ C("span", {
|
|
492
495
|
className: "text-text-secondary",
|
|
493
496
|
children: "—"
|
|
494
497
|
}) }),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ C(J, { children: /* @__PURE__ */ C(h, { status: e.status }) }),
|
|
499
|
+
/* @__PURE__ */ C(J, { children: n ? /* @__PURE__ */ w("button", {
|
|
497
500
|
type: "button",
|
|
498
501
|
onClick: () => t(n.path),
|
|
499
502
|
className: "inline-flex max-w-[12rem] items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
|
|
500
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ C(O, {
|
|
501
504
|
className: "size-3.5 shrink-0",
|
|
502
505
|
"aria-hidden": "true"
|
|
503
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ C("span", {
|
|
504
507
|
className: "truncate",
|
|
505
508
|
children: n.label
|
|
506
509
|
})]
|
|
507
|
-
}) : /* @__PURE__ */
|
|
510
|
+
}) : /* @__PURE__ */ C("span", {
|
|
508
511
|
className: "text-text-secondary",
|
|
509
512
|
children: "—"
|
|
510
513
|
}) }),
|
|
511
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ C(J, {
|
|
512
515
|
className: "whitespace-nowrap text-text-secondary",
|
|
513
516
|
children: Q(e.startedAt)
|
|
514
517
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ C(J, {
|
|
516
519
|
className: "whitespace-nowrap text-text-secondary",
|
|
517
520
|
children: Q(e.finishedAt)
|
|
518
521
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ C(J, { children: X(e) ? /* @__PURE__ */ w(M, {
|
|
520
523
|
type: "button",
|
|
521
524
|
variant: "outline",
|
|
522
525
|
size: "sm",
|
|
523
526
|
className: "h-auto gap-1 px-2 py-1",
|
|
524
|
-
onClick: () =>
|
|
525
|
-
children: [/* @__PURE__ */
|
|
527
|
+
onClick: () => q(e),
|
|
528
|
+
children: [/* @__PURE__ */ C(T, {
|
|
526
529
|
className: "size-3.5",
|
|
527
530
|
"aria-hidden": "true"
|
|
528
531
|
}), "View"]
|
|
529
|
-
}) : /* @__PURE__ */
|
|
532
|
+
}) : /* @__PURE__ */ C("span", {
|
|
530
533
|
className: "text-text-secondary",
|
|
531
534
|
children: "—"
|
|
532
535
|
}) }),
|
|
533
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ C(J, {
|
|
534
537
|
className: "text-right",
|
|
535
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ C(c, {
|
|
536
539
|
ariaLabel: `Actions for ${e.title}`,
|
|
537
540
|
onView: n ? () => t(n.path) : void 0,
|
|
538
541
|
extraItems: ue(e)
|
|
@@ -540,78 +543,78 @@ function ce() {
|
|
|
540
543
|
})
|
|
541
544
|
] }, e.id);
|
|
542
545
|
}) })] })
|
|
543
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ C("ul", {
|
|
544
547
|
className: "space-y-3 md:hidden",
|
|
545
548
|
children: R.map((e) => {
|
|
546
|
-
let n =
|
|
547
|
-
return /* @__PURE__ */
|
|
549
|
+
let n = $(e), r = e.status === "PENDING" || e.status === "RUNNING";
|
|
550
|
+
return /* @__PURE__ */ w("li", {
|
|
548
551
|
className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-4",
|
|
549
552
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ w("div", {
|
|
551
554
|
className: "flex items-start justify-between gap-3",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ w("div", {
|
|
553
556
|
className: "min-w-0",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
557
|
+
children: [/* @__PURE__ */ C("p", {
|
|
555
558
|
className: "truncate font-medium text-text-primary",
|
|
556
559
|
children: e.title
|
|
557
|
-
}), e.method ? /* @__PURE__ */
|
|
560
|
+
}), e.method ? /* @__PURE__ */ C("p", {
|
|
558
561
|
className: "truncate text-xs text-text-secondary",
|
|
559
562
|
children: e.method
|
|
560
563
|
}) : null]
|
|
561
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ C(h, { status: e.status })]
|
|
562
565
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ w("div", {
|
|
564
567
|
className: "flex flex-wrap items-center gap-2",
|
|
565
|
-
children: [e.aiAssisted ? /* @__PURE__ */
|
|
568
|
+
children: [e.aiAssisted ? /* @__PURE__ */ w(j, {
|
|
566
569
|
variant: "secondary",
|
|
567
570
|
className: "gap-1",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ C(A, {
|
|
569
572
|
className: "size-3",
|
|
570
573
|
"aria-hidden": "true"
|
|
571
574
|
}), "AI"]
|
|
572
|
-
}) : null, n ? /* @__PURE__ */
|
|
575
|
+
}) : null, n ? /* @__PURE__ */ w("button", {
|
|
573
576
|
type: "button",
|
|
574
577
|
onClick: () => t(n.path),
|
|
575
578
|
className: "inline-flex max-w-full items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
|
|
576
|
-
children: [/* @__PURE__ */
|
|
579
|
+
children: [/* @__PURE__ */ C(O, {
|
|
577
580
|
className: "size-3.5 shrink-0",
|
|
578
581
|
"aria-hidden": "true"
|
|
579
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ C("span", {
|
|
580
583
|
className: "truncate",
|
|
581
584
|
children: n.label
|
|
582
585
|
})]
|
|
583
586
|
}) : null]
|
|
584
587
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ w("dl", {
|
|
586
589
|
className: "grid grid-cols-2 gap-2 text-xs",
|
|
587
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
588
591
|
className: "text-text-secondary",
|
|
589
592
|
children: "Started"
|
|
590
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ C("dd", {
|
|
591
594
|
className: "text-text-primary",
|
|
592
595
|
children: Q(e.startedAt)
|
|
593
|
-
})] }), /* @__PURE__ */
|
|
596
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
594
597
|
className: "text-text-secondary",
|
|
595
598
|
children: "Finished"
|
|
596
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ C("dd", {
|
|
597
600
|
className: "text-text-primary",
|
|
598
601
|
children: Q(e.finishedAt)
|
|
599
602
|
})] })]
|
|
600
603
|
}),
|
|
601
|
-
X(e) || r ? /* @__PURE__ */
|
|
604
|
+
X(e) || r ? /* @__PURE__ */ w("div", {
|
|
602
605
|
className: "flex flex-wrap gap-2",
|
|
603
|
-
children: [X(e) ? /* @__PURE__ */
|
|
606
|
+
children: [X(e) ? /* @__PURE__ */ w(M, {
|
|
604
607
|
type: "button",
|
|
605
608
|
variant: "outline",
|
|
606
609
|
size: "sm",
|
|
607
|
-
onClick: () =>
|
|
608
|
-
children: [/* @__PURE__ */
|
|
609
|
-
}) : null, r ? /* @__PURE__ */
|
|
610
|
+
onClick: () => q(e),
|
|
611
|
+
children: [/* @__PURE__ */ C(T, { className: "size-4" }), "View results"]
|
|
612
|
+
}) : null, r ? /* @__PURE__ */ w(M, {
|
|
610
613
|
type: "button",
|
|
611
614
|
variant: "outline",
|
|
612
615
|
size: "sm",
|
|
613
|
-
onClick: () =>
|
|
614
|
-
children: [/* @__PURE__ */
|
|
616
|
+
onClick: () => y(e),
|
|
617
|
+
children: [/* @__PURE__ */ C(E, { className: "size-4" }), "Complete"]
|
|
615
618
|
}) : null]
|
|
616
619
|
}) : null
|
|
617
620
|
]
|
|
@@ -619,28 +622,28 @@ function ce() {
|
|
|
619
622
|
})
|
|
620
623
|
})] })]
|
|
621
624
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ C(ce, {
|
|
623
626
|
open: p,
|
|
624
627
|
onOpenChange: _,
|
|
625
628
|
onCompleted: () => void F()
|
|
626
629
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
analysis:
|
|
630
|
+
/* @__PURE__ */ C(le, {
|
|
631
|
+
analysis: v,
|
|
629
632
|
onOpenChange: (e) => {
|
|
630
|
-
e ||
|
|
633
|
+
e || y(null);
|
|
631
634
|
},
|
|
632
635
|
onCompleted: () => void F()
|
|
633
|
-
},
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
analysis:
|
|
636
|
+
}, v?.id ?? "none"),
|
|
637
|
+
/* @__PURE__ */ C(se, {
|
|
638
|
+
analysis: V,
|
|
636
639
|
onOpenChange: (e) => {
|
|
637
|
-
e ||
|
|
640
|
+
e || q(null);
|
|
638
641
|
}
|
|
639
642
|
})
|
|
640
643
|
]
|
|
641
644
|
});
|
|
642
645
|
}
|
|
643
646
|
//#endregion
|
|
644
|
-
export {
|
|
647
|
+
export { ue as default };
|
|
645
648
|
|
|
646
649
|
//# sourceMappingURL=AnalysesPage.js.map
|