@burdenoff/microfe-bigconsole 2026.1103.7 → 2026.1103.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.
@@ -9,18 +9,19 @@ import { setActiveGenerationContext as ee } from "../assistant/generationContext
9
9
  import { isNative as te, nativeImpact as o, nativeNotify as ne } from "../../utils/nativeBridge.js";
10
10
  import { generationApproval as s } from "../utils/generationApproval.js";
11
11
  import { isInsightsDraftDirty as re } from "../utils/insightsDraft.js";
12
- import { GeneratedFormattingReview as ie, GenerationExecutionStatus as ae } from "../components/insights/GeneratedFormattingReview.js";
12
+ import { PromptAnalysisPreview as ie } from "../components/insights/PromptAnalysisPreview.js";
13
+ import { GeneratedFormattingReview as ae, GenerationExecutionStatus as oe } from "../components/insights/GeneratedFormattingReview.js";
13
14
  /* empty css */
14
15
  import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
15
- import { AlertCircle as oe, ArrowRight as f, Ban as se, CheckCircle as p, Clock as m, Eye as ce, History as le, Lightbulb as ue, Loader2 as h, RefreshCw as de, Sparkles as g, Trash2 as fe, Wand2 as _, X as pe, XCircle as v } from "lucide-react";
16
- import { AuroraBackground as me, GlassCard as he, GradientText as ge, IllustratedEmptyState as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
17
- import { useUnsavedChanges as ye } from "@burdenoff/fe-libs/shared/hooks";
18
- import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { useMutation as y, useQuery as xe } from "@apollo/client/react";
16
+ import { AlertCircle as se, ArrowRight as f, Ban as ce, CheckCircle as p, Clock as m, Eye as le, History as ue, Lightbulb as de, Loader2 as h, RefreshCw as fe, Sparkles as g, Trash2 as pe, Wand2 as _, X as me, XCircle as v } from "lucide-react";
17
+ import { AuroraBackground as he, GlassCard as ge, GradientText as _e, IllustratedEmptyState as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
18
+ import { useUnsavedChanges as be } from "@burdenoff/fe-libs/shared/hooks";
19
+ import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
+ import { useMutation as y, useQuery as Se } from "@apollo/client/react";
20
21
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
21
22
  import { gql as S } from "@apollo/client";
22
23
  //#region src/bigconsole/pages/InsightsPage.tsx
23
- var Se = S`
24
+ var Ce = S`
24
25
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
25
26
  listPromptGenerations(status: $status, first: $first) {
26
27
  edges {
@@ -64,7 +65,7 @@ var Se = S`
64
65
  totalCount
65
66
  }
66
67
  }
67
- `, Ce = S`
68
+ `, we = S`
68
69
  query GetPromptSuggestions($category: String, $limit: Int) {
69
70
  getPromptSuggestions(category: $category, limit: $limit) {
70
71
  id
@@ -75,7 +76,7 @@ var Se = S`
75
76
  tags
76
77
  }
77
78
  }
78
- `, we = S`
79
+ `, Te = S`
79
80
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
80
81
  generateDashboardFromPrompt(input: $input) {
81
82
  id
@@ -83,24 +84,24 @@ var Se = S`
83
84
  prompt
84
85
  }
85
86
  }
86
- `, Te = S`
87
+ `, Ee = S`
87
88
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
88
89
  createDashboardFromGeneration(input: $input) {
89
90
  id
90
91
  }
91
92
  }
92
- `, Ee = S`
93
+ `, De = S`
93
94
  mutation DeletePromptGeneration($generationId: ID!) {
94
95
  deletePromptGeneration(generationId: $generationId)
95
96
  }
96
- `, De = S`
97
+ `, Oe = S`
97
98
  mutation CancelPromptGeneration($generationId: ID!) {
98
99
  cancelPromptGeneration(generationId: $generationId) {
99
100
  id
100
101
  status
101
102
  }
102
103
  }
103
- `, Oe = S`
104
+ `, ke = S`
104
105
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
105
106
  regenerateDashboard(input: $input) {
106
107
  id
@@ -108,7 +109,7 @@ var Se = S`
108
109
  prompt
109
110
  }
110
111
  }
111
- `, ke = S`
112
+ `, Ae = S`
112
113
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
113
114
  refineGeneratedDashboard(input: $input) {
114
115
  id
@@ -120,7 +121,7 @@ var Se = S`
120
121
  "PENDING",
121
122
  "PROCESSING",
122
123
  "GENERATING"
123
- ], Ae = 12, je = 8, Me = [
124
+ ], je = 12, Me = 8, Ne = [
124
125
  {
125
126
  value: "MODERN",
126
127
  label: "Modern"
@@ -141,7 +142,7 @@ var Se = S`
141
142
  value: "VIBRANT",
142
143
  label: "Vibrant"
143
144
  }
144
- ], Ne = [
145
+ ], Pe = [
145
146
  {
146
147
  value: "GRID",
147
148
  label: "Grid"
@@ -166,13 +167,13 @@ var Se = S`
166
167
  value: "THREE_COLUMN",
167
168
  label: "Three column"
168
169
  }
169
- ], Pe = [
170
+ ], Fe = [
170
171
  6,
171
172
  8,
172
173
  12,
173
174
  16,
174
175
  24
175
- ], Fe = [
176
+ ], Ie = [
176
177
  4,
177
178
  6,
178
179
  8,
@@ -201,25 +202,25 @@ var Se = S`
201
202
  border: "1px solid transparent",
202
203
  backgroundColor: "var(--color-action-primary-bg)",
203
204
  color: "var(--color-action-primary-text)"
204
- }, Ie = {
205
+ }, Le = {
205
206
  ...w,
206
207
  border: "1px solid var(--color-status-warning-border)",
207
208
  backgroundColor: "transparent",
208
209
  color: "var(--color-status-warning-text)"
209
- }, D = {
210
+ }, Re = {
210
211
  ...w,
211
212
  minWidth: "var(--size-controlHeight-md)",
212
213
  padding: "0 var(--space-controlGap)",
213
214
  border: "1px solid var(--color-border-default)",
214
215
  backgroundColor: "transparent",
215
216
  color: "var(--color-status-error-text)"
216
- }, O = {
217
+ }, D = {
217
218
  display: "block",
218
219
  marginBottom: "2px",
219
220
  fontSize: "var(--font-size-body-sm)",
220
221
  fontWeight: "var(--font-weight-medium)",
221
222
  color: "var(--color-text-secondary)"
222
- }, k = {
223
+ }, O = {
223
224
  width: "100%",
224
225
  minHeight: "var(--size-controlHeight-md)",
225
226
  padding: "0 var(--space-controlGap)",
@@ -228,7 +229,7 @@ var Se = S`
228
229
  backgroundColor: "var(--color-bg-canvas)",
229
230
  color: "var(--color-text-primary)",
230
231
  fontSize: "var(--font-size-body-sm)"
231
- }, A = {
232
+ }, k = {
232
233
  display: "inline-flex",
233
234
  alignItems: "center",
234
235
  gap: "var(--space-iconGap)",
@@ -240,7 +241,7 @@ var Se = S`
240
241
  backgroundColor: "var(--color-bg-sunken)",
241
242
  color: "var(--color-text-secondary)"
242
243
  };
243
- function j(e) {
244
+ function A(e) {
244
245
  switch (e) {
245
246
  case "COMPLETED": return "success";
246
247
  case "FAILED": return "danger";
@@ -250,7 +251,7 @@ function j(e) {
250
251
  default: return "neutral";
251
252
  }
252
253
  }
253
- var M = {
254
+ var j = {
254
255
  success: {
255
256
  text: "var(--color-status-success-text)",
256
257
  bg: "var(--color-status-success-bgSubtle)",
@@ -272,8 +273,8 @@ var M = {
272
273
  border: "var(--color-border-subtle)"
273
274
  }
274
275
  };
275
- function Le(e) {
276
- let t = M[j(e)].text;
276
+ function ze(e) {
277
+ let t = j[A(e)].text;
277
278
  switch (e) {
278
279
  case "COMPLETED": return /* @__PURE__ */ b(p, {
279
280
  size: 14,
@@ -301,7 +302,7 @@ function Le(e) {
301
302
  });
302
303
  }
303
304
  }
304
- function N(e, t) {
305
+ function M(e, t) {
305
306
  switch (e) {
306
307
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
307
308
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -312,44 +313,44 @@ function N(e, t) {
312
313
  default: return e;
313
314
  }
314
315
  }
315
- var Re = ({ status: e }) => {
316
- let { t } = be(), n = M[j(e)];
316
+ var Be = ({ status: e }) => {
317
+ let { t } = xe(), n = j[A(e)];
317
318
  return /* @__PURE__ */ x("span", {
318
319
  "data-status": e,
319
320
  style: {
320
- ...A,
321
+ ...k,
321
322
  border: `1px solid ${n.border}`,
322
323
  backgroundColor: n.bg,
323
324
  color: n.text
324
325
  },
325
- children: [Le(e), N(e, t)]
326
+ children: [ze(e), M(e, t)]
326
327
  });
327
328
  };
328
- function ze(e) {
329
- let t = M[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
329
+ function Ve(e) {
330
+ let t = j[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
330
331
  return {
331
- ...A,
332
+ ...k,
332
333
  border: `1px solid ${t.border}`,
333
334
  backgroundColor: t.bg,
334
335
  color: t.text
335
336
  };
336
337
  }
337
- function P(e) {
338
+ function N(e) {
338
339
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
339
340
  }
340
- function Be(e) {
341
+ function He(e) {
341
342
  let t = e?.toUpperCase();
342
343
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
343
344
  }
344
- var Ve = {
345
+ var Ue = {
345
346
  HIGH: "success",
346
347
  MEDIUM: "neutral",
347
348
  LOW: "danger"
348
349
  };
349
- function He(e) {
350
+ function We(e) {
350
351
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
351
352
  }
352
- function Ue(e, t) {
353
+ function Ge(e, t) {
353
354
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
354
355
  return {
355
356
  "--proposal-column": r + 1,
@@ -358,10 +359,10 @@ function Ue(e, t) {
358
359
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
359
360
  };
360
361
  }
361
- function We(e) {
362
- let t = M[Ve[e]];
362
+ function Ke(e) {
363
+ let t = j[Ue[e]];
363
364
  return {
364
- ...A,
365
+ ...k,
365
366
  padding: "0 var(--space-controlGap)",
366
367
  fontSize: "var(--font-size-xs)",
367
368
  fontWeight: "var(--font-weight-semibold)",
@@ -371,97 +372,97 @@ function We(e) {
371
372
  color: t.text
372
373
  };
373
374
  }
374
- var F = c(function() {
375
- let { t: c } = be(), p = e(), m = a(), [v, S] = d(""), [w, j] = d("MODERN"), [M, Le] = d("GRID"), [N, Ve] = d(Ae), [F, Ge] = d(je), [I, Ke] = d(!1), [qe, L] = d(null), [R, Je] = d(() => /* @__PURE__ */ new Set()), [z, B] = d(null), [V, H] = d(null), [U, W] = d("");
376
- ye({
375
+ var P = c(function() {
376
+ let { t: c } = xe(), p = e(), m = a(), [v, S] = d(""), [w, A] = d("MODERN"), [j, ze] = d("GRID"), [M, Ue] = d(je), [P, qe] = d(Me), [F, Je] = d(!1), [Ye, I] = d(null), [L, Xe] = d(() => /* @__PURE__ */ new Set()), [R, z] = d(null), [B, V] = d(null), [H, U] = d("");
377
+ be({
377
378
  id: "insights-prompt",
378
379
  label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
379
380
  dirty: re({
380
381
  promptText: v,
381
- isGenerating: I,
382
- refineOpen: V !== null,
383
- refineText: U,
384
- refineBusy: V !== null && R.has(V.id)
382
+ isGenerating: F,
383
+ refineOpen: B !== null,
384
+ refineText: H,
385
+ refineBusy: B !== null && L.has(B.id)
385
386
  })
386
- }), u(() => (ee(V?.id ?? z?.id ?? null), () => ee(null)), [V, z]);
387
- let G = l((e) => {
388
- Je((t) => new Set(t).add(e));
389
- }, []), K = l((e) => {
390
- Je((t) => {
387
+ }), u(() => (ee(B?.id ?? R?.id ?? null), () => ee(null)), [B, R]);
388
+ let W = l((e) => {
389
+ Xe((t) => new Set(t).add(e));
390
+ }, []), G = l((e) => {
391
+ Xe((t) => {
391
392
  let n = new Set(t);
392
393
  return n.delete(e), n;
393
394
  });
394
- }, []), { data: Ye, loading: Xe, error: q, refetch: J, startPolling: Ze, stopPolling: Y } = xe(Se, {
395
+ }, []), { data: Ze, loading: Qe, error: K, refetch: q, startPolling: $e, stopPolling: J } = Se(Ce, {
395
396
  variables: { first: 20 },
396
397
  fetchPolicy: "cache-and-network"
397
- }), X = Ye?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: Qe, error: $e, refetch: et } = xe(Ce, { variables: { limit: 6 } }), [tt] = y(we), [nt] = y(Te), [rt] = y(Ee), [it] = y(De), [Z] = y(Oe), [at] = y(ke), Q = Ye?.listPromptGenerations?.edges?.map((e) => e.node) || [], ot = Qe?.getPromptSuggestions || [];
398
- u(() => (X || I ? Ze(2e3) : Y(), () => Y()), [
399
- X,
400
- I,
401
- Ze,
402
- Y
398
+ }), Y = Ze?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: et, error: tt, refetch: nt } = Se(we, { variables: { limit: 6 } }), [rt] = y(Te), [it] = y(Ee), [X] = y(De), [at] = y(Oe), [ot] = y(ke), [st] = y(Ae), Z = Ze?.listPromptGenerations?.edges?.map((e) => e.node) || [], ct = et?.getPromptSuggestions || [];
399
+ u(() => (Y || F ? $e(2e3) : J(), () => J()), [
400
+ Y,
401
+ F,
402
+ $e,
403
+ J
403
404
  ]), u(() => {
404
- if (!z && !V) return;
405
+ if (!R && !B) return;
405
406
  let e = (e) => {
406
- e.key === "Escape" && (B(null), H(null));
407
+ e.key === "Escape" && (z(null), V(null));
407
408
  };
408
409
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
409
- }, [z, V]);
410
- let st = l(async () => {
411
- if (!(!v.trim() || I)) {
410
+ }, [R, B]);
411
+ let lt = l(async () => {
412
+ if (!(!v.trim() || F)) {
412
413
  if (v.length > 2e3) {
413
- L(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
414
+ I(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
414
415
  return;
415
416
  }
416
- L(null), Ke(!0);
417
+ I(null), Je(!0);
417
418
  try {
418
- m("bigconsole.ai.generate_clicked", { maxWidgets: F });
419
- let e = await tt({ variables: { input: {
419
+ m("bigconsole.ai.generate_clicked", { maxWidgets: P });
420
+ let e = await rt({ variables: { input: {
420
421
  prompt: v.trim(),
421
422
  styleType: w,
422
- layoutType: M,
423
- gridColumns: N,
424
- maxWidgets: F
423
+ layoutType: j,
424
+ gridColumns: M,
425
+ maxWidgets: P
425
426
  } } });
426
427
  if (t(e, "command")) return;
427
428
  let n = e.data?.generateDashboardFromPrompt?.id;
428
429
  n && m("bigconsole.ai.dashboard_generated", {
429
430
  generationId: n,
430
- maxWidgets: F
431
- }), S(""), J();
431
+ maxWidgets: P
432
+ }), S(""), q();
432
433
  } catch (e) {
433
434
  if (t(e, "command")) return;
434
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
435
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
435
436
  } finally {
436
- Ke(!1);
437
+ Je(!1);
437
438
  }
438
439
  }
439
440
  }, [
440
441
  m,
441
442
  v,
442
- I,
443
- tt,
444
- J,
443
+ F,
444
+ rt,
445
+ q,
445
446
  w,
447
+ j,
446
448
  M,
447
- N,
448
- F,
449
+ P,
449
450
  c
450
- ]), ct = l(async (e) => {
451
- L(null);
451
+ ]), Q = l(async (e) => {
452
+ I(null);
452
453
  let n = s(e);
453
454
  if (n.kind === "view") {
454
455
  p(`/dashboards/${n.dashboardId}`);
455
456
  return;
456
457
  }
457
458
  if (n.kind === "hold") {
458
- L(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
459
+ I(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
459
460
  return;
460
461
  }
461
462
  let r = e.id;
462
463
  try {
463
464
  m("bigconsole.ai.create_dashboard_clicked", { generationId: r });
464
- let e = await nt({ variables: { input: n.input } });
465
+ let e = await it({ variables: { input: n.input } });
465
466
  if (t(e, "project")) return;
466
467
  let i = e.data?.createDashboardFromGeneration?.id;
467
468
  i && (m("bigconsole.ai.dashboard_created", {
@@ -470,84 +471,84 @@ var F = c(function() {
470
471
  }), p(`/dashboards/${i}`));
471
472
  } catch (e) {
472
473
  if (t(e, "project")) return;
473
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
474
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
474
475
  }
475
476
  }, [
476
- nt,
477
+ it,
477
478
  m,
478
479
  p,
479
480
  c
480
- ]), lt = l(async (e) => {
481
- L(null);
481
+ ]), ut = l(async (e) => {
482
+ I(null);
482
483
  try {
483
- await rt({ variables: { generationId: e } }), te() && ne("success"), J();
484
+ await X({ variables: { generationId: e } }), te() && ne("success"), q();
484
485
  } catch (e) {
485
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), te() && ne("error");
486
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), te() && ne("error");
486
487
  }
487
488
  }, [
488
- rt,
489
- J,
489
+ X,
490
+ q,
490
491
  c
491
- ]), ut = l(async (e) => {
492
- L(null), G(e);
492
+ ]), dt = l(async (e) => {
493
+ I(null), W(e);
493
494
  try {
494
- await it({ variables: { generationId: e } }), J();
495
+ await at({ variables: { generationId: e } }), q();
495
496
  } catch (e) {
496
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
497
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
497
498
  } finally {
498
- K(e);
499
+ G(e);
499
500
  }
500
501
  }, [
501
- it,
502
- J,
502
+ at,
503
+ q,
503
504
  c
504
- ]), dt = l(async (e) => {
505
- L(null), G(e);
505
+ ]), ft = l(async (e) => {
506
+ I(null), W(e);
506
507
  try {
507
- if (t(await Z({ variables: { input: { generationId: e } } }), "command")) return;
508
- J();
508
+ if (t(await ot({ variables: { input: { generationId: e } } }), "command")) return;
509
+ q();
509
510
  } catch (e) {
510
511
  if (t(e, "command")) return;
511
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
512
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
512
513
  } finally {
513
- K(e);
514
+ G(e);
514
515
  }
515
516
  }, [
516
- Z,
517
- J,
517
+ ot,
518
+ q,
518
519
  c
519
- ]), ft = l(async () => {
520
- if (!V || !U.trim()) return;
521
- let e = V.id;
522
- L(null), G(e);
520
+ ]), pt = l(async () => {
521
+ if (!B || !H.trim()) return;
522
+ let e = B.id;
523
+ I(null), W(e);
523
524
  let n = !1;
524
525
  try {
525
- if (t(await at({ variables: { input: {
526
+ if (t(await st({ variables: { input: {
526
527
  generationId: e,
527
- refinementPrompt: U.trim()
528
+ refinementPrompt: H.trim()
528
529
  } } }), "command")) {
529
530
  n = !0;
530
531
  return;
531
532
  }
532
- n = !0, J();
533
+ n = !0, q();
533
534
  } catch (e) {
534
535
  if (t(e, "command")) {
535
536
  n = !0;
536
537
  return;
537
538
  }
538
- L(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
539
+ I(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
539
540
  } finally {
540
- n && (H(null), W("")), K(e);
541
+ n && (V(null), U("")), G(e);
541
542
  }
542
543
  }, [
543
- V,
544
- U,
545
- at,
546
- J,
544
+ B,
545
+ H,
546
+ st,
547
+ q,
547
548
  c
548
- ]), pt = l((e) => {
549
+ ]), mt = l((e) => {
549
550
  S(e);
550
- }, []), $ = z?.generatedSpec;
551
+ }, []), $ = R?.generatedSpec;
551
552
  return /* @__PURE__ */ x("div", {
552
553
  "data-tour": "bigconsole-ai-insights",
553
554
  className: "min-w-0",
@@ -555,7 +556,7 @@ var F = c(function() {
555
556
  children: [
556
557
  /* @__PURE__ */ x("header", {
557
558
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
558
- children: [/* @__PURE__ */ b(me, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
559
+ children: [/* @__PURE__ */ b(he, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
559
560
  style: { padding: "var(--space-pagePadding)" },
560
561
  children: /* @__PURE__ */ x("div", {
561
562
  style: {
@@ -585,7 +586,7 @@ var F = c(function() {
585
586
  style: { minWidth: 0 },
586
587
  children: [/* @__PURE__ */ b("h1", {
587
588
  className: "m-0 text-2xl font-bold text-text-primary",
588
- children: /* @__PURE__ */ b(ge, { children: c("bigconsole.insights.header.title", "AI Insights") })
589
+ children: /* @__PURE__ */ b(_e, { children: c("bigconsole.insights.header.title", "AI Insights") })
589
590
  }), /* @__PURE__ */ b("p", {
590
591
  className: "m-0 text-sm text-text-secondary",
591
592
  children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
@@ -596,28 +597,28 @@ var F = c(function() {
596
597
  }),
597
598
  /* @__PURE__ */ x("div", {
598
599
  style: { padding: "var(--space-pagePadding)" },
599
- children: [/* @__PURE__ */ b(ve, {
600
+ children: [/* @__PURE__ */ b(ye, {
600
601
  className: "mb-[var(--space-sectionGap)]",
601
602
  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."
602
603
  }), /* @__PURE__ */ x(i, { children: [
603
- qe && /* @__PURE__ */ b(r, {
604
+ Ye && /* @__PURE__ */ b(r, {
604
605
  headingLevel: 2,
605
606
  tone: "danger",
606
607
  padding: "compact",
607
608
  title: "That request did not go through",
608
- description: qe,
609
- icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" }),
609
+ description: Ye,
610
+ icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" }),
610
611
  "data-testid": "insights-error",
611
612
  actions: /* @__PURE__ */ b("button", {
612
613
  type: "button",
613
- onClick: () => L(null),
614
+ onClick: () => I(null),
614
615
  "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
615
616
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
616
617
  style: T,
617
618
  children: "Dismiss"
618
619
  })
619
620
  }),
620
- (q || $e) && /* @__PURE__ */ b("div", {
621
+ (K || tt) && /* @__PURE__ */ b("div", {
621
622
  role: "alert",
622
623
  children: /* @__PURE__ */ b(r, {
623
624
  tone: "danger",
@@ -631,10 +632,10 @@ var F = c(function() {
631
632
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
632
633
  style: T,
633
634
  onClick: () => {
634
- q && J().catch(() => void 0), $e && et().catch(() => void 0);
635
+ K && q().catch(() => void 0), tt && nt().catch(() => void 0);
635
636
  },
636
637
  children: [
637
- /* @__PURE__ */ b(de, {
638
+ /* @__PURE__ */ b(fe, {
638
639
  size: 14,
639
640
  "aria-hidden": "true"
640
641
  }),
@@ -689,7 +690,7 @@ var F = c(function() {
689
690
  resize: "vertical"
690
691
  },
691
692
  onKeyDown: (e) => {
692
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), st());
693
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), lt());
693
694
  }
694
695
  }),
695
696
  /* @__PURE__ */ x("div", {
@@ -704,66 +705,70 @@ var F = c(function() {
704
705
  children: [
705
706
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
706
707
  htmlFor: "prompt-style",
707
- style: O,
708
+ style: D,
708
709
  children: c("bigconsole.insights.prompt.style", "Style")
709
710
  }), /* @__PURE__ */ b("select", {
710
711
  id: "prompt-style",
711
712
  value: w,
712
- onChange: (e) => j(e.target.value),
713
+ onChange: (e) => A(e.target.value),
713
714
  className: n,
714
- style: k,
715
- children: Me.map((e) => /* @__PURE__ */ b("option", {
715
+ style: O,
716
+ children: Ne.map((e) => /* @__PURE__ */ b("option", {
716
717
  value: e.value,
717
718
  children: e.label
718
719
  }, e.value))
719
720
  })] }),
720
721
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
721
722
  htmlFor: "prompt-layout",
722
- style: O,
723
+ style: D,
723
724
  children: c("bigconsole.insights.prompt.layout", "Layout")
724
725
  }), /* @__PURE__ */ b("select", {
725
726
  id: "prompt-layout",
726
- value: M,
727
- onChange: (e) => Le(e.target.value),
727
+ value: j,
728
+ onChange: (e) => ze(e.target.value),
728
729
  className: n,
729
- style: k,
730
- children: Ne.map((e) => /* @__PURE__ */ b("option", {
730
+ style: O,
731
+ children: Pe.map((e) => /* @__PURE__ */ b("option", {
731
732
  value: e.value,
732
733
  children: e.label
733
734
  }, e.value))
734
735
  })] }),
735
736
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
736
737
  htmlFor: "prompt-columns",
737
- style: O,
738
+ style: D,
738
739
  children: c("bigconsole.insights.prompt.columns", "Columns")
739
740
  }), /* @__PURE__ */ b("select", {
740
741
  id: "prompt-columns",
741
- value: N,
742
- onChange: (e) => Ve(Number(e.target.value)),
742
+ value: M,
743
+ onChange: (e) => Ue(Number(e.target.value)),
743
744
  className: n,
744
- style: k,
745
- children: Pe.map((e) => /* @__PURE__ */ b("option", {
745
+ style: O,
746
+ children: Fe.map((e) => /* @__PURE__ */ b("option", {
746
747
  value: e,
747
748
  children: e
748
749
  }, e))
749
750
  })] }),
750
751
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
751
752
  htmlFor: "prompt-max-widgets",
752
- style: O,
753
+ style: D,
753
754
  children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
754
755
  }), /* @__PURE__ */ b("select", {
755
756
  id: "prompt-max-widgets",
756
- value: F,
757
- onChange: (e) => Ge(Number(e.target.value)),
757
+ value: P,
758
+ onChange: (e) => qe(Number(e.target.value)),
758
759
  className: n,
759
- style: k,
760
- children: Fe.map((e) => /* @__PURE__ */ b("option", {
760
+ style: O,
761
+ children: Ie.map((e) => /* @__PURE__ */ b("option", {
761
762
  value: e,
762
763
  children: e
763
764
  }, e))
764
765
  })] })
765
766
  ]
766
767
  }),
768
+ /* @__PURE__ */ b(ie, {
769
+ prompt: v,
770
+ disabled: F
771
+ }),
767
772
  /* @__PURE__ */ x("div", {
768
773
  style: {
769
774
  display: "flex",
@@ -788,16 +793,16 @@ var F = c(function() {
788
793
  ]
789
794
  }), /* @__PURE__ */ x("button", {
790
795
  type: "button",
791
- onClick: st,
792
- disabled: !v.trim() || I,
796
+ onClick: lt,
797
+ disabled: !v.trim() || F,
793
798
  className: n,
794
799
  style: {
795
800
  ...E,
796
801
  marginLeft: "auto",
797
- cursor: !v.trim() || I ? "not-allowed" : "pointer",
798
- opacity: !v.trim() || I ? .5 : 1
802
+ cursor: !v.trim() || F ? "not-allowed" : "pointer",
803
+ opacity: !v.trim() || F ? .5 : 1
799
804
  },
800
- children: [I ? /* @__PURE__ */ b(h, {
805
+ children: [F ? /* @__PURE__ */ b(h, {
801
806
  size: 16,
802
807
  className: "animate-spin",
803
808
  "aria-hidden": "true"
@@ -810,12 +815,12 @@ var F = c(function() {
810
815
  ]
811
816
  })
812
817
  }),
813
- ot.length > 0 && /* @__PURE__ */ b(r, {
818
+ ct.length > 0 && /* @__PURE__ */ b(r, {
814
819
  emphasis: "muted",
815
820
  headingLevel: 2,
816
821
  title: c("bigconsole.insights.suggestions.heading", "Starting points"),
817
822
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
818
- icon: /* @__PURE__ */ b(ue, { className: "h-icon-sm w-icon-sm" }),
823
+ icon: /* @__PURE__ */ b(de, { className: "h-icon-sm w-icon-sm" }),
819
824
  "data-testid": "insights-suggestions",
820
825
  children: /* @__PURE__ */ b("div", {
821
826
  style: {
@@ -823,9 +828,9 @@ var F = c(function() {
823
828
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
824
829
  gap: "var(--space-controlGap)"
825
830
  },
826
- children: ot.map((e) => /* @__PURE__ */ x("button", {
831
+ children: ct.map((e) => /* @__PURE__ */ x("button", {
827
832
  type: "button",
828
- onClick: () => pt(e.prompt),
833
+ onClick: () => mt(e.prompt),
829
834
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
830
835
  style: {
831
836
  textAlign: "left",
@@ -865,7 +870,7 @@ var F = c(function() {
865
870
  flexWrap: "wrap"
866
871
  },
867
872
  children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
868
- style: A,
873
+ style: k,
869
874
  children: e
870
875
  }, e))
871
876
  })
@@ -879,17 +884,17 @@ var F = c(function() {
879
884
  headingLevel: 2,
880
885
  title: c("bigconsole.insights.generations.heading", "Recent generations"),
881
886
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
882
- icon: /* @__PURE__ */ b(le, { className: "h-icon-sm w-icon-sm" }),
883
- meta: Q.length > 0 ? /* @__PURE__ */ x("span", {
884
- style: A,
887
+ icon: /* @__PURE__ */ b(ue, { className: "h-icon-sm w-icon-sm" }),
888
+ meta: Z.length > 0 ? /* @__PURE__ */ x("span", {
889
+ style: k,
885
890
  children: [
886
- Q.length,
891
+ Z.length,
887
892
  " generation",
888
- Q.length === 1 ? "" : "s"
893
+ Z.length === 1 ? "" : "s"
889
894
  ]
890
895
  }) : void 0,
891
896
  "data-testid": "insights-generations",
892
- children: Xe && Q.length === 0 ? /* @__PURE__ */ b(r, {
897
+ children: Qe && Z.length === 0 ? /* @__PURE__ */ b(r, {
893
898
  emphasis: "muted",
894
899
  headingLevel: 3,
895
900
  "aria-label": "Loading generations",
@@ -914,17 +919,17 @@ var F = c(function() {
914
919
  children: c("bigconsole.insights.generations.loading", "Loading generations…")
915
920
  })]
916
921
  })
917
- }) : Q.length === 0 && !I && !q ? /* @__PURE__ */ b(he, {
922
+ }) : Z.length === 0 && !F && !K ? /* @__PURE__ */ b(ge, {
918
923
  treatment: "insight",
919
924
  className: "border-[var(--color-border-seam)]",
920
- children: /* @__PURE__ */ b(_e, {
925
+ children: /* @__PURE__ */ b(ve, {
921
926
  illustration: "onboarding",
922
927
  title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
923
928
  description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
924
929
  })
925
930
  }) : /* @__PURE__ */ x("div", {
926
931
  className: "flex flex-col gap-list-gap",
927
- children: [I && !X && /* @__PURE__ */ b(r, {
932
+ children: [F && !Y && /* @__PURE__ */ b(r, {
928
933
  emphasis: "muted",
929
934
  tone: "info",
930
935
  padding: "compact",
@@ -933,14 +938,14 @@ var F = c(function() {
933
938
  description: "The new generation appears here as soon as the backend accepts it.",
934
939
  icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
935
940
  "data-testid": "insights-generation-pending"
936
- }), Q.map((e) => {
937
- let t = e.generatedSpec, i = R.has(e.id), a = C.includes(e.status);
941
+ }), Z.map((e) => {
942
+ let t = e.generatedSpec, i = L.has(e.id), a = C.includes(e.status);
938
943
  return /* @__PURE__ */ x(r, {
939
944
  emphasis: "standard",
940
945
  padding: "compact",
941
946
  headingLevel: 3,
942
947
  title: t?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
943
- meta: /* @__PURE__ */ b(Re, { status: e.status }),
948
+ meta: /* @__PURE__ */ b(Be, { status: e.status }),
944
949
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
945
950
  "data-testid": "insights-generation-card",
946
951
  bodyClassName: "flex flex-col gap-control-gap",
@@ -953,15 +958,15 @@ var F = c(function() {
953
958
  },
954
959
  children: [
955
960
  /* @__PURE__ */ x("span", {
956
- style: A,
961
+ style: k,
957
962
  children: [
958
- P(t),
963
+ N(t),
959
964
  " widget",
960
- P(t) === 1 ? "" : "s"
965
+ N(t) === 1 ? "" : "s"
961
966
  ]
962
967
  }),
963
968
  /* @__PURE__ */ x("span", {
964
- style: A,
969
+ style: k,
965
970
  children: [
966
971
  t.pages.length,
967
972
  " page",
@@ -969,7 +974,7 @@ var F = c(function() {
969
974
  ]
970
975
  }),
971
976
  /* @__PURE__ */ x("span", {
972
- style: ze(t.overallConfidence),
977
+ style: Ve(t.overallConfidence),
973
978
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
974
979
  })
975
980
  ]
@@ -980,7 +985,7 @@ var F = c(function() {
980
985
  padding: "compact",
981
986
  title: "Generation failed",
982
987
  description: e.errorMessage,
983
- icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" })
988
+ icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" })
984
989
  }),
985
990
  /* @__PURE__ */ x("div", {
986
991
  style: {
@@ -995,17 +1000,17 @@ var F = c(function() {
995
1000
  a && /* @__PURE__ */ x("button", {
996
1001
  type: "button",
997
1002
  onClick: () => {
998
- o("medium"), ut(e.id);
1003
+ o("medium"), dt(e.id);
999
1004
  },
1000
1005
  disabled: i,
1001
1006
  title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1002
1007
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1003
1008
  style: {
1004
- ...Ie,
1009
+ ...Le,
1005
1010
  cursor: i ? "wait" : "pointer"
1006
1011
  },
1007
1012
  children: [
1008
- /* @__PURE__ */ b(se, {
1013
+ /* @__PURE__ */ b(ce, {
1009
1014
  size: 14,
1010
1015
  "aria-hidden": "true"
1011
1016
  }),
@@ -1015,12 +1020,12 @@ var F = c(function() {
1015
1020
  }),
1016
1021
  e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1017
1022
  type: "button",
1018
- onClick: () => B(e),
1023
+ onClick: () => z(e),
1019
1024
  title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1020
1025
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1021
1026
  style: T,
1022
1027
  children: [
1023
- /* @__PURE__ */ b(ce, {
1028
+ /* @__PURE__ */ b(le, {
1024
1029
  size: 14,
1025
1030
  "aria-hidden": "true"
1026
1031
  }),
@@ -1031,7 +1036,7 @@ var F = c(function() {
1031
1036
  e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1032
1037
  type: "button",
1033
1038
  onClick: () => {
1034
- H(e), W("");
1039
+ V(e), U("");
1035
1040
  },
1036
1041
  title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1037
1042
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
@@ -1048,7 +1053,7 @@ var F = c(function() {
1048
1053
  (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1049
1054
  type: "button",
1050
1055
  onClick: () => {
1051
- o("medium"), dt(e.id);
1056
+ o("medium"), ft(e.id);
1052
1057
  },
1053
1058
  disabled: i,
1054
1059
  title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
@@ -1058,7 +1063,7 @@ var F = c(function() {
1058
1063
  cursor: i ? "wait" : "pointer"
1059
1064
  },
1060
1065
  children: [
1061
- /* @__PURE__ */ b(de, {
1066
+ /* @__PURE__ */ b(fe, {
1062
1067
  size: 14,
1063
1068
  className: i ? "animate-spin" : "",
1064
1069
  "aria-hidden": "true"
@@ -1082,7 +1087,7 @@ var F = c(function() {
1082
1087
  }),
1083
1088
  e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1084
1089
  type: "button",
1085
- onClick: () => ct(e),
1090
+ onClick: () => Q(e),
1086
1091
  disabled: s(e).kind !== "create",
1087
1092
  title: s(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1088
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",
@@ -1113,13 +1118,13 @@ var F = c(function() {
1113
1118
  /* @__PURE__ */ b("button", {
1114
1119
  type: "button",
1115
1120
  onClick: () => {
1116
- o("medium"), lt(e.id);
1121
+ o("medium"), ut(e.id);
1117
1122
  },
1118
1123
  title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1119
1124
  "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1120
1125
  className: n,
1121
- style: D,
1122
- children: /* @__PURE__ */ b(fe, {
1126
+ style: Re,
1127
+ children: /* @__PURE__ */ b(pe, {
1123
1128
  size: 14,
1124
1129
  "aria-hidden": "true"
1125
1130
  })
@@ -1135,11 +1140,11 @@ var F = c(function() {
1135
1140
  })
1136
1141
  ] })]
1137
1142
  }),
1138
- z && $ && /* @__PURE__ */ b("div", {
1143
+ R && $ && /* @__PURE__ */ b("div", {
1139
1144
  role: "dialog",
1140
1145
  "aria-modal": "true",
1141
1146
  "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1142
- onClick: () => B(null),
1147
+ onClick: () => z(null),
1143
1148
  style: {
1144
1149
  position: "fixed",
1145
1150
  inset: 0,
@@ -1192,14 +1197,14 @@ var F = c(function() {
1192
1197
  })]
1193
1198
  }), /* @__PURE__ */ b("button", {
1194
1199
  type: "button",
1195
- onClick: () => B(null),
1200
+ onClick: () => z(null),
1196
1201
  "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1197
1202
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1198
1203
  style: {
1199
- ...D,
1204
+ ...Re,
1200
1205
  color: "var(--color-text-muted)"
1201
1206
  },
1202
- children: /* @__PURE__ */ b(pe, {
1207
+ children: /* @__PURE__ */ b(me, {
1203
1208
  size: 18,
1204
1209
  "aria-hidden": "true"
1205
1210
  })
@@ -1224,15 +1229,15 @@ var F = c(function() {
1224
1229
  },
1225
1230
  children: [
1226
1231
  /* @__PURE__ */ x("span", {
1227
- style: A,
1232
+ style: k,
1228
1233
  children: [
1229
- P($),
1234
+ N($),
1230
1235
  " widget",
1231
- P($) === 1 ? "" : "s"
1236
+ N($) === 1 ? "" : "s"
1232
1237
  ]
1233
1238
  }),
1234
1239
  /* @__PURE__ */ x("span", {
1235
- style: A,
1240
+ style: k,
1236
1241
  children: [
1237
1242
  $.pages.length,
1238
1243
  " page",
@@ -1240,12 +1245,12 @@ var F = c(function() {
1240
1245
  ]
1241
1246
  }),
1242
1247
  /* @__PURE__ */ x("span", {
1243
- style: ze($.overallConfidence),
1248
+ style: Ve($.overallConfidence),
1244
1249
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1245
1250
  })
1246
1251
  ]
1247
1252
  }),
1248
- /* @__PURE__ */ b(ae, { metadata: z.processingMetadata }),
1253
+ /* @__PURE__ */ b(oe, { metadata: R.processingMetadata }),
1249
1254
  $.reasoning && /* @__PURE__ */ x("details", {
1250
1255
  "data-testid": "preview-reasoning",
1251
1256
  children: [/* @__PURE__ */ b("summary", {
@@ -1274,7 +1279,7 @@ var F = c(function() {
1274
1279
  headingLevel: 3,
1275
1280
  title: e.name,
1276
1281
  meta: /* @__PURE__ */ x("span", {
1277
- style: A,
1282
+ style: k,
1278
1283
  children: [
1279
1284
  e.widgets.length,
1280
1285
  " widget",
@@ -1299,13 +1304,13 @@ var F = c(function() {
1299
1304
  ]
1300
1305
  }), /* @__PURE__ */ b("div", {
1301
1306
  className: "insights-proposal-grid",
1302
- style: He(e.gridColumns),
1307
+ style: We(e.gridColumns),
1303
1308
  children: e.widgets.map((t, n) => {
1304
- let r = Be(t.confidence);
1309
+ let r = He(t.confidence);
1305
1310
  return /* @__PURE__ */ x("div", {
1306
1311
  className: "insights-proposal-widget",
1307
1312
  style: {
1308
- ...Ue(t.position, e.gridColumns),
1313
+ ...Ge(t.position, e.gridColumns),
1309
1314
  display: "flex",
1310
1315
  flexDirection: "column",
1311
1316
  gap: "2px",
@@ -1342,7 +1347,7 @@ var F = c(function() {
1342
1347
  }),
1343
1348
  r && /* @__PURE__ */ b("span", {
1344
1349
  style: {
1345
- ...We(r),
1350
+ ...Ke(r),
1346
1351
  marginLeft: "auto"
1347
1352
  },
1348
1353
  "data-testid": "preview-widget-confidence",
@@ -1359,7 +1364,7 @@ var F = c(function() {
1359
1364
  },
1360
1365
  children: t.reasoning
1361
1366
  }),
1362
- /* @__PURE__ */ b(ie, { config: t.config })
1367
+ /* @__PURE__ */ b(ae, { config: t.config })
1363
1368
  ]
1364
1369
  }, n);
1365
1370
  })
@@ -1379,16 +1384,16 @@ var F = c(function() {
1379
1384
  children: [
1380
1385
  /* @__PURE__ */ b("button", {
1381
1386
  type: "button",
1382
- onClick: () => B(null),
1387
+ onClick: () => z(null),
1383
1388
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1384
1389
  style: T,
1385
1390
  children: "Close"
1386
1391
  }),
1387
- z.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1392
+ R.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1388
1393
  type: "button",
1389
1394
  onClick: () => {
1390
- let e = z;
1391
- B(null), H(e), W("");
1395
+ let e = R;
1396
+ z(null), V(e), U("");
1392
1397
  },
1393
1398
  title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1394
1399
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
@@ -1402,24 +1407,24 @@ var F = c(function() {
1402
1407
  c("bigconsole.insights.actions.refine", "Refine")
1403
1408
  ]
1404
1409
  }),
1405
- z.status === "COMPLETED" && s(z).kind === "hold" && /* @__PURE__ */ b("span", {
1410
+ R.status === "COMPLETED" && s(R).kind === "hold" && /* @__PURE__ */ b("span", {
1406
1411
  role: "status",
1407
1412
  children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1408
1413
  }),
1409
- z.dashboardId && /* @__PURE__ */ b("button", {
1414
+ R.dashboardId && /* @__PURE__ */ b("button", {
1410
1415
  type: "button",
1411
1416
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1412
1417
  style: T,
1413
- onClick: () => p(`/dashboards/${z.dashboardId}`),
1418
+ onClick: () => p(`/dashboards/${R.dashboardId}`),
1414
1419
  children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1415
1420
  }),
1416
- z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ x("button", {
1421
+ R.status === "COMPLETED" && !R.dashboardId && /* @__PURE__ */ x("button", {
1417
1422
  type: "button",
1418
- disabled: s(z).kind !== "create",
1419
- title: s(z).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1423
+ disabled: s(R).kind !== "create",
1424
+ title: s(R).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1420
1425
  onClick: () => {
1421
- let e = z;
1422
- B(null), ct(e);
1426
+ let e = R;
1427
+ z(null), Q(e);
1423
1428
  },
1424
1429
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1425
1430
  style: E,
@@ -1437,11 +1442,11 @@ var F = c(function() {
1437
1442
  ]
1438
1443
  })
1439
1444
  }),
1440
- V && /* @__PURE__ */ b("div", {
1445
+ B && /* @__PURE__ */ b("div", {
1441
1446
  role: "dialog",
1442
1447
  "aria-modal": "true",
1443
1448
  "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1444
- onClick: () => H(null),
1449
+ onClick: () => V(null),
1445
1450
  style: {
1446
1451
  position: "fixed",
1447
1452
  inset: 0,
@@ -1501,8 +1506,8 @@ var F = c(function() {
1501
1506
  emphasis: "muted",
1502
1507
  padding: "compact",
1503
1508
  headingLevel: 3,
1504
- title: V.generatedSpec?.name || "Current proposal",
1505
- description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1509
+ title: B.generatedSpec?.name || "Current proposal",
1510
+ description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
1506
1511
  icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1507
1512
  }), /* @__PURE__ */ x("div", {
1508
1513
  style: {
@@ -1521,8 +1526,8 @@ var F = c(function() {
1521
1526
  children: "What should change?"
1522
1527
  }), /* @__PURE__ */ b("textarea", {
1523
1528
  id: "refine-input",
1524
- value: U,
1525
- onChange: (e) => W(e.target.value),
1529
+ value: H,
1530
+ onChange: (e) => U(e.target.value),
1526
1531
  maxLength: 2e3,
1527
1532
  rows: 4,
1528
1533
  placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
@@ -1552,21 +1557,21 @@ var F = c(function() {
1552
1557
  },
1553
1558
  children: [/* @__PURE__ */ b("button", {
1554
1559
  type: "button",
1555
- onClick: () => H(null),
1560
+ onClick: () => V(null),
1556
1561
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1557
1562
  style: T,
1558
1563
  children: c("bigconsole.insights.actions.cancel", "Cancel")
1559
1564
  }), /* @__PURE__ */ x("button", {
1560
1565
  type: "button",
1561
- onClick: () => void ft(),
1562
- disabled: !U.trim() || R.has(V.id),
1566
+ onClick: () => void pt(),
1567
+ disabled: !H.trim() || L.has(B.id),
1563
1568
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1564
1569
  style: {
1565
1570
  ...E,
1566
- cursor: !U.trim() || R.has(V.id) ? "not-allowed" : "pointer",
1567
- opacity: U.trim() ? 1 : .6
1571
+ cursor: !H.trim() || L.has(B.id) ? "not-allowed" : "pointer",
1572
+ opacity: H.trim() ? 1 : .6
1568
1573
  },
1569
- children: [R.has(V.id) ? /* @__PURE__ */ b(h, {
1574
+ children: [L.has(B.id) ? /* @__PURE__ */ b(h, {
1570
1575
  size: 14,
1571
1576
  className: "animate-spin",
1572
1577
  "aria-hidden": "true"
@@ -1583,4 +1588,4 @@ var F = c(function() {
1583
1588
  });
1584
1589
  });
1585
1590
  //#endregion
1586
- export { F as InsightsPage, F as default };
1591
+ export { P as InsightsPage, P as default };