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