@ganakailabs/cloudeval-cli 0.21.2 → 0.22.0

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.
@@ -38,10 +38,10 @@ import {
38
38
  } from "./chunk-LDDHLUZH.js";
39
39
  import {
40
40
  Banner
41
- } from "./chunk-CJWMEKKP.js";
41
+ } from "./chunk-TTE5NEMA.js";
42
42
  import {
43
43
  CLI_VERSION
44
- } from "./chunk-32EP3DJT.js";
44
+ } from "./chunk-AF6Z5VZD.js";
45
45
  import {
46
46
  raisedButtonStyle,
47
47
  terminalTheme
@@ -49,7 +49,7 @@ import {
49
49
 
50
50
  // src/ui/App.tsx
51
51
  import React8, { useEffect as useEffect4, useMemo, useState as useState4, startTransition } from "react";
52
- import { Box as Box9, Text as Text10, useApp, useInput as useInput4 } from "ink";
52
+ import { Box as Box9, Text as Text12, useApp, useInput as useInput4 } from "ink";
53
53
  import { ScrollView } from "ink-scroll-view";
54
54
  import { randomUUID as randomUUID2 } from "crypto";
55
55
  import { spawn } from "child_process";
@@ -772,7 +772,7 @@ var Transcript = ({
772
772
 
773
773
  // src/ui/components/InputBox.tsx
774
774
  import { useEffect as useEffect2, useState as useState2 } from "react";
775
- import { Box as Box4, Text as Text5, useInput } from "ink";
775
+ import { Box as Box4, Text as Text6, useInput } from "ink";
776
776
 
777
777
  // src/ui/inputSanitizer.ts
778
778
  var SGR_MOUSE_SEQUENCE = /\x1b?\[<\d+;\d+;\d+[mM]/g;
@@ -946,8 +946,26 @@ var workspaceTabFromPosition = (column, row, areas) => areas.find(
946
946
  (area) => column >= area.startColumn && column <= area.endColumn && row >= area.startRow && row <= area.endRow
947
947
  )?.tab;
948
948
 
949
+ // src/ui/components/InputHelpText.tsx
950
+ import { Text as Text5 } from "ink";
951
+ import { jsx as jsx5 } from "react/jsx-runtime";
952
+ var SLASH_COMMAND_PATTERN = /(\/[a-z][a-z0-9_-]*)/gi;
953
+ var InputHelpText = ({ text }) => {
954
+ const parts = text.split(SLASH_COMMAND_PATTERN);
955
+ if (parts.length === 1) {
956
+ return /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "truncate", children: text });
957
+ }
958
+ return /* @__PURE__ */ jsx5(Text5, { wrap: "truncate", children: parts.map((part, index) => {
959
+ if (part.startsWith("/")) {
960
+ return /* @__PURE__ */ jsx5(Text5, { color: terminalTheme.accent, bold: true, children: part }, `${part}-${index}`);
961
+ }
962
+ return /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: part }, `${part}-${index}`);
963
+ }) });
964
+ };
965
+
949
966
  // src/ui/components/InputBox.tsx
950
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
967
+ import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
968
+ var COMMAND_MENU_VISIBLE_ROWS = 5;
951
969
  var shouldAnimateInputCursor = ({
952
970
  disabled,
953
971
  inputActive = true,
@@ -1006,7 +1024,7 @@ var Scrollbar = ({
1006
1024
  visibleRows - 1,
1007
1025
  Math.max(0, Math.round(startRow / maxStart * (visibleRows - 1)))
1008
1026
  );
1009
- return /* @__PURE__ */ jsx5(Box4, { flexDirection: "column", marginLeft: 1, children: Array.from({ length: visibleRows }, (_, index) => /* @__PURE__ */ jsx5(Text5, { color: index === thumbIndex ? terminalTheme.focus : terminalTheme.muted, children: index === thumbIndex ? "\u2503" : "\u2502" }, index)) });
1027
+ return /* @__PURE__ */ jsx6(Box4, { flexDirection: "column", marginLeft: 1, children: Array.from({ length: visibleRows }, (_, index) => /* @__PURE__ */ jsx6(Text6, { color: index === thumbIndex ? terminalTheme.focus : terminalTheme.muted, children: index === thumbIndex ? "\u2503" : "\u2502" }, index)) });
1010
1028
  };
1011
1029
  var truncateInline = (value, maxLength) => {
1012
1030
  if (value.length <= maxLength) {
@@ -1094,20 +1112,65 @@ var getFollowUpRowViewport = ({
1094
1112
  rowCount: 1
1095
1113
  };
1096
1114
  };
1097
- var getCommandCompletionViewport = ({
1115
+ var estimateCommandCompletionRows = (commandCount, terminalColumns) => {
1116
+ if (!commandCount) {
1117
+ return 0;
1118
+ }
1119
+ const layout = getCommandCompletionLayout({
1120
+ commands: Array.from({ length: commandCount }, (_, index) => ({
1121
+ name: `/cmd-${index}`,
1122
+ description: ""
1123
+ })),
1124
+ focusedIndex: 0,
1125
+ terminalColumns
1126
+ });
1127
+ return layout.rowCount;
1128
+ };
1129
+ var getCommandCompletionLayout = ({
1098
1130
  commands,
1099
1131
  focusedIndex = 0,
1100
1132
  terminalColumns
1101
1133
  }) => {
1102
- const availableWidth = Math.max(24, terminalColumns - 28);
1103
1134
  const activeIndex = commands.length ? Math.min(Math.max(0, focusedIndex), commands.length - 1) : 0;
1135
+ const activeCommand = commands[activeIndex];
1136
+ const useVertical = commands.length >= 5 || terminalColumns < 100 || commands.some((command) => command.name.length > 14);
1137
+ if (!commands.length) {
1138
+ return {
1139
+ mode: "vertical",
1140
+ activeIndex: 0,
1141
+ items: [],
1142
+ clippedStart: false,
1143
+ clippedEnd: false,
1144
+ rowCount: 0
1145
+ };
1146
+ }
1147
+ if (useVertical) {
1148
+ const visibleCount = Math.min(COMMAND_MENU_VISIBLE_ROWS, commands.length);
1149
+ let start2 = Math.max(0, activeIndex - Math.floor(visibleCount / 2));
1150
+ if (start2 + visibleCount > commands.length) {
1151
+ start2 = Math.max(0, commands.length - visibleCount);
1152
+ }
1153
+ const end2 = Math.min(commands.length, start2 + visibleCount);
1154
+ const items2 = commands.slice(start2, end2).map((command, offset) => {
1155
+ const index = start2 + offset;
1156
+ const label = `${index === activeIndex ? raisedButtonStyle.activeMarker : raisedButtonStyle.inactiveMarker} ${command.name}`;
1157
+ return { command, index, label, width: label.length };
1158
+ });
1159
+ return {
1160
+ mode: "vertical",
1161
+ activeIndex,
1162
+ activeCommand,
1163
+ items: items2,
1164
+ clippedStart: start2 > 0,
1165
+ clippedEnd: end2 < commands.length,
1166
+ rowCount: 1 + items2.length + 1 + 1
1167
+ };
1168
+ }
1169
+ const availableWidth = Math.max(24, terminalColumns - 28);
1104
1170
  const items = commands.map((command, index) => {
1105
1171
  const label = `${index === activeIndex ? raisedButtonStyle.activeMarker : raisedButtonStyle.inactiveMarker} ${command.name}`;
1106
1172
  return { command, index, label, width: label.length };
1107
1173
  });
1108
- if (!items.length) {
1109
- return { items: [], clippedStart: false, clippedEnd: false, rowCount: 0 };
1110
- }
1111
1174
  let start = activeIndex;
1112
1175
  let usedWidth = items[start]?.width ?? 0;
1113
1176
  while (start > 0) {
@@ -1128,10 +1191,13 @@ var getCommandCompletionViewport = ({
1128
1191
  end++;
1129
1192
  }
1130
1193
  return {
1194
+ mode: "horizontal",
1195
+ activeIndex,
1196
+ activeCommand,
1131
1197
  items: items.slice(start, end),
1132
1198
  clippedStart: start > 0,
1133
1199
  clippedEnd: end < items.length,
1134
- rowCount: 1
1200
+ rowCount: 2
1135
1201
  };
1136
1202
  };
1137
1203
  var InputBox = ({
@@ -1175,20 +1241,18 @@ var InputBox = ({
1175
1241
  focusedFollowUpIndex,
1176
1242
  terminalColumns
1177
1243
  });
1178
- const commandCompletionViewport = getCommandCompletionViewport({
1244
+ const commandCompletionLayout = getCommandCompletionLayout({
1179
1245
  commands: commandCompletions,
1180
1246
  focusedIndex: focusedCommandCompletionIndex,
1181
1247
  terminalColumns
1182
1248
  });
1183
- const commandCompletionLine = [
1184
- commandCompletionViewport.clippedStart ? "<--" : void 0,
1185
- ...commandCompletionViewport.items.map((item) => item.label),
1186
- commandCompletionViewport.clippedEnd ? "-->" : void 0
1187
- ].filter(Boolean).join(" ");
1188
- const activeCommand = focusedCommandCompletionIndex === void 0 ? void 0 : commandCompletions[Math.min(
1189
- Math.max(0, focusedCommandCompletionIndex),
1190
- Math.max(0, commandCompletions.length - 1)
1191
- )];
1249
+ const activeCommand = commandCompletionLayout.activeCommand;
1250
+ const commandCompletionNavigationHint = [
1251
+ commandCompletionLayout.clippedStart ? "\u2191 more" : void 0,
1252
+ "Tab/\u2191\u2193 move",
1253
+ "Enter choose",
1254
+ commandCompletionLayout.clippedEnd ? "\u2193 more" : void 0
1255
+ ].filter(Boolean).join(" \xB7 ");
1192
1256
  const promptPrefix = ">";
1193
1257
  const inputWidth = Math.max(20, terminalColumns - 10);
1194
1258
  const inputViewport = getInputViewport({
@@ -1283,13 +1347,13 @@ var InputBox = ({
1283
1347
  const cursorColor = getInputCursorColor({ disabled, inputActive, cursorVisible });
1284
1348
  const inputBorderColor = disabled ? terminalTheme.muted : followUpsActive || inputActive ? terminalTheme.focus : terminalTheme.muted;
1285
1349
  const content = /* @__PURE__ */ jsxs4(Fragment, { children: [
1286
- followUps.length ? /* @__PURE__ */ jsxs4(Text5, { wrap: "truncate", children: [
1287
- /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: `${followUpsLabel}: ` }),
1288
- followUpViewport.clippedStart ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "<-- " }) : null,
1350
+ followUps.length ? /* @__PURE__ */ jsxs4(Text6, { wrap: "truncate", children: [
1351
+ /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: `${followUpsLabel}: ` }),
1352
+ followUpViewport.clippedStart ? /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "<-- " }) : null,
1289
1353
  followUpViewport.items.map(({ question, index, label }) => {
1290
1354
  const focused = followUpsActive && focusedFollowUpIndex === index;
1291
1355
  return /* @__PURE__ */ jsxs4(
1292
- Text5,
1356
+ Text6,
1293
1357
  {
1294
1358
  color: focused ? terminalTheme.focus : void 0,
1295
1359
  bold: focused,
@@ -1303,30 +1367,30 @@ var InputBox = ({
1303
1367
  `${index}-${question}`
1304
1368
  );
1305
1369
  }),
1306
- followUpViewport.clippedEnd ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "-->" }) : null
1370
+ followUpViewport.clippedEnd ? /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "-->" }) : null
1307
1371
  ] }) : null,
1308
1372
  /* @__PURE__ */ jsxs4(
1309
1373
  Box4,
1310
1374
  {
1311
1375
  flexDirection: compact ? "column" : "row",
1312
1376
  children: [
1313
- /* @__PURE__ */ jsx5(Box4, { flexDirection: "column", flexGrow: 1, children: !value ? /* @__PURE__ */ jsxs4(Text5, { wrap: "truncate", children: [
1314
- /* @__PURE__ */ jsxs4(Text5, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
1377
+ /* @__PURE__ */ jsx6(Box4, { flexDirection: "column", flexGrow: 1, children: !value ? /* @__PURE__ */ jsxs4(Text6, { wrap: "truncate", children: [
1378
+ /* @__PURE__ */ jsxs4(Text6, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
1315
1379
  promptPrefix,
1316
1380
  " "
1317
1381
  ] }),
1318
- /* @__PURE__ */ jsx5(Text5, { color: cursorColor, children: cursorGlyph }),
1319
- /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: ` ${placeholder}` })
1382
+ /* @__PURE__ */ jsx6(Text6, { color: cursorColor, children: cursorGlyph }),
1383
+ /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: ` ${placeholder}` })
1320
1384
  ] }) : promptRows.map((row, index) => {
1321
- return /* @__PURE__ */ jsxs4(Text5, { wrap: "truncate", children: [
1322
- row.showPromptPrefix ? /* @__PURE__ */ jsxs4(Text5, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
1385
+ return /* @__PURE__ */ jsxs4(Text6, { wrap: "truncate", children: [
1386
+ row.showPromptPrefix ? /* @__PURE__ */ jsxs4(Text6, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
1323
1387
  promptPrefix,
1324
1388
  " "
1325
- ] }) : /* @__PURE__ */ jsx5(Text5, { children: " " }),
1389
+ ] }) : /* @__PURE__ */ jsx6(Text6, { children: " " }),
1326
1390
  row.line,
1327
1391
  row.showCursor ? /* @__PURE__ */ jsxs4(Fragment, { children: [
1328
- /* @__PURE__ */ jsx5(
1329
- Text5,
1392
+ /* @__PURE__ */ jsx6(
1393
+ Text6,
1330
1394
  {
1331
1395
  dimColor: true,
1332
1396
  italic: true,
@@ -1334,11 +1398,11 @@ var InputBox = ({
1334
1398
  children: ghostText ?? ""
1335
1399
  }
1336
1400
  ),
1337
- /* @__PURE__ */ jsx5(Text5, { color: cursorColor, children: cursorGlyph })
1401
+ /* @__PURE__ */ jsx6(Text6, { color: cursorColor, children: cursorGlyph })
1338
1402
  ] }) : null
1339
1403
  ] }, `${startRow}-${index}`);
1340
1404
  }) }),
1341
- /* @__PURE__ */ jsx5(
1405
+ /* @__PURE__ */ jsx6(
1342
1406
  Scrollbar,
1343
1407
  {
1344
1408
  totalRows: inputRows.length,
@@ -1349,20 +1413,42 @@ var InputBox = ({
1349
1413
  ]
1350
1414
  }
1351
1415
  ),
1352
- actionHint ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "truncate", children: actionHint }) : resolvedHelpText ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "truncate", children: resolvedHelpText }) : null,
1353
- commandCompletionViewport.items.length ? /* @__PURE__ */ jsx5(
1354
- Text5,
1355
- {
1356
- color: commandCompletionsActive ? terminalTheme.focus : terminalTheme.muted,
1357
- bold: commandCompletionsActive,
1358
- wrap: "truncate",
1359
- children: `/commands: ${commandCompletionLine} | Tab/\u2191\u2193 move | Enter choose`
1360
- }
1361
- ) : null,
1362
- footerControls ? /* @__PURE__ */ jsx5(Box4, { flexDirection: "column", marginTop: 1, children: footerControls }) : null
1416
+ actionHint ? /* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate", children: actionHint }) : resolvedHelpText ? /* @__PURE__ */ jsx6(InputHelpText, { text: resolvedHelpText }) : null,
1417
+ commandCompletionLayout.items.length ? /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
1418
+ /* @__PURE__ */ jsx6(Text6, { color: terminalTheme.muted, bold: commandCompletionsActive, children: "Slash commands" }),
1419
+ commandCompletionLayout.mode === "vertical" ? commandCompletionLayout.items.map((item) => {
1420
+ const active = item.index === commandCompletionLayout.activeIndex;
1421
+ return /* @__PURE__ */ jsx6(
1422
+ Text6,
1423
+ {
1424
+ backgroundColor: active ? terminalTheme.selectedBackground : void 0,
1425
+ color: active ? terminalTheme.selected : terminalTheme.muted,
1426
+ bold: active,
1427
+ wrap: "truncate",
1428
+ children: item.label
1429
+ },
1430
+ item.command.name
1431
+ );
1432
+ }) : /* @__PURE__ */ jsx6(
1433
+ Text6,
1434
+ {
1435
+ color: commandCompletionsActive ? terminalTheme.focus : terminalTheme.muted,
1436
+ bold: commandCompletionsActive,
1437
+ wrap: "truncate",
1438
+ children: [
1439
+ commandCompletionLayout.clippedStart ? "\u2026" : void 0,
1440
+ ...commandCompletionLayout.items.map((item) => item.label),
1441
+ commandCompletionLayout.clippedEnd ? "\u2026" : void 0
1442
+ ].filter(Boolean).join(" ")
1443
+ }
1444
+ ),
1445
+ activeCommand?.description ? /* @__PURE__ */ jsx6(Text6, { color: terminalTheme.secondary, wrap: "truncate", children: activeCommand.description }) : null,
1446
+ /* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate", children: commandCompletionNavigationHint })
1447
+ ] }) : null,
1448
+ footerControls ? /* @__PURE__ */ jsx6(Box4, { flexDirection: "column", marginTop: 1, children: footerControls }) : null
1363
1449
  ] });
1364
1450
  if (variant === "dock") {
1365
- return /* @__PURE__ */ jsx5(
1451
+ return /* @__PURE__ */ jsx6(
1366
1452
  Box4,
1367
1453
  {
1368
1454
  flexDirection: "column",
@@ -1373,7 +1459,7 @@ var InputBox = ({
1373
1459
  }
1374
1460
  );
1375
1461
  }
1376
- return /* @__PURE__ */ jsx5(
1462
+ return /* @__PURE__ */ jsx6(
1377
1463
  TitledBox,
1378
1464
  {
1379
1465
  title,
@@ -1386,9 +1472,276 @@ var InputBox = ({
1386
1472
  );
1387
1473
  };
1388
1474
 
1475
+ // src/ui/components/NoticeLine.tsx
1476
+ import { Text as Text7 } from "ink";
1477
+
1478
+ // src/ui/noticeTone.ts
1479
+ var matchesAny = (message, patterns) => patterns.some((pattern) => pattern.test(message));
1480
+ var classifyNoticeTone = (message) => {
1481
+ const normalized = message.trim();
1482
+ if (!normalized) {
1483
+ return "neutral";
1484
+ }
1485
+ if (matchesAny(normalized, [
1486
+ /^failed\b/i,
1487
+ /\bfailed:/i,
1488
+ /^error\b/i,
1489
+ /\bunavailable\b/i,
1490
+ /^cannot\b/i,
1491
+ /^could not\b/i,
1492
+ /^copy failed\b/i,
1493
+ /^no assistant response\b/i,
1494
+ /^no chat transcript\b/i,
1495
+ /^sign in before\b/i
1496
+ ])) {
1497
+ return "danger";
1498
+ }
1499
+ if (matchesAny(normalized, [
1500
+ /^loading\b/i,
1501
+ /^submitting\b/i,
1502
+ /\.\.\.$/,
1503
+ /^stop the running\b/i,
1504
+ /^starter selections shown\b/i,
1505
+ /^type to edit\b/i
1506
+ ])) {
1507
+ return "warning";
1508
+ }
1509
+ if (matchesAny(normalized, [
1510
+ /^downloaded\b/i,
1511
+ /^copied\b/i,
1512
+ /^loaded\b/i,
1513
+ /^started\b/i,
1514
+ /^project selected\b/i,
1515
+ /^model selected\b/i,
1516
+ /^profile selected\b/i,
1517
+ /^thread\b/i,
1518
+ /^report run submitted\b/i,
1519
+ /^agent profile cleared\b/i
1520
+ ])) {
1521
+ return "success";
1522
+ }
1523
+ if (matchesAny(normalized, [
1524
+ /^frontend link:/i,
1525
+ /^open frontend manually:/i,
1526
+ /^open session was not found\b/i,
1527
+ /^cannot resume\b/i,
1528
+ /^local threads unavailable\b/i,
1529
+ /^cloud threads unavailable\b/i,
1530
+ /queued:/i
1531
+ ])) {
1532
+ return "info";
1533
+ }
1534
+ return "neutral";
1535
+ };
1536
+
1537
+ // src/ui/components/NoticeLine.tsx
1538
+ import { jsx as jsx7 } from "react/jsx-runtime";
1539
+ var toneColor = (tone) => {
1540
+ switch (tone) {
1541
+ case "success":
1542
+ return terminalTheme.success;
1543
+ case "warning":
1544
+ return terminalTheme.warning;
1545
+ case "danger":
1546
+ return terminalTheme.danger;
1547
+ case "info":
1548
+ return terminalTheme.secondary;
1549
+ default:
1550
+ return terminalTheme.muted;
1551
+ }
1552
+ };
1553
+ var NoticeLine = ({ message }) => {
1554
+ const tone = classifyNoticeTone(message);
1555
+ const color = toneColor(tone);
1556
+ const bold = tone === "success" || tone === "danger";
1557
+ return /* @__PURE__ */ jsx7(Text7, { wrap: "wrap", color, bold, children: message });
1558
+ };
1559
+
1560
+ // src/ui/layout.ts
1561
+ var clamp2 = (value, min, max) => Math.min(max, Math.max(min, value));
1562
+ var normalizeDimension = (value, fallback) => Number.isFinite(value) && value && value > 0 ? value : fallback;
1563
+ var BANNER_ART_WIDTH = 84;
1564
+ var BANNER_ART_ROWS = 6;
1565
+ var BANNER_WELCOME_ROWS = 1;
1566
+ var BANNER_VERSION_ROWS = 1;
1567
+ var BANNER_MARGIN_BOTTOM_ROWS = 1;
1568
+ var BANNER_SIDE_DETAILS_MIN_WIDTH = 42;
1569
+ var estimateBannerRows = ({
1570
+ columns,
1571
+ detailsCount = 3
1572
+ }) => {
1573
+ const showArt = columns >= BANNER_ART_WIDTH;
1574
+ const detailsBesideArt = showArt && detailsCount > 0 && columns >= BANNER_ART_WIDTH + BANNER_SIDE_DETAILS_MIN_WIDTH;
1575
+ const detailRows = BANNER_VERSION_ROWS + detailsCount;
1576
+ if (!showArt) {
1577
+ return detailRows + BANNER_MARGIN_BOTTOM_ROWS;
1578
+ }
1579
+ if (detailsBesideArt) {
1580
+ return BANNER_WELCOME_ROWS + Math.max(BANNER_ART_ROWS, detailRows) + BANNER_MARGIN_BOTTOM_ROWS;
1581
+ }
1582
+ return BANNER_WELCOME_ROWS + BANNER_ART_ROWS + detailRows + BANNER_MARGIN_BOTTOM_ROWS;
1583
+ };
1584
+ var getResponsiveTuiLayout = (size, options = {}) => {
1585
+ const columns = normalizeDimension(size.columns, 100);
1586
+ const rows = normalizeDimension(size.rows, 32);
1587
+ const compact = columns < 96 || rows < 30;
1588
+ const showBanner = !options.disableBanner;
1589
+ let reservedRows = 25 + Math.max(0, Math.ceil(options.promptInputRows ?? 2) - 2) + Math.max(0, Math.ceil(options.promptSuggestionRows ?? 0));
1590
+ if (showBanner) reservedRows += estimateBannerRows({ columns });
1591
+ if (options.hasQueue) reservedRows += 4;
1592
+ if (options.hasError) reservedRows += 4;
1593
+ if (options.hasHitl) reservedRows += 7;
1594
+ if (options.hasSelector) reservedRows += 8;
1595
+ if (options.isSearching) reservedRows += 3;
1596
+ const maxThreadHeight = compact ? 14 : 24;
1597
+ const availableRows = rows - reservedRows;
1598
+ return {
1599
+ compact,
1600
+ paddingX: compact ? 0 : 1,
1601
+ selectorLimit: compact ? 6 : 8,
1602
+ showBanner,
1603
+ threadHeight: clamp2(availableRows, 1, maxThreadHeight)
1604
+ };
1605
+ };
1606
+ var getMiddleViewportRows = (size, options = {}) => {
1607
+ const rows = normalizeDimension(size.rows, 32);
1608
+ const headerRows = Math.max(0, Math.ceil(options.headerRows ?? 0));
1609
+ const footerRows = Math.max(0, Math.ceil(options.footerRows ?? 0));
1610
+ const safetyRows = Math.max(0, Math.ceil(options.safetyRows ?? 2));
1611
+ return Math.max(1, Math.floor(rows) - headerRows - footerRows - safetyRows);
1612
+ };
1613
+ var getFramedBodyRows = (frameRows, chromeRows = 4) => Math.max(1, Math.floor(frameRows) - Math.max(0, Math.ceil(chromeRows)));
1614
+ var estimateWorkspaceTabBarRows = () => 2;
1615
+ var estimateSelectPanelRows = (visibleLimit) => 4 + Math.max(1, Math.ceil(visibleLimit));
1616
+ var getPromptInputRowBudget = (size) => {
1617
+ const rows = normalizeDimension(size.rows, 32);
1618
+ return clamp2(Math.floor(rows * 0.13), 4, 8);
1619
+ };
1620
+ var getChatResponsiveMode = (size) => {
1621
+ const columns = normalizeDimension(size.columns, 100);
1622
+ const rows = normalizeDimension(size.rows, 32);
1623
+ if (columns >= 132 && rows >= 40) {
1624
+ return "wide";
1625
+ }
1626
+ if (columns >= 112 && rows >= 34) {
1627
+ return "medium";
1628
+ }
1629
+ return "narrow";
1630
+ };
1631
+ var shouldUseSplitChatLayout = (size) => getChatResponsiveMode(size) !== "narrow";
1632
+ var getContextRailWidth = (size) => {
1633
+ const mode = getChatResponsiveMode(size);
1634
+ const columns = normalizeDimension(size.columns, 100);
1635
+ if (mode === "wide") {
1636
+ return Math.min(40, Math.max(34, Math.ceil(columns * 0.25)));
1637
+ }
1638
+ if (mode === "medium") {
1639
+ return Math.min(30, Math.max(28, Math.ceil(columns * 0.25)));
1640
+ }
1641
+ return 0;
1642
+ };
1643
+ var estimateComposerRows = ({
1644
+ inputRows,
1645
+ suggestionRows,
1646
+ includeControls = true,
1647
+ controlRows = 0,
1648
+ variant = "panel"
1649
+ }) => {
1650
+ const chromeRows = variant === "dock" ? 1 : 2;
1651
+ const inputRowsWithHint = inputRows + 1;
1652
+ const footerRows = includeControls ? controlRows : 0;
1653
+ return chromeRows + Math.max(0, suggestionRows) + inputRowsWithHint + footerRows;
1654
+ };
1655
+ var truncateForTerminal = (value, maxLength) => {
1656
+ if (maxLength <= 0) {
1657
+ return "";
1658
+ }
1659
+ if (value.length <= maxLength) {
1660
+ return value;
1661
+ }
1662
+ if (maxLength <= 3) {
1663
+ return ".".repeat(maxLength);
1664
+ }
1665
+ return `${value.slice(0, maxLength - 3)}...`;
1666
+ };
1667
+
1668
+ // src/ui/bannerDetails.ts
1669
+ var labelSegment = (label) => ({
1670
+ text: label,
1671
+ dimColor: true
1672
+ });
1673
+ var valueSegment = (value, color) => ({
1674
+ text: value,
1675
+ color
1676
+ });
1677
+ var creditToneColor = (tone) => {
1678
+ if (tone === "warning" || tone === "low") {
1679
+ return terminalTheme.warning;
1680
+ }
1681
+ if (tone === "exhausted" || tone === "danger") {
1682
+ return terminalTheme.danger;
1683
+ }
1684
+ if (tone === "success" || tone === "normal") {
1685
+ return terminalTheme.success;
1686
+ }
1687
+ return terminalTheme.brand;
1688
+ };
1689
+ var buildBannerDetailLines = ({
1690
+ apiBase,
1691
+ frontendBaseUrl,
1692
+ billingSummary,
1693
+ billingTone,
1694
+ userName,
1695
+ userEmail
1696
+ }) => {
1697
+ const displayName = truncateForTerminal(userName.trim() || "You", 48);
1698
+ const email = userEmail?.trim();
1699
+ const userSegments = [
1700
+ labelSegment("User: "),
1701
+ valueSegment(displayName, terminalTheme.userName)
1702
+ ];
1703
+ if (email) {
1704
+ userSegments.push({
1705
+ text: ` (${truncateForTerminal(email, 56)})`,
1706
+ dimColor: true
1707
+ });
1708
+ }
1709
+ const billingUnavailable = billingSummary.includes("unavailable");
1710
+ return [
1711
+ { key: "user", segments: userSegments },
1712
+ {
1713
+ key: "api",
1714
+ segments: [
1715
+ labelSegment("API: "),
1716
+ valueSegment(truncateForTerminal(apiBase, 72), terminalTheme.secondary)
1717
+ ]
1718
+ },
1719
+ {
1720
+ key: "frontend",
1721
+ segments: [
1722
+ labelSegment("Frontend: "),
1723
+ valueSegment(truncateForTerminal(frontendBaseUrl, 72), terminalTheme.secondary)
1724
+ ]
1725
+ },
1726
+ {
1727
+ key: "billing",
1728
+ segments: [
1729
+ {
1730
+ text: billingSummary,
1731
+ color: billingUnavailable ? terminalTheme.warning : creditToneColor(billingTone),
1732
+ bold: !billingUnavailable
1733
+ }
1734
+ ]
1735
+ }
1736
+ ];
1737
+ };
1738
+ var buildTuiHeaderDetails = (options) => buildBannerDetailLines(options).map(
1739
+ (line) => line.segments.map((segment) => segment.text).join("")
1740
+ );
1741
+
1389
1742
  // src/ui/components/Scrollbar.tsx
1390
- import { Box as Box5, Text as Text6 } from "ink";
1391
- import { jsx as jsx6 } from "react/jsx-runtime";
1743
+ import { Box as Box5, Text as Text8 } from "ink";
1744
+ import { jsx as jsx8 } from "react/jsx-runtime";
1392
1745
  var Scrollbar2 = ({
1393
1746
  scrollOffset,
1394
1747
  contentHeight,
@@ -1410,8 +1763,8 @@ var Scrollbar2 = ({
1410
1763
  scrollbarLines.push("\u2502");
1411
1764
  }
1412
1765
  }
1413
- return /* @__PURE__ */ jsx6(Box5, { flexDirection: "column", marginLeft: 1, flexShrink: 0, width: 1, children: scrollbarLines.map((line, idx) => /* @__PURE__ */ jsx6(
1414
- Text6,
1766
+ return /* @__PURE__ */ jsx8(Box5, { flexDirection: "column", marginLeft: 1, flexShrink: 0, width: 1, children: scrollbarLines.map((line, idx) => /* @__PURE__ */ jsx8(
1767
+ Text8,
1415
1768
  {
1416
1769
  color: line === "\u2588" ? terminalTheme.focus : terminalTheme.muted,
1417
1770
  children: line
@@ -1422,8 +1775,8 @@ var Scrollbar2 = ({
1422
1775
 
1423
1776
  // src/ui/components/ProjectSelector.tsx
1424
1777
  import { useState as useState3, useEffect as useEffect3 } from "react";
1425
- import { Box as Box6, Text as Text7, useInput as useInput2 } from "ink";
1426
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1778
+ import { Box as Box6, Text as Text9, useInput as useInput2 } from "ink";
1779
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
1427
1780
  function ProjectSelector({
1428
1781
  items,
1429
1782
  onSubmit,
@@ -1483,7 +1836,7 @@ function ProjectSelector({
1483
1836
  );
1484
1837
  const visibleItems = items.slice(windowStart, windowStart + visibleCount);
1485
1838
  if (items.length === 0) {
1486
- return /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "No projects available." });
1839
+ return /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No projects available." });
1487
1840
  }
1488
1841
  return /* @__PURE__ */ jsxs5(Box6, { flexDirection: "column", gap: 0, children: [
1489
1842
  visibleItems.map((item, idx) => {
@@ -1492,7 +1845,7 @@ function ProjectSelector({
1492
1845
  const isHighlighted = highlighted === actualIndex;
1493
1846
  const marker = isHighlighted ? ">" : isSelected ? "*" : " ";
1494
1847
  return /* @__PURE__ */ jsxs5(
1495
- Text7,
1848
+ Text9,
1496
1849
  {
1497
1850
  bold: isHighlighted || isSelected,
1498
1851
  color: isSelected ? terminalTheme.selected : isHighlighted ? terminalTheme.focus : void 0,
@@ -1506,8 +1859,8 @@ function ProjectSelector({
1506
1859
  `${actualIndex}-${item.label}`
1507
1860
  );
1508
1861
  }),
1509
- /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: multiple ? "Use arrows to navigate, Space to toggle, Enter to confirm" : "Use arrows to navigate and Enter to select" }),
1510
- items.length > visibleItems.length ? /* @__PURE__ */ jsxs5(Text7, { dimColor: true, children: [
1862
+ /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: multiple ? "Use arrows to navigate, Space to toggle, Enter to confirm" : "Use arrows to navigate and Enter to select" }),
1863
+ items.length > visibleItems.length ? /* @__PURE__ */ jsxs5(Text9, { dimColor: true, children: [
1511
1864
  "Showing ",
1512
1865
  windowStart + 1,
1513
1866
  "-",
@@ -1520,8 +1873,8 @@ function ProjectSelector({
1520
1873
 
1521
1874
  // src/ui/components/SelectPanel.tsx
1522
1875
  import React6 from "react";
1523
- import { Box as Box7, Text as Text8, useInput as useInput3 } from "ink";
1524
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1876
+ import { Box as Box7, Text as Text10, useInput as useInput3 } from "ink";
1877
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1525
1878
  function SelectPanel({
1526
1879
  title,
1527
1880
  items,
@@ -1567,14 +1920,14 @@ function SelectPanel({
1567
1920
  );
1568
1921
  const visibleItems = items.slice(windowStart, windowStart + visibleCount);
1569
1922
  return /* @__PURE__ */ jsxs6(TitledBox, { title, borderStyle: "round", borderColor: terminalTheme.focus, padding: 1, children: [
1570
- items.length === 0 ? /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: "No options available." }) : visibleItems.map((item, offset) => {
1923
+ items.length === 0 ? /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "No options available." }) : visibleItems.map((item, offset) => {
1571
1924
  const index = windowStart + offset;
1572
1925
  const isHighlighted = index === highlighted;
1573
1926
  const isSelected = index === normalizedSelectedIndex;
1574
1927
  const marker = isHighlighted ? "\u25B8" : isSelected ? "\u2022" : " ";
1575
1928
  return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", children: [
1576
1929
  /* @__PURE__ */ jsxs6(
1577
- Text8,
1930
+ Text10,
1578
1931
  {
1579
1932
  bold: isHighlighted || isSelected,
1580
1933
  color: isSelected ? terminalTheme.selected : isHighlighted ? terminalTheme.focus : void 0,
@@ -1586,13 +1939,13 @@ function SelectPanel({
1586
1939
  ]
1587
1940
  }
1588
1941
  ),
1589
- isHighlighted && item.description ? /* @__PURE__ */ jsxs6(Text8, { dimColor: true, children: [
1942
+ isHighlighted && item.description ? /* @__PURE__ */ jsxs6(Text10, { dimColor: true, children: [
1590
1943
  " ",
1591
1944
  item.description
1592
1945
  ] }) : null
1593
1946
  ] }, `${index}-${item.label}`);
1594
1947
  }),
1595
- /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: "Use Up/Down, Enter to select, Esc to cancel." })
1948
+ /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Use Up/Down, Enter to select, Esc to cancel." })
1596
1949
  ] });
1597
1950
  }
1598
1951
 
@@ -2038,114 +2391,6 @@ var isPromptTextInput = (input, key) => {
2038
2391
  return input.length > 0;
2039
2392
  };
2040
2393
 
2041
- // src/ui/layout.ts
2042
- var clamp2 = (value, min, max) => Math.min(max, Math.max(min, value));
2043
- var normalizeDimension = (value, fallback) => Number.isFinite(value) && value && value > 0 ? value : fallback;
2044
- var BANNER_ART_WIDTH = 84;
2045
- var BANNER_ART_ROWS = 6;
2046
- var BANNER_WELCOME_ROWS = 1;
2047
- var BANNER_VERSION_ROWS = 1;
2048
- var BANNER_MARGIN_BOTTOM_ROWS = 1;
2049
- var BANNER_SIDE_DETAILS_MIN_WIDTH = 42;
2050
- var estimateBannerRows = ({
2051
- columns,
2052
- detailsCount = 3
2053
- }) => {
2054
- const showArt = columns >= BANNER_ART_WIDTH;
2055
- const detailsBesideArt = showArt && detailsCount > 0 && columns >= BANNER_ART_WIDTH + BANNER_SIDE_DETAILS_MIN_WIDTH;
2056
- const detailRows = BANNER_VERSION_ROWS + detailsCount;
2057
- if (!showArt) {
2058
- return detailRows + BANNER_MARGIN_BOTTOM_ROWS;
2059
- }
2060
- if (detailsBesideArt) {
2061
- return BANNER_WELCOME_ROWS + Math.max(BANNER_ART_ROWS, detailRows) + BANNER_MARGIN_BOTTOM_ROWS;
2062
- }
2063
- return BANNER_WELCOME_ROWS + BANNER_ART_ROWS + detailRows + BANNER_MARGIN_BOTTOM_ROWS;
2064
- };
2065
- var getResponsiveTuiLayout = (size, options = {}) => {
2066
- const columns = normalizeDimension(size.columns, 100);
2067
- const rows = normalizeDimension(size.rows, 32);
2068
- const compact = columns < 96 || rows < 30;
2069
- const showBanner = !options.disableBanner;
2070
- let reservedRows = 25 + Math.max(0, Math.ceil(options.promptInputRows ?? 2) - 2) + Math.max(0, Math.ceil(options.promptSuggestionRows ?? 0));
2071
- if (showBanner) reservedRows += estimateBannerRows({ columns });
2072
- if (options.hasQueue) reservedRows += 4;
2073
- if (options.hasError) reservedRows += 4;
2074
- if (options.hasHitl) reservedRows += 7;
2075
- if (options.hasSelector) reservedRows += 8;
2076
- if (options.isSearching) reservedRows += 3;
2077
- const maxThreadHeight = compact ? 14 : 24;
2078
- const availableRows = rows - reservedRows;
2079
- return {
2080
- compact,
2081
- paddingX: compact ? 0 : 1,
2082
- selectorLimit: compact ? 6 : 8,
2083
- showBanner,
2084
- threadHeight: clamp2(availableRows, 1, maxThreadHeight)
2085
- };
2086
- };
2087
- var getMiddleViewportRows = (size, options = {}) => {
2088
- const rows = normalizeDimension(size.rows, 32);
2089
- const headerRows = Math.max(0, Math.ceil(options.headerRows ?? 0));
2090
- const footerRows = Math.max(0, Math.ceil(options.footerRows ?? 0));
2091
- const safetyRows = Math.max(0, Math.ceil(options.safetyRows ?? 2));
2092
- return Math.max(1, Math.floor(rows) - headerRows - footerRows - safetyRows);
2093
- };
2094
- var getFramedBodyRows = (frameRows, chromeRows = 4) => Math.max(1, Math.floor(frameRows) - Math.max(0, Math.ceil(chromeRows)));
2095
- var estimateWorkspaceTabBarRows = () => 2;
2096
- var estimateSelectPanelRows = (visibleLimit) => 4 + Math.max(1, Math.ceil(visibleLimit));
2097
- var getPromptInputRowBudget = (size) => {
2098
- const rows = normalizeDimension(size.rows, 32);
2099
- return clamp2(Math.floor(rows * 0.13), 4, 8);
2100
- };
2101
- var getChatResponsiveMode = (size) => {
2102
- const columns = normalizeDimension(size.columns, 100);
2103
- const rows = normalizeDimension(size.rows, 32);
2104
- if (columns >= 132 && rows >= 40) {
2105
- return "wide";
2106
- }
2107
- if (columns >= 112 && rows >= 34) {
2108
- return "medium";
2109
- }
2110
- return "narrow";
2111
- };
2112
- var shouldUseSplitChatLayout = (size) => getChatResponsiveMode(size) !== "narrow";
2113
- var getContextRailWidth = (size) => {
2114
- const mode = getChatResponsiveMode(size);
2115
- const columns = normalizeDimension(size.columns, 100);
2116
- if (mode === "wide") {
2117
- return Math.min(40, Math.max(34, Math.ceil(columns * 0.25)));
2118
- }
2119
- if (mode === "medium") {
2120
- return Math.min(30, Math.max(28, Math.ceil(columns * 0.25)));
2121
- }
2122
- return 0;
2123
- };
2124
- var estimateComposerRows = ({
2125
- inputRows,
2126
- suggestionRows,
2127
- includeControls = true,
2128
- controlRows = 0,
2129
- variant = "panel"
2130
- }) => {
2131
- const chromeRows = variant === "dock" ? 1 : 2;
2132
- const inputRowsWithHint = inputRows + 1;
2133
- const footerRows = includeControls ? controlRows : 0;
2134
- return chromeRows + Math.max(0, suggestionRows) + inputRowsWithHint + footerRows;
2135
- };
2136
- var truncateForTerminal = (value, maxLength) => {
2137
- if (maxLength <= 0) {
2138
- return "";
2139
- }
2140
- if (value.length <= maxLength) {
2141
- return value;
2142
- }
2143
- if (maxLength <= 3) {
2144
- return ".".repeat(maxLength);
2145
- }
2146
- return `${value.slice(0, maxLength - 3)}...`;
2147
- };
2148
-
2149
2394
  // src/ui/artifactChips.ts
2150
2395
  var buildChatArtifactChips = ({
2151
2396
  projectName: projectName2,
@@ -3810,7 +4055,7 @@ var loadWorkspacePanelData = async ({
3810
4055
 
3811
4056
  // src/ui/workspacePanel.tsx
3812
4057
  import React7 from "react";
3813
- import { Box as Box8, Text as Text9 } from "ink";
4058
+ import { Box as Box8, Text as Text11 } from "ink";
3814
4059
  import { plot as plotAsciiChart } from "asciichart";
3815
4060
 
3816
4061
  // src/ui/workspaceEntityDetails.ts
@@ -4006,7 +4251,7 @@ var buildConnectionDetailModel = ({
4006
4251
  };
4007
4252
 
4008
4253
  // src/ui/workspacePanel.tsx
4009
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4254
+ import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
4010
4255
  var toRecord5 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
4011
4256
  var directArray3 = (value) => {
4012
4257
  if (Array.isArray(value)) {
@@ -4156,12 +4401,12 @@ var sparkBlocks = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "
4156
4401
  var InlineSparkline = ({ values, width, tone }) => {
4157
4402
  const sampled = sampleValues(values, Math.max(4, width));
4158
4403
  if (!sampled.length) {
4159
- return /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "no trend data" });
4404
+ return /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "no trend data" });
4160
4405
  }
4161
4406
  const max = Math.max(...sampled);
4162
4407
  const min = Math.min(...sampled);
4163
4408
  const span = max - min || 1;
4164
- return /* @__PURE__ */ jsx9(Text9, { color: metricColor(tone) ?? terminalTheme.brand, children: sampled.map((value) => {
4409
+ return /* @__PURE__ */ jsx11(Text11, { color: metricColor(tone) ?? terminalTheme.brand, children: sampled.map((value) => {
4165
4410
  const index = Math.min(
4166
4411
  sparkBlocks.length - 1,
4167
4412
  Math.max(
@@ -4176,7 +4421,7 @@ var AsciiLineChart = ({ values, width, height = 4, tone }) => {
4176
4421
  const sampled = sampleValues(values, Math.max(8, width - 8));
4177
4422
  if (sampled.length < 2) {
4178
4423
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4179
- /* @__PURE__ */ jsx9(
4424
+ /* @__PURE__ */ jsx11(
4180
4425
  InlineSparkline,
4181
4426
  {
4182
4427
  values: sampled,
@@ -4184,7 +4429,7 @@ var AsciiLineChart = ({ values, width, height = 4, tone }) => {
4184
4429
  tone
4185
4430
  }
4186
4431
  ),
4187
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: " current only" })
4432
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: " current only" })
4188
4433
  ] });
4189
4434
  }
4190
4435
  const chart = plotAsciiChart(sampled, {
@@ -4193,8 +4438,8 @@ var AsciiLineChart = ({ values, width, height = 4, tone }) => {
4193
4438
  padding: " ",
4194
4439
  format: (value) => String(Math.round(value)).padStart(3, " ").slice(-3)
4195
4440
  });
4196
- return /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: chart.split("\n").map((line, index) => /* @__PURE__ */ jsx9(
4197
- Text9,
4441
+ return /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", children: chart.split("\n").map((line, index) => /* @__PURE__ */ jsx11(
4442
+ Text11,
4198
4443
  {
4199
4444
  color: metricColor(tone) ?? terminalTheme.brand,
4200
4445
  wrap: "truncate",
@@ -4256,28 +4501,28 @@ var rowDetail = (value) => {
4256
4501
  };
4257
4502
  var Bar = ({ value, width = 28, tone }) => {
4258
4503
  if (value === void 0) {
4259
- return /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "-".repeat(Math.min(width, 28)) });
4504
+ return /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "-".repeat(Math.min(width, 28)) });
4260
4505
  }
4261
4506
  const ratio = Math.max(0, Math.min(1, value));
4262
4507
  const filled = Math.round(ratio * width);
4263
4508
  if (filled <= 0) {
4264
- return /* @__PURE__ */ jsx9(Text9, { children: " ".repeat(width) });
4509
+ return /* @__PURE__ */ jsx11(Text11, { children: " ".repeat(width) });
4265
4510
  }
4266
- return /* @__PURE__ */ jsxs7(Text9, { color: metricColor(tone) ?? terminalTheme.brand, children: [
4511
+ return /* @__PURE__ */ jsxs7(Text11, { color: metricColor(tone) ?? terminalTheme.brand, children: [
4267
4512
  "\u2588".repeat(filled),
4268
4513
  " ".repeat(width - filled)
4269
4514
  ] });
4270
4515
  };
4271
4516
  var BarList = ({ bars, width, emptyLabel, labelWidth = 18 }) => {
4272
4517
  const barWidth = Math.max(12, Math.min(32, width));
4273
- return /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: bars.length ? bars.slice(0, 6).map((bar) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4274
- /* @__PURE__ */ jsx9(Box8, { width: labelWidth, children: /* @__PURE__ */ jsx9(Text9, { wrap: "truncate", children: truncateForTerminal(normalizeLabel(bar.label), labelWidth - 2) }) }),
4275
- /* @__PURE__ */ jsx9(Bar, { value: bar.ratio, width: barWidth, tone: bar.tone }),
4276
- /* @__PURE__ */ jsxs7(Text9, { color: metricColor(bar.tone), children: [
4518
+ return /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", children: bars.length ? bars.slice(0, 6).map((bar) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4519
+ /* @__PURE__ */ jsx11(Box8, { width: labelWidth, children: /* @__PURE__ */ jsx11(Text11, { wrap: "truncate", children: truncateForTerminal(normalizeLabel(bar.label), labelWidth - 2) }) }),
4520
+ /* @__PURE__ */ jsx11(Bar, { value: bar.ratio, width: barWidth, tone: bar.tone }),
4521
+ /* @__PURE__ */ jsxs7(Text11, { color: metricColor(bar.tone), children: [
4277
4522
  " ",
4278
4523
  chartValue(bar.value)
4279
4524
  ] })
4280
- ] }, bar.label)) : /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: emptyLabel }) });
4525
+ ] }, bar.label)) : /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: emptyLabel }) });
4281
4526
  };
4282
4527
  var TrendSummary = ({
4283
4528
  trend,
@@ -4288,14 +4533,14 @@ var TrendSummary = ({
4288
4533
  const icon = trend.delta === void 0 ? "\u2022" : trend.delta > 0 ? "\u2191" : trend.delta < 0 ? "\u2193" : "\u2192";
4289
4534
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4290
4535
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4291
- /* @__PURE__ */ jsx9(Box8, { width: labelWidth, children: /* @__PURE__ */ jsx9(Text9, { bold: true, wrap: "truncate", children: truncateForTerminal(trend.label, labelWidth - 1) }) }),
4292
- /* @__PURE__ */ jsxs7(Text9, { color: metricColor(trend.tone), children: [
4536
+ /* @__PURE__ */ jsx11(Box8, { width: labelWidth, children: /* @__PURE__ */ jsx11(Text11, { bold: true, wrap: "truncate", children: truncateForTerminal(trend.label, labelWidth - 1) }) }),
4537
+ /* @__PURE__ */ jsxs7(Text11, { color: metricColor(trend.tone), children: [
4293
4538
  icon,
4294
4539
  " ",
4295
4540
  trend.summary
4296
4541
  ] })
4297
4542
  ] }),
4298
- /* @__PURE__ */ jsx9(
4543
+ /* @__PURE__ */ jsx11(
4299
4544
  AsciiLineChart,
4300
4545
  {
4301
4546
  values: trend.values,
@@ -4306,7 +4551,7 @@ var TrendSummary = ({
4306
4551
  )
4307
4552
  ] });
4308
4553
  };
4309
- var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */ jsx9(
4554
+ var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */ jsx11(
4310
4555
  TitledBox,
4311
4556
  {
4312
4557
  title,
@@ -4314,16 +4559,16 @@ var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */ jsx9(
4314
4559
  borderColor: borderColor ?? terminalTheme.muted,
4315
4560
  padding: 0,
4316
4561
  paddingX: 1,
4317
- children: /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", marginTop: 1, children })
4562
+ children: /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", marginTop: 1, children })
4318
4563
  }
4319
4564
  );
4320
4565
  var CreditProgress = ({ remaining, total, width = 12, tone }) => {
4321
4566
  const ratio = total > 0 ? Math.min(1, Math.max(0, remaining / total)) : 0;
4322
4567
  const safeWidth = Math.max(6, width);
4323
4568
  const filled = Math.round(ratio * safeWidth);
4324
- return /* @__PURE__ */ jsxs7(Text9, { children: [
4569
+ return /* @__PURE__ */ jsxs7(Text11, { children: [
4325
4570
  "[",
4326
- /* @__PURE__ */ jsx9(Text9, { color: billingToneColor(tone), children: "\u2588".repeat(filled) }),
4571
+ /* @__PURE__ */ jsx11(Text11, { color: billingToneColor(tone), children: "\u2588".repeat(filled) }),
4327
4572
  " ".repeat(safeWidth - filled),
4328
4573
  "] ",
4329
4574
  Math.round(ratio * 100),
@@ -4333,18 +4578,18 @@ var CreditProgress = ({ remaining, total, width = 12, tone }) => {
4333
4578
  var BillingSummaryLine = ({
4334
4579
  billing
4335
4580
  }) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", flexWrap: "wrap", columnGap: 1, children: [
4336
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4581
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4337
4582
  "Plan: ",
4338
- /* @__PURE__ */ jsx9(Text9, { children: billing.plan })
4583
+ /* @__PURE__ */ jsx11(Text11, { children: billing.plan })
4339
4584
  ] }),
4340
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4585
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4341
4586
  "Credits:",
4342
4587
  " ",
4343
- /* @__PURE__ */ jsx9(Text9, { color: billingToneColor(billing.tone), children: Math.max(Number(billing.reportedUsed ?? billing.used ?? 0), 0) > 0 ? `${formatCredits(billing.remaining)} left | Used ${formatCredits(
4588
+ /* @__PURE__ */ jsx11(Text11, { color: billingToneColor(billing.tone), children: Math.max(Number(billing.reportedUsed ?? billing.used ?? 0), 0) > 0 ? `${formatCredits(billing.remaining)} left | Used ${formatCredits(
4344
4589
  Math.max(Number(billing.reportedUsed ?? billing.used ?? 0), 0)
4345
4590
  )}` : `${formatCredits(billing.remaining)}/${formatCredits(billing.total)}` })
4346
4591
  ] }),
4347
- /* @__PURE__ */ jsx9(
4592
+ /* @__PURE__ */ jsx11(
4348
4593
  CreditProgress,
4349
4594
  {
4350
4595
  remaining: billing.remaining,
@@ -4353,18 +4598,18 @@ var BillingSummaryLine = ({
4353
4598
  tone: billing.tone
4354
4599
  }
4355
4600
  ),
4356
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "O opens billing" })
4601
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "O opens billing" })
4357
4602
  ] });
4358
4603
  var MetricStrip = ({
4359
4604
  metrics,
4360
4605
  compact
4361
- }) => /* @__PURE__ */ jsx9(Box8, { flexDirection: compact ? "column" : "row", gap: 1, flexWrap: "wrap", children: metrics.map((metric) => {
4606
+ }) => /* @__PURE__ */ jsx11(Box8, { flexDirection: compact ? "column" : "row", gap: 1, flexWrap: "wrap", children: metrics.map((metric) => {
4362
4607
  const width = Math.max(
4363
4608
  metric.label.length + 8,
4364
4609
  metric.value.length + 6,
4365
4610
  compact ? 0 : 17
4366
4611
  );
4367
- return /* @__PURE__ */ jsx9(
4612
+ return /* @__PURE__ */ jsx11(
4368
4613
  TitledBox,
4369
4614
  {
4370
4615
  title: metric.label,
@@ -4375,7 +4620,7 @@ var MetricStrip = ({
4375
4620
  paddingX: 1,
4376
4621
  width,
4377
4622
  flexShrink: 0,
4378
- children: /* @__PURE__ */ jsx9(Text9, { bold: true, color: metricColor(metric.tone), wrap: "truncate", children: metric.value })
4623
+ children: /* @__PURE__ */ jsx11(Text11, { bold: true, color: metricColor(metric.tone), wrap: "truncate", children: metric.value })
4379
4624
  },
4380
4625
  metric.label
4381
4626
  );
@@ -4393,15 +4638,15 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
4393
4638
  const narrow = terminalColumns < 76;
4394
4639
  if (narrow) {
4395
4640
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4396
- visibleRows.map((row, index) => /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", marginBottom: 1, children: columns.map((column) => /* @__PURE__ */ jsxs7(Text9, { wrap: "truncate", children: [
4397
- /* @__PURE__ */ jsxs7(Text9, { color: terminalTheme.muted, children: [
4641
+ visibleRows.map((row, index) => /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", marginBottom: 1, children: columns.map((column) => /* @__PURE__ */ jsxs7(Text11, { wrap: "truncate", children: [
4642
+ /* @__PURE__ */ jsxs7(Text11, { color: terminalTheme.muted, children: [
4398
4643
  column,
4399
4644
  ": "
4400
4645
  ] }),
4401
4646
  String(row[column] ?? "")
4402
4647
  ] }, column)) }, index)),
4403
4648
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", justifyContent: "space-between", children: [
4404
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4649
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4405
4650
  "rows ",
4406
4651
  startIndex + 1,
4407
4652
  "-",
@@ -4410,7 +4655,7 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
4410
4655
  " ",
4411
4656
  rows.length
4412
4657
  ] }),
4413
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "[ prev | ] next | D download" })
4658
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "[ prev | ] next | D download" })
4414
4659
  ] })
4415
4660
  ] });
4416
4661
  }
@@ -4434,11 +4679,11 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
4434
4679
  return Math.max(min, scaled);
4435
4680
  });
4436
4681
  const columnWidth = (column) => widths[columns.indexOf(column)] ?? 10;
4437
- const renderRow = (row, key, heading = false) => /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", children: columns.map((column) => {
4682
+ const renderRow = (row, key, heading = false) => /* @__PURE__ */ jsx11(Box8, { flexDirection: "row", children: columns.map((column) => {
4438
4683
  const width = columnWidth(column);
4439
4684
  const value = heading ? column : String(row[column] ?? "");
4440
- return /* @__PURE__ */ jsx9(Box8, { width, marginRight: 1, children: /* @__PURE__ */ jsx9(
4441
- Text9,
4685
+ return /* @__PURE__ */ jsx11(Box8, { width, marginRight: 1, children: /* @__PURE__ */ jsx11(
4686
+ Text11,
4442
4687
  {
4443
4688
  bold: heading,
4444
4689
  color: heading ? terminalTheme.brand : void 0,
@@ -4449,20 +4694,20 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
4449
4694
  }) }, key);
4450
4695
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4451
4696
  renderRow({}, "header", true),
4452
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: truncateForTerminal("\u2500".repeat(availableWidth), availableWidth) }),
4697
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: truncateForTerminal("\u2500".repeat(availableWidth), availableWidth) }),
4453
4698
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4454
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", flexGrow: 1, children: visibleRows.map((row, index) => renderRow(row, String(index))) }),
4699
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", flexGrow: 1, children: visibleRows.map((row, index) => renderRow(row, String(index))) }),
4455
4700
  hiddenCount > 0 ? /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", marginLeft: 1, children: [
4456
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "\u2503" }),
4701
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "\u2503" }),
4457
4702
  Array.from(
4458
4703
  { length: Math.max(1, visibleRows.length - 2) },
4459
- (_, index) => /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "\u2502" }, index)
4704
+ (_, index) => /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "\u2502" }, index)
4460
4705
  ),
4461
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "\u2575" })
4706
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "\u2575" })
4462
4707
  ] }) : null
4463
4708
  ] }),
4464
4709
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", justifyContent: "space-between", children: [
4465
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4710
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4466
4711
  "rows ",
4467
4712
  startIndex + 1,
4468
4713
  "-",
@@ -4471,7 +4716,7 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
4471
4716
  " ",
4472
4717
  rows.length
4473
4718
  ] }),
4474
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4719
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4475
4720
  "page ",
4476
4721
  safePage + 1,
4477
4722
  "/",
@@ -4497,10 +4742,10 @@ var HelpLegend = ({
4497
4742
  { key: "D", label: "download", color: terminalTheme.success },
4498
4743
  ...includeQuit ? [{ key: "Ctrl+Q", label: "quit", color: terminalTheme.danger }] : []
4499
4744
  ];
4500
- return /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", flexWrap: wrap ? "wrap" : "nowrap", columnGap: 1, children: segments.map((segment, index) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4501
- index > 0 ? /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "| " }) : null,
4502
- /* @__PURE__ */ jsx9(Text9, { bold: true, color: segment.color, children: segment.key }),
4503
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4745
+ return /* @__PURE__ */ jsx11(Box8, { flexDirection: "row", flexWrap: wrap ? "wrap" : "nowrap", columnGap: 1, children: segments.map((segment, index) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4746
+ index > 0 ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "| " }) : null,
4747
+ /* @__PURE__ */ jsx11(Text11, { bold: true, color: segment.color, children: segment.key }),
4748
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4504
4749
  " ",
4505
4750
  segment.label
4506
4751
  ] })
@@ -4509,16 +4754,16 @@ var HelpLegend = ({
4509
4754
  var ResourceSummary = ({ label, value, terminalColumns }) => {
4510
4755
  const rows = directArray3(value);
4511
4756
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4512
- /* @__PURE__ */ jsx9(Text9, { bold: true, children: label }),
4513
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "wrap", children: rows.length ? `${rows.length} row(s) returned` : `keys: ${truncateForTerminal(keySummary(value), Math.max(32, terminalColumns - 14))}` }),
4514
- rows.slice(0, 5).map((row, index) => /* @__PURE__ */ jsxs7(Text9, { wrap: "truncate", children: [
4757
+ /* @__PURE__ */ jsx11(Text11, { bold: true, children: label }),
4758
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "wrap", children: rows.length ? `${rows.length} row(s) returned` : `keys: ${truncateForTerminal(keySummary(value), Math.max(32, terminalColumns - 14))}` }),
4759
+ rows.slice(0, 5).map((row, index) => /* @__PURE__ */ jsxs7(Text11, { wrap: "truncate", children: [
4515
4760
  index + 1,
4516
4761
  ".",
4517
4762
  " ",
4518
4763
  truncateForTerminal(rowLabel(row, `row ${index + 1}`), 36),
4519
4764
  rowDetail(row) ? ` - ${truncateForTerminal(rowDetail(row), 64)}` : ""
4520
4765
  ] }, `${label}-${index}`)),
4521
- !rows.length && !toRecord5(value) ? /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No data returned." }) : null
4766
+ !rows.length && !toRecord5(value) ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No data returned." }) : null
4522
4767
  ] });
4523
4768
  };
4524
4769
  var cleanBackendWarning = (warning, terminalColumns) => {
@@ -4540,29 +4785,29 @@ var entityToneColor = (tone) => {
4540
4785
  };
4541
4786
  var EntityDetailPanel = ({ model, emptyLabel, compact, terminalColumns }) => {
4542
4787
  if (!model) {
4543
- return /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: emptyLabel });
4788
+ return /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: emptyLabel });
4544
4789
  }
4545
- return /* @__PURE__ */ jsx9(SectionCard, { title: "Selected detail", borderColor: terminalTheme.focus, children: /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4790
+ return /* @__PURE__ */ jsx11(SectionCard, { title: "Selected detail", borderColor: terminalTheme.focus, children: /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4546
4791
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", justifyContent: "space-between", gap: 1, children: [
4547
4792
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexShrink: 1, children: [
4548
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.focus, bold: true, wrap: "truncate", children: truncateForTerminal(model.title, Math.max(24, terminalColumns - 32)) }),
4549
- model.subtitle ? /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "truncate", children: model.subtitle }) : null
4793
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.focus, bold: true, wrap: "truncate", children: truncateForTerminal(model.title, Math.max(24, terminalColumns - 32)) }),
4794
+ model.subtitle ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "truncate", children: model.subtitle }) : null
4550
4795
  ] }),
4551
- /* @__PURE__ */ jsx9(MetricStrip, { metrics: model.metrics, compact })
4796
+ /* @__PURE__ */ jsx11(MetricStrip, { metrics: model.metrics, compact })
4552
4797
  ] }),
4553
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: model.detailRows.map((row) => /* @__PURE__ */ jsxs7(Text9, { wrap: "truncate", children: [
4554
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4798
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", children: model.detailRows.map((row) => /* @__PURE__ */ jsxs7(Text11, { wrap: "truncate", children: [
4799
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4555
4800
  row.label.padEnd(16),
4556
4801
  " "
4557
4802
  ] }),
4558
- /* @__PURE__ */ jsx9(Text9, { color: entityToneColor(row.tone), children: truncateForTerminal(row.value || "-", Math.max(20, terminalColumns - 24)) })
4803
+ /* @__PURE__ */ jsx11(Text11, { color: entityToneColor(row.tone), children: truncateForTerminal(row.value || "-", Math.max(20, terminalColumns - 24)) })
4559
4804
  ] }, `${row.label}-${row.value}`)) }),
4560
4805
  model.relatedItems.length ? /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4561
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "Linked" }),
4562
- model.relatedItems.slice(0, 5).map((item, index) => /* @__PURE__ */ jsxs7(Text9, { wrap: "truncate", children: [
4563
- /* @__PURE__ */ jsx9(Text9, { color: entityToneColor(item.tone), children: "\u25CF " }),
4806
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "Linked" }),
4807
+ model.relatedItems.slice(0, 5).map((item, index) => /* @__PURE__ */ jsxs7(Text11, { wrap: "truncate", children: [
4808
+ /* @__PURE__ */ jsx11(Text11, { color: entityToneColor(item.tone), children: "\u25CF " }),
4564
4809
  truncateForTerminal(item.label, 36),
4565
- item.detail ? /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4810
+ item.detail ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4566
4811
  " - ",
4567
4812
  truncateForTerminal(item.detail, 36)
4568
4813
  ] }) : null
@@ -4577,7 +4822,7 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
4577
4822
  reportsSummary
4578
4823
  });
4579
4824
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4580
- /* @__PURE__ */ jsx9(
4825
+ /* @__PURE__ */ jsx11(
4581
4826
  MetricStrip,
4582
4827
  {
4583
4828
  compact,
@@ -4587,14 +4832,14 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
4587
4832
  ]
4588
4833
  }
4589
4834
  ),
4590
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "J/K or Up/Down selects project | Enter confirms | O opens frontend" }),
4835
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "J/K or Up/Down selects project | Enter confirms | O opens frontend" }),
4591
4836
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", gap: 2, children: [
4592
4837
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexBasis: compact ? void 0 : 52, flexShrink: 0, children: [
4593
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "Project list" }),
4838
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "Project list" }),
4594
4839
  projects.length ? projects.slice(0, 12).map((project, index) => {
4595
4840
  const active = project.id === (selectedProject ?? projects[0])?.id;
4596
4841
  return /* @__PURE__ */ jsxs7(
4597
- Text9,
4842
+ Text11,
4598
4843
  {
4599
4844
  color: active ? terminalTheme.focus : void 0,
4600
4845
  backgroundColor: active ? terminalTheme.selectedBackground : void 0,
@@ -4605,16 +4850,16 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
4605
4850
  " ",
4606
4851
  truncateForTerminal(project.name, 30),
4607
4852
  " ",
4608
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: project.cloud_provider ?? "cloud" }),
4853
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: project.cloud_provider ?? "cloud" }),
4609
4854
  " ",
4610
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: project.id })
4855
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: project.id })
4611
4856
  ]
4612
4857
  },
4613
4858
  project.id ?? index
4614
4859
  );
4615
- }) : /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No projects returned by the backend." })
4860
+ }) : /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No projects returned by the backend." })
4616
4861
  ] }),
4617
- /* @__PURE__ */ jsx9(Box8, { flexGrow: 1, children: /* @__PURE__ */ jsx9(
4862
+ /* @__PURE__ */ jsx11(Box8, { flexGrow: 1, children: /* @__PURE__ */ jsx11(
4618
4863
  EntityDetailPanel,
4619
4864
  {
4620
4865
  model: selectedModel,
@@ -4634,21 +4879,21 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
4634
4879
  projects
4635
4880
  });
4636
4881
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4637
- /* @__PURE__ */ jsx9(
4882
+ /* @__PURE__ */ jsx11(
4638
4883
  MetricStrip,
4639
4884
  {
4640
4885
  compact,
4641
4886
  metrics: [{ label: "Connections", value: String(connections.length) }]
4642
4887
  }
4643
4888
  ),
4644
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "J/K or Up/Down selects connection | Enter confirms | O opens frontend | D downloads table data" }),
4889
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "J/K or Up/Down selects connection | Enter confirms | O opens frontend | D downloads table data" }),
4645
4890
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", gap: 2, children: [
4646
4891
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexBasis: compact ? void 0 : 58, flexShrink: 0, children: [
4647
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "Connection list" }),
4892
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "Connection list" }),
4648
4893
  connections.length ? connections.slice(0, 12).map((connection, index) => {
4649
4894
  const active = index === safeIndex;
4650
4895
  return /* @__PURE__ */ jsxs7(
4651
- Text9,
4896
+ Text11,
4652
4897
  {
4653
4898
  color: active ? terminalTheme.focus : void 0,
4654
4899
  backgroundColor: active ? terminalTheme.selectedBackground : void 0,
@@ -4660,7 +4905,7 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
4660
4905
  String(index + 1).padStart(2),
4661
4906
  " ",
4662
4907
  truncateForTerminal(rowLabel(connection, "connection"), 34),
4663
- rowDetail(connection) ? /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4908
+ rowDetail(connection) ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4664
4909
  " - ",
4665
4910
  truncateForTerminal(rowDetail(connection), 28)
4666
4911
  ] }) : ""
@@ -4668,9 +4913,9 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
4668
4913
  },
4669
4914
  String(firstString5(connection, ["id"], String(index)))
4670
4915
  );
4671
- }) : /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No connections returned by the backend." })
4916
+ }) : /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No connections returned by the backend." })
4672
4917
  ] }),
4673
- /* @__PURE__ */ jsx9(Box8, { flexGrow: 1, children: /* @__PURE__ */ jsx9(
4918
+ /* @__PURE__ */ jsx11(Box8, { flexGrow: 1, children: /* @__PURE__ */ jsx11(
4674
4919
  EntityDetailPanel,
4675
4920
  {
4676
4921
  model: selectedModel,
@@ -4725,10 +4970,10 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4725
4970
  }
4726
4971
  ];
4727
4972
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4728
- /* @__PURE__ */ jsx9(MetricStrip, { metrics, compact }),
4973
+ /* @__PURE__ */ jsx11(MetricStrip, { metrics, compact }),
4729
4974
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", gap: 1, children: [
4730
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Credit balance" }),
4731
- remaining !== void 0 && total !== void 0 ? /* @__PURE__ */ jsx9(
4975
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Credit balance" }),
4976
+ remaining !== void 0 && total !== void 0 ? /* @__PURE__ */ jsx11(
4732
4977
  CreditProgress,
4733
4978
  {
4734
4979
  remaining,
@@ -4737,17 +4982,17 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4737
4982
  tone: creditTone
4738
4983
  }
4739
4984
  ) : /* @__PURE__ */ jsxs7(Fragment2, { children: [
4740
- /* @__PURE__ */ jsx9(Bar, { value: remainingRatio, tone }),
4741
- /* @__PURE__ */ jsx9(Text9, { children: formatPercent(remainingRatio) })
4985
+ /* @__PURE__ */ jsx11(Bar, { value: remainingRatio, tone }),
4986
+ /* @__PURE__ */ jsx11(Text11, { children: formatPercent(remainingRatio) })
4742
4987
  ] })
4743
4988
  ] }),
4744
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, wrap: "wrap", children: [
4989
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, wrap: "wrap", children: [
4745
4990
  "Subscribe: ",
4746
4991
  plansUrl,
4747
4992
  " | Top up: ",
4748
4993
  topUpUrl
4749
4994
  ] }),
4750
- /* @__PURE__ */ jsx9(SectionCard, { title: "Usage trend", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsx9(
4995
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Usage trend", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsx11(
4751
4996
  AsciiLineChart,
4752
4997
  {
4753
4998
  values: usageValues,
@@ -4756,7 +5001,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4756
5001
  tone: "normal"
4757
5002
  }
4758
5003
  ) }),
4759
- /* @__PURE__ */ jsx9(
5004
+ /* @__PURE__ */ jsx11(
4760
5005
  ResourceSummary,
4761
5006
  {
4762
5007
  label: "Recent ledger",
@@ -4764,7 +5009,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4764
5009
  terminalColumns
4765
5010
  }
4766
5011
  ),
4767
- /* @__PURE__ */ jsx9(
5012
+ /* @__PURE__ */ jsx11(
4768
5013
  ResourceSummary,
4769
5014
  {
4770
5015
  label: "Invoices",
@@ -4772,7 +5017,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4772
5017
  terminalColumns
4773
5018
  }
4774
5019
  ),
4775
- /* @__PURE__ */ jsx9(
5020
+ /* @__PURE__ */ jsx11(
4776
5021
  ResourceSummary,
4777
5022
  {
4778
5023
  label: "Top-ups",
@@ -4780,7 +5025,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
4780
5025
  terminalColumns
4781
5026
  }
4782
5027
  ),
4783
- /* @__PURE__ */ jsx9(
5028
+ /* @__PURE__ */ jsx11(
4784
5029
  ResourceSummary,
4785
5030
  {
4786
5031
  label: "Notifications",
@@ -4825,13 +5070,13 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
4825
5070
  const startIndex = safePage * maxRows;
4826
5071
  const visibleRows = rows.slice(startIndex, startIndex + maxRows);
4827
5072
  if (!visibleRows.length) {
4828
- return /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No project report status data returned." });
5073
+ return /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No project report status data returned." });
4829
5074
  }
4830
5075
  const statusCell = (status, width) => {
4831
5076
  const label = compactStatusLabel(status);
4832
5077
  return /* @__PURE__ */ jsxs7(Box8, { width, children: [
4833
- /* @__PURE__ */ jsx9(Text9, { color: statusHeatColor(status), children: "\u25CF " }),
4834
- /* @__PURE__ */ jsx9(Text9, { wrap: "truncate", children: truncateForTerminal(label, Math.max(4, width - 2)) })
5078
+ /* @__PURE__ */ jsx11(Text11, { color: statusHeatColor(status), children: "\u25CF " }),
5079
+ /* @__PURE__ */ jsx11(Text11, { wrap: "truncate", children: truncateForTerminal(label, Math.max(4, width - 2)) })
4835
5080
  ] });
4836
5081
  };
4837
5082
  const nameWidth = Math.max(
@@ -4846,27 +5091,27 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
4846
5091
  { key: "freshness", label: "Freshness" }
4847
5092
  ];
4848
5093
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4849
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "wrap", children: "Each row shows whether the selected project has generated report artifacts and whether they are current." }),
4850
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
4851
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.success, children: "\u25CF ready" }),
4852
- /* @__PURE__ */ jsx9(Text9, { children: " " }),
4853
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.warning, children: "\u25CF running/partial/stale" }),
4854
- /* @__PURE__ */ jsx9(Text9, { children: " " }),
4855
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.danger, children: "\u25CF failed/missing/outdated" })
5094
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "wrap", children: "Each row shows whether the selected project has generated report artifacts and whether they are current." }),
5095
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
5096
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.success, children: "\u25CF ready" }),
5097
+ /* @__PURE__ */ jsx11(Text11, { children: " " }),
5098
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.warning, children: "\u25CF running/partial/stale" }),
5099
+ /* @__PURE__ */ jsx11(Text11, { children: " " }),
5100
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.danger, children: "\u25CF failed/missing/outdated" })
4856
5101
  ] }),
4857
5102
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4858
- /* @__PURE__ */ jsx9(Box8, { width: nameWidth, children: /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, bold: true, children: "Project" }) }),
4859
- columns.map((column) => /* @__PURE__ */ jsx9(Box8, { width: statusWidth, children: /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, bold: true, children: column.label }) }, column.key)),
4860
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, bold: true, children: "Critical issues" })
5103
+ /* @__PURE__ */ jsx11(Box8, { width: nameWidth, children: /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, bold: true, children: "Project" }) }),
5104
+ columns.map((column) => /* @__PURE__ */ jsx11(Box8, { width: statusWidth, children: /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, bold: true, children: column.label }) }, column.key)),
5105
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, bold: true, children: "Critical issues" })
4861
5106
  ] }),
4862
5107
  visibleRows.map((row) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", children: [
4863
- /* @__PURE__ */ jsx9(Box8, { width: nameWidth, children: /* @__PURE__ */ jsx9(Text9, { wrap: "truncate", children: row.projectName }) }),
5108
+ /* @__PURE__ */ jsx11(Box8, { width: nameWidth, children: /* @__PURE__ */ jsx11(Text11, { wrap: "truncate", children: row.projectName }) }),
4864
5109
  columns.map((column) => {
4865
5110
  const status = row[column.key];
4866
- return /* @__PURE__ */ jsx9(React7.Fragment, { children: statusCell(status, statusWidth) }, column.key);
5111
+ return /* @__PURE__ */ jsx11(React7.Fragment, { children: statusCell(status, statusWidth) }, column.key);
4867
5112
  }),
4868
- /* @__PURE__ */ jsx9(
4869
- Text9,
5113
+ /* @__PURE__ */ jsx11(
5114
+ Text11,
4870
5115
  {
4871
5116
  color: row.criticalIssues ? terminalTheme.danger : terminalTheme.success,
4872
5117
  children: row.criticalIssues
@@ -4874,7 +5119,7 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
4874
5119
  )
4875
5120
  ] }, row.projectId)),
4876
5121
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", justifyContent: "space-between", children: [
4877
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5122
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4878
5123
  "rows ",
4879
5124
  startIndex + 1,
4880
5125
  "-",
@@ -4883,7 +5128,7 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
4883
5128
  " ",
4884
5129
  rows.length
4885
5130
  ] }),
4886
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5131
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
4887
5132
  "page ",
4888
5133
  safePage + 1,
4889
5134
  "/",
@@ -4894,23 +5139,23 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
4894
5139
  ] });
4895
5140
  };
4896
5141
  var ReportRunActions = ({ compact }) => /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4897
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "wrap", children: "Run report generation directly through backend report APIs using the selected project context." }),
4898
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", gap: 1, flexWrap: "wrap", children: [
5142
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "wrap", children: "Run report generation directly through backend report APIs using the selected project context." }),
5143
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "row", gap: 1, flexWrap: "wrap", children: [
4899
5144
  ["W", "Well-Architected"],
4900
5145
  ["K", "Cost"],
4901
5146
  ["U", "Unit tests"],
4902
5147
  ["A", "All reports"],
4903
5148
  ["O", "Open frontend"]
4904
- ].map(([keyName, label]) => /* @__PURE__ */ jsx9(
5149
+ ].map(([keyName, label]) => /* @__PURE__ */ jsx11(
4905
5150
  Box8,
4906
5151
  {
4907
5152
  borderStyle: raisedButtonStyle.border,
4908
5153
  borderColor: terminalTheme.muted,
4909
5154
  paddingX: 1,
4910
5155
  minWidth: compact ? void 0 : 18,
4911
- children: /* @__PURE__ */ jsxs7(Text9, { children: [
4912
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, bold: true, children: keyName }),
4913
- /* @__PURE__ */ jsxs7(Text9, { children: [
5156
+ children: /* @__PURE__ */ jsxs7(Text11, { children: [
5157
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, bold: true, children: keyName }),
5158
+ /* @__PURE__ */ jsxs7(Text11, { children: [
4914
5159
  " ",
4915
5160
  label
4916
5161
  ] })
@@ -4919,14 +5164,14 @@ var ReportRunActions = ({ compact }) => /* @__PURE__ */ jsxs7(Box8, { flexDirect
4919
5164
  keyName
4920
5165
  )) })
4921
5166
  ] });
4922
- var ProjectDropdownButton = ({ projectName: projectName2, compact }) => /* @__PURE__ */ jsx9(
5167
+ var ProjectDropdownButton = ({ projectName: projectName2, compact }) => /* @__PURE__ */ jsx11(
4923
5168
  Box8,
4924
5169
  {
4925
5170
  borderStyle: raisedButtonStyle.border,
4926
5171
  borderColor: terminalTheme.brand,
4927
5172
  paddingX: 1,
4928
5173
  minWidth: compact ? void 0 : 28,
4929
- children: /* @__PURE__ */ jsxs7(Text9, { color: terminalTheme.brand, bold: true, wrap: "truncate", children: [
5174
+ children: /* @__PURE__ */ jsxs7(Text11, { color: terminalTheme.brand, bold: true, wrap: "truncate", children: [
4930
5175
  raisedButtonStyle.activeMarker,
4931
5176
  " Project [",
4932
5177
  truncateForTerminal(projectName2, compact ? 28 : 36),
@@ -4963,31 +5208,31 @@ var ReportsView = ({
4963
5208
  gap: 1,
4964
5209
  children: [
4965
5210
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexShrink: 1, children: [
4966
- /* @__PURE__ */ jsx9(Text9, { bold: true, children: "Reports home" }),
4967
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "wrap", children: "Portfolio summary, score signals, report health, and selected project drilldown." })
5211
+ /* @__PURE__ */ jsx11(Text11, { bold: true, children: "Reports home" }),
5212
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "wrap", children: "Portfolio summary, score signals, report health, and selected project drilldown." })
4968
5213
  ] }),
4969
5214
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
4970
- /* @__PURE__ */ jsx9(
5215
+ /* @__PURE__ */ jsx11(
4971
5216
  ProjectDropdownButton,
4972
5217
  {
4973
5218
  projectName: selectedProject?.name ?? selectedSummary.projectName,
4974
5219
  compact
4975
5220
  }
4976
5221
  ),
4977
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Press P or Enter to choose project" })
5222
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Press P or Enter to choose project" })
4978
5223
  ] })
4979
5224
  ]
4980
5225
  }
4981
5226
  ),
4982
- !hasReportData ? /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "No report summary returned yet. Generate a report or refresh this tab." }) : null,
4983
- /* @__PURE__ */ jsx9(MetricStrip, { metrics: model.metrics, compact }),
4984
- /* @__PURE__ */ jsx9(SectionCard, { title: "Report sections", children: /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
4985
- /* @__PURE__ */ jsx9(Box8, { flexDirection: compact ? "column" : "row", gap: 1, children: model.reportTabs.map((tab) => /* @__PURE__ */ jsxs7(Text9, { color: tab.selected ? "cyan" : void 0, children: [
5227
+ !hasReportData ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No report summary returned yet. Generate a report or refresh this tab." }) : null,
5228
+ /* @__PURE__ */ jsx11(MetricStrip, { metrics: model.metrics, compact }),
5229
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Report sections", children: /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
5230
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: compact ? "column" : "row", gap: 1, children: model.reportTabs.map((tab) => /* @__PURE__ */ jsxs7(Text11, { color: tab.selected ? "cyan" : void 0, children: [
4986
5231
  tab.selected ? ">" : "-",
4987
5232
  " ",
4988
5233
  tab.label
4989
5234
  ] }, tab.id)) }),
4990
- /* @__PURE__ */ jsx9(
5235
+ /* @__PURE__ */ jsx11(
4991
5236
  ResponsiveTable,
4992
5237
  {
4993
5238
  terminalColumns,
@@ -5001,8 +5246,8 @@ var ReportsView = ({
5001
5246
  }
5002
5247
  )
5003
5248
  ] }) }),
5004
- /* @__PURE__ */ jsx9(SectionCard, { title: "Run reports", children: /* @__PURE__ */ jsx9(ReportRunActions, { compact }) }),
5005
- /* @__PURE__ */ jsx9(SectionCard, { title: "Project report status", children: /* @__PURE__ */ jsx9(
5249
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Run reports", children: /* @__PURE__ */ jsx11(ReportRunActions, { compact }) }),
5250
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Project report status", children: /* @__PURE__ */ jsx11(
5006
5251
  ReportsHeatmap,
5007
5252
  {
5008
5253
  rows: model.projectRows,
@@ -5014,8 +5259,8 @@ var ReportsView = ({
5014
5259
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
5015
5260
  /* @__PURE__ */ jsxs7(SectionCard, { title: "Portfolio coverage", children: [
5016
5261
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", gap: 1, children: [
5017
- /* @__PURE__ */ jsx9(Text9, { wrap: "truncate", children: model.coverageLabel }),
5018
- /* @__PURE__ */ jsx9(
5262
+ /* @__PURE__ */ jsx11(Text11, { wrap: "truncate", children: model.coverageLabel }),
5263
+ /* @__PURE__ */ jsx11(
5019
5264
  Bar,
5020
5265
  {
5021
5266
  value: model.coverageRatio,
@@ -5023,11 +5268,11 @@ var ReportsView = ({
5023
5268
  tone: "success"
5024
5269
  }
5025
5270
  ),
5026
- /* @__PURE__ */ jsx9(Text9, { children: formatPercent(model.coverageRatio) })
5271
+ /* @__PURE__ */ jsx11(Text11, { children: formatPercent(model.coverageRatio) })
5027
5272
  ] }),
5028
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(TrendSummary, { trend: model.activityTrend, width: chartWidth }) })
5273
+ /* @__PURE__ */ jsx11(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx11(TrendSummary, { trend: model.activityTrend, width: chartWidth }) })
5029
5274
  ] }),
5030
- /* @__PURE__ */ jsx9(SectionCard, { title: "Report types", children: /* @__PURE__ */ jsx9(
5275
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Report types", children: /* @__PURE__ */ jsx11(
5031
5276
  BarList,
5032
5277
  {
5033
5278
  bars: model.reportTypeBars,
@@ -5037,7 +5282,7 @@ var ReportsView = ({
5037
5282
  ) })
5038
5283
  ] }),
5039
5284
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
5040
- /* @__PURE__ */ jsx9(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx9(
5285
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx11(
5041
5286
  BarList,
5042
5287
  {
5043
5288
  bars: model.statusBars,
@@ -5045,7 +5290,7 @@ var ReportsView = ({
5045
5290
  emptyLabel: "No report status breakdown returned."
5046
5291
  }
5047
5292
  ) }),
5048
- /* @__PURE__ */ jsx9(SectionCard, { title: "Freshness", children: /* @__PURE__ */ jsx9(
5293
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Freshness", children: /* @__PURE__ */ jsx11(
5049
5294
  BarList,
5050
5295
  {
5051
5296
  bars: model.freshnessBars,
@@ -5064,26 +5309,26 @@ var ReportsView = ({
5064
5309
  gap: 1,
5065
5310
  children: [
5066
5311
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexShrink: 1, children: [
5067
- /* @__PURE__ */ jsx9(Text9, { bold: true, wrap: "truncate", children: selectedSummary.projectName }),
5068
- selectedSummary.projectId ? /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "truncate", children: selectedSummary.projectId }) : /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Select a project to load cost and architecture report details." })
5312
+ /* @__PURE__ */ jsx11(Text11, { bold: true, wrap: "truncate", children: selectedSummary.projectName }),
5313
+ selectedSummary.projectId ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "truncate", children: selectedSummary.projectId }) : /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Select a project to load cost and architecture report details." })
5069
5314
  ] }),
5070
- selectedSummary.lastReportAt ? /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5315
+ selectedSummary.lastReportAt ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
5071
5316
  "last report ",
5072
5317
  selectedSummary.lastReportAt
5073
5318
  ] }) : null
5074
5319
  ]
5075
5320
  }
5076
5321
  ),
5077
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(MetricStrip, { metrics: selectedSummary.metrics, compact }) }),
5322
+ /* @__PURE__ */ jsx11(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx11(MetricStrip, { metrics: selectedSummary.metrics, compact }) }),
5078
5323
  selectedStatuses ? /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", gap: 1, marginTop: 1, children: [
5079
- /* @__PURE__ */ jsxs7(Text9, { children: [
5080
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Cost " }),
5081
- /* @__PURE__ */ jsx9(Text9, { color: statusTextColor(selectedStatuses.cost ?? ""), children: compactStatusLabel(selectedStatuses.cost ?? "not_started") })
5324
+ /* @__PURE__ */ jsxs7(Text11, { children: [
5325
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Cost " }),
5326
+ /* @__PURE__ */ jsx11(Text11, { color: statusTextColor(selectedStatuses.cost ?? ""), children: compactStatusLabel(selectedStatuses.cost ?? "not_started") })
5082
5327
  ] }),
5083
- /* @__PURE__ */ jsxs7(Text9, { children: [
5084
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Architecture " }),
5085
- /* @__PURE__ */ jsx9(
5086
- Text9,
5328
+ /* @__PURE__ */ jsxs7(Text11, { children: [
5329
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Architecture " }),
5330
+ /* @__PURE__ */ jsx11(
5331
+ Text11,
5087
5332
  {
5088
5333
  color: statusTextColor(selectedStatuses.architecture ?? ""),
5089
5334
  children: compactStatusLabel(
@@ -5092,14 +5337,14 @@ var ReportsView = ({
5092
5337
  }
5093
5338
  )
5094
5339
  ] }),
5095
- /* @__PURE__ */ jsxs7(Text9, { children: [
5096
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "Unit tests " }),
5097
- /* @__PURE__ */ jsx9(Text9, { color: statusTextColor(selectedStatuses.unitTests ?? ""), children: compactStatusLabel(
5340
+ /* @__PURE__ */ jsxs7(Text11, { children: [
5341
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Unit tests " }),
5342
+ /* @__PURE__ */ jsx11(Text11, { color: statusTextColor(selectedStatuses.unitTests ?? ""), children: compactStatusLabel(
5098
5343
  selectedStatuses.unitTests ?? "not_started"
5099
5344
  ) })
5100
5345
  ] })
5101
5346
  ] }) : null,
5102
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(
5347
+ /* @__PURE__ */ jsx11(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx11(
5103
5348
  BarList,
5104
5349
  {
5105
5350
  bars: selectedSummary.pillarScores,
@@ -5108,7 +5353,7 @@ var ReportsView = ({
5108
5353
  }
5109
5354
  ) })
5110
5355
  ] }),
5111
- model.projectRows.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx9(
5356
+ model.projectRows.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx11(
5112
5357
  ResponsiveTable,
5113
5358
  {
5114
5359
  terminalColumns,
@@ -5133,7 +5378,7 @@ var ReportsView = ({
5133
5378
  page: tablePage
5134
5379
  }
5135
5380
  ) }) : null,
5136
- model.topActions.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx9(
5381
+ model.topActions.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx11(
5137
5382
  ResponsiveTable,
5138
5383
  {
5139
5384
  terminalColumns,
@@ -5148,7 +5393,7 @@ var ReportsView = ({
5148
5393
  page: tablePage
5149
5394
  }
5150
5395
  ) }) : null,
5151
- model.topInsights.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx9(
5396
+ model.topInsights.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx11(
5152
5397
  ResponsiveTable,
5153
5398
  {
5154
5399
  terminalColumns,
@@ -5160,7 +5405,7 @@ var ReportsView = ({
5160
5405
  page: tablePage
5161
5406
  }
5162
5407
  ) }) : null,
5163
- projects.length && !model.projectRows.length ? /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5408
+ projects.length && !model.projectRows.length ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
5164
5409
  projects.length,
5165
5410
  " project(s) available. Pick a project from the dropdown to inspect specific reports."
5166
5411
  ] }) : null
@@ -5184,20 +5429,20 @@ var OverviewView = ({
5184
5429
  const chartWidth = compact ? Math.max(24, terminalColumns - 28) : 42;
5185
5430
  const barWidth = compact ? Math.max(14, terminalColumns - 42) : 24;
5186
5431
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
5187
- /* @__PURE__ */ jsx9(MetricStrip, { metrics: model.metrics, compact }),
5188
- /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5432
+ /* @__PURE__ */ jsx11(MetricStrip, { metrics: model.metrics, compact }),
5433
+ /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5189
5434
  "Project: ",
5190
5435
  selectedProject?.name ?? "none",
5191
5436
  " ",
5192
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: selectedProject?.id ? `(${selectedProject.id})` : "" })
5437
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: selectedProject?.id ? `(${selectedProject.id})` : "" })
5193
5438
  ] }),
5194
5439
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", gap: 2, children: [
5195
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsxs7(SectionCard, { title: "Trends", children: [
5196
- /* @__PURE__ */ jsx9(TrendSummary, { trend: model.trends.score, width: chartWidth }),
5197
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(TrendSummary, { trend: model.trends.cost, width: chartWidth }) }),
5198
- /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(TrendSummary, { trend: model.trends.reports, width: chartWidth }) })
5440
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsxs7(SectionCard, { title: "Trends", children: [
5441
+ /* @__PURE__ */ jsx11(TrendSummary, { trend: model.trends.score, width: chartWidth }),
5442
+ /* @__PURE__ */ jsx11(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx11(TrendSummary, { trend: model.trends.cost, width: chartWidth }) }),
5443
+ /* @__PURE__ */ jsx11(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx11(TrendSummary, { trend: model.trends.reports, width: chartWidth }) })
5199
5444
  ] }) }),
5200
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsx9(SectionCard, { title: "Architecture scores", children: /* @__PURE__ */ jsx9(
5445
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsx11(SectionCard, { title: "Architecture scores", children: /* @__PURE__ */ jsx11(
5201
5446
  BarList,
5202
5447
  {
5203
5448
  bars: model.pillarScores,
@@ -5208,7 +5453,7 @@ var OverviewView = ({
5208
5453
  ] }),
5209
5454
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: compact ? "column" : "row", gap: 2, children: [
5210
5455
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
5211
- /* @__PURE__ */ jsx9(SectionCard, { title: "Issues by pillar", children: /* @__PURE__ */ jsx9(
5456
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Issues by pillar", children: /* @__PURE__ */ jsx11(
5212
5457
  BarList,
5213
5458
  {
5214
5459
  bars: model.issuesByPillar,
@@ -5216,7 +5461,7 @@ var OverviewView = ({
5216
5461
  emptyLabel: "No issue breakdown returned by /dashboard/user."
5217
5462
  }
5218
5463
  ) }),
5219
- /* @__PURE__ */ jsx9(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx9(
5464
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx11(
5220
5465
  BarList,
5221
5466
  {
5222
5467
  bars: model.projectHealth,
@@ -5226,7 +5471,7 @@ var OverviewView = ({
5226
5471
  ) })
5227
5472
  ] }),
5228
5473
  /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
5229
- /* @__PURE__ */ jsx9(SectionCard, { title: "Monthly cost by service", children: /* @__PURE__ */ jsx9(
5474
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Monthly cost by service", children: /* @__PURE__ */ jsx11(
5230
5475
  BarList,
5231
5476
  {
5232
5477
  bars: model.serviceCosts,
@@ -5234,7 +5479,7 @@ var OverviewView = ({
5234
5479
  emptyLabel: "No service cost breakdown returned."
5235
5480
  }
5236
5481
  ) }),
5237
- /* @__PURE__ */ jsx9(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx9(
5482
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx11(
5238
5483
  BarList,
5239
5484
  {
5240
5485
  bars: model.reportStatus,
@@ -5244,7 +5489,7 @@ var OverviewView = ({
5244
5489
  ) })
5245
5490
  ] })
5246
5491
  ] }),
5247
- /* @__PURE__ */ jsx9(SectionCard, { title: "Report freshness", children: /* @__PURE__ */ jsx9(
5492
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Report freshness", children: /* @__PURE__ */ jsx11(
5248
5493
  BarList,
5249
5494
  {
5250
5495
  bars: model.reportFreshness,
@@ -5252,7 +5497,7 @@ var OverviewView = ({
5252
5497
  emptyLabel: "No report freshness breakdown returned."
5253
5498
  }
5254
5499
  ) }),
5255
- model.topActions.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx9(
5500
+ model.topActions.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx11(
5256
5501
  ResponsiveTable,
5257
5502
  {
5258
5503
  terminalColumns,
@@ -5267,7 +5512,7 @@ var OverviewView = ({
5267
5512
  page: tablePage
5268
5513
  }
5269
5514
  ) }) : null,
5270
- model.topRecommendations.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Recommendations", children: /* @__PURE__ */ jsx9(
5515
+ model.topRecommendations.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Recommendations", children: /* @__PURE__ */ jsx11(
5271
5516
  ResponsiveTable,
5272
5517
  {
5273
5518
  terminalColumns,
@@ -5281,7 +5526,7 @@ var OverviewView = ({
5281
5526
  page: tablePage
5282
5527
  }
5283
5528
  ) }) : null,
5284
- model.topInsights.length ? /* @__PURE__ */ jsx9(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx9(
5529
+ model.topInsights.length ? /* @__PURE__ */ jsx11(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx11(
5285
5530
  ResponsiveTable,
5286
5531
  {
5287
5532
  terminalColumns,
@@ -5305,7 +5550,7 @@ var OptionsView = ({
5305
5550
  }) => {
5306
5551
  const keys = getTuiKeyBindings();
5307
5552
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
5308
- /* @__PURE__ */ jsx9(
5553
+ /* @__PURE__ */ jsx11(
5309
5554
  MetricStrip,
5310
5555
  {
5311
5556
  compact: false,
@@ -5316,19 +5561,19 @@ var OptionsView = ({
5316
5561
  ]
5317
5562
  }
5318
5563
  ),
5319
- /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5564
+ /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5320
5565
  "User: ",
5321
5566
  currentUserId ?? "unknown"
5322
5567
  ] }),
5323
- /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5568
+ /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5324
5569
  "API: ",
5325
5570
  apiBase
5326
5571
  ] }),
5327
- /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5572
+ /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5328
5573
  "Frontend: ",
5329
5574
  frontendUrl
5330
5575
  ] }),
5331
- /* @__PURE__ */ jsxs7(Text9, { dimColor: true, wrap: "wrap", children: [
5576
+ /* @__PURE__ */ jsxs7(Text11, { dimColor: true, wrap: "wrap", children: [
5332
5577
  "Keys: 1-",
5333
5578
  workspaceTabs.length,
5334
5579
  " jump tabs | ",
@@ -5361,14 +5606,14 @@ var HelpView = () => {
5361
5606
  ];
5362
5607
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 1, children: [
5363
5608
  /* @__PURE__ */ jsxs7(SectionCard, { title: "Navigation", borderColor: terminalTheme.brand, children: [
5364
- /* @__PURE__ */ jsx9(HelpLegend, { includeQuit: true, wrap: true }),
5365
- /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5609
+ /* @__PURE__ */ jsx11(HelpLegend, { includeQuit: true, wrap: true }),
5610
+ /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5366
5611
  keys.mouse,
5367
5612
  " | ",
5368
5613
  keys.scroll
5369
5614
  ] })
5370
5615
  ] }),
5371
- /* @__PURE__ */ jsx9(SectionCard, { title: "Prompt Input", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5616
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Prompt Input", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5372
5617
  keys.submit,
5373
5618
  " | ",
5374
5619
  keys.newline,
@@ -5382,20 +5627,20 @@ var HelpView = () => {
5382
5627
  " | ",
5383
5628
  keys.quit
5384
5629
  ] }) }),
5385
- /* @__PURE__ */ jsx9(SectionCard, { title: "Slash Commands", borderColor: terminalTheme.brand, children: slashCommands.map((command) => /* @__PURE__ */ jsxs7(Text9, { wrap: "wrap", children: [
5630
+ /* @__PURE__ */ jsx11(SectionCard, { title: "Slash Commands", borderColor: terminalTheme.brand, children: slashCommands.map((command) => /* @__PURE__ */ jsxs7(Text11, { wrap: "wrap", children: [
5386
5631
  command.name.padEnd(10),
5387
5632
  " ",
5388
5633
  command.description
5389
5634
  ] }, command.name)) }),
5390
5635
  /* @__PURE__ */ jsxs7(SectionCard, { title: "CLI Commands", borderColor: terminalTheme.muted, children: [
5391
- cliCommands.map((command) => /* @__PURE__ */ jsx9(Text9, { wrap: "wrap", children: command }, command)),
5392
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, wrap: "wrap", children: "Common flags: --base-url, --access-key, --access-key-stdin, --frontend-url, --format, --json, --verbose, --help" })
5636
+ cliCommands.map((command) => /* @__PURE__ */ jsx11(Text11, { wrap: "wrap", children: command }, command)),
5637
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, wrap: "wrap", children: "Common flags: --base-url, --access-key, --access-key-stdin, --frontend-url, --format, --json, --verbose, --help" })
5393
5638
  ] })
5394
5639
  ] });
5395
5640
  };
5396
5641
  var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
5397
5642
  return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", gap: 0, children: [
5398
- showBrand ? /* @__PURE__ */ jsx9(
5643
+ showBrand ? /* @__PURE__ */ jsx11(
5399
5644
  TitledBox,
5400
5645
  {
5401
5646
  title: "Console",
@@ -5406,22 +5651,22 @@ var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
5406
5651
  padding: 0,
5407
5652
  paddingX: 1,
5408
5653
  children: /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", gap: 1, children: [
5409
- /* @__PURE__ */ jsx9(Text9, { bold: true, color: terminalTheme.brand, children: "CloudEval" }),
5410
- /* @__PURE__ */ jsx9(Text9, { dimColor: true, children: "agent console" })
5654
+ /* @__PURE__ */ jsx11(Text11, { bold: true, color: terminalTheme.brand, children: "CloudEval" }),
5655
+ /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "agent console" })
5411
5656
  ] })
5412
5657
  }
5413
5658
  ) : null,
5414
- /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", gap: 0, flexWrap: "wrap", children: workspaceTabs.map((tab) => {
5659
+ /* @__PURE__ */ jsx11(Box8, { flexDirection: "row", gap: 0, flexWrap: "wrap", children: workspaceTabs.map((tab) => {
5415
5660
  const active = tab === activeTab;
5416
5661
  const style = workspaceTabButtonStyle(active);
5417
- return /* @__PURE__ */ jsx9(
5662
+ return /* @__PURE__ */ jsx11(
5418
5663
  Box8,
5419
5664
  {
5420
5665
  borderStyle: style.borderStyle,
5421
5666
  borderColor: style.borderColor,
5422
5667
  marginRight: 1,
5423
- children: /* @__PURE__ */ jsx9(
5424
- Text9,
5668
+ children: /* @__PURE__ */ jsx11(
5669
+ Text11,
5425
5670
  {
5426
5671
  bold: style.bold,
5427
5672
  color: style.color,
@@ -5434,8 +5679,8 @@ var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
5434
5679
  tab
5435
5680
  );
5436
5681
  }) }),
5437
- /* @__PURE__ */ jsx9(HelpLegend, {}),
5438
- billingSummary ? /* @__PURE__ */ jsx9(BillingSummaryLine, { billing: billingSummary }) : null
5682
+ /* @__PURE__ */ jsx11(HelpLegend, {}),
5683
+ billingSummary ? /* @__PURE__ */ jsx11(BillingSummaryLine, { billing: billingSummary }) : null
5439
5684
  ] });
5440
5685
  };
5441
5686
  var WorkspacePanel = (props) => {
@@ -5449,19 +5694,19 @@ var WorkspacePanel = (props) => {
5449
5694
  state.isRefreshing && !isInitialLoading
5450
5695
  );
5451
5696
  const content = /* @__PURE__ */ jsxs7(Fragment2, { children: [
5452
- state.loadedAt && !isInitialLoading && !isBackgroundRefreshing ? /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", justifyContent: "flex-end", children: /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5697
+ state.loadedAt && !isInitialLoading && !isBackgroundRefreshing ? /* @__PURE__ */ jsx11(Box8, { flexDirection: "row", justifyContent: "flex-end", children: /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
5453
5698
  "loaded ",
5454
5699
  new Date(state.loadedAt).toLocaleTimeString()
5455
5700
  ] }) }) : null,
5456
5701
  isInitialLoading ? /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", gap: 1, children: [
5457
- /* @__PURE__ */ jsx9(Spinner, { type: "dots", animate }),
5458
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "Loading workspace data..." })
5702
+ /* @__PURE__ */ jsx11(Spinner, { type: "dots", animate }),
5703
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "Loading workspace data..." })
5459
5704
  ] }) : null,
5460
5705
  isBackgroundRefreshing ? /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", gap: 1, children: [
5461
- /* @__PURE__ */ jsx9(Spinner, { type: "dots", animate }),
5462
- /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.brand, children: "Refreshing in background, showing cached data..." })
5706
+ /* @__PURE__ */ jsx11(Spinner, { type: "dots", animate }),
5707
+ /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.brand, children: "Refreshing in background, showing cached data..." })
5463
5708
  ] }) : null,
5464
- state.status === "error" ? /* @__PURE__ */ jsx9(
5709
+ state.status === "error" ? /* @__PURE__ */ jsx11(
5465
5710
  TitledBox,
5466
5711
  {
5467
5712
  title: "Backend Data Unavailable",
@@ -5469,7 +5714,7 @@ var WorkspacePanel = (props) => {
5469
5714
  borderColor: terminalTheme.danger,
5470
5715
  padding: 0,
5471
5716
  paddingX: 1,
5472
- children: /* @__PURE__ */ jsxs7(Text9, { color: terminalTheme.danger, wrap: "wrap", children: [
5717
+ children: /* @__PURE__ */ jsxs7(Text11, { color: terminalTheme.danger, wrap: "wrap", children: [
5473
5718
  " ",
5474
5719
  state.error ?? "Unable to load this tab."
5475
5720
  ] })
@@ -5484,8 +5729,8 @@ var WorkspacePanel = (props) => {
5484
5729
  padding: 0,
5485
5730
  paddingX: 1,
5486
5731
  children: [
5487
- state.warnings.slice(0, 4).map((warning) => /* @__PURE__ */ jsx9(Text9, { color: terminalTheme.warning, wrap: "truncate", children: cleanBackendWarning(warning, props.terminalColumns) }, warning)),
5488
- state.warnings.length > 4 ? /* @__PURE__ */ jsxs7(Text9, { dimColor: true, children: [
5732
+ state.warnings.slice(0, 4).map((warning) => /* @__PURE__ */ jsx11(Text11, { color: terminalTheme.warning, wrap: "truncate", children: cleanBackendWarning(warning, props.terminalColumns) }, warning)),
5733
+ state.warnings.length > 4 ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
5489
5734
  "+",
5490
5735
  state.warnings.length - 4,
5491
5736
  " more warning(s)"
@@ -5493,7 +5738,7 @@ var WorkspacePanel = (props) => {
5493
5738
  ]
5494
5739
  }
5495
5740
  ) : null,
5496
- props.tab === "overview" ? /* @__PURE__ */ jsx9(
5741
+ props.tab === "overview" ? /* @__PURE__ */ jsx11(
5497
5742
  OverviewView,
5498
5743
  {
5499
5744
  state,
@@ -5504,7 +5749,7 @@ var WorkspacePanel = (props) => {
5504
5749
  tablePage: props.tablePage
5505
5750
  }
5506
5751
  ) : null,
5507
- props.tab === "reports" ? /* @__PURE__ */ jsx9(
5752
+ props.tab === "reports" ? /* @__PURE__ */ jsx11(
5508
5753
  ReportsView,
5509
5754
  {
5510
5755
  state,
@@ -5515,7 +5760,7 @@ var WorkspacePanel = (props) => {
5515
5760
  tablePage: props.tablePage
5516
5761
  }
5517
5762
  ) : null,
5518
- props.tab === "projects" ? /* @__PURE__ */ jsx9(
5763
+ props.tab === "projects" ? /* @__PURE__ */ jsx11(
5519
5764
  ProjectsView,
5520
5765
  {
5521
5766
  projects: props.projects,
@@ -5526,7 +5771,7 @@ var WorkspacePanel = (props) => {
5526
5771
  terminalColumns: props.terminalColumns
5527
5772
  }
5528
5773
  ) : null,
5529
- props.tab === "connections" ? /* @__PURE__ */ jsx9(
5774
+ props.tab === "connections" ? /* @__PURE__ */ jsx11(
5530
5775
  ConnectionsView,
5531
5776
  {
5532
5777
  connections,
@@ -5536,7 +5781,7 @@ var WorkspacePanel = (props) => {
5536
5781
  terminalColumns: props.terminalColumns
5537
5782
  }
5538
5783
  ) : null,
5539
- props.tab === "billing" ? /* @__PURE__ */ jsx9(
5784
+ props.tab === "billing" ? /* @__PURE__ */ jsx11(
5540
5785
  BillingView,
5541
5786
  {
5542
5787
  state,
@@ -5545,13 +5790,13 @@ var WorkspacePanel = (props) => {
5545
5790
  frontendUrl: props.frontendUrl
5546
5791
  }
5547
5792
  ) : null,
5548
- props.tab === "options" ? /* @__PURE__ */ jsx9(OptionsView, { ...props }) : null,
5549
- props.tab === "help" ? /* @__PURE__ */ jsx9(HelpView, {}) : null
5793
+ props.tab === "options" ? /* @__PURE__ */ jsx11(OptionsView, { ...props }) : null,
5794
+ props.tab === "help" ? /* @__PURE__ */ jsx11(HelpView, {}) : null
5550
5795
  ] });
5551
5796
  if (!framed) {
5552
- return /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", gap: 1, children: content });
5797
+ return /* @__PURE__ */ jsx11(Box8, { flexDirection: "column", gap: 1, children: content });
5553
5798
  }
5554
- return /* @__PURE__ */ jsx9(
5799
+ return /* @__PURE__ */ jsx11(
5555
5800
  TitledBox,
5556
5801
  {
5557
5802
  title: workspaceTabLabels[props.tab],
@@ -5591,7 +5836,7 @@ var shouldEnableTuiAnimations = ({
5591
5836
  };
5592
5837
 
5593
5838
  // src/ui/App.tsx
5594
- import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
5839
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
5595
5840
  var bootSteps = [
5596
5841
  "Loading config",
5597
5842
  "Validating auth",
@@ -5600,14 +5845,19 @@ var bootSteps = [
5600
5845
  ];
5601
5846
  var defaultUser = { id: "cli-user", name: "CLI User" };
5602
5847
  var newDraftChatSessionKey = () => `draft-${randomUUID2()}`;
5603
- var getUserNameFromToken = async (token) => {
5604
- if (!token) return "You";
5848
+ var getUserIdentityFromToken = async (token) => {
5849
+ if (!token) {
5850
+ return { name: "You" };
5851
+ }
5605
5852
  try {
5606
5853
  const { extractEmailFromToken } = await import("./dist-AGQQPJUD.js");
5607
- const email = extractEmailFromToken(token);
5608
- return getFirstNameForDisplay({ email: email ?? void 0 });
5854
+ const email = extractEmailFromToken(token) ?? void 0;
5855
+ return {
5856
+ name: getFirstNameForDisplay({ email }),
5857
+ email
5858
+ };
5609
5859
  } catch {
5610
- return "You";
5860
+ return { name: "You" };
5611
5861
  }
5612
5862
  };
5613
5863
  var defaultProject = {
@@ -5718,20 +5968,6 @@ var billingHeaderFromEntitlement = (entitlement, usageSummary) => {
5718
5968
  };
5719
5969
  };
5720
5970
  var isBusyStatus = (status) => status === "connecting" || status === "thinking" || status === "streaming" || status === "tool_running" || status === "hitl_waiting";
5721
- var buildTuiHeaderDetails = ({
5722
- apiBase,
5723
- frontendBaseUrl,
5724
- billingSummary,
5725
- userName
5726
- }) => {
5727
- const displayName = truncateForTerminal(userName.trim() || "You", 64);
5728
- return [
5729
- `User: ${displayName}`,
5730
- `API: ${apiBase}`,
5731
- `Frontend: ${frontendBaseUrl}`,
5732
- billingSummary
5733
- ];
5734
- };
5735
5971
  var isTerminalThinkingStatus = (status) => status === "completed" || status === "error" || status === "aborted" || status === "cancelled";
5736
5972
  var hasCancellableAssistantWork = (messages) => messages.some(
5737
5973
  (message) => message.role === "assistant" && (message.pending || message.thinkingSteps?.some((step) => !isTerminalThinkingStatus(step.status ?? "streaming")))
@@ -6061,7 +6297,7 @@ var QueuePanel = ({ messages, compact, terminalColumns }) => {
6061
6297
  marginTop: 1,
6062
6298
  children: [
6063
6299
  visibleMessages.map((message, index) => /* @__PURE__ */ jsxs8(
6064
- Text10,
6300
+ Text12,
6065
6301
  {
6066
6302
  color: index === 0 ? terminalTheme.warning : void 0,
6067
6303
  dimColor: index > 0,
@@ -6075,7 +6311,7 @@ var QueuePanel = ({ messages, compact, terminalColumns }) => {
6075
6311
  },
6076
6312
  message.id
6077
6313
  )),
6078
- messages.length > visibleMessages.length ? /* @__PURE__ */ jsxs8(Text10, { dimColor: true, children: [
6314
+ messages.length > visibleMessages.length ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
6079
6315
  "+",
6080
6316
  messages.length - visibleMessages.length,
6081
6317
  " more queued"
@@ -6096,10 +6332,10 @@ var ArtifactStrip = ({ chips, compact = false, terminalColumns }) => {
6096
6332
  return null;
6097
6333
  }
6098
6334
  const valueLimit = compact ? Math.max(10, terminalColumns - 15) : 24;
6099
- return /* @__PURE__ */ jsx10(Box9, { flexDirection: compact ? "column" : "row", gap: compact ? 0 : 1, flexWrap: "wrap", children: chips.map((chip) => /* @__PURE__ */ jsxs8(Text10, { children: [
6100
- /* @__PURE__ */ jsx10(Text10, { color: artifactToneColor(chip.tone), bold: true, children: chip.label }),
6101
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: " " }),
6102
- /* @__PURE__ */ jsx10(Text10, { color: artifactToneColor(chip.tone), children: truncateForTerminal(chip.value, valueLimit) })
6335
+ return /* @__PURE__ */ jsx12(Box9, { flexDirection: compact ? "column" : "row", gap: compact ? 0 : 1, flexWrap: "wrap", children: chips.map((chip) => /* @__PURE__ */ jsxs8(Text12, { children: [
6336
+ /* @__PURE__ */ jsx12(Text12, { color: artifactToneColor(chip.tone), bold: true, children: chip.label }),
6337
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: " " }),
6338
+ /* @__PURE__ */ jsx12(Text12, { color: artifactToneColor(chip.tone), children: truncateForTerminal(chip.value, valueLimit) })
6103
6339
  ] }, `${chip.label}-${chip.value}`)) });
6104
6340
  };
6105
6341
  var PromptControlBar = ({
@@ -6134,7 +6370,7 @@ var PromptControlBar = ({
6134
6370
  gap: 0,
6135
6371
  marginTop: index === 0 ? 0 : 1,
6136
6372
  children: [
6137
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: group.label }),
6373
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: group.label }),
6138
6374
  group.controls.map((kind) => {
6139
6375
  const isFocused = focused === kind;
6140
6376
  const label = kind.charAt(0).toUpperCase() + kind.slice(1);
@@ -6149,7 +6385,7 @@ var PromptControlBar = ({
6149
6385
  const valueLimit = Math.max(14, terminalColumns - label.length - 8);
6150
6386
  const value = truncateForTerminal(rawValue, valueLimit);
6151
6387
  return /* @__PURE__ */ jsxs8(
6152
- Text10,
6388
+ Text12,
6153
6389
  {
6154
6390
  color: isFocused ? "white" : void 0,
6155
6391
  backgroundColor: isFocused ? terminalTheme.selectedBackground : void 0,
@@ -6173,9 +6409,9 @@ var PromptControlBar = ({
6173
6409
  group.label
6174
6410
  )),
6175
6411
  showActivity ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 0, marginTop: 1, children: [
6176
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Activity" }),
6412
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Activity" }),
6177
6413
  hasThinkingSteps ? /* @__PURE__ */ jsxs8(
6178
- Text10,
6414
+ Text12,
6179
6415
  {
6180
6416
  color: focused === "thinking" ? "white" : void 0,
6181
6417
  backgroundColor: focused === "thinking" ? terminalTheme.selectedBackground : void 0,
@@ -6190,14 +6426,14 @@ var PromptControlBar = ({
6190
6426
  }
6191
6427
  ) : null,
6192
6428
  /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
6193
- busy ? /* @__PURE__ */ jsx10(Spinner, { type: "line", animate }) : null,
6194
- /* @__PURE__ */ jsx10(Text10, { color: statusColor, children: statusText })
6429
+ busy ? /* @__PURE__ */ jsx12(Spinner, { type: "line", animate }) : null,
6430
+ /* @__PURE__ */ jsx12(Text12, { color: statusColor, children: statusText })
6195
6431
  ] })
6196
6432
  ] }) : null
6197
6433
  ] });
6198
6434
  }
6199
6435
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 0, children: [
6200
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Command context" }),
6436
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Command context" }),
6201
6437
  /* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: controlGap, flexWrap: "wrap", children: [
6202
6438
  selectorOrder.map((kind) => {
6203
6439
  const isFocused = focused === kind;
@@ -6212,14 +6448,14 @@ var PromptControlBar = ({
6212
6448
  });
6213
6449
  const valueLimit = compact ? Math.max(18, terminalColumns - label.length - 8) : kind === "project" ? 30 : 20;
6214
6450
  const value = truncateForTerminal(rawValue, valueLimit);
6215
- return /* @__PURE__ */ jsx10(
6451
+ return /* @__PURE__ */ jsx12(
6216
6452
  Box9,
6217
6453
  {
6218
6454
  borderStyle: raisedButtonStyle.border,
6219
6455
  borderColor: isFocused ? terminalTheme.focus : terminalTheme.muted,
6220
6456
  paddingX: 1,
6221
6457
  children: /* @__PURE__ */ jsxs8(
6222
- Text10,
6458
+ Text12,
6223
6459
  {
6224
6460
  color: isFocused ? "white" : void 0,
6225
6461
  backgroundColor: isFocused ? terminalTheme.selectedBackground : void 0,
@@ -6239,14 +6475,14 @@ var PromptControlBar = ({
6239
6475
  kind
6240
6476
  );
6241
6477
  }),
6242
- hasThinkingSteps ? /* @__PURE__ */ jsx10(
6478
+ hasThinkingSteps ? /* @__PURE__ */ jsx12(
6243
6479
  Box9,
6244
6480
  {
6245
6481
  borderStyle: raisedButtonStyle.border,
6246
6482
  borderColor: focused === "thinking" ? terminalTheme.focus : terminalTheme.muted,
6247
6483
  paddingX: 1,
6248
6484
  children: /* @__PURE__ */ jsxs8(
6249
- Text10,
6485
+ Text12,
6250
6486
  {
6251
6487
  color: focused === "thinking" ? "white" : void 0,
6252
6488
  backgroundColor: focused === "thinking" ? terminalTheme.selectedBackground : void 0,
@@ -6261,9 +6497,9 @@ var PromptControlBar = ({
6261
6497
  )
6262
6498
  }
6263
6499
  ) : null,
6264
- /* @__PURE__ */ jsx10(Box9, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
6265
- busy ? /* @__PURE__ */ jsx10(Spinner, { type: "line", animate }) : null,
6266
- /* @__PURE__ */ jsx10(Text10, { color: statusColor, children: statusText })
6500
+ /* @__PURE__ */ jsx12(Box9, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
6501
+ busy ? /* @__PURE__ */ jsx12(Spinner, { type: "line", animate }) : null,
6502
+ /* @__PURE__ */ jsx12(Text12, { color: statusColor, children: statusText })
6267
6503
  ] }) })
6268
6504
  ] })
6269
6505
  ] });
@@ -6300,8 +6536,8 @@ var ChatContextPanel = ({
6300
6536
  height,
6301
6537
  children: [
6302
6538
  artifactChips.length ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", marginBottom: 1, children: [
6303
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.brand, children: "Artifacts" }),
6304
- /* @__PURE__ */ jsx10(
6539
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Artifacts" }),
6540
+ /* @__PURE__ */ jsx12(
6305
6541
  ArtifactStrip,
6306
6542
  {
6307
6543
  chips: artifactChips,
@@ -6310,7 +6546,7 @@ var ChatContextPanel = ({
6310
6546
  }
6311
6547
  )
6312
6548
  ] }) : null,
6313
- /* @__PURE__ */ jsx10(
6549
+ /* @__PURE__ */ jsx12(
6314
6550
  PromptControlBar,
6315
6551
  {
6316
6552
  focused,
@@ -6335,39 +6571,39 @@ var ChatContextPanel = ({
6335
6571
  );
6336
6572
  };
6337
6573
  var BottomControls = ({ tab }) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", justifyContent: "space-between", children: [
6338
- /* @__PURE__ */ jsxs8(Text10, { dimColor: true, children: [
6339
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "\u2303Q" }),
6340
- /* @__PURE__ */ jsx10(Text10, { children: " Quit " }),
6341
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "\u2303T" }),
6342
- /* @__PURE__ */ jsx10(Text10, { children: " Tabs " }),
6574
+ /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
6575
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "\u2303Q" }),
6576
+ /* @__PURE__ */ jsx12(Text12, { children: " Quit " }),
6577
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "\u2303T" }),
6578
+ /* @__PURE__ */ jsx12(Text12, { children: " Tabs " }),
6343
6579
  tab === "chat" ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
6344
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "Y" }),
6345
- /* @__PURE__ */ jsx10(Text10, { children: " Copy " }),
6346
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "D" }),
6347
- /* @__PURE__ */ jsx10(Text10, { children: " Download " }),
6348
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "O" }),
6349
- /* @__PURE__ */ jsx10(Text10, { children: " Open " }),
6350
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.brand, children: "/ Commands" })
6580
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "Y" }),
6581
+ /* @__PURE__ */ jsx12(Text12, { children: " Copy " }),
6582
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "D" }),
6583
+ /* @__PURE__ */ jsx12(Text12, { children: " Download " }),
6584
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "O" }),
6585
+ /* @__PURE__ */ jsx12(Text12, { children: " Open " }),
6586
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "/ Commands" })
6351
6587
  ] }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
6352
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "R" }),
6353
- /* @__PURE__ */ jsx10(Text10, { children: " Refresh " }),
6354
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "O" }),
6355
- /* @__PURE__ */ jsx10(Text10, { children: " Open " }),
6356
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "D" }),
6357
- /* @__PURE__ */ jsx10(Text10, { children: " Download " }),
6588
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "R" }),
6589
+ /* @__PURE__ */ jsx12(Text12, { children: " Refresh " }),
6590
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "O" }),
6591
+ /* @__PURE__ */ jsx12(Text12, { children: " Open " }),
6592
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "D" }),
6593
+ /* @__PURE__ */ jsx12(Text12, { children: " Download " }),
6358
6594
  tab === "projects" || tab === "connections" ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
6359
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "\u2191\u2193/J/K" }),
6360
- /* @__PURE__ */ jsx10(Text10, { children: " Select " }),
6361
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "Enter" }),
6362
- /* @__PURE__ */ jsx10(Text10, { children: " Confirm " })
6595
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "\u2191\u2193/J/K" }),
6596
+ /* @__PURE__ */ jsx12(Text12, { children: " Select " }),
6597
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "Enter" }),
6598
+ /* @__PURE__ */ jsx12(Text12, { children: " Confirm " })
6363
6599
  ] }) : null,
6364
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.accent, bold: true, children: "[/]" }),
6365
- /* @__PURE__ */ jsx10(Text10, { children: " Page" })
6600
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.accent, bold: true, children: "[/]" }),
6601
+ /* @__PURE__ */ jsx12(Text12, { children: " Page" })
6366
6602
  ] })
6367
6603
  ] }),
6368
- tab === "reports" ? /* @__PURE__ */ jsxs8(Text10, { dimColor: true, children: [
6369
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.brand, bold: true, children: "Reports" }),
6370
- /* @__PURE__ */ jsx10(Text10, { children: " W WAF | K cost | U tests | A all | P project" })
6604
+ tab === "reports" ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
6605
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: "Reports" }),
6606
+ /* @__PURE__ */ jsx12(Text12, { children: " W WAF | K cost | U tests | A all | P project" })
6371
6607
  ] }) : null
6372
6608
  ] });
6373
6609
  var recommendedOptionIndex = (question) => {
@@ -6390,18 +6626,18 @@ var HitlPanel = ({ hitl, questionIndex, optionIndex, answers, frontendUrl }) =>
6390
6626
  borderColor: terminalTheme.warning,
6391
6627
  padding: 1,
6392
6628
  children: [
6393
- /* @__PURE__ */ jsxs8(Text10, { wrap: "wrap", children: [
6629
+ /* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
6394
6630
  questionIndex + 1,
6395
6631
  "/",
6396
6632
  hitl.questions.length,
6397
6633
  ": ",
6398
6634
  question?.text ?? "Action required"
6399
6635
  ] }),
6400
- options.length ? /* @__PURE__ */ jsx10(Box9, { flexDirection: "column", marginTop: 1, children: options.map((option, index) => {
6636
+ options.length ? /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", marginTop: 1, children: options.map((option, index) => {
6401
6637
  const highlighted = index === optionIndex;
6402
6638
  const selected = answers[question.id] === option.id;
6403
6639
  return /* @__PURE__ */ jsxs8(
6404
- Text10,
6640
+ Text12,
6405
6641
  {
6406
6642
  color: highlighted ? terminalTheme.focus : selected ? terminalTheme.selected : void 0,
6407
6643
  dimColor: !highlighted && !selected,
@@ -6419,9 +6655,9 @@ var HitlPanel = ({ hitl, questionIndex, optionIndex, answers, frontendUrl }) =>
6419
6655
  },
6420
6656
  option.id
6421
6657
  );
6422
- }) }) : /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Type the answer in the prompt and press Enter, or open the frontend." }),
6423
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Up/Down choose | Enter answer | Left/Right switch question | O or /open opens frontend" }),
6424
- /* @__PURE__ */ jsxs8(Text10, { dimColor: true, wrap: "wrap", children: [
6658
+ }) }) : /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Type the answer in the prompt and press Enter, or open the frontend." }),
6659
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Up/Down choose | Enter answer | Left/Right switch question | O or /open opens frontend" }),
6660
+ /* @__PURE__ */ jsxs8(Text12, { dimColor: true, wrap: "wrap", children: [
6425
6661
  "Frontend: ",
6426
6662
  frontendUrl
6427
6663
  ] })
@@ -6497,6 +6733,7 @@ var App = ({
6497
6733
  const [checkingOnboarding, setCheckingOnboarding] = useState4(false);
6498
6734
  const [currentUserId, setCurrentUserId] = useState4();
6499
6735
  const [userName, setUserName] = useState4("You");
6736
+ const [userEmail, setUserEmail] = useState4();
6500
6737
  const [billingHeader, setBillingHeader] = useState4(null);
6501
6738
  const [billingHeaderError, setBillingHeaderError] = useState4();
6502
6739
  const [focusedControl, setFocusedControl] = useState4("project");
@@ -6897,6 +7134,7 @@ var App = ({
6897
7134
  const userStatus = await checkUserStatus(baseUrl, token);
6898
7135
  if (userStatus.user) {
6899
7136
  setUserName(getFirstNameForDisplay(userStatus.user));
7137
+ setUserEmail(userStatus.user.email?.trim() || void 0);
6900
7138
  }
6901
7139
  if (userStatus.user?.id) {
6902
7140
  setCurrentUserId(userStatus.user.id);
@@ -7072,8 +7310,12 @@ var App = ({
7072
7310
  setAuthToken(token);
7073
7311
  }
7074
7312
  if (token && !accessKey) {
7075
- getUserNameFromToken(token).then(setUserName).catch(() => {
7313
+ getUserIdentityFromToken(token).then((identity) => {
7314
+ setUserName(identity.name);
7315
+ setUserEmail(identity.email);
7316
+ }).catch(() => {
7076
7317
  setUserName("You");
7318
+ setUserEmail(void 0);
7077
7319
  });
7078
7320
  }
7079
7321
  if (token && shouldHydrateAuthenticatedWorkspace({
@@ -8002,7 +8244,10 @@ var App = ({
8002
8244
  scrollOffset: promptInputScrollOffset
8003
8245
  });
8004
8246
  const promptInputRows = promptInputViewport.visibleRowCount;
8005
- const promptCommandCompletionRows = slashCommandCompletions.length ? 1 : 0;
8247
+ const promptCommandCompletionRows = estimateCommandCompletionRows(
8248
+ slashCommandCompletions.length,
8249
+ terminalSize.columns
8250
+ );
8006
8251
  const promptSuggestionRows = estimatePromptSuggestionRows(visiblePromptSuggestions.length) + promptCommandCompletionRows;
8007
8252
  const chatResponsiveMode = getChatResponsiveMode(terminalSize);
8008
8253
  const splitChatLayout = shouldUseSplitChatLayout(terminalSize);
@@ -8031,12 +8276,17 @@ var App = ({
8031
8276
  const bannerDisabled = bannerDisabledByConfig || !tuiLayout.showBanner;
8032
8277
  const bannerContentColumns = Math.max(1, terminalSize.columns - tuiLayout.paddingX * 2);
8033
8278
  const billingSummary = billingHeaderError ? `Plan: unavailable | Credits: unavailable` : billingSummaryText(billingHeader);
8034
- const headerDetails = buildTuiHeaderDetails({
8279
+ const bannerDetailLines = buildBannerDetailLines({
8035
8280
  apiBase,
8036
8281
  frontendBaseUrl,
8037
8282
  billingSummary,
8038
- userName
8283
+ billingTone: billingHeader?.tone,
8284
+ userName,
8285
+ userEmail
8039
8286
  });
8287
+ const headerDetails = bannerDetailLines.map(
8288
+ (line) => line.segments.map((segment) => segment.text).join("")
8289
+ );
8040
8290
  const keyBindings = getTuiKeyBindings();
8041
8291
  const scrollHelp = mouseTrackingEnabled ? `${keyBindings.mouse} | wheel scroll` : keyBindings.scroll;
8042
8292
  const chatAvailableWidth = Math.max(
@@ -8853,15 +9103,22 @@ var App = ({
8853
9103
  );
8854
9104
  if (phase === "boot") {
8855
9105
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, height: terminalSize.rows, children: [
8856
- /* @__PURE__ */ jsx10(Banner, { disable: bannerDisabled, details: headerDetails, terminalColumns: bannerContentColumns }),
9106
+ /* @__PURE__ */ jsx12(
9107
+ Banner,
9108
+ {
9109
+ disable: bannerDisabled,
9110
+ detailLines: bannerDetailLines,
9111
+ terminalColumns: bannerContentColumns
9112
+ }
9113
+ ),
8857
9114
  isLoggingIn ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, padding: 1, children: [
8858
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.brand, bold: true, children: "Signing in..." }),
8859
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "Please complete authentication in your browser." })
8860
- ] }) : /* @__PURE__ */ jsx10(Loader, { step: loaderStep, steps: bootSteps, animate: animationsEnabled })
9115
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: "Signing in..." }),
9116
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Please complete authentication in your browser." })
9117
+ ] }) : /* @__PURE__ */ jsx12(Loader, { step: loaderStep, steps: bootSteps, animate: animationsEnabled })
8861
9118
  ] });
8862
9119
  }
8863
9120
  if (needsOnboarding && phase === "ready" && authToken) {
8864
- return /* @__PURE__ */ jsx10(
9121
+ return /* @__PURE__ */ jsx12(
8865
9122
  Onboarding,
8866
9123
  {
8867
9124
  baseUrl,
@@ -8882,14 +9139,14 @@ var App = ({
8882
9139
  }
8883
9140
  if (phase === "error") {
8884
9141
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", padding: 1, height: terminalSize.rows, children: [
8885
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.danger, children: "Failed to start CLI." }),
8886
- /* @__PURE__ */ jsx10(Text10, { children: bootError ?? "Unknown error" }),
8887
- /* @__PURE__ */ jsxs8(Text10, { children: [
9142
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.danger, children: "Failed to start CLI." }),
9143
+ /* @__PURE__ */ jsx12(Text12, { children: bootError ?? "Unknown error" }),
9144
+ /* @__PURE__ */ jsxs8(Text12, { children: [
8888
9145
  "Base URL: ",
8889
9146
  apiBase,
8890
9147
  " (set via CLOUDEVAL_BASE_URL or --base-url)"
8891
9148
  ] }),
8892
- /* @__PURE__ */ jsx10(Text10, { children: "Press Ctrl+C to quit." })
9149
+ /* @__PURE__ */ jsx12(Text12, { children: "Press Ctrl+C to quit." })
8893
9150
  ] });
8894
9151
  }
8895
9152
  const chatStatusText = (() => {
@@ -8906,7 +9163,7 @@ var App = ({
8906
9163
  const chatStatusColor = chatState.status === "error" ? terminalTheme.danger : chatState.status === "complete" ? terminalTheme.success : chatState.status === "canceled" ? terminalTheme.warning : isBusyStatus(chatState.status) ? terminalTheme.brand : void 0;
8907
9164
  const chatBusy = chatState.status === "connecting" || chatState.status === "thinking" || chatState.status === "streaming" || chatState.status === "tool_running";
8908
9165
  const promptActionIsCancel = isBusyStatus(chatState.status) || Boolean(controllerRef.current) || hasCancellableReasoning;
8909
- const threadPanel = /* @__PURE__ */ jsx10(
9166
+ const threadPanel = /* @__PURE__ */ jsx12(
8910
9167
  TitledBox,
8911
9168
  {
8912
9169
  title: selectedThreadTitle,
@@ -8916,7 +9173,7 @@ var App = ({
8916
9173
  width: chatThreadPanelWidth,
8917
9174
  height: chatMainPanelRows,
8918
9175
  children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
8919
- /* @__PURE__ */ jsx10(Box9, { flexShrink: 1, width: threadContentWidth, children: /* @__PURE__ */ jsx10(
9176
+ /* @__PURE__ */ jsx12(Box9, { flexShrink: 1, width: threadContentWidth, children: /* @__PURE__ */ jsx12(
8920
9177
  ScrollView,
8921
9178
  {
8922
9179
  ref: scrollViewRef,
@@ -8939,7 +9196,7 @@ var App = ({
8939
9196
  });
8940
9197
  },
8941
9198
  onViewportSizeChange: (size) => setViewportHeight(size.height),
8942
- children: /* @__PURE__ */ jsx10(
9199
+ children: /* @__PURE__ */ jsx12(
8943
9200
  Transcript,
8944
9201
  {
8945
9202
  messages: displayedMessages,
@@ -8952,7 +9209,7 @@ var App = ({
8952
9209
  )
8953
9210
  }
8954
9211
  ) }),
8955
- /* @__PURE__ */ jsx10(
9212
+ /* @__PURE__ */ jsx12(
8956
9213
  Scrollbar2,
8957
9214
  {
8958
9215
  scrollOffset,
@@ -8963,7 +9220,7 @@ var App = ({
8963
9220
  ] })
8964
9221
  }
8965
9222
  );
8966
- const promptFooterControls = splitChatLayout ? void 0 : /* @__PURE__ */ jsx10(
9223
+ const promptFooterControls = splitChatLayout ? void 0 : /* @__PURE__ */ jsx12(
8967
9224
  PromptControlBar,
8968
9225
  {
8969
9226
  focused: focusedControl,
@@ -8989,12 +9246,19 @@ var App = ({
8989
9246
  value: p
8990
9247
  }));
8991
9248
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
8992
- /* @__PURE__ */ jsx10(Banner, { disable: bannerDisabled, details: headerDetails, terminalColumns: bannerContentColumns }),
8993
- /* @__PURE__ */ jsx10(Text10, { children: "Select a project to chat with:" }),
9249
+ /* @__PURE__ */ jsx12(
9250
+ Banner,
9251
+ {
9252
+ disable: bannerDisabled,
9253
+ detailLines: bannerDetailLines,
9254
+ terminalColumns: bannerContentColumns
9255
+ }
9256
+ ),
9257
+ /* @__PURE__ */ jsx12(Text12, { children: "Select a project to chat with:" }),
8994
9258
  loadingProjects ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
8995
- /* @__PURE__ */ jsx10(Spinner, { type: "line", animate: animationsEnabled }),
8996
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.brand, children: "Loading projects..." })
8997
- ] }) : /* @__PURE__ */ jsx10(
9259
+ /* @__PURE__ */ jsx12(Spinner, { type: "line", animate: animationsEnabled }),
9260
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Loading projects..." })
9261
+ ] }) : /* @__PURE__ */ jsx12(
8998
9262
  ProjectSelector,
8999
9263
  {
9000
9264
  items,
@@ -9011,8 +9275,15 @@ var App = ({
9011
9275
  }
9012
9276
  if (activeWorkspaceTab !== "chat") {
9013
9277
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
9014
- /* @__PURE__ */ jsx10(Banner, { disable: bannerDisabled, details: headerDetails, terminalColumns: bannerContentColumns }),
9015
- /* @__PURE__ */ jsx10(
9278
+ /* @__PURE__ */ jsx12(
9279
+ Banner,
9280
+ {
9281
+ disable: bannerDisabled,
9282
+ detailLines: bannerDetailLines,
9283
+ terminalColumns: bannerContentColumns
9284
+ }
9285
+ ),
9286
+ /* @__PURE__ */ jsx12(
9016
9287
  WorkspaceTabBar,
9017
9288
  {
9018
9289
  activeTab: activeWorkspaceTab,
@@ -9020,9 +9291,9 @@ var App = ({
9020
9291
  billingSummary: bannerDisabled ? billingHeader : void 0
9021
9292
  }
9022
9293
  ),
9023
- /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions[activeWorkspaceTab] }),
9024
- notice ? /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "wrap", children: notice }) : null,
9025
- /* @__PURE__ */ jsx10(
9294
+ /* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions[activeWorkspaceTab] }),
9295
+ notice ? /* @__PURE__ */ jsx12(NoticeLine, { message: notice }) : null,
9296
+ /* @__PURE__ */ jsx12(
9026
9297
  TitledBox,
9027
9298
  {
9028
9299
  title: workspaceTabLabels[activeWorkspaceTab],
@@ -9033,7 +9304,7 @@ var App = ({
9033
9304
  height: workspacePanelViewportRows,
9034
9305
  width: workspaceContentWidth,
9035
9306
  children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
9036
- /* @__PURE__ */ jsx10(Box9, { flexShrink: 1, width: workspacePanelBodyWidth, children: /* @__PURE__ */ jsx10(
9307
+ /* @__PURE__ */ jsx12(Box9, { flexShrink: 1, width: workspacePanelBodyWidth, children: /* @__PURE__ */ jsx12(
9037
9308
  ScrollView,
9038
9309
  {
9039
9310
  ref: workspaceScrollViewRef,
@@ -9041,7 +9312,7 @@ var App = ({
9041
9312
  onScroll: (offset) => setWorkspaceScrollOffset(offset),
9042
9313
  onContentHeightChange: (height) => setWorkspaceContentHeight(height),
9043
9314
  onViewportSizeChange: (size) => setWorkspaceViewportHeight(size.height),
9044
- children: /* @__PURE__ */ jsx10(
9315
+ children: /* @__PURE__ */ jsx12(
9045
9316
  WorkspacePanel,
9046
9317
  {
9047
9318
  tab: activeWorkspaceTab,
@@ -9062,7 +9333,7 @@ var App = ({
9062
9333
  )
9063
9334
  }
9064
9335
  ) }),
9065
- workspacePanelOverflowing ? /* @__PURE__ */ jsx10(
9336
+ workspacePanelOverflowing ? /* @__PURE__ */ jsx12(
9066
9337
  Scrollbar2,
9067
9338
  {
9068
9339
  scrollOffset: workspaceScrollOffset,
@@ -9073,8 +9344,8 @@ var App = ({
9073
9344
  ] })
9074
9345
  }
9075
9346
  ),
9076
- /* @__PURE__ */ jsx10(BottomControls, { tab: activeWorkspaceTab }),
9077
- activeSelector === "project" ? /* @__PURE__ */ jsx10(
9347
+ /* @__PURE__ */ jsx12(BottomControls, { tab: activeWorkspaceTab }),
9348
+ activeSelector === "project" ? /* @__PURE__ */ jsx12(
9078
9349
  SelectPanel,
9079
9350
  {
9080
9351
  title: "Select Project",
@@ -9101,8 +9372,15 @@ var App = ({
9101
9372
  ] });
9102
9373
  }
9103
9374
  return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
9104
- /* @__PURE__ */ jsx10(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx10(Banner, { disable: bannerDisabled, details: headerDetails, terminalColumns: bannerContentColumns }) }),
9105
- /* @__PURE__ */ jsx10(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx10(
9375
+ /* @__PURE__ */ jsx12(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx12(
9376
+ Banner,
9377
+ {
9378
+ disable: bannerDisabled,
9379
+ detailLines: bannerDetailLines,
9380
+ terminalColumns: bannerContentColumns
9381
+ }
9382
+ ) }),
9383
+ /* @__PURE__ */ jsx12(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx12(
9106
9384
  WorkspaceTabBar,
9107
9385
  {
9108
9386
  activeTab: activeWorkspaceTab,
@@ -9110,14 +9388,14 @@ var App = ({
9110
9388
  billingSummary: bannerDisabled ? billingHeader : void 0
9111
9389
  }
9112
9390
  ) }),
9113
- /* @__PURE__ */ jsx10(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions.chat }) }),
9391
+ /* @__PURE__ */ jsx12(Box9, { flexShrink: 0, children: /* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions.chat }) }),
9114
9392
  /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", marginTop: 1, children: [
9115
- /* @__PURE__ */ jsx10(
9393
+ /* @__PURE__ */ jsx12(
9116
9394
  Box9,
9117
9395
  {
9118
9396
  flexShrink: 1,
9119
9397
  width: Math.max(24, chatAvailableWidth - (chatMiddleOverflowing ? 2 : 0)),
9120
- children: /* @__PURE__ */ jsx10(
9398
+ children: /* @__PURE__ */ jsx12(
9121
9399
  ScrollView,
9122
9400
  {
9123
9401
  ref: chatMiddleScrollViewRef,
@@ -9126,7 +9404,7 @@ var App = ({
9126
9404
  onContentHeightChange: (height) => setChatMiddleContentHeight(height),
9127
9405
  onViewportSizeChange: (size) => setChatMiddleViewportHeight(size.height),
9128
9406
  children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
9129
- isSearching ? /* @__PURE__ */ jsx10(
9407
+ isSearching ? /* @__PURE__ */ jsx12(
9130
9408
  TitledBox,
9131
9409
  {
9132
9410
  title: "Search",
@@ -9134,14 +9412,14 @@ var App = ({
9134
9412
  borderColor: terminalTheme.warning,
9135
9413
  padding: 0,
9136
9414
  paddingX: 1,
9137
- children: /* @__PURE__ */ jsxs8(Text10, { children: [
9415
+ children: /* @__PURE__ */ jsxs8(Text12, { children: [
9138
9416
  "Found: ",
9139
9417
  displayedMessages.length,
9140
9418
  " matches"
9141
9419
  ] })
9142
9420
  }
9143
9421
  ) : null,
9144
- queuedMessages.length > 0 ? /* @__PURE__ */ jsx10(
9422
+ queuedMessages.length > 0 ? /* @__PURE__ */ jsx12(
9145
9423
  QueuePanel,
9146
9424
  {
9147
9425
  messages: queuedMessages,
@@ -9149,7 +9427,7 @@ var App = ({
9149
9427
  terminalColumns: terminalSize.columns
9150
9428
  }
9151
9429
  ) : null,
9152
- notice ? /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "wrap", children: notice }) : null,
9430
+ notice ? /* @__PURE__ */ jsx12(NoticeLine, { message: notice }) : null,
9153
9431
  errorText ? /* @__PURE__ */ jsxs8(
9154
9432
  TitledBox,
9155
9433
  {
@@ -9160,12 +9438,12 @@ var App = ({
9160
9438
  paddingX: 1,
9161
9439
  marginTop: 1,
9162
9440
  children: [
9163
- /* @__PURE__ */ jsx10(Text10, { color: terminalTheme.danger, wrap: "wrap", children: errorText }),
9164
- !hasThinkingSteps ? /* @__PURE__ */ jsx10(Text10, { dimColor: true, wrap: "wrap", children: "No thinking steps were received before the backend returned this error." }) : null
9441
+ /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.danger, wrap: "wrap", children: errorText }),
9442
+ !hasThinkingSteps ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: "No thinking steps were received before the backend returned this error." }) : null
9165
9443
  ]
9166
9444
  }
9167
9445
  ) : null,
9168
- !splitChatLayout && chatArtifactChips.length ? /* @__PURE__ */ jsx10(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx10(
9446
+ !splitChatLayout && chatArtifactChips.length ? /* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(
9169
9447
  ArtifactStrip,
9170
9448
  {
9171
9449
  chips: chatArtifactChips,
@@ -9173,7 +9451,7 @@ var App = ({
9173
9451
  }
9174
9452
  ) }) : null,
9175
9453
  showChatThreadPanel ? splitChatLayout ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", columnGap: chatSplitGap, children: [
9176
- /* @__PURE__ */ jsx10(
9454
+ /* @__PURE__ */ jsx12(
9177
9455
  ChatContextPanel,
9178
9456
  {
9179
9457
  width: chatContextPanelWidth,
@@ -9198,7 +9476,7 @@ var App = ({
9198
9476
  ),
9199
9477
  threadPanel
9200
9478
  ] }) : threadPanel : null,
9201
- chatState.status === "hitl_waiting" && chatState.hitl?.waiting ? /* @__PURE__ */ jsx10(
9479
+ chatState.status === "hitl_waiting" && chatState.hitl?.waiting ? /* @__PURE__ */ jsx12(
9202
9480
  HitlPanel,
9203
9481
  {
9204
9482
  hitl: chatState.hitl,
@@ -9213,7 +9491,7 @@ var App = ({
9213
9491
  )
9214
9492
  }
9215
9493
  ),
9216
- chatMiddleOverflowing ? /* @__PURE__ */ jsx10(
9494
+ chatMiddleOverflowing ? /* @__PURE__ */ jsx12(
9217
9495
  Scrollbar2,
9218
9496
  {
9219
9497
  scrollOffset: chatMiddleScrollOffset,
@@ -9222,7 +9500,7 @@ var App = ({
9222
9500
  }
9223
9501
  ) : null
9224
9502
  ] }),
9225
- activeSelector === "thread" ? /* @__PURE__ */ jsx10(
9503
+ activeSelector === "thread" ? /* @__PURE__ */ jsx12(
9226
9504
  SelectPanel,
9227
9505
  {
9228
9506
  title: "Select Thread",
@@ -9244,7 +9522,7 @@ var App = ({
9244
9522
  limit: tuiLayout.selectorLimit
9245
9523
  }
9246
9524
  ) : null,
9247
- activeSelector === "project" ? /* @__PURE__ */ jsx10(
9525
+ activeSelector === "project" ? /* @__PURE__ */ jsx12(
9248
9526
  SelectPanel,
9249
9527
  {
9250
9528
  title: "Select Project",
@@ -9267,7 +9545,7 @@ var App = ({
9267
9545
  limit: tuiLayout.selectorLimit
9268
9546
  }
9269
9547
  ) : null,
9270
- activeSelector === "model" ? /* @__PURE__ */ jsx10(
9548
+ activeSelector === "model" ? /* @__PURE__ */ jsx12(
9271
9549
  SelectPanel,
9272
9550
  {
9273
9551
  title: "Select Model",
@@ -9284,7 +9562,7 @@ var App = ({
9284
9562
  limit: tuiLayout.selectorLimit
9285
9563
  }
9286
9564
  ) : null,
9287
- activeSelector === "mode" ? /* @__PURE__ */ jsx10(
9565
+ activeSelector === "mode" ? /* @__PURE__ */ jsx12(
9288
9566
  SelectPanel,
9289
9567
  {
9290
9568
  title: "Select Mode",
@@ -9307,7 +9585,7 @@ var App = ({
9307
9585
  limit: tuiLayout.selectorLimit
9308
9586
  }
9309
9587
  ) : null,
9310
- activeSelector === "profile" ? /* @__PURE__ */ jsx10(
9588
+ activeSelector === "profile" ? /* @__PURE__ */ jsx12(
9311
9589
  SelectPanel,
9312
9590
  {
9313
9591
  title: "Select Agent Profile",
@@ -9324,7 +9602,7 @@ var App = ({
9324
9602
  limit: tuiLayout.selectorLimit
9325
9603
  }
9326
9604
  ) : null,
9327
- isSearching ? /* @__PURE__ */ jsx10(
9605
+ isSearching ? /* @__PURE__ */ jsx12(
9328
9606
  InputBox,
9329
9607
  {
9330
9608
  title: "Search History",
@@ -9338,7 +9616,7 @@ var App = ({
9338
9616
  setSearchQuery("");
9339
9617
  }
9340
9618
  }
9341
- ) : activeSelector ? null : /* @__PURE__ */ jsx10(
9619
+ ) : activeSelector ? null : /* @__PURE__ */ jsx12(
9342
9620
  InputBox,
9343
9621
  {
9344
9622
  variant: "dock",
@@ -9396,10 +9674,11 @@ var App = ({
9396
9674
  placeholder: chatState.status === "hitl_waiting" ? "Answer HITL prompt, or /open for frontend..." : isBusyStatus(chatState.status) ? "Response in progress. Enter queues next message..." : "Ask Cloudeval..."
9397
9675
  }
9398
9676
  ),
9399
- /* @__PURE__ */ jsx10(BottomControls, { tab: activeWorkspaceTab })
9677
+ /* @__PURE__ */ jsx12(BottomControls, { tab: activeWorkspaceTab })
9400
9678
  ] });
9401
9679
  };
9402
9680
  export {
9403
9681
  App,
9682
+ buildBannerDetailLines,
9404
9683
  buildTuiHeaderDetails
9405
9684
  };