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