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