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