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