@burdenoff/microfe-bigconsole 2026.1122.6 → 2026.1123.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/bigconsole/pages/InsightsPage.js +490 -425
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
|
2
2
|
import "../contexts/index.js";
|
|
3
3
|
import t from "../hooks/useBigConsoleAnalytics.js";
|
|
4
4
|
import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
|
|
5
|
-
import { Section as r, SectionStack as
|
|
6
|
-
import { generationApproval as
|
|
7
|
-
import { findParentGeneration as
|
|
8
|
-
import { setActiveGenerationContext as
|
|
9
|
-
import { isInsightsDraftDirty as
|
|
10
|
-
import { reportBigConsoleQuotaError as
|
|
11
|
-
import { PromptAnalysisPreview as
|
|
12
|
-
import { isNative as
|
|
5
|
+
import { Section as r, SectionStack as i } from "../components/common/Section.js";
|
|
6
|
+
import { generationApproval as a } from "../utils/generationApproval.js";
|
|
7
|
+
import { findParentGeneration as ee, splitSupersededGenerations as o } from "../utils/generationRevisions.js";
|
|
8
|
+
import { setActiveGenerationContext as s } from "../assistant/generationContext.js";
|
|
9
|
+
import { isInsightsDraftDirty as te } from "../utils/insightsDraft.js";
|
|
10
|
+
import { reportBigConsoleQuotaError as c } from "../utils/quota.js";
|
|
11
|
+
import { PromptAnalysisPreview as ne } from "../components/insights/PromptAnalysisPreview.js";
|
|
12
|
+
import { isNative as re, nativeImpact as ie, nativeNotify as ae } from "../../utils/nativeBridge.js";
|
|
13
13
|
import "../components/common/index.js";
|
|
14
14
|
import { GeneratedFormattingReview as oe, GeneratedSpecWarnings as se, GenerationExecutionStatus as ce } from "../components/insights/GeneratedFormattingReview.js";
|
|
15
15
|
import { BoardLintPanel as le } from "../components/insights/BoardLintPanel.js";
|
|
@@ -18,66 +18,84 @@ import { ConversationalEditPanel as de } from "../components/insights/Conversati
|
|
|
18
18
|
import { AskYourData as fe } from "../components/ask/AskYourData.js";
|
|
19
19
|
/* empty css */
|
|
20
20
|
import { memo as l, useCallback as u, useEffect as pe, useMemo as me, useRef as he, useState as d } from "react";
|
|
21
|
-
import { AlertCircle as ge, ArrowRight as
|
|
22
|
-
import { AuroraBackground as
|
|
23
|
-
import { useUnsavedChanges as
|
|
24
|
-
import { useI18n as
|
|
25
|
-
import { useMutation as
|
|
26
|
-
import { jsx as
|
|
27
|
-
import { gql as
|
|
21
|
+
import { AlertCircle as ge, ArrowRight as _e, Ban as ve, CheckCircle as f, Clock as p, Eye as ye, History as be, Lightbulb as xe, Loader2 as m, MessageSquare as Se, RefreshCw as Ce, ShieldCheck as we, Sparkles as h, Trash2 as Te, Wand2 as Ee, X as De, XCircle as g } from "lucide-react";
|
|
22
|
+
import { AuroraBackground as Oe, Card as ke, CardContent as Ae, GlassCard as je, GradientText as Me, IllustratedEmptyState as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { useUnsavedChanges as Fe } from "@burdenoff/fe-libs/shared/hooks";
|
|
24
|
+
import { useI18n as Ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
25
|
+
import { useMutation as _, useQuery as Le } from "@apollo/client/react";
|
|
26
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
27
|
+
import { gql as b } from "@apollo/client";
|
|
28
28
|
// src/bigconsole/pages/InsightsPage.tsx
|
|
29
|
-
var
|
|
29
|
+
var x = b`
|
|
30
|
+
fragment InsightsGeneration on PromptGeneration {
|
|
31
|
+
id
|
|
32
|
+
prompt
|
|
33
|
+
status
|
|
34
|
+
dashboardId
|
|
35
|
+
parentGenerationId
|
|
36
|
+
generatedSpecDigest
|
|
37
|
+
undoRevision
|
|
38
|
+
specRevision
|
|
39
|
+
updatedAt
|
|
40
|
+
errorMessage
|
|
41
|
+
createdAt
|
|
42
|
+
completedAt
|
|
43
|
+
processingMetadata
|
|
44
|
+
generatedSpec {
|
|
45
|
+
name
|
|
46
|
+
description
|
|
47
|
+
overallConfidence
|
|
48
|
+
reasoning
|
|
49
|
+
warnings {
|
|
50
|
+
code
|
|
51
|
+
message
|
|
52
|
+
threshold
|
|
53
|
+
reference
|
|
54
|
+
}
|
|
55
|
+
pages {
|
|
56
|
+
name
|
|
57
|
+
layout
|
|
58
|
+
gridColumns
|
|
59
|
+
widgets {
|
|
60
|
+
position {
|
|
61
|
+
x
|
|
62
|
+
y
|
|
63
|
+
width
|
|
64
|
+
height
|
|
65
|
+
}
|
|
66
|
+
title
|
|
67
|
+
type
|
|
68
|
+
confidence
|
|
69
|
+
reasoning
|
|
70
|
+
config
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`, Re = b`
|
|
30
76
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
31
77
|
listPromptGenerations(status: $status, first: $first) {
|
|
32
78
|
edges {
|
|
33
79
|
node {
|
|
34
|
-
|
|
35
|
-
prompt
|
|
36
|
-
status
|
|
37
|
-
dashboardId
|
|
38
|
-
parentGenerationId
|
|
39
|
-
generatedSpecDigest
|
|
40
|
-
updatedAt
|
|
41
|
-
errorMessage
|
|
42
|
-
createdAt
|
|
43
|
-
completedAt
|
|
44
|
-
processingMetadata
|
|
45
|
-
generatedSpec {
|
|
46
|
-
name
|
|
47
|
-
description
|
|
48
|
-
overallConfidence
|
|
49
|
-
reasoning
|
|
50
|
-
warnings {
|
|
51
|
-
code
|
|
52
|
-
message
|
|
53
|
-
threshold
|
|
54
|
-
reference
|
|
55
|
-
}
|
|
56
|
-
pages {
|
|
57
|
-
name
|
|
58
|
-
layout
|
|
59
|
-
gridColumns
|
|
60
|
-
widgets {
|
|
61
|
-
position {
|
|
62
|
-
x
|
|
63
|
-
y
|
|
64
|
-
width
|
|
65
|
-
height
|
|
66
|
-
}
|
|
67
|
-
title
|
|
68
|
-
type
|
|
69
|
-
confidence
|
|
70
|
-
reasoning
|
|
71
|
-
config
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
80
|
+
...InsightsGeneration
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
83
|
totalCount
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
|
-
|
|
86
|
+
${x}
|
|
87
|
+
`, ze = b`
|
|
88
|
+
mutation RevertGeneratedDashboard($generationId: ID!, $toRevision: Int!, $expectedRevision: Int!) {
|
|
89
|
+
revertGeneratedDashboard(
|
|
90
|
+
generationId: $generationId
|
|
91
|
+
toRevision: $toRevision
|
|
92
|
+
expectedRevision: $expectedRevision
|
|
93
|
+
) {
|
|
94
|
+
...InsightsGeneration
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
${x}
|
|
98
|
+
`, Be = b`
|
|
81
99
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
82
100
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
83
101
|
id
|
|
@@ -88,7 +106,7 @@ var Fe = x`
|
|
|
88
106
|
tags
|
|
89
107
|
}
|
|
90
108
|
}
|
|
91
|
-
`,
|
|
109
|
+
`, Ve = b`
|
|
92
110
|
mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
|
|
93
111
|
generateDashboardFromPrompt(input: $input) {
|
|
94
112
|
id
|
|
@@ -96,24 +114,24 @@ var Fe = x`
|
|
|
96
114
|
prompt
|
|
97
115
|
}
|
|
98
116
|
}
|
|
99
|
-
`,
|
|
117
|
+
`, He = b`
|
|
100
118
|
mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
|
|
101
119
|
createDashboardFromGeneration(input: $input) {
|
|
102
120
|
id
|
|
103
121
|
}
|
|
104
122
|
}
|
|
105
|
-
`,
|
|
123
|
+
`, Ue = b`
|
|
106
124
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
107
125
|
deletePromptGeneration(generationId: $generationId)
|
|
108
126
|
}
|
|
109
|
-
`,
|
|
127
|
+
`, We = b`
|
|
110
128
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
111
129
|
cancelPromptGeneration(generationId: $generationId) {
|
|
112
130
|
id
|
|
113
131
|
status
|
|
114
132
|
}
|
|
115
133
|
}
|
|
116
|
-
`,
|
|
134
|
+
`, Ge = b`
|
|
117
135
|
mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
|
|
118
136
|
regenerateDashboard(input: $input) {
|
|
119
137
|
id
|
|
@@ -121,7 +139,7 @@ var Fe = x`
|
|
|
121
139
|
prompt
|
|
122
140
|
}
|
|
123
141
|
}
|
|
124
|
-
`,
|
|
142
|
+
`, Ke = b`
|
|
125
143
|
mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
|
|
126
144
|
refineGeneratedDashboard(input: $input) {
|
|
127
145
|
id
|
|
@@ -129,11 +147,11 @@ var Fe = x`
|
|
|
129
147
|
prompt
|
|
130
148
|
}
|
|
131
149
|
}
|
|
132
|
-
`,
|
|
150
|
+
`, qe = [
|
|
133
151
|
"PENDING",
|
|
134
152
|
"PROCESSING",
|
|
135
153
|
"GENERATING"
|
|
136
|
-
],
|
|
154
|
+
], Je = 12, Ye = 8, Xe = [
|
|
137
155
|
{
|
|
138
156
|
value: "MODERN",
|
|
139
157
|
label: "Modern"
|
|
@@ -154,7 +172,7 @@ var Fe = x`
|
|
|
154
172
|
value: "VIBRANT",
|
|
155
173
|
label: "Vibrant"
|
|
156
174
|
}
|
|
157
|
-
],
|
|
175
|
+
], Ze = [
|
|
158
176
|
{
|
|
159
177
|
value: "GRID",
|
|
160
178
|
label: "Grid"
|
|
@@ -179,13 +197,13 @@ var Fe = x`
|
|
|
179
197
|
value: "THREE_COLUMN",
|
|
180
198
|
label: "Three column"
|
|
181
199
|
}
|
|
182
|
-
],
|
|
200
|
+
], Qe = [
|
|
183
201
|
6,
|
|
184
202
|
8,
|
|
185
203
|
12,
|
|
186
204
|
16,
|
|
187
205
|
24
|
|
188
|
-
],
|
|
206
|
+
], $e = [
|
|
189
207
|
4,
|
|
190
208
|
6,
|
|
191
209
|
8,
|
|
@@ -193,7 +211,7 @@ var Fe = x`
|
|
|
193
211
|
16,
|
|
194
212
|
24
|
|
195
213
|
];
|
|
196
|
-
function
|
|
214
|
+
function et(e) {
|
|
197
215
|
if (typeof e != "object" || !e || !("refineGeneratedDashboard" in e)) return null;
|
|
198
216
|
let t = e.refineGeneratedDashboard;
|
|
199
217
|
return typeof t != "object" || !t || !("id" in t) ? null : typeof t.id == "string" ? t.id : null;
|
|
@@ -220,12 +238,12 @@ var S = {
|
|
|
220
238
|
border: "1px solid transparent",
|
|
221
239
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
222
240
|
color: "var(--color-action-primary-text)"
|
|
223
|
-
},
|
|
241
|
+
}, tt = {
|
|
224
242
|
...S,
|
|
225
243
|
border: "1px solid var(--color-status-warning-border)",
|
|
226
244
|
backgroundColor: "transparent",
|
|
227
245
|
color: "var(--color-status-warning-text)"
|
|
228
|
-
},
|
|
246
|
+
}, nt = {
|
|
229
247
|
...S,
|
|
230
248
|
minWidth: "var(--size-controlHeight-md)",
|
|
231
249
|
padding: "0 var(--space-controlGap)",
|
|
@@ -291,36 +309,36 @@ var k = {
|
|
|
291
309
|
border: "var(--color-border-subtle)"
|
|
292
310
|
}
|
|
293
311
|
};
|
|
294
|
-
function
|
|
312
|
+
function A(e) {
|
|
295
313
|
let t = k[O(e)].text;
|
|
296
314
|
switch (e) {
|
|
297
|
-
case "COMPLETED": return /* @__PURE__ */
|
|
315
|
+
case "COMPLETED": return /* @__PURE__ */ v(f, {
|
|
298
316
|
size: 14,
|
|
299
317
|
style: { color: t },
|
|
300
318
|
"aria-hidden": "true"
|
|
301
319
|
});
|
|
302
320
|
case "FAILED":
|
|
303
|
-
case "CANCELLED": return /* @__PURE__ */
|
|
321
|
+
case "CANCELLED": return /* @__PURE__ */ v(g, {
|
|
304
322
|
size: 14,
|
|
305
323
|
style: { color: t },
|
|
306
324
|
"aria-hidden": "true"
|
|
307
325
|
});
|
|
308
326
|
case "PENDING":
|
|
309
327
|
case "PROCESSING":
|
|
310
|
-
case "GENERATING": return /* @__PURE__ */
|
|
328
|
+
case "GENERATING": return /* @__PURE__ */ v(m, {
|
|
311
329
|
size: 14,
|
|
312
330
|
className: "animate-spin",
|
|
313
331
|
style: { color: t },
|
|
314
332
|
"aria-hidden": "true"
|
|
315
333
|
});
|
|
316
|
-
default: return /* @__PURE__ */
|
|
334
|
+
default: return /* @__PURE__ */ v(p, {
|
|
317
335
|
size: 14,
|
|
318
336
|
style: { color: t },
|
|
319
337
|
"aria-hidden": "true"
|
|
320
338
|
});
|
|
321
339
|
}
|
|
322
340
|
}
|
|
323
|
-
function
|
|
341
|
+
function rt(e, t) {
|
|
324
342
|
switch (e) {
|
|
325
343
|
case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
|
|
326
344
|
case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
|
|
@@ -331,9 +349,9 @@ function A(e, t) {
|
|
|
331
349
|
default: return e;
|
|
332
350
|
}
|
|
333
351
|
}
|
|
334
|
-
var
|
|
335
|
-
let { t } =
|
|
336
|
-
return /* @__PURE__ */
|
|
352
|
+
var it = ({ status: e }) => {
|
|
353
|
+
let { t } = Ie(), n = k[O(e)];
|
|
354
|
+
return /* @__PURE__ */ y("span", {
|
|
337
355
|
"data-status": e,
|
|
338
356
|
style: {
|
|
339
357
|
...D,
|
|
@@ -341,10 +359,10 @@ var et = ({ status: e }) => {
|
|
|
341
359
|
backgroundColor: n.bg,
|
|
342
360
|
color: n.text
|
|
343
361
|
},
|
|
344
|
-
children: [
|
|
362
|
+
children: [A(e), rt(e, t)]
|
|
345
363
|
});
|
|
346
364
|
};
|
|
347
|
-
function
|
|
365
|
+
function at(e) {
|
|
348
366
|
let t = k[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
|
|
349
367
|
return {
|
|
350
368
|
...D,
|
|
@@ -356,19 +374,19 @@ function tt(e) {
|
|
|
356
374
|
function j(e) {
|
|
357
375
|
return e.pages.reduce((e, t) => e + t.widgets.length, 0);
|
|
358
376
|
}
|
|
359
|
-
function
|
|
377
|
+
function ot(e) {
|
|
360
378
|
let t = e?.toUpperCase();
|
|
361
379
|
return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
|
|
362
380
|
}
|
|
363
|
-
var
|
|
381
|
+
var M = {
|
|
364
382
|
HIGH: "success",
|
|
365
383
|
MEDIUM: "neutral",
|
|
366
384
|
LOW: "danger"
|
|
367
385
|
};
|
|
368
|
-
function
|
|
386
|
+
function st(e) {
|
|
369
387
|
return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
|
|
370
388
|
}
|
|
371
|
-
function
|
|
389
|
+
function ct(e, t) {
|
|
372
390
|
let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
|
|
373
391
|
return {
|
|
374
392
|
"--proposal-column": r + 1,
|
|
@@ -377,8 +395,8 @@ function at(e, t) {
|
|
|
377
395
|
"--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
|
|
378
396
|
};
|
|
379
397
|
}
|
|
380
|
-
function
|
|
381
|
-
let t = k[
|
|
398
|
+
function lt(e) {
|
|
399
|
+
let t = k[M[e]];
|
|
382
400
|
return {
|
|
383
401
|
...D,
|
|
384
402
|
padding: "0 var(--space-controlGap)",
|
|
@@ -390,9 +408,9 @@ function ot(e) {
|
|
|
390
408
|
color: t.text
|
|
391
409
|
};
|
|
392
410
|
}
|
|
393
|
-
var
|
|
394
|
-
let { t: l } =
|
|
395
|
-
|
|
411
|
+
var ut = l(function() {
|
|
412
|
+
let { t: l } = Ie(), f = e(), p = t(), [g, b] = d(""), [x, S] = d("MODERN"), [O, k] = d("GRID"), [A, rt] = d(Je), [M, ut] = d(Ye), [N, dt] = d(!1), [ft, P] = d(null), [F, pt] = d(() => /* @__PURE__ */ new Set()), [I, L] = d(null), [mt, R] = d(null), ht = he(!1), [gt, _t] = d(null), [z, vt] = d(null), [yt, bt] = d({}), xt = u((e, t) => {
|
|
413
|
+
bt((n) => {
|
|
396
414
|
if (t) return {
|
|
397
415
|
...n,
|
|
398
416
|
[e]: t
|
|
@@ -400,99 +418,99 @@ var M = l(function() {
|
|
|
400
418
|
let r = { ...n };
|
|
401
419
|
return delete r[e], r;
|
|
402
420
|
});
|
|
403
|
-
}, []), [
|
|
421
|
+
}, []), [B, V] = d(null), [H, U] = d(""), [St, Ct] = d(!1), [W, wt] = d(null), [Tt, Et] = d({
|
|
404
422
|
text: "",
|
|
405
423
|
busy: !1
|
|
406
424
|
});
|
|
407
|
-
|
|
425
|
+
Fe({
|
|
408
426
|
id: "insights-prompt",
|
|
409
427
|
label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
|
|
410
|
-
dirty:
|
|
411
|
-
promptText:
|
|
428
|
+
dirty: te({
|
|
429
|
+
promptText: g,
|
|
412
430
|
isGenerating: N,
|
|
413
|
-
refineOpen:
|
|
414
|
-
refineText:
|
|
415
|
-
refineBusy:
|
|
431
|
+
refineOpen: B !== null,
|
|
432
|
+
refineText: H,
|
|
433
|
+
refineBusy: B !== null && F.has(B.id),
|
|
416
434
|
chatOpen: W !== null,
|
|
417
|
-
chatText:
|
|
418
|
-
chatBusy:
|
|
435
|
+
chatText: Tt.text,
|
|
436
|
+
chatBusy: Tt.busy
|
|
419
437
|
})
|
|
420
|
-
}), pe(() => (
|
|
421
|
-
|
|
438
|
+
}), pe(() => (s(B?.id ?? W?.id ?? I?.id ?? null), () => s(null)), [
|
|
439
|
+
B,
|
|
422
440
|
W,
|
|
423
441
|
I
|
|
424
442
|
]);
|
|
425
443
|
let G = u((e) => {
|
|
426
|
-
|
|
444
|
+
pt((t) => new Set(t).add(e));
|
|
427
445
|
}, []), K = u((e) => {
|
|
428
|
-
|
|
446
|
+
pt((t) => {
|
|
429
447
|
let n = new Set(t);
|
|
430
448
|
return n.delete(e), n;
|
|
431
449
|
});
|
|
432
|
-
}, []), { data:
|
|
450
|
+
}, []), { data: Dt, loading: Ot, error: kt, refetch: q, startPolling: At, stopPolling: jt } = Le(Re, {
|
|
433
451
|
variables: { first: 20 },
|
|
434
452
|
fetchPolicy: "cache-and-network"
|
|
435
|
-
}),
|
|
436
|
-
pe(() => (
|
|
437
|
-
|
|
453
|
+
}), Mt = Dt?.listPromptGenerations?.edges?.some((e) => qe.includes(e.node.status)) ?? !1, { data: Nt, error: Pt, refetch: Ft } = Le(Be, { variables: { limit: 6 } }), [It] = _(Ve), [Lt] = _(He), [J] = _(Ue), [Rt] = _(We), [zt] = _(Ge), [Y] = _(Ke), [Bt, { loading: X }] = _(ze), Z = Dt?.listPromptGenerations?.edges?.map((e) => e.node) || [], Vt = Nt?.getPromptSuggestions || [], { current: Ht, superseded: Ut } = o(Z), Q = St ? Z : Ht;
|
|
454
|
+
pe(() => (Mt || N ? At(2e3) : jt(), () => jt()), [
|
|
455
|
+
Mt,
|
|
438
456
|
N,
|
|
439
|
-
|
|
440
|
-
|
|
457
|
+
At,
|
|
458
|
+
jt
|
|
441
459
|
]), pe(() => {
|
|
442
|
-
if (!I && !
|
|
460
|
+
if (!I && !B && !W) return;
|
|
443
461
|
let e = (e) => {
|
|
444
|
-
e.key === "Escape" && (L(null),
|
|
462
|
+
e.key === "Escape" && (L(null), V(null), wt(null));
|
|
445
463
|
};
|
|
446
464
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
447
465
|
}, [
|
|
448
466
|
I,
|
|
449
|
-
|
|
467
|
+
B,
|
|
450
468
|
W
|
|
451
469
|
]);
|
|
452
|
-
let
|
|
453
|
-
if (
|
|
454
|
-
if (
|
|
470
|
+
let Wt = u(async () => {
|
|
471
|
+
if (g.trim() && !N) {
|
|
472
|
+
if (g.length > 2e3) P(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
|
|
455
473
|
else {
|
|
456
|
-
P(null),
|
|
474
|
+
P(null), dt(!0);
|
|
457
475
|
try {
|
|
458
|
-
|
|
459
|
-
let e = await
|
|
460
|
-
prompt:
|
|
461
|
-
styleType:
|
|
462
|
-
layoutType:
|
|
476
|
+
p("bigconsole.ai.generate_clicked", { maxWidgets: M });
|
|
477
|
+
let e = await It({ variables: { input: {
|
|
478
|
+
prompt: g.trim(),
|
|
479
|
+
styleType: x,
|
|
480
|
+
layoutType: O,
|
|
463
481
|
gridColumns: A,
|
|
464
482
|
maxWidgets: M
|
|
465
483
|
} } });
|
|
466
|
-
if (
|
|
484
|
+
if (c(e, "command")) return;
|
|
467
485
|
let t = e.data?.generateDashboardFromPrompt?.id;
|
|
468
|
-
t &&
|
|
486
|
+
t && p("bigconsole.ai.dashboard_generated", {
|
|
469
487
|
generationId: t,
|
|
470
488
|
maxWidgets: M
|
|
471
|
-
}),
|
|
489
|
+
}), b(""), q();
|
|
472
490
|
} catch (e) {
|
|
473
|
-
if (
|
|
491
|
+
if (c(e, "command")) return;
|
|
474
492
|
P(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
|
|
475
493
|
} finally {
|
|
476
|
-
|
|
494
|
+
dt(!1);
|
|
477
495
|
}
|
|
478
496
|
}
|
|
479
497
|
}
|
|
480
498
|
}, [
|
|
481
|
-
|
|
482
|
-
|
|
499
|
+
p,
|
|
500
|
+
g,
|
|
483
501
|
N,
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
502
|
+
It,
|
|
503
|
+
q,
|
|
504
|
+
x,
|
|
505
|
+
O,
|
|
488
506
|
A,
|
|
489
507
|
M,
|
|
490
508
|
l
|
|
491
|
-
]),
|
|
509
|
+
]), Gt = u(async (e) => {
|
|
492
510
|
P(null);
|
|
493
|
-
let t =
|
|
511
|
+
let t = a(e);
|
|
494
512
|
if (t.kind === "view") {
|
|
495
|
-
|
|
513
|
+
f(`/dashboards/${t.dashboardId}`);
|
|
496
514
|
return;
|
|
497
515
|
}
|
|
498
516
|
if (t.kind === "hold") {
|
|
@@ -501,106 +519,106 @@ var M = l(function() {
|
|
|
501
519
|
}
|
|
502
520
|
let n = e.id;
|
|
503
521
|
try {
|
|
504
|
-
|
|
505
|
-
let e = await
|
|
506
|
-
if (
|
|
522
|
+
p("bigconsole.ai.create_dashboard_clicked", { generationId: n });
|
|
523
|
+
let e = await Lt({ variables: { input: t.input } });
|
|
524
|
+
if (c(e, "project")) return;
|
|
507
525
|
let r = e.data?.createDashboardFromGeneration?.id;
|
|
508
|
-
r && (
|
|
526
|
+
r && (p("bigconsole.ai.dashboard_created", {
|
|
509
527
|
generationId: n,
|
|
510
528
|
dashboardId: r
|
|
511
|
-
}),
|
|
529
|
+
}), f(`/dashboards/${r}`));
|
|
512
530
|
} catch (e) {
|
|
513
|
-
if (
|
|
531
|
+
if (c(e, "project")) return;
|
|
514
532
|
P(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
|
|
515
533
|
}
|
|
516
534
|
}, [
|
|
517
|
-
|
|
518
|
-
m,
|
|
535
|
+
Lt,
|
|
519
536
|
p,
|
|
537
|
+
f,
|
|
520
538
|
l
|
|
521
|
-
]),
|
|
539
|
+
]), Kt = u(async (e) => {
|
|
522
540
|
P(null);
|
|
523
541
|
try {
|
|
524
|
-
await
|
|
542
|
+
await J({ variables: { generationId: e } }), re() && ae("success"), q();
|
|
525
543
|
} catch (e) {
|
|
526
|
-
P(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")),
|
|
544
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), re() && ae("error");
|
|
527
545
|
}
|
|
528
546
|
}, [
|
|
529
|
-
Y,
|
|
530
547
|
J,
|
|
548
|
+
q,
|
|
531
549
|
l
|
|
532
|
-
]),
|
|
550
|
+
]), qt = u(async (e) => {
|
|
533
551
|
P(null), G(e);
|
|
534
552
|
try {
|
|
535
|
-
await
|
|
553
|
+
await Rt({ variables: { generationId: e } }), q();
|
|
536
554
|
} catch (e) {
|
|
537
555
|
P(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
|
|
538
556
|
} finally {
|
|
539
557
|
K(e);
|
|
540
558
|
}
|
|
541
559
|
}, [
|
|
542
|
-
|
|
543
|
-
|
|
560
|
+
Rt,
|
|
561
|
+
q,
|
|
544
562
|
l
|
|
545
|
-
]),
|
|
563
|
+
]), Jt = u(async (e) => {
|
|
546
564
|
P(null), G(e);
|
|
547
565
|
try {
|
|
548
|
-
let t = await
|
|
549
|
-
if (
|
|
550
|
-
|
|
566
|
+
let t = await zt({ variables: { input: { generationId: e } } });
|
|
567
|
+
if (c(t, "command")) return;
|
|
568
|
+
q();
|
|
551
569
|
} catch (e) {
|
|
552
|
-
if (
|
|
570
|
+
if (c(e, "command")) return;
|
|
553
571
|
P(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
|
|
554
572
|
} finally {
|
|
555
573
|
K(e);
|
|
556
574
|
}
|
|
557
575
|
}, [
|
|
558
|
-
|
|
559
|
-
|
|
576
|
+
zt,
|
|
577
|
+
q,
|
|
560
578
|
l
|
|
561
|
-
]),
|
|
562
|
-
if (!
|
|
563
|
-
let e =
|
|
579
|
+
]), Yt = u(async () => {
|
|
580
|
+
if (!B || !H.trim()) return;
|
|
581
|
+
let e = B.id;
|
|
564
582
|
P(null), G(e);
|
|
565
583
|
let t = !1;
|
|
566
584
|
try {
|
|
567
|
-
let n = await
|
|
585
|
+
let n = await Y({ variables: { input: {
|
|
568
586
|
generationId: e,
|
|
569
|
-
refinementPrompt:
|
|
587
|
+
refinementPrompt: H.trim()
|
|
570
588
|
} } });
|
|
571
|
-
if (
|
|
589
|
+
if (c(n, "command")) {
|
|
572
590
|
t = !0;
|
|
573
591
|
return;
|
|
574
592
|
}
|
|
575
|
-
t = !0,
|
|
593
|
+
t = !0, q();
|
|
576
594
|
} catch (e) {
|
|
577
|
-
if (
|
|
595
|
+
if (c(e, "command")) {
|
|
578
596
|
t = !0;
|
|
579
597
|
return;
|
|
580
598
|
}
|
|
581
599
|
P(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
|
|
582
600
|
} finally {
|
|
583
|
-
t && (
|
|
601
|
+
t && (V(null), U("")), K(e);
|
|
584
602
|
}
|
|
585
603
|
}, [
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
604
|
+
B,
|
|
605
|
+
H,
|
|
606
|
+
Y,
|
|
607
|
+
q,
|
|
590
608
|
l
|
|
591
|
-
]),
|
|
592
|
-
|
|
593
|
-
}, []),
|
|
609
|
+
]), Xt = u((e) => {
|
|
610
|
+
b(e);
|
|
611
|
+
}, []), Zt = u((e) => {
|
|
594
612
|
let t = e.generatedSpec;
|
|
595
|
-
t && (
|
|
613
|
+
t && (_t({
|
|
596
614
|
name: t.name,
|
|
597
615
|
pages: t.pages
|
|
598
|
-
}),
|
|
599
|
-
}, []),
|
|
600
|
-
if (
|
|
601
|
-
|
|
616
|
+
}), vt(e.id));
|
|
617
|
+
}, []), Qt = he(/* @__PURE__ */ new Set()), $t = u(async (e, t) => {
|
|
618
|
+
if (Qt.current.has(e)) throw Error("A fix is already being applied to this draft. Please wait a moment.");
|
|
619
|
+
Qt.current.add(e), P(null), G(e);
|
|
602
620
|
try {
|
|
603
|
-
let n = await
|
|
621
|
+
let n = await Y({ variables: { input: {
|
|
604
622
|
generationId: e,
|
|
605
623
|
refinementPrompt: `Board Lint fix: ${t.summary}`,
|
|
606
624
|
widgetRefinements: [{
|
|
@@ -609,34 +627,54 @@ var M = l(function() {
|
|
|
609
627
|
...t.configOverrides ? { configOverrides: t.configOverrides } : {}
|
|
610
628
|
}]
|
|
611
629
|
} } });
|
|
612
|
-
return
|
|
630
|
+
return c(n, "command") ? null : (q(), et(n.data));
|
|
613
631
|
} catch (e) {
|
|
614
|
-
if (
|
|
632
|
+
if (c(e, "command")) return null;
|
|
615
633
|
throw e;
|
|
616
634
|
} finally {
|
|
617
|
-
|
|
635
|
+
Qt.current.delete(e), K(e);
|
|
618
636
|
}
|
|
619
637
|
}, [
|
|
620
|
-
|
|
621
|
-
|
|
638
|
+
Y,
|
|
639
|
+
q,
|
|
622
640
|
G,
|
|
623
641
|
K
|
|
624
|
-
]),
|
|
625
|
-
await
|
|
626
|
-
}, [
|
|
642
|
+
]), en = u(async (e) => {
|
|
643
|
+
await J({ variables: { generationId: e } }), q();
|
|
644
|
+
}, [J, q]), tn = u(async ({ id: e, undoRevision: t, specRevision: n }) => {
|
|
645
|
+
if (!(t == null || ht.current)) {
|
|
646
|
+
ht.current = !0, R(null);
|
|
647
|
+
try {
|
|
648
|
+
let { data: r } = await Bt({ variables: {
|
|
649
|
+
generationId: e,
|
|
650
|
+
toRevision: t,
|
|
651
|
+
expectedRevision: n
|
|
652
|
+
} }), i = r?.revertGeneratedDashboard;
|
|
653
|
+
if (!i) throw Error(l("bigconsole.insights.error.undoFailed", "Could not undo the last draft change."));
|
|
654
|
+
L((t) => t?.id === e ? i : t);
|
|
655
|
+
} catch (t) {
|
|
656
|
+
R({
|
|
657
|
+
generationId: e,
|
|
658
|
+
message: t instanceof Error ? t.message : l("bigconsole.insights.error.undoFailed", "Could not undo the last draft change.")
|
|
659
|
+
});
|
|
660
|
+
} finally {
|
|
661
|
+
ht.current = !1;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}, [Bt, l]), nn = me(() => I?.generatedSpec ? {
|
|
627
665
|
name: I.generatedSpec.name,
|
|
628
666
|
pages: I.generatedSpec.pages
|
|
629
667
|
} : null, [I?.generatedSpec]), $ = I?.generatedSpec;
|
|
630
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ y("div", {
|
|
631
669
|
"data-tour": "bigconsole-ai-insights",
|
|
632
670
|
className: "min-w-0",
|
|
633
671
|
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
634
672
|
children: [
|
|
635
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ y("header", {
|
|
636
674
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ v(Oe, { intensity: "subtle" }), /* @__PURE__ */ v("div", {
|
|
638
676
|
style: { padding: "var(--space-pagePadding)" },
|
|
639
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ y("div", {
|
|
640
678
|
style: {
|
|
641
679
|
display: "flex",
|
|
642
680
|
alignItems: "center",
|
|
@@ -644,7 +682,7 @@ var M = l(function() {
|
|
|
644
682
|
flexWrap: "wrap",
|
|
645
683
|
minWidth: 0
|
|
646
684
|
},
|
|
647
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ v("div", {
|
|
648
686
|
style: {
|
|
649
687
|
display: "flex",
|
|
650
688
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -655,17 +693,17 @@ var M = l(function() {
|
|
|
655
693
|
borderRadius: "var(--radius-card)",
|
|
656
694
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
657
695
|
},
|
|
658
|
-
children: /* @__PURE__ */
|
|
696
|
+
children: /* @__PURE__ */ v(h, { style: {
|
|
659
697
|
height: "var(--size-icon-lg)",
|
|
660
698
|
width: "var(--size-icon-lg)",
|
|
661
699
|
color: "var(--color-action-primary-text)"
|
|
662
700
|
} })
|
|
663
|
-
}), /* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ y("div", {
|
|
664
702
|
style: { minWidth: 0 },
|
|
665
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ v("h1", {
|
|
666
704
|
className: "m-0 text-2xl font-bold text-text-primary",
|
|
667
|
-
children: /* @__PURE__ */
|
|
668
|
-
}), /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ v(Me, { children: l("bigconsole.insights.header.title", "AI Insights") })
|
|
706
|
+
}), /* @__PURE__ */ v("p", {
|
|
669
707
|
className: "m-0 text-sm text-text-secondary",
|
|
670
708
|
children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
671
709
|
})]
|
|
@@ -673,22 +711,22 @@ var M = l(function() {
|
|
|
673
711
|
})
|
|
674
712
|
})]
|
|
675
713
|
}),
|
|
676
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ y("div", {
|
|
677
715
|
style: { padding: "var(--space-pagePadding)" },
|
|
678
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ v(Pe, {
|
|
679
717
|
className: "mb-[var(--space-sectionGap)]",
|
|
680
718
|
children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
|
|
681
|
-
}), /* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
|
|
719
|
+
}), /* @__PURE__ */ y(i, { children: [
|
|
720
|
+
/* @__PURE__ */ v(fe, {}),
|
|
721
|
+
ft && /* @__PURE__ */ v(r, {
|
|
684
722
|
headingLevel: 2,
|
|
685
723
|
tone: "danger",
|
|
686
724
|
padding: "compact",
|
|
687
725
|
title: "That request did not go through",
|
|
688
|
-
description:
|
|
689
|
-
icon: /* @__PURE__ */
|
|
726
|
+
description: ft,
|
|
727
|
+
icon: /* @__PURE__ */ v(ge, { className: "h-icon-sm w-icon-sm" }),
|
|
690
728
|
"data-testid": "insights-error",
|
|
691
|
-
actions: /* @__PURE__ */
|
|
729
|
+
actions: /* @__PURE__ */ v("button", {
|
|
692
730
|
type: "button",
|
|
693
731
|
onClick: () => P(null),
|
|
694
732
|
"aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
|
|
@@ -697,24 +735,24 @@ var M = l(function() {
|
|
|
697
735
|
children: "Dismiss"
|
|
698
736
|
})
|
|
699
737
|
}),
|
|
700
|
-
(
|
|
738
|
+
(kt || Pt) && /* @__PURE__ */ v("div", {
|
|
701
739
|
role: "alert",
|
|
702
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ v(r, {
|
|
703
741
|
tone: "danger",
|
|
704
742
|
padding: "compact",
|
|
705
743
|
headingLevel: 2,
|
|
706
744
|
title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
|
|
707
745
|
description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
|
|
708
746
|
"data-testid": "insights-load-error",
|
|
709
|
-
actions: /* @__PURE__ */
|
|
747
|
+
actions: /* @__PURE__ */ y("button", {
|
|
710
748
|
type: "button",
|
|
711
749
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
712
750
|
style: C,
|
|
713
751
|
onClick: () => {
|
|
714
|
-
|
|
752
|
+
kt && q().catch(() => void 0), Pt && Ft().catch(() => void 0);
|
|
715
753
|
},
|
|
716
754
|
children: [
|
|
717
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ v(Ce, {
|
|
718
756
|
size: 14,
|
|
719
757
|
"aria-hidden": "true"
|
|
720
758
|
}),
|
|
@@ -724,22 +762,22 @@ var M = l(function() {
|
|
|
724
762
|
})
|
|
725
763
|
})
|
|
726
764
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ v(r, {
|
|
728
766
|
id: "insights-prompt",
|
|
729
767
|
emphasis: "primary",
|
|
730
768
|
headingLevel: 2,
|
|
731
769
|
title: "Describe your dashboard",
|
|
732
770
|
description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
|
|
733
|
-
icon: /* @__PURE__ */
|
|
771
|
+
icon: /* @__PURE__ */ v(h, { className: "h-icon-sm w-icon-sm" }),
|
|
734
772
|
"data-testid": "insights-prompt",
|
|
735
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ y("div", {
|
|
736
774
|
style: {
|
|
737
775
|
display: "flex",
|
|
738
776
|
flexDirection: "column",
|
|
739
777
|
gap: "var(--space-controlGap)"
|
|
740
778
|
},
|
|
741
779
|
children: [
|
|
742
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ v("label", {
|
|
743
781
|
htmlFor: "prompt-input",
|
|
744
782
|
style: {
|
|
745
783
|
display: "block",
|
|
@@ -749,10 +787,10 @@ var M = l(function() {
|
|
|
749
787
|
},
|
|
750
788
|
children: l("bigconsole.insights.prompt.label", "Your prompt")
|
|
751
789
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ v("textarea", {
|
|
753
791
|
id: "prompt-input",
|
|
754
|
-
value:
|
|
755
|
-
onChange: (e) =>
|
|
792
|
+
value: g,
|
|
793
|
+
onChange: (e) => b(e.target.value),
|
|
756
794
|
placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
757
795
|
rows: 3,
|
|
758
796
|
maxLength: 2e3,
|
|
@@ -769,10 +807,10 @@ var M = l(function() {
|
|
|
769
807
|
resize: "vertical"
|
|
770
808
|
},
|
|
771
809
|
onKeyDown: (e) => {
|
|
772
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(),
|
|
810
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Wt());
|
|
773
811
|
}
|
|
774
812
|
}),
|
|
775
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ y("div", {
|
|
776
814
|
role: "group",
|
|
777
815
|
"aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
|
|
778
816
|
"data-testid": "insights-generation-options",
|
|
@@ -782,73 +820,73 @@ var M = l(function() {
|
|
|
782
820
|
gap: "var(--space-controlGap)"
|
|
783
821
|
},
|
|
784
822
|
children: [
|
|
785
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
786
824
|
htmlFor: "prompt-style",
|
|
787
825
|
style: T,
|
|
788
826
|
children: l("bigconsole.insights.prompt.style", "Style")
|
|
789
|
-
}), /* @__PURE__ */
|
|
827
|
+
}), /* @__PURE__ */ v("select", {
|
|
790
828
|
id: "prompt-style",
|
|
791
|
-
value:
|
|
792
|
-
onChange: (e) =>
|
|
829
|
+
value: x,
|
|
830
|
+
onChange: (e) => S(e.target.value),
|
|
793
831
|
className: n,
|
|
794
832
|
style: E,
|
|
795
|
-
children:
|
|
833
|
+
children: Xe.map((e) => /* @__PURE__ */ v("option", {
|
|
796
834
|
value: e.value,
|
|
797
835
|
children: e.label
|
|
798
836
|
}, e.value))
|
|
799
837
|
})] }),
|
|
800
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
801
839
|
htmlFor: "prompt-layout",
|
|
802
840
|
style: T,
|
|
803
841
|
children: l("bigconsole.insights.prompt.layout", "Layout")
|
|
804
|
-
}), /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ v("select", {
|
|
805
843
|
id: "prompt-layout",
|
|
806
|
-
value:
|
|
807
|
-
onChange: (e) =>
|
|
844
|
+
value: O,
|
|
845
|
+
onChange: (e) => k(e.target.value),
|
|
808
846
|
className: n,
|
|
809
847
|
style: E,
|
|
810
|
-
children:
|
|
848
|
+
children: Ze.map((e) => /* @__PURE__ */ v("option", {
|
|
811
849
|
value: e.value,
|
|
812
850
|
children: e.label
|
|
813
851
|
}, e.value))
|
|
814
852
|
})] }),
|
|
815
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
816
854
|
htmlFor: "prompt-columns",
|
|
817
855
|
style: T,
|
|
818
856
|
children: l("bigconsole.insights.prompt.columns", "Columns")
|
|
819
|
-
}), /* @__PURE__ */
|
|
857
|
+
}), /* @__PURE__ */ v("select", {
|
|
820
858
|
id: "prompt-columns",
|
|
821
859
|
value: A,
|
|
822
860
|
onChange: (e) => rt(Number(e.target.value)),
|
|
823
861
|
className: n,
|
|
824
862
|
style: E,
|
|
825
|
-
children:
|
|
863
|
+
children: Qe.map((e) => /* @__PURE__ */ v("option", {
|
|
826
864
|
value: e,
|
|
827
865
|
children: e
|
|
828
866
|
}, e))
|
|
829
867
|
})] }),
|
|
830
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
831
869
|
htmlFor: "prompt-max-widgets",
|
|
832
870
|
style: T,
|
|
833
871
|
children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
|
|
834
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ v("select", {
|
|
835
873
|
id: "prompt-max-widgets",
|
|
836
874
|
value: M,
|
|
837
|
-
onChange: (e) =>
|
|
875
|
+
onChange: (e) => ut(Number(e.target.value)),
|
|
838
876
|
className: n,
|
|
839
877
|
style: E,
|
|
840
|
-
children:
|
|
878
|
+
children: $e.map((e) => /* @__PURE__ */ v("option", {
|
|
841
879
|
value: e,
|
|
842
880
|
children: e
|
|
843
881
|
}, e))
|
|
844
882
|
})] })
|
|
845
883
|
]
|
|
846
884
|
}),
|
|
847
|
-
/* @__PURE__ */
|
|
848
|
-
prompt:
|
|
885
|
+
/* @__PURE__ */ v(ne, {
|
|
886
|
+
prompt: g,
|
|
849
887
|
disabled: N
|
|
850
888
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ y("div", {
|
|
852
890
|
style: {
|
|
853
891
|
display: "flex",
|
|
854
892
|
alignItems: "center",
|
|
@@ -857,7 +895,7 @@ var M = l(function() {
|
|
|
857
895
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
858
896
|
paddingTop: "var(--space-controlGap)"
|
|
859
897
|
},
|
|
860
|
-
children: [/* @__PURE__ */
|
|
898
|
+
children: [/* @__PURE__ */ y("span", {
|
|
861
899
|
style: {
|
|
862
900
|
flex: "1 1 12rem",
|
|
863
901
|
minWidth: 0,
|
|
@@ -867,25 +905,25 @@ var M = l(function() {
|
|
|
867
905
|
children: [
|
|
868
906
|
l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
|
|
869
907
|
" · ",
|
|
870
|
-
|
|
908
|
+
g.length,
|
|
871
909
|
"/2000"
|
|
872
910
|
]
|
|
873
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ y("button", {
|
|
874
912
|
type: "button",
|
|
875
|
-
onClick:
|
|
876
|
-
disabled: !
|
|
913
|
+
onClick: Wt,
|
|
914
|
+
disabled: !g.trim() || N,
|
|
877
915
|
className: n,
|
|
878
916
|
style: {
|
|
879
917
|
...w,
|
|
880
918
|
marginLeft: "auto",
|
|
881
|
-
cursor: !
|
|
882
|
-
opacity: !
|
|
919
|
+
cursor: !g.trim() || N ? "not-allowed" : "pointer",
|
|
920
|
+
opacity: !g.trim() || N ? .5 : 1
|
|
883
921
|
},
|
|
884
|
-
children: [N ? /* @__PURE__ */
|
|
922
|
+
children: [N ? /* @__PURE__ */ v(m, {
|
|
885
923
|
size: 16,
|
|
886
924
|
className: "animate-spin",
|
|
887
925
|
"aria-hidden": "true"
|
|
888
|
-
}) : /* @__PURE__ */
|
|
926
|
+
}) : /* @__PURE__ */ v(h, {
|
|
889
927
|
size: 16,
|
|
890
928
|
"aria-hidden": "true"
|
|
891
929
|
}), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
@@ -894,22 +932,22 @@ var M = l(function() {
|
|
|
894
932
|
]
|
|
895
933
|
})
|
|
896
934
|
}),
|
|
897
|
-
|
|
935
|
+
Vt.length > 0 && /* @__PURE__ */ v(r, {
|
|
898
936
|
emphasis: "muted",
|
|
899
937
|
headingLevel: 2,
|
|
900
938
|
title: l("bigconsole.insights.suggestions.heading", "Starting points"),
|
|
901
939
|
description: "Pick one to drop it into the prompt box above, then edit it before generating.",
|
|
902
|
-
icon: /* @__PURE__ */
|
|
940
|
+
icon: /* @__PURE__ */ v(xe, { className: "h-icon-sm w-icon-sm" }),
|
|
903
941
|
"data-testid": "insights-suggestions",
|
|
904
|
-
children: /* @__PURE__ */
|
|
942
|
+
children: /* @__PURE__ */ v("div", {
|
|
905
943
|
style: {
|
|
906
944
|
display: "grid",
|
|
907
945
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
|
|
908
946
|
gap: "var(--space-controlGap)"
|
|
909
947
|
},
|
|
910
|
-
children:
|
|
948
|
+
children: Vt.map((e) => /* @__PURE__ */ y("button", {
|
|
911
949
|
type: "button",
|
|
912
|
-
onClick: () =>
|
|
950
|
+
onClick: () => Xt(e.prompt),
|
|
913
951
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
914
952
|
style: {
|
|
915
953
|
textAlign: "left",
|
|
@@ -922,7 +960,7 @@ var M = l(function() {
|
|
|
922
960
|
cursor: "pointer"
|
|
923
961
|
},
|
|
924
962
|
children: [
|
|
925
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ v("span", {
|
|
926
964
|
style: {
|
|
927
965
|
display: "block",
|
|
928
966
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -932,7 +970,7 @@ var M = l(function() {
|
|
|
932
970
|
},
|
|
933
971
|
children: e.title
|
|
934
972
|
}),
|
|
935
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ v("span", {
|
|
936
974
|
style: {
|
|
937
975
|
display: "block",
|
|
938
976
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -941,14 +979,14 @@ var M = l(function() {
|
|
|
941
979
|
},
|
|
942
980
|
children: e.exampleDescription || e.prompt
|
|
943
981
|
}),
|
|
944
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
982
|
+
e.tags.length > 0 && /* @__PURE__ */ v("span", {
|
|
945
983
|
style: {
|
|
946
984
|
display: "flex",
|
|
947
985
|
gap: "var(--space-iconGap)",
|
|
948
986
|
marginTop: "var(--space-controlGap)",
|
|
949
987
|
flexWrap: "wrap"
|
|
950
988
|
},
|
|
951
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
989
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ v("span", {
|
|
952
990
|
style: D,
|
|
953
991
|
children: e
|
|
954
992
|
}, e))
|
|
@@ -957,14 +995,14 @@ var M = l(function() {
|
|
|
957
995
|
}, e.id))
|
|
958
996
|
})
|
|
959
997
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ v(r, {
|
|
961
999
|
emphasis: "bare",
|
|
962
1000
|
padding: "none",
|
|
963
1001
|
headingLevel: 2,
|
|
964
1002
|
title: l("bigconsole.insights.generations.heading", "Recent generations"),
|
|
965
1003
|
description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
|
|
966
|
-
icon: /* @__PURE__ */
|
|
967
|
-
meta: Q.length > 0 ? /* @__PURE__ */
|
|
1004
|
+
icon: /* @__PURE__ */ v(be, { className: "h-icon-sm w-icon-sm" }),
|
|
1005
|
+
meta: Q.length > 0 ? /* @__PURE__ */ y("span", {
|
|
968
1006
|
style: D,
|
|
969
1007
|
children: [
|
|
970
1008
|
Q.length,
|
|
@@ -973,13 +1011,13 @@ var M = l(function() {
|
|
|
973
1011
|
]
|
|
974
1012
|
}) : void 0,
|
|
975
1013
|
"data-testid": "insights-generations",
|
|
976
|
-
children:
|
|
1014
|
+
children: Ot && Z.length === 0 ? /* @__PURE__ */ v(r, {
|
|
977
1015
|
emphasis: "muted",
|
|
978
1016
|
headingLevel: 3,
|
|
979
1017
|
"aria-label": "Loading generations",
|
|
980
1018
|
className: "min-h-[10rem]",
|
|
981
1019
|
"data-testid": "insights-generations-loading",
|
|
982
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ y("div", {
|
|
983
1021
|
style: {
|
|
984
1022
|
display: "flex",
|
|
985
1023
|
minHeight: "8rem",
|
|
@@ -989,61 +1027,61 @@ var M = l(function() {
|
|
|
989
1027
|
gap: "var(--space-controlGap)",
|
|
990
1028
|
color: "var(--color-text-muted)"
|
|
991
1029
|
},
|
|
992
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ v(m, {
|
|
993
1031
|
size: 24,
|
|
994
1032
|
className: "animate-spin",
|
|
995
1033
|
"aria-hidden": "true"
|
|
996
|
-
}), /* @__PURE__ */
|
|
1034
|
+
}), /* @__PURE__ */ v("p", {
|
|
997
1035
|
style: { fontSize: "var(--font-size-body-sm)" },
|
|
998
1036
|
children: l("bigconsole.insights.generations.loading", "Loading generations…")
|
|
999
1037
|
})]
|
|
1000
1038
|
})
|
|
1001
|
-
}) : Z.length === 0 && !N && !
|
|
1039
|
+
}) : Z.length === 0 && !N && !kt ? /* @__PURE__ */ v(je, {
|
|
1002
1040
|
treatment: "insight",
|
|
1003
1041
|
className: "border-[var(--color-border-seam)]",
|
|
1004
|
-
children: /* @__PURE__ */
|
|
1042
|
+
children: /* @__PURE__ */ v(Ne, {
|
|
1005
1043
|
illustration: "onboarding",
|
|
1006
1044
|
title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
1007
1045
|
description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
1008
1046
|
})
|
|
1009
|
-
}) : /* @__PURE__ */
|
|
1047
|
+
}) : /* @__PURE__ */ y("div", {
|
|
1010
1048
|
className: "flex flex-col gap-list-gap",
|
|
1011
1049
|
children: [
|
|
1012
|
-
N && !
|
|
1050
|
+
N && !Mt && /* @__PURE__ */ v(r, {
|
|
1013
1051
|
emphasis: "muted",
|
|
1014
1052
|
tone: "info",
|
|
1015
1053
|
padding: "compact",
|
|
1016
1054
|
headingLevel: 3,
|
|
1017
1055
|
title: "Sending your prompt…",
|
|
1018
1056
|
description: "The new generation appears here as soon as the backend accepts it.",
|
|
1019
|
-
icon: /* @__PURE__ */
|
|
1057
|
+
icon: /* @__PURE__ */ v(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
|
|
1020
1058
|
"data-testid": "insights-generation-pending"
|
|
1021
1059
|
}),
|
|
1022
1060
|
Q.map((e) => {
|
|
1023
|
-
let t = e.generatedSpec,
|
|
1024
|
-
return /* @__PURE__ */
|
|
1061
|
+
let t = e.generatedSpec, i = ee(Z, e), o = F.has(e.id), s = qe.includes(e.status);
|
|
1062
|
+
return /* @__PURE__ */ y(r, {
|
|
1025
1063
|
emphasis: "standard",
|
|
1026
1064
|
padding: "compact",
|
|
1027
1065
|
headingLevel: 3,
|
|
1028
|
-
title: t?.name || (
|
|
1029
|
-
meta: /* @__PURE__ */
|
|
1066
|
+
title: t?.name || (s ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
|
|
1067
|
+
meta: /* @__PURE__ */ v(it, { status: e.status }),
|
|
1030
1068
|
description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
|
|
1031
1069
|
"data-testid": "insights-generation-card",
|
|
1032
1070
|
bodyClassName: "flex flex-col gap-control-gap",
|
|
1033
1071
|
children: [
|
|
1034
|
-
t && /* @__PURE__ */
|
|
1072
|
+
t && /* @__PURE__ */ y("div", {
|
|
1035
1073
|
style: {
|
|
1036
1074
|
display: "flex",
|
|
1037
1075
|
flexWrap: "wrap",
|
|
1038
1076
|
gap: "var(--space-iconGap)"
|
|
1039
1077
|
},
|
|
1040
1078
|
children: [
|
|
1041
|
-
e.parentGenerationId && /* @__PURE__ */
|
|
1079
|
+
e.parentGenerationId && /* @__PURE__ */ v("span", {
|
|
1042
1080
|
style: D,
|
|
1043
1081
|
"data-testid": "insights-generation-revision",
|
|
1044
|
-
children:
|
|
1082
|
+
children: i ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: i.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
|
|
1045
1083
|
}),
|
|
1046
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ y("span", {
|
|
1047
1085
|
style: D,
|
|
1048
1086
|
children: [
|
|
1049
1087
|
j(t),
|
|
@@ -1051,7 +1089,7 @@ var M = l(function() {
|
|
|
1051
1089
|
j(t) === 1 ? "" : "s"
|
|
1052
1090
|
]
|
|
1053
1091
|
}),
|
|
1054
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ y("span", {
|
|
1055
1093
|
style: D,
|
|
1056
1094
|
children: [
|
|
1057
1095
|
t.pages.length,
|
|
@@ -1059,21 +1097,21 @@ var M = l(function() {
|
|
|
1059
1097
|
t.pages.length === 1 ? "" : "s"
|
|
1060
1098
|
]
|
|
1061
1099
|
}),
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
style:
|
|
1100
|
+
/* @__PURE__ */ y("span", {
|
|
1101
|
+
style: at(t.overallConfidence),
|
|
1064
1102
|
children: [Math.round(t.overallConfidence * 100), "% confidence"]
|
|
1065
1103
|
})
|
|
1066
1104
|
]
|
|
1067
1105
|
}),
|
|
1068
|
-
e.errorMessage && /* @__PURE__ */
|
|
1106
|
+
e.errorMessage && /* @__PURE__ */ v(r, {
|
|
1069
1107
|
headingLevel: 4,
|
|
1070
1108
|
tone: "danger",
|
|
1071
1109
|
padding: "compact",
|
|
1072
1110
|
title: "Generation failed",
|
|
1073
1111
|
description: e.errorMessage,
|
|
1074
|
-
icon: /* @__PURE__ */
|
|
1112
|
+
icon: /* @__PURE__ */ v(ge, { className: "h-icon-sm w-icon-sm" })
|
|
1075
1113
|
}),
|
|
1076
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ y("div", {
|
|
1077
1115
|
style: {
|
|
1078
1116
|
display: "flex",
|
|
1079
1117
|
flexWrap: "wrap",
|
|
@@ -1083,20 +1121,20 @@ var M = l(function() {
|
|
|
1083
1121
|
paddingTop: "var(--space-controlGap)"
|
|
1084
1122
|
},
|
|
1085
1123
|
children: [
|
|
1086
|
-
|
|
1124
|
+
s && /* @__PURE__ */ y("button", {
|
|
1087
1125
|
type: "button",
|
|
1088
1126
|
onClick: () => {
|
|
1089
|
-
|
|
1127
|
+
ie("medium"), qt(e.id);
|
|
1090
1128
|
},
|
|
1091
|
-
disabled:
|
|
1129
|
+
disabled: o,
|
|
1092
1130
|
title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
|
|
1093
1131
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1094
1132
|
style: {
|
|
1095
|
-
...
|
|
1096
|
-
cursor:
|
|
1133
|
+
...tt,
|
|
1134
|
+
cursor: o ? "wait" : "pointer"
|
|
1097
1135
|
},
|
|
1098
1136
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ v(ve, {
|
|
1100
1138
|
size: 14,
|
|
1101
1139
|
"aria-hidden": "true"
|
|
1102
1140
|
}),
|
|
@@ -1104,14 +1142,16 @@ var M = l(function() {
|
|
|
1104
1142
|
l("bigconsole.insights.actions.cancel", "Cancel")
|
|
1105
1143
|
]
|
|
1106
1144
|
}),
|
|
1107
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1145
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ y("button", {
|
|
1108
1146
|
type: "button",
|
|
1109
|
-
onClick: () =>
|
|
1147
|
+
onClick: () => {
|
|
1148
|
+
R(null), L(e);
|
|
1149
|
+
},
|
|
1110
1150
|
title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
1111
1151
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1112
1152
|
style: C,
|
|
1113
1153
|
children: [
|
|
1114
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ v(ye, {
|
|
1115
1155
|
size: 14,
|
|
1116
1156
|
"aria-hidden": "true"
|
|
1117
1157
|
}),
|
|
@@ -1119,16 +1159,16 @@ var M = l(function() {
|
|
|
1119
1159
|
l("bigconsole.insights.actions.preview", "Preview")
|
|
1120
1160
|
]
|
|
1121
1161
|
}),
|
|
1122
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1162
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ y("button", {
|
|
1123
1163
|
type: "button",
|
|
1124
1164
|
onClick: () => {
|
|
1125
|
-
|
|
1165
|
+
V(e), U("");
|
|
1126
1166
|
},
|
|
1127
1167
|
title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1128
1168
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1129
1169
|
style: C,
|
|
1130
1170
|
children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ v(Ee, {
|
|
1132
1172
|
size: 14,
|
|
1133
1173
|
"aria-hidden": "true"
|
|
1134
1174
|
}),
|
|
@@ -1136,14 +1176,14 @@ var M = l(function() {
|
|
|
1136
1176
|
l("bigconsole.insights.actions.refine", "Refine")
|
|
1137
1177
|
]
|
|
1138
1178
|
}),
|
|
1139
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1179
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ y("button", {
|
|
1140
1180
|
type: "button",
|
|
1141
|
-
onClick: () =>
|
|
1181
|
+
onClick: () => Zt(e),
|
|
1142
1182
|
title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
|
|
1143
1183
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1144
1184
|
style: C,
|
|
1145
1185
|
children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ v(we, {
|
|
1147
1187
|
size: 14,
|
|
1148
1188
|
"aria-hidden": "true"
|
|
1149
1189
|
}),
|
|
@@ -1151,29 +1191,29 @@ var M = l(function() {
|
|
|
1151
1191
|
l("bigconsole.insights.actions.checkDraft", "Check draft")
|
|
1152
1192
|
]
|
|
1153
1193
|
}),
|
|
1154
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */
|
|
1194
|
+
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ y("button", {
|
|
1155
1195
|
type: "button",
|
|
1156
1196
|
onClick: () => {
|
|
1157
|
-
|
|
1197
|
+
ie("medium"), Jt(e.id);
|
|
1158
1198
|
},
|
|
1159
|
-
disabled:
|
|
1199
|
+
disabled: o,
|
|
1160
1200
|
title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
|
|
1161
1201
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1162
1202
|
style: {
|
|
1163
1203
|
...C,
|
|
1164
|
-
cursor:
|
|
1204
|
+
cursor: o ? "wait" : "pointer"
|
|
1165
1205
|
},
|
|
1166
1206
|
children: [
|
|
1167
|
-
/* @__PURE__ */
|
|
1207
|
+
/* @__PURE__ */ v(Ce, {
|
|
1168
1208
|
size: 14,
|
|
1169
|
-
className:
|
|
1209
|
+
className: o ? "animate-spin" : "",
|
|
1170
1210
|
"aria-hidden": "true"
|
|
1171
1211
|
}),
|
|
1172
1212
|
" ",
|
|
1173
1213
|
l("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
1174
1214
|
]
|
|
1175
1215
|
}),
|
|
1176
|
-
/* @__PURE__ */
|
|
1216
|
+
/* @__PURE__ */ y("div", {
|
|
1177
1217
|
style: {
|
|
1178
1218
|
display: "flex",
|
|
1179
1219
|
flexWrap: "wrap",
|
|
@@ -1182,50 +1222,50 @@ var M = l(function() {
|
|
|
1182
1222
|
marginLeft: "auto"
|
|
1183
1223
|
},
|
|
1184
1224
|
children: [
|
|
1185
|
-
e.status === "COMPLETED" &&
|
|
1225
|
+
e.status === "COMPLETED" && a(e).kind === "hold" && /* @__PURE__ */ v("span", {
|
|
1186
1226
|
role: "status",
|
|
1187
1227
|
children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
|
|
1188
1228
|
}),
|
|
1189
|
-
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */
|
|
1229
|
+
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ y("button", {
|
|
1190
1230
|
type: "button",
|
|
1191
|
-
onClick: () =>
|
|
1192
|
-
disabled:
|
|
1193
|
-
title:
|
|
1231
|
+
onClick: () => Gt(e),
|
|
1232
|
+
disabled: a(e).kind !== "create",
|
|
1233
|
+
title: a(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
|
|
1194
1234
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1195
1235
|
style: w,
|
|
1196
1236
|
children: [
|
|
1197
1237
|
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1198
1238
|
" ",
|
|
1199
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ v(_e, {
|
|
1200
1240
|
size: 14,
|
|
1201
1241
|
"aria-hidden": "true"
|
|
1202
1242
|
})
|
|
1203
1243
|
]
|
|
1204
1244
|
}),
|
|
1205
|
-
e.dashboardId && /* @__PURE__ */
|
|
1245
|
+
e.dashboardId && /* @__PURE__ */ y("button", {
|
|
1206
1246
|
type: "button",
|
|
1207
|
-
onClick: () =>
|
|
1247
|
+
onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
|
|
1208
1248
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1209
1249
|
style: C,
|
|
1210
1250
|
children: [
|
|
1211
1251
|
l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
|
|
1212
1252
|
" ",
|
|
1213
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ v(_e, {
|
|
1214
1254
|
size: 14,
|
|
1215
1255
|
"aria-hidden": "true"
|
|
1216
1256
|
})
|
|
1217
1257
|
]
|
|
1218
1258
|
}),
|
|
1219
|
-
/* @__PURE__ */
|
|
1259
|
+
/* @__PURE__ */ v("button", {
|
|
1220
1260
|
type: "button",
|
|
1221
1261
|
onClick: () => {
|
|
1222
|
-
|
|
1262
|
+
ie("medium"), Kt(e.id);
|
|
1223
1263
|
},
|
|
1224
1264
|
title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1225
1265
|
"aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1226
1266
|
className: n,
|
|
1227
|
-
style:
|
|
1228
|
-
children: /* @__PURE__ */
|
|
1267
|
+
style: nt,
|
|
1268
|
+
children: /* @__PURE__ */ v(Te, {
|
|
1229
1269
|
size: 14,
|
|
1230
1270
|
"aria-hidden": "true"
|
|
1231
1271
|
})
|
|
@@ -1237,21 +1277,21 @@ var M = l(function() {
|
|
|
1237
1277
|
]
|
|
1238
1278
|
}, e.id);
|
|
1239
1279
|
}),
|
|
1240
|
-
|
|
1280
|
+
Ut.length > 0 && /* @__PURE__ */ v("button", {
|
|
1241
1281
|
type: "button",
|
|
1242
|
-
onClick: () =>
|
|
1243
|
-
"aria-expanded":
|
|
1282
|
+
onClick: () => Ct((e) => !e),
|
|
1283
|
+
"aria-expanded": St,
|
|
1244
1284
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1245
1285
|
style: C,
|
|
1246
1286
|
"data-testid": "insights-earlier-versions-toggle",
|
|
1247
|
-
children:
|
|
1287
|
+
children: St ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Ut.length === 1 ? l("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Ut.length })
|
|
1248
1288
|
})
|
|
1249
1289
|
]
|
|
1250
1290
|
})
|
|
1251
1291
|
})
|
|
1252
1292
|
] })]
|
|
1253
1293
|
}),
|
|
1254
|
-
I && $ && /* @__PURE__ */
|
|
1294
|
+
I && $ && /* @__PURE__ */ v("div", {
|
|
1255
1295
|
role: "dialog",
|
|
1256
1296
|
"aria-modal": "true",
|
|
1257
1297
|
"aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
|
|
@@ -1266,7 +1306,7 @@ var M = l(function() {
|
|
|
1266
1306
|
justifyContent: "center",
|
|
1267
1307
|
padding: "var(--space-pagePadding)"
|
|
1268
1308
|
},
|
|
1269
|
-
children: /* @__PURE__ */
|
|
1309
|
+
children: /* @__PURE__ */ y("div", {
|
|
1270
1310
|
onClick: (e) => e.stopPropagation(),
|
|
1271
1311
|
style: {
|
|
1272
1312
|
display: "flex",
|
|
@@ -1280,7 +1320,7 @@ var M = l(function() {
|
|
|
1280
1320
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1281
1321
|
},
|
|
1282
1322
|
children: [
|
|
1283
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ y("div", {
|
|
1284
1324
|
style: {
|
|
1285
1325
|
display: "flex",
|
|
1286
1326
|
justifyContent: "space-between",
|
|
@@ -1289,16 +1329,16 @@ var M = l(function() {
|
|
|
1289
1329
|
padding: "var(--space-cardPadding)",
|
|
1290
1330
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1291
1331
|
},
|
|
1292
|
-
children: [/* @__PURE__ */
|
|
1332
|
+
children: [/* @__PURE__ */ y("div", {
|
|
1293
1333
|
style: { minWidth: 0 },
|
|
1294
|
-
children: [/* @__PURE__ */
|
|
1334
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
1295
1335
|
style: {
|
|
1296
1336
|
fontSize: "var(--font-size-heading-h4)",
|
|
1297
1337
|
fontWeight: "var(--font-weight-semibold)",
|
|
1298
1338
|
color: "var(--color-text-primary)"
|
|
1299
1339
|
},
|
|
1300
1340
|
children: $.name
|
|
1301
|
-
}), $.description && /* @__PURE__ */
|
|
1341
|
+
}), $.description && /* @__PURE__ */ v("p", {
|
|
1302
1342
|
style: {
|
|
1303
1343
|
fontSize: "var(--font-size-body-sm)",
|
|
1304
1344
|
color: "var(--color-text-secondary)",
|
|
@@ -1306,22 +1346,22 @@ var M = l(function() {
|
|
|
1306
1346
|
},
|
|
1307
1347
|
children: $.description
|
|
1308
1348
|
})]
|
|
1309
|
-
}), /* @__PURE__ */
|
|
1349
|
+
}), /* @__PURE__ */ v("button", {
|
|
1310
1350
|
type: "button",
|
|
1311
1351
|
onClick: () => L(null),
|
|
1312
1352
|
"aria-label": l("bigconsole.insights.preview.close", "Close preview"),
|
|
1313
1353
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1314
1354
|
style: {
|
|
1315
|
-
...
|
|
1355
|
+
...nt,
|
|
1316
1356
|
color: "var(--color-text-muted)"
|
|
1317
1357
|
},
|
|
1318
|
-
children: /* @__PURE__ */
|
|
1358
|
+
children: /* @__PURE__ */ v(De, {
|
|
1319
1359
|
size: 18,
|
|
1320
1360
|
"aria-hidden": "true"
|
|
1321
1361
|
})
|
|
1322
1362
|
})]
|
|
1323
1363
|
}),
|
|
1324
|
-
/* @__PURE__ */
|
|
1364
|
+
/* @__PURE__ */ y("div", {
|
|
1325
1365
|
style: {
|
|
1326
1366
|
flex: "1 1 auto",
|
|
1327
1367
|
minHeight: 0,
|
|
@@ -1332,14 +1372,24 @@ var M = l(function() {
|
|
|
1332
1372
|
gap: "var(--space-controlGap)"
|
|
1333
1373
|
},
|
|
1334
1374
|
children: [
|
|
1335
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ v(ke, { children: /* @__PURE__ */ y(Ae, {
|
|
1376
|
+
className: "flex items-start gap-[var(--space-iconGap)] p-[var(--space-cardPadding)]",
|
|
1377
|
+
children: [/* @__PURE__ */ v(ge, {
|
|
1378
|
+
className: "h-icon-sm w-icon-sm shrink-0",
|
|
1379
|
+
"aria-hidden": "true"
|
|
1380
|
+
}), /* @__PURE__ */ v("p", {
|
|
1381
|
+
className: "text-body-sm",
|
|
1382
|
+
children: l("bigconsole.insights.preview.aiVerificationNotice", "This console was generated by AI. Verify bindings and figures before publishing.")
|
|
1383
|
+
})]
|
|
1384
|
+
}) }),
|
|
1385
|
+
/* @__PURE__ */ y("div", {
|
|
1336
1386
|
style: {
|
|
1337
1387
|
display: "flex",
|
|
1338
1388
|
flexWrap: "wrap",
|
|
1339
1389
|
gap: "var(--space-iconGap)"
|
|
1340
1390
|
},
|
|
1341
1391
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ y("span", {
|
|
1343
1393
|
style: D,
|
|
1344
1394
|
children: [
|
|
1345
1395
|
j($),
|
|
@@ -1347,7 +1397,7 @@ var M = l(function() {
|
|
|
1347
1397
|
j($) === 1 ? "" : "s"
|
|
1348
1398
|
]
|
|
1349
1399
|
}),
|
|
1350
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ y("span", {
|
|
1351
1401
|
style: D,
|
|
1352
1402
|
children: [
|
|
1353
1403
|
$.pages.length,
|
|
@@ -1355,24 +1405,28 @@ var M = l(function() {
|
|
|
1355
1405
|
$.pages.length === 1 ? "" : "s"
|
|
1356
1406
|
]
|
|
1357
1407
|
}),
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
style:
|
|
1408
|
+
/* @__PURE__ */ y("span", {
|
|
1409
|
+
style: at($.overallConfidence),
|
|
1360
1410
|
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
1361
1411
|
})
|
|
1362
1412
|
]
|
|
1363
1413
|
}),
|
|
1364
|
-
/* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1414
|
+
/* @__PURE__ */ v(ce, { metadata: I.processingMetadata }),
|
|
1415
|
+
/* @__PURE__ */ v(se, { warnings: $.warnings }),
|
|
1416
|
+
mt?.generationId === I.id && /* @__PURE__ */ v("p", {
|
|
1417
|
+
role: "alert",
|
|
1418
|
+
children: mt.message
|
|
1419
|
+
}),
|
|
1420
|
+
/* @__PURE__ */ v(le, {
|
|
1421
|
+
spec: nn,
|
|
1422
|
+
onApplyFix: (e) => $t(I.id, e),
|
|
1423
|
+
onUndoFix: en,
|
|
1424
|
+
applied: yt[I.id] ?? null,
|
|
1425
|
+
onAppliedChange: (e) => xt(I.id, e)
|
|
1372
1426
|
}),
|
|
1373
|
-
$.reasoning && /* @__PURE__ */
|
|
1427
|
+
$.reasoning && /* @__PURE__ */ y("details", {
|
|
1374
1428
|
"data-testid": "preview-reasoning",
|
|
1375
|
-
children: [/* @__PURE__ */
|
|
1429
|
+
children: [/* @__PURE__ */ v("summary", {
|
|
1376
1430
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1377
1431
|
style: {
|
|
1378
1432
|
cursor: "pointer",
|
|
@@ -1382,7 +1436,7 @@ var M = l(function() {
|
|
|
1382
1436
|
borderRadius: "var(--radius-button)"
|
|
1383
1437
|
},
|
|
1384
1438
|
children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
|
|
1385
|
-
}), /* @__PURE__ */
|
|
1439
|
+
}), /* @__PURE__ */ v("p", {
|
|
1386
1440
|
style: {
|
|
1387
1441
|
marginTop: "var(--space-controlGap)",
|
|
1388
1442
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -1392,12 +1446,12 @@ var M = l(function() {
|
|
|
1392
1446
|
children: $.reasoning
|
|
1393
1447
|
})]
|
|
1394
1448
|
}),
|
|
1395
|
-
$.pages.map((e, t) => /* @__PURE__ */
|
|
1449
|
+
$.pages.map((e, t) => /* @__PURE__ */ y(r, {
|
|
1396
1450
|
emphasis: "muted",
|
|
1397
1451
|
padding: "compact",
|
|
1398
1452
|
headingLevel: 3,
|
|
1399
1453
|
title: e.name,
|
|
1400
|
-
meta: /* @__PURE__ */
|
|
1454
|
+
meta: /* @__PURE__ */ y("span", {
|
|
1401
1455
|
style: D,
|
|
1402
1456
|
children: [
|
|
1403
1457
|
e.widgets.length,
|
|
@@ -1405,7 +1459,7 @@ var M = l(function() {
|
|
|
1405
1459
|
e.widgets.length === 1 ? "" : "s"
|
|
1406
1460
|
]
|
|
1407
1461
|
}),
|
|
1408
|
-
children: [/* @__PURE__ */
|
|
1462
|
+
children: [/* @__PURE__ */ y("p", {
|
|
1409
1463
|
style: {
|
|
1410
1464
|
fontSize: "var(--font-size-body-sm)",
|
|
1411
1465
|
color: "var(--color-text-secondary)",
|
|
@@ -1421,15 +1475,15 @@ var M = l(function() {
|
|
|
1421
1475
|
" ",
|
|
1422
1476
|
e.layout.toLowerCase().replaceAll("_", " ")
|
|
1423
1477
|
]
|
|
1424
|
-
}), /* @__PURE__ */
|
|
1478
|
+
}), /* @__PURE__ */ v("div", {
|
|
1425
1479
|
className: "insights-proposal-grid",
|
|
1426
|
-
style:
|
|
1480
|
+
style: st(e.gridColumns),
|
|
1427
1481
|
children: e.widgets.map((t, n) => {
|
|
1428
|
-
let r =
|
|
1429
|
-
return /* @__PURE__ */
|
|
1482
|
+
let r = ot(t.confidence);
|
|
1483
|
+
return /* @__PURE__ */ y("div", {
|
|
1430
1484
|
className: "insights-proposal-widget",
|
|
1431
1485
|
style: {
|
|
1432
|
-
...
|
|
1486
|
+
...ct(t.position, e.gridColumns),
|
|
1433
1487
|
display: "flex",
|
|
1434
1488
|
flexDirection: "column",
|
|
1435
1489
|
gap: "2px",
|
|
@@ -1439,7 +1493,7 @@ var M = l(function() {
|
|
|
1439
1493
|
border: "1px solid var(--color-border-subtle)"
|
|
1440
1494
|
},
|
|
1441
1495
|
children: [
|
|
1442
|
-
/* @__PURE__ */
|
|
1496
|
+
/* @__PURE__ */ y("div", {
|
|
1443
1497
|
style: {
|
|
1444
1498
|
display: "flex",
|
|
1445
1499
|
flexWrap: "wrap",
|
|
@@ -1447,7 +1501,7 @@ var M = l(function() {
|
|
|
1447
1501
|
gap: "var(--space-iconGap)"
|
|
1448
1502
|
},
|
|
1449
1503
|
children: [
|
|
1450
|
-
/* @__PURE__ */
|
|
1504
|
+
/* @__PURE__ */ v("span", {
|
|
1451
1505
|
style: {
|
|
1452
1506
|
fontSize: "var(--font-size-body-sm)",
|
|
1453
1507
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -1456,7 +1510,7 @@ var M = l(function() {
|
|
|
1456
1510
|
},
|
|
1457
1511
|
children: t.title
|
|
1458
1512
|
}),
|
|
1459
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ v("span", {
|
|
1460
1514
|
style: {
|
|
1461
1515
|
fontSize: "var(--font-size-xs)",
|
|
1462
1516
|
color: "var(--color-text-muted)"
|
|
@@ -1464,9 +1518,9 @@ var M = l(function() {
|
|
|
1464
1518
|
"data-testid": "preview-widget-type",
|
|
1465
1519
|
children: t.type
|
|
1466
1520
|
}),
|
|
1467
|
-
r && /* @__PURE__ */
|
|
1521
|
+
r && /* @__PURE__ */ v("span", {
|
|
1468
1522
|
style: {
|
|
1469
|
-
...
|
|
1523
|
+
...lt(r),
|
|
1470
1524
|
marginLeft: "auto"
|
|
1471
1525
|
},
|
|
1472
1526
|
"data-testid": "preview-widget-confidence",
|
|
@@ -1474,7 +1528,7 @@ var M = l(function() {
|
|
|
1474
1528
|
})
|
|
1475
1529
|
]
|
|
1476
1530
|
}),
|
|
1477
|
-
t.reasoning && /* @__PURE__ */
|
|
1531
|
+
t.reasoning && /* @__PURE__ */ v("p", {
|
|
1478
1532
|
style: {
|
|
1479
1533
|
margin: 0,
|
|
1480
1534
|
fontSize: "var(--font-size-xs)",
|
|
@@ -1483,7 +1537,7 @@ var M = l(function() {
|
|
|
1483
1537
|
},
|
|
1484
1538
|
children: t.reasoning
|
|
1485
1539
|
}),
|
|
1486
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ v(oe, { config: t.config })
|
|
1487
1541
|
]
|
|
1488
1542
|
}, n);
|
|
1489
1543
|
})
|
|
@@ -1491,7 +1545,7 @@ var M = l(function() {
|
|
|
1491
1545
|
}, t))
|
|
1492
1546
|
]
|
|
1493
1547
|
}),
|
|
1494
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ y("div", {
|
|
1495
1549
|
style: {
|
|
1496
1550
|
display: "flex",
|
|
1497
1551
|
justifyContent: "flex-end",
|
|
@@ -1501,24 +1555,33 @@ var M = l(function() {
|
|
|
1501
1555
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1502
1556
|
},
|
|
1503
1557
|
children: [
|
|
1504
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ v("button", {
|
|
1505
1559
|
type: "button",
|
|
1506
1560
|
onClick: () => L(null),
|
|
1507
1561
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1508
1562
|
style: C,
|
|
1509
1563
|
children: "Close"
|
|
1510
1564
|
}),
|
|
1511
|
-
I.status === "COMPLETED" &&
|
|
1565
|
+
I.status === "COMPLETED" && !I.dashboardId && I.undoRevision != null && /* @__PURE__ */ v("button", {
|
|
1512
1566
|
type: "button",
|
|
1567
|
+
disabled: X || F.has(I.id),
|
|
1568
|
+
onClick: () => void tn(I),
|
|
1569
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1570
|
+
style: C,
|
|
1571
|
+
children: X ? l("bigconsole.insights.actions.undoing", "Undoing…") : l("bigconsole.insights.actions.undo", "Undo last change")
|
|
1572
|
+
}),
|
|
1573
|
+
I.status === "COMPLETED" && $ && /* @__PURE__ */ y("button", {
|
|
1574
|
+
type: "button",
|
|
1575
|
+
disabled: X,
|
|
1513
1576
|
onClick: () => {
|
|
1514
1577
|
let e = I;
|
|
1515
|
-
L(null),
|
|
1578
|
+
L(null), V(e), U("");
|
|
1516
1579
|
},
|
|
1517
1580
|
title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1518
1581
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1519
1582
|
style: C,
|
|
1520
1583
|
children: [
|
|
1521
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ v(Ee, {
|
|
1522
1585
|
size: 14,
|
|
1523
1586
|
"aria-hidden": "true"
|
|
1524
1587
|
}),
|
|
@@ -1526,14 +1589,15 @@ var M = l(function() {
|
|
|
1526
1589
|
l("bigconsole.insights.actions.refine", "Refine")
|
|
1527
1590
|
]
|
|
1528
1591
|
}),
|
|
1529
|
-
I.status === "COMPLETED" && $ && /* @__PURE__ */
|
|
1592
|
+
I.status === "COMPLETED" && $ && /* @__PURE__ */ y("button", {
|
|
1530
1593
|
type: "button",
|
|
1531
|
-
|
|
1594
|
+
disabled: X,
|
|
1595
|
+
onClick: () => Zt(I),
|
|
1532
1596
|
title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
|
|
1533
1597
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1534
1598
|
style: C,
|
|
1535
1599
|
children: [
|
|
1536
|
-
/* @__PURE__ */
|
|
1600
|
+
/* @__PURE__ */ v(we, {
|
|
1537
1601
|
size: 14,
|
|
1538
1602
|
"aria-hidden": "true"
|
|
1539
1603
|
}),
|
|
@@ -1541,11 +1605,12 @@ var M = l(function() {
|
|
|
1541
1605
|
l("bigconsole.insights.actions.checkDraft", "Check draft")
|
|
1542
1606
|
]
|
|
1543
1607
|
}),
|
|
1544
|
-
I.status === "COMPLETED" && $ && /* @__PURE__ */
|
|
1608
|
+
I.status === "COMPLETED" && $ && /* @__PURE__ */ y("button", {
|
|
1545
1609
|
type: "button",
|
|
1610
|
+
disabled: X,
|
|
1546
1611
|
onClick: () => {
|
|
1547
1612
|
let e = I;
|
|
1548
|
-
L(null),
|
|
1613
|
+
L(null), wt(e), Et({
|
|
1549
1614
|
text: "",
|
|
1550
1615
|
busy: !1
|
|
1551
1616
|
});
|
|
@@ -1554,7 +1619,7 @@ var M = l(function() {
|
|
|
1554
1619
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1555
1620
|
style: C,
|
|
1556
1621
|
children: [
|
|
1557
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ v(Se, {
|
|
1558
1623
|
size: 14,
|
|
1559
1624
|
"aria-hidden": "true"
|
|
1560
1625
|
}),
|
|
@@ -1562,31 +1627,31 @@ var M = l(function() {
|
|
|
1562
1627
|
l("bigconsole.insights.actions.chat", "Chat to edit")
|
|
1563
1628
|
]
|
|
1564
1629
|
}),
|
|
1565
|
-
I.status === "COMPLETED" &&
|
|
1630
|
+
I.status === "COMPLETED" && a(I).kind === "hold" && /* @__PURE__ */ v("span", {
|
|
1566
1631
|
role: "status",
|
|
1567
1632
|
children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
|
|
1568
1633
|
}),
|
|
1569
|
-
I.dashboardId && /* @__PURE__ */
|
|
1634
|
+
I.dashboardId && /* @__PURE__ */ v("button", {
|
|
1570
1635
|
type: "button",
|
|
1571
1636
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1572
1637
|
style: C,
|
|
1573
|
-
onClick: () =>
|
|
1638
|
+
onClick: () => f(`/dashboards/${I.dashboardId}`),
|
|
1574
1639
|
children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
|
|
1575
1640
|
}),
|
|
1576
|
-
I.status === "COMPLETED" && !I.dashboardId && /* @__PURE__ */
|
|
1641
|
+
I.status === "COMPLETED" && !I.dashboardId && /* @__PURE__ */ y("button", {
|
|
1577
1642
|
type: "button",
|
|
1578
|
-
disabled:
|
|
1579
|
-
title:
|
|
1643
|
+
disabled: X || a(I).kind !== "create",
|
|
1644
|
+
title: a(I).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
|
|
1580
1645
|
onClick: () => {
|
|
1581
1646
|
let e = I;
|
|
1582
|
-
L(null),
|
|
1647
|
+
L(null), Gt(e);
|
|
1583
1648
|
},
|
|
1584
1649
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1585
1650
|
style: w,
|
|
1586
1651
|
children: [
|
|
1587
1652
|
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1588
1653
|
" ",
|
|
1589
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ v(_e, {
|
|
1590
1655
|
size: 14,
|
|
1591
1656
|
"aria-hidden": "true"
|
|
1592
1657
|
})
|
|
@@ -1597,11 +1662,11 @@ var M = l(function() {
|
|
|
1597
1662
|
]
|
|
1598
1663
|
})
|
|
1599
1664
|
}),
|
|
1600
|
-
|
|
1665
|
+
B && /* @__PURE__ */ v("div", {
|
|
1601
1666
|
role: "dialog",
|
|
1602
1667
|
"aria-modal": "true",
|
|
1603
1668
|
"aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
|
|
1604
|
-
onClick: () =>
|
|
1669
|
+
onClick: () => V(null),
|
|
1605
1670
|
style: {
|
|
1606
1671
|
position: "fixed",
|
|
1607
1672
|
inset: 0,
|
|
@@ -1612,7 +1677,7 @@ var M = l(function() {
|
|
|
1612
1677
|
justifyContent: "center",
|
|
1613
1678
|
padding: "var(--space-pagePadding)"
|
|
1614
1679
|
},
|
|
1615
|
-
children: /* @__PURE__ */
|
|
1680
|
+
children: /* @__PURE__ */ y("div", {
|
|
1616
1681
|
onClick: (e) => e.stopPropagation(),
|
|
1617
1682
|
style: {
|
|
1618
1683
|
display: "flex",
|
|
@@ -1626,19 +1691,19 @@ var M = l(function() {
|
|
|
1626
1691
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1627
1692
|
},
|
|
1628
1693
|
children: [
|
|
1629
|
-
/* @__PURE__ */
|
|
1694
|
+
/* @__PURE__ */ y("div", {
|
|
1630
1695
|
style: {
|
|
1631
1696
|
padding: "var(--space-cardPadding)",
|
|
1632
1697
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1633
1698
|
},
|
|
1634
|
-
children: [/* @__PURE__ */
|
|
1699
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
1635
1700
|
style: {
|
|
1636
1701
|
fontSize: "var(--font-size-heading-h4)",
|
|
1637
1702
|
fontWeight: "var(--font-weight-semibold)",
|
|
1638
1703
|
color: "var(--color-text-primary)"
|
|
1639
1704
|
},
|
|
1640
1705
|
children: l("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1641
|
-
}), /* @__PURE__ */
|
|
1706
|
+
}), /* @__PURE__ */ v("p", {
|
|
1642
1707
|
style: {
|
|
1643
1708
|
fontSize: "var(--font-size-body-sm)",
|
|
1644
1709
|
color: "var(--color-text-secondary)",
|
|
@@ -1647,7 +1712,7 @@ var M = l(function() {
|
|
|
1647
1712
|
children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1648
1713
|
})]
|
|
1649
1714
|
}),
|
|
1650
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ y("div", {
|
|
1651
1716
|
style: {
|
|
1652
1717
|
flex: "1 1 auto",
|
|
1653
1718
|
minHeight: 0,
|
|
@@ -1657,20 +1722,20 @@ var M = l(function() {
|
|
|
1657
1722
|
flexDirection: "column",
|
|
1658
1723
|
gap: "var(--space-controlGap)"
|
|
1659
1724
|
},
|
|
1660
|
-
children: [/* @__PURE__ */
|
|
1725
|
+
children: [/* @__PURE__ */ v(r, {
|
|
1661
1726
|
emphasis: "muted",
|
|
1662
1727
|
padding: "compact",
|
|
1663
1728
|
headingLevel: 3,
|
|
1664
|
-
title:
|
|
1665
|
-
description:
|
|
1666
|
-
icon: /* @__PURE__ */
|
|
1667
|
-
}), /* @__PURE__ */
|
|
1729
|
+
title: B.generatedSpec?.name || "Current proposal",
|
|
1730
|
+
description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
|
|
1731
|
+
icon: /* @__PURE__ */ v(h, { className: "h-icon-sm w-icon-sm" })
|
|
1732
|
+
}), /* @__PURE__ */ y("div", {
|
|
1668
1733
|
style: {
|
|
1669
1734
|
display: "flex",
|
|
1670
1735
|
flexDirection: "column",
|
|
1671
1736
|
gap: "var(--space-controlGap)"
|
|
1672
1737
|
},
|
|
1673
|
-
children: [/* @__PURE__ */
|
|
1738
|
+
children: [/* @__PURE__ */ v("label", {
|
|
1674
1739
|
htmlFor: "refine-input",
|
|
1675
1740
|
style: {
|
|
1676
1741
|
display: "block",
|
|
@@ -1679,10 +1744,10 @@ var M = l(function() {
|
|
|
1679
1744
|
color: "var(--color-text-primary)"
|
|
1680
1745
|
},
|
|
1681
1746
|
children: "What should change?"
|
|
1682
|
-
}), /* @__PURE__ */
|
|
1747
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
1683
1748
|
id: "refine-input",
|
|
1684
|
-
value:
|
|
1685
|
-
onChange: (e) =>
|
|
1749
|
+
value: H,
|
|
1750
|
+
onChange: (e) => U(e.target.value),
|
|
1686
1751
|
maxLength: 2e3,
|
|
1687
1752
|
rows: 4,
|
|
1688
1753
|
placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
|
|
@@ -1701,7 +1766,7 @@ var M = l(function() {
|
|
|
1701
1766
|
})]
|
|
1702
1767
|
})]
|
|
1703
1768
|
}),
|
|
1704
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ y("div", {
|
|
1705
1770
|
style: {
|
|
1706
1771
|
display: "flex",
|
|
1707
1772
|
justifyContent: "flex-end",
|
|
@@ -1710,27 +1775,27 @@ var M = l(function() {
|
|
|
1710
1775
|
padding: "var(--space-cardPadding)",
|
|
1711
1776
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1712
1777
|
},
|
|
1713
|
-
children: [/* @__PURE__ */
|
|
1778
|
+
children: [/* @__PURE__ */ v("button", {
|
|
1714
1779
|
type: "button",
|
|
1715
|
-
onClick: () =>
|
|
1780
|
+
onClick: () => V(null),
|
|
1716
1781
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1717
1782
|
style: C,
|
|
1718
1783
|
children: l("bigconsole.insights.actions.cancel", "Cancel")
|
|
1719
|
-
}), /* @__PURE__ */
|
|
1784
|
+
}), /* @__PURE__ */ y("button", {
|
|
1720
1785
|
type: "button",
|
|
1721
|
-
onClick: () => void
|
|
1722
|
-
disabled: !
|
|
1786
|
+
onClick: () => void Yt(),
|
|
1787
|
+
disabled: !H.trim() || F.has(B.id),
|
|
1723
1788
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1724
1789
|
style: {
|
|
1725
1790
|
...w,
|
|
1726
|
-
cursor: !
|
|
1727
|
-
opacity:
|
|
1791
|
+
cursor: !H.trim() || F.has(B.id) ? "not-allowed" : "pointer",
|
|
1792
|
+
opacity: H.trim() ? 1 : .6
|
|
1728
1793
|
},
|
|
1729
|
-
children: [F.has(
|
|
1794
|
+
children: [F.has(B.id) ? /* @__PURE__ */ v(m, {
|
|
1730
1795
|
size: 14,
|
|
1731
1796
|
className: "animate-spin",
|
|
1732
1797
|
"aria-hidden": "true"
|
|
1733
|
-
}) : /* @__PURE__ */
|
|
1798
|
+
}) : /* @__PURE__ */ v(Ee, {
|
|
1734
1799
|
size: 14,
|
|
1735
1800
|
"aria-hidden": "true"
|
|
1736
1801
|
}), l("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
@@ -1739,36 +1804,36 @@ var M = l(function() {
|
|
|
1739
1804
|
]
|
|
1740
1805
|
})
|
|
1741
1806
|
}),
|
|
1742
|
-
W && W.generatedSpec && /* @__PURE__ */
|
|
1807
|
+
W && W.generatedSpec && /* @__PURE__ */ v(de, {
|
|
1743
1808
|
generation: {
|
|
1744
1809
|
...W,
|
|
1745
1810
|
generatedSpec: W.generatedSpec
|
|
1746
1811
|
},
|
|
1747
|
-
message:
|
|
1748
|
-
onMessageChange: (e) =>
|
|
1812
|
+
message: Tt.text,
|
|
1813
|
+
onMessageChange: (e) => Et((t) => ({
|
|
1749
1814
|
...t,
|
|
1750
1815
|
text: e
|
|
1751
1816
|
})),
|
|
1752
|
-
onBusyChange: (e) =>
|
|
1817
|
+
onBusyChange: (e) => Et((t) => ({
|
|
1753
1818
|
...t,
|
|
1754
1819
|
busy: e
|
|
1755
1820
|
})),
|
|
1756
|
-
onClose: () =>
|
|
1821
|
+
onClose: () => wt(null)
|
|
1757
1822
|
}),
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
open:
|
|
1823
|
+
/* @__PURE__ */ v(ue, {
|
|
1824
|
+
open: gt !== null,
|
|
1760
1825
|
onClose: () => {
|
|
1761
|
-
|
|
1826
|
+
_t(null), vt(null);
|
|
1762
1827
|
},
|
|
1763
|
-
spec:
|
|
1764
|
-
onApplyFix: (e) =>
|
|
1765
|
-
onUndoFix:
|
|
1766
|
-
appliedFix:
|
|
1828
|
+
spec: gt,
|
|
1829
|
+
onApplyFix: (e) => z ? $t(z, e) : Promise.resolve(null),
|
|
1830
|
+
onUndoFix: en,
|
|
1831
|
+
appliedFix: z ? yt[z] ?? null : null,
|
|
1767
1832
|
onAppliedFixChange: (e) => {
|
|
1768
|
-
|
|
1833
|
+
z && xt(z, e);
|
|
1769
1834
|
}
|
|
1770
1835
|
})
|
|
1771
1836
|
]
|
|
1772
1837
|
});
|
|
1773
1838
|
});
|
|
1774
|
-
export {
|
|
1839
|
+
export { ut as InsightsPage, ut as default };
|