@ganakailabs/cloudeval-cli 0.24.3 → 0.25.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.
- package/dist/{App-YO6YXOII.js → App-H46FRLWK.js} +614 -516
- package/dist/{Banner-CSZZHF6L.js → Banner-7X2VHUVH.js} +2 -2
- package/dist/{chunk-UZDPQSE5.js → chunk-LKVKOGVL.js} +1 -1
- package/dist/{chunk-JNHT2L4P.js → chunk-TISPT6EB.js} +1 -1
- package/dist/cli.js +825 -310
- package/dist/fetchLastAssistantContent-RH6RMSQO.js +27 -0
- package/dist/resolveAskProject-NK435I56.js +49 -0
- package/package.json +1 -1
- package/sbom.spdx.json +1 -1
|
@@ -38,10 +38,10 @@ import {
|
|
|
38
38
|
} from "./chunk-KBHRBGSX.js";
|
|
39
39
|
import {
|
|
40
40
|
Banner
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TISPT6EB.js";
|
|
42
42
|
import {
|
|
43
43
|
CLI_VERSION
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-LKVKOGVL.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
|
|
52
|
+
import { Box as Box10, Text as Text13, 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";
|
|
@@ -135,9 +135,11 @@ import { supportsLanguage } from "cli-highlight";
|
|
|
135
135
|
import SyntaxHighlight from "ink-syntax-highlight";
|
|
136
136
|
|
|
137
137
|
// src/ui/citationContent.ts
|
|
138
|
-
var CITATION_TAG_RE = /\[S([A-Za-z0-9_
|
|
139
|
-
var CITATION_TAG_ALT_RE = /\[(tool_[A-Za-z0-9_
|
|
138
|
+
var CITATION_TAG_RE = /\[S([A-Za-z0-9_\-]+)\]/g;
|
|
139
|
+
var CITATION_TAG_ALT_RE = /\[(tool_[A-Za-z0-9_\-]+)\]/g;
|
|
140
140
|
var DEFAULT_MAX_INLINE_CITATIONS_PER_SOURCE = 3;
|
|
141
|
+
var ALIGNMENT_LOW_SCORE = 70;
|
|
142
|
+
var QUOTE_EXCERPT_MAX = 120;
|
|
141
143
|
var normalizeCitationSourceId = (sourceId) => sourceId.startsWith("_tool_") ? sourceId.slice(1) : sourceId;
|
|
142
144
|
var findCitationMatches = (value) => {
|
|
143
145
|
const matches = [];
|
|
@@ -251,6 +253,7 @@ var buildCitationReferences = ({
|
|
|
251
253
|
return order.map((sourceId, index) => {
|
|
252
254
|
const tool = toolBySourceId.get(sourceId);
|
|
253
255
|
const citation = citationBySourceId.get(sourceId);
|
|
256
|
+
const alignmentScore = typeof citation?.alignment_score === "number" ? citation.alignment_score : void 0;
|
|
254
257
|
return {
|
|
255
258
|
number: index + 1,
|
|
256
259
|
sourceId,
|
|
@@ -260,10 +263,15 @@ var buildCitationReferences = ({
|
|
|
260
263
|
tool?.tool_friendly_name,
|
|
261
264
|
tool?.tool_name
|
|
262
265
|
) ?? fallbackSourceLabel(sourceId),
|
|
263
|
-
url: firstString(citation?.url, tool?.source_url)
|
|
266
|
+
url: firstString(citation?.url, tool?.source_url),
|
|
267
|
+
quote: firstString(citation?.quote),
|
|
268
|
+
loc: firstString(citation?.loc),
|
|
269
|
+
alignment_score: alignmentScore,
|
|
270
|
+
origin: typeof citation?.origin === "string" ? citation.origin : void 0
|
|
264
271
|
};
|
|
265
272
|
});
|
|
266
273
|
};
|
|
274
|
+
var truncateQuote = (quote) => quote.length <= QUOTE_EXCERPT_MAX ? quote : `${quote.slice(0, QUOTE_EXCERPT_MAX - 1)}\u2026`;
|
|
267
275
|
var buildReferencesSection = (references) => {
|
|
268
276
|
if (!references.length) {
|
|
269
277
|
return "";
|
|
@@ -271,9 +279,13 @@ var buildReferencesSection = (references) => {
|
|
|
271
279
|
return [
|
|
272
280
|
"---",
|
|
273
281
|
"## References",
|
|
274
|
-
...references.map(
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
...references.map((reference) => {
|
|
283
|
+
const lowConfidence = typeof reference.alignment_score === "number" && reference.alignment_score < ALIGNMENT_LOW_SCORE;
|
|
284
|
+
const quotePart = reference.quote ? ` \u2014 "${truncateQuote(reference.quote)}"` : "";
|
|
285
|
+
const locPart = reference.loc ? ` (${reference.loc})` : "";
|
|
286
|
+
const confidencePart = lowConfidence ? " ~low confidence" : "";
|
|
287
|
+
return `- [${reference.number}] ${reference.label}${reference.url ? ` - ${reference.url}` : ""}${quotePart}${locPart}${confidencePart}`;
|
|
288
|
+
})
|
|
277
289
|
].join("\n");
|
|
278
290
|
};
|
|
279
291
|
var toCitationExportContent = ({
|
|
@@ -466,16 +478,30 @@ var CitationReferences = ({
|
|
|
466
478
|
}
|
|
467
479
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
468
480
|
/* @__PURE__ */ jsx4(Text4, { color: terminalTheme.brand, children: "Sources" }),
|
|
469
|
-
references.map((reference) =>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
481
|
+
references.map((reference) => {
|
|
482
|
+
const lowConfidence = typeof reference.alignment_score === "number" && reference.alignment_score < 70;
|
|
483
|
+
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
484
|
+
/* @__PURE__ */ jsxs3(Text4, { dimColor: true, wrap: "wrap", children: [
|
|
485
|
+
/* @__PURE__ */ jsxs3(Text4, { color: terminalTheme.brand, children: [
|
|
486
|
+
"[",
|
|
487
|
+
reference.number,
|
|
488
|
+
"]"
|
|
489
|
+
] }),
|
|
490
|
+
" ",
|
|
491
|
+
reference.label,
|
|
492
|
+
reference.url ? ` - ${reference.url}` : "",
|
|
493
|
+
lowConfidence ? /* @__PURE__ */ jsx4(Text4, { color: terminalTheme.warning, children: " ~low confidence" }) : null
|
|
494
|
+
] }),
|
|
495
|
+
reference.quote ? /* @__PURE__ */ jsxs3(Text4, { dimColor: true, wrap: "wrap", children: [
|
|
496
|
+
" ",
|
|
497
|
+
reference.quote.length > 120 ? `${reference.quote.slice(0, 119)}\u2026` : reference.quote
|
|
498
|
+
] }) : null,
|
|
499
|
+
reference.loc ? /* @__PURE__ */ jsxs3(Text4, { dimColor: true, wrap: "wrap", children: [
|
|
500
|
+
" ",
|
|
501
|
+
reference.loc
|
|
502
|
+
] }) : null
|
|
503
|
+
] }, reference.sourceId);
|
|
504
|
+
})
|
|
479
505
|
] });
|
|
480
506
|
};
|
|
481
507
|
var FormattedContent = ({ message, role }) => {
|
|
@@ -770,9 +796,47 @@ var Transcript = ({
|
|
|
770
796
|
] });
|
|
771
797
|
};
|
|
772
798
|
|
|
799
|
+
// src/ui/components/CitationSourceInspector.tsx
|
|
800
|
+
import { Box as Box4, Text as Text5 } from "ink";
|
|
801
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
802
|
+
var ALIGNMENT_LOW_SCORE2 = 70;
|
|
803
|
+
var CitationSourceInspector = ({
|
|
804
|
+
reference,
|
|
805
|
+
onClose: _onClose
|
|
806
|
+
}) => {
|
|
807
|
+
if (!reference) {
|
|
808
|
+
return null;
|
|
809
|
+
}
|
|
810
|
+
const lowConfidence = typeof reference.alignment_score === "number" && reference.alignment_score < ALIGNMENT_LOW_SCORE2;
|
|
811
|
+
return /* @__PURE__ */ jsxs4(
|
|
812
|
+
Box4,
|
|
813
|
+
{
|
|
814
|
+
flexDirection: "column",
|
|
815
|
+
borderStyle: "round",
|
|
816
|
+
borderColor: terminalTheme.brand,
|
|
817
|
+
paddingX: 1,
|
|
818
|
+
marginTop: 1,
|
|
819
|
+
children: [
|
|
820
|
+
/* @__PURE__ */ jsxs4(Text5, { color: terminalTheme.brand, bold: true, children: [
|
|
821
|
+
"Source [",
|
|
822
|
+
reference.number,
|
|
823
|
+
"]"
|
|
824
|
+
] }),
|
|
825
|
+
/* @__PURE__ */ jsx5(Text5, { wrap: "wrap", children: reference.label }),
|
|
826
|
+
reference.url ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "wrap", children: reference.url }) : null,
|
|
827
|
+
reference.quote ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "wrap", children: reference.quote }) : null,
|
|
828
|
+
reference.loc ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, wrap: "wrap", children: reference.loc }) : null,
|
|
829
|
+
lowConfidence ? /* @__PURE__ */ jsx5(Text5, { color: terminalTheme.warning, children: "~low confidence" }) : null,
|
|
830
|
+
reference.origin === "fallback" ? /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "origin: fallback (synthetic placement)" }) : null,
|
|
831
|
+
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "Press Esc to close" })
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
);
|
|
835
|
+
};
|
|
836
|
+
|
|
773
837
|
// src/ui/components/InputBox.tsx
|
|
774
838
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
775
|
-
import { Box as
|
|
839
|
+
import { Box as Box5, Text as Text7, useInput } from "ink";
|
|
776
840
|
|
|
777
841
|
// src/ui/inputSanitizer.ts
|
|
778
842
|
var SGR_MOUSE_SEQUENCE = /\x1b?\[<\d+;\d+;\d+[mM]/g;
|
|
@@ -947,24 +1011,24 @@ var workspaceTabFromPosition = (column, row, areas) => areas.find(
|
|
|
947
1011
|
)?.tab;
|
|
948
1012
|
|
|
949
1013
|
// src/ui/components/InputHelpText.tsx
|
|
950
|
-
import { Text as
|
|
951
|
-
import { jsx as
|
|
1014
|
+
import { Text as Text6 } from "ink";
|
|
1015
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
952
1016
|
var SLASH_COMMAND_PATTERN = /(\/[a-z][a-z0-9_-]*)/gi;
|
|
953
1017
|
var InputHelpText = ({ text }) => {
|
|
954
1018
|
const parts = text.split(SLASH_COMMAND_PATTERN);
|
|
955
1019
|
if (parts.length === 1) {
|
|
956
|
-
return /* @__PURE__ */
|
|
1020
|
+
return /* @__PURE__ */ jsx6(Text6, { dimColor: true, wrap: "truncate", children: text });
|
|
957
1021
|
}
|
|
958
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsx6(Text6, { wrap: "truncate", children: parts.map((part, index) => {
|
|
959
1023
|
if (part.startsWith("/")) {
|
|
960
|
-
return /* @__PURE__ */
|
|
1024
|
+
return /* @__PURE__ */ jsx6(Text6, { color: terminalTheme.accent, bold: true, children: part }, `${part}-${index}`);
|
|
961
1025
|
}
|
|
962
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: part }, `${part}-${index}`);
|
|
963
1027
|
}) });
|
|
964
1028
|
};
|
|
965
1029
|
|
|
966
1030
|
// src/ui/components/InputBox.tsx
|
|
967
|
-
import { Fragment, jsx as
|
|
1031
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
968
1032
|
var COMMAND_MENU_VISIBLE_ROWS = 5;
|
|
969
1033
|
var shouldAnimateInputCursor = ({
|
|
970
1034
|
disabled,
|
|
@@ -1024,7 +1088,7 @@ var Scrollbar = ({
|
|
|
1024
1088
|
visibleRows - 1,
|
|
1025
1089
|
Math.max(0, Math.round(startRow / maxStart * (visibleRows - 1)))
|
|
1026
1090
|
);
|
|
1027
|
-
return /* @__PURE__ */
|
|
1091
|
+
return /* @__PURE__ */ jsx7(Box5, { flexDirection: "column", marginLeft: 1, children: Array.from({ length: visibleRows }, (_, index) => /* @__PURE__ */ jsx7(Text7, { color: index === thumbIndex ? terminalTheme.focus : terminalTheme.muted, children: index === thumbIndex ? "\u2503" : "\u2502" }, index)) });
|
|
1028
1092
|
};
|
|
1029
1093
|
var truncateInline = (value, maxLength) => {
|
|
1030
1094
|
if (value.length <= maxLength) {
|
|
@@ -1346,14 +1410,14 @@ var InputBox = ({
|
|
|
1346
1410
|
const cursorGlyph = getInputCursorGlyph({ inputActive, cursorVisible });
|
|
1347
1411
|
const cursorColor = getInputCursorColor({ disabled, inputActive, cursorVisible });
|
|
1348
1412
|
const inputBorderColor = disabled ? terminalTheme.muted : followUpsActive || inputActive ? terminalTheme.focus : terminalTheme.muted;
|
|
1349
|
-
const content = /* @__PURE__ */
|
|
1350
|
-
followUps.length ? /* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
followUpViewport.clippedStart ? /* @__PURE__ */
|
|
1413
|
+
const content = /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1414
|
+
followUps.length ? /* @__PURE__ */ jsxs5(Text7, { wrap: "truncate", children: [
|
|
1415
|
+
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: `${followUpsLabel}: ` }),
|
|
1416
|
+
followUpViewport.clippedStart ? /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "<-- " }) : null,
|
|
1353
1417
|
followUpViewport.items.map(({ question, index, label }) => {
|
|
1354
1418
|
const focused = followUpsActive && focusedFollowUpIndex === index;
|
|
1355
|
-
return /* @__PURE__ */
|
|
1356
|
-
|
|
1419
|
+
return /* @__PURE__ */ jsxs5(
|
|
1420
|
+
Text7,
|
|
1357
1421
|
{
|
|
1358
1422
|
color: focused ? terminalTheme.focus : void 0,
|
|
1359
1423
|
bold: focused,
|
|
@@ -1367,30 +1431,30 @@ var InputBox = ({
|
|
|
1367
1431
|
`${index}-${question}`
|
|
1368
1432
|
);
|
|
1369
1433
|
}),
|
|
1370
|
-
followUpViewport.clippedEnd ? /* @__PURE__ */
|
|
1434
|
+
followUpViewport.clippedEnd ? /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "-->" }) : null
|
|
1371
1435
|
] }) : null,
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
|
|
1436
|
+
/* @__PURE__ */ jsxs5(
|
|
1437
|
+
Box5,
|
|
1374
1438
|
{
|
|
1375
1439
|
flexDirection: compact ? "column" : "row",
|
|
1376
1440
|
children: [
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ jsx7(Box5, { flexDirection: "column", flexGrow: 1, children: !value ? /* @__PURE__ */ jsxs5(Text7, { wrap: "truncate", children: [
|
|
1442
|
+
/* @__PURE__ */ jsxs5(Text7, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
|
|
1379
1443
|
promptPrefix,
|
|
1380
1444
|
" "
|
|
1381
1445
|
] }),
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ jsx7(Text7, { color: cursorColor, children: cursorGlyph }),
|
|
1447
|
+
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: ` ${placeholder}` })
|
|
1384
1448
|
] }) : promptRows.map((row, index) => {
|
|
1385
|
-
return /* @__PURE__ */
|
|
1386
|
-
row.showPromptPrefix ? /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ jsxs5(Text7, { wrap: "truncate", children: [
|
|
1450
|
+
row.showPromptPrefix ? /* @__PURE__ */ jsxs5(Text7, { color: inputActive ? terminalTheme.brand : terminalTheme.muted, children: [
|
|
1387
1451
|
promptPrefix,
|
|
1388
1452
|
" "
|
|
1389
|
-
] }) : /* @__PURE__ */
|
|
1453
|
+
] }) : /* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
1390
1454
|
row.line,
|
|
1391
|
-
row.showCursor ? /* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
|
|
1455
|
+
row.showCursor ? /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1456
|
+
/* @__PURE__ */ jsx7(
|
|
1457
|
+
Text7,
|
|
1394
1458
|
{
|
|
1395
1459
|
dimColor: true,
|
|
1396
1460
|
italic: true,
|
|
@@ -1398,11 +1462,11 @@ var InputBox = ({
|
|
|
1398
1462
|
children: ghostText ?? ""
|
|
1399
1463
|
}
|
|
1400
1464
|
),
|
|
1401
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ jsx7(Text7, { color: cursorColor, children: cursorGlyph })
|
|
1402
1466
|
] }) : null
|
|
1403
1467
|
] }, `${startRow}-${index}`);
|
|
1404
1468
|
}) }),
|
|
1405
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ jsx7(
|
|
1406
1470
|
Scrollbar,
|
|
1407
1471
|
{
|
|
1408
1472
|
totalRows: inputRows.length,
|
|
@@ -1413,13 +1477,13 @@ var InputBox = ({
|
|
|
1413
1477
|
]
|
|
1414
1478
|
}
|
|
1415
1479
|
),
|
|
1416
|
-
actionHint ? /* @__PURE__ */
|
|
1417
|
-
commandCompletionLayout.items.length ? /* @__PURE__ */
|
|
1418
|
-
/* @__PURE__ */
|
|
1480
|
+
actionHint ? /* @__PURE__ */ jsx7(Text7, { dimColor: true, wrap: "truncate", children: actionHint }) : resolvedHelpText ? /* @__PURE__ */ jsx7(InputHelpText, { text: resolvedHelpText }) : null,
|
|
1481
|
+
commandCompletionLayout.items.length ? /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
1482
|
+
/* @__PURE__ */ jsx7(Text7, { color: terminalTheme.muted, bold: commandCompletionsActive, children: "Slash commands" }),
|
|
1419
1483
|
commandCompletionLayout.mode === "vertical" ? commandCompletionLayout.items.map((item) => {
|
|
1420
1484
|
const active = item.index === commandCompletionLayout.activeIndex;
|
|
1421
|
-
return /* @__PURE__ */
|
|
1422
|
-
|
|
1485
|
+
return /* @__PURE__ */ jsx7(
|
|
1486
|
+
Text7,
|
|
1423
1487
|
{
|
|
1424
1488
|
backgroundColor: active ? terminalTheme.selectedBackground : void 0,
|
|
1425
1489
|
color: active ? terminalTheme.selected : terminalTheme.muted,
|
|
@@ -1429,8 +1493,8 @@ var InputBox = ({
|
|
|
1429
1493
|
},
|
|
1430
1494
|
item.command.name
|
|
1431
1495
|
);
|
|
1432
|
-
}) : /* @__PURE__ */
|
|
1433
|
-
|
|
1496
|
+
}) : /* @__PURE__ */ jsx7(
|
|
1497
|
+
Text7,
|
|
1434
1498
|
{
|
|
1435
1499
|
color: commandCompletionsActive ? terminalTheme.focus : terminalTheme.muted,
|
|
1436
1500
|
bold: commandCompletionsActive,
|
|
@@ -1442,14 +1506,14 @@ var InputBox = ({
|
|
|
1442
1506
|
].filter(Boolean).join(" ")
|
|
1443
1507
|
}
|
|
1444
1508
|
),
|
|
1445
|
-
activeCommand?.description ? /* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1509
|
+
activeCommand?.description ? /* @__PURE__ */ jsx7(Text7, { color: terminalTheme.secondary, wrap: "truncate", children: activeCommand.description }) : null,
|
|
1510
|
+
/* @__PURE__ */ jsx7(Text7, { dimColor: true, wrap: "truncate", children: commandCompletionNavigationHint })
|
|
1447
1511
|
] }) : null,
|
|
1448
|
-
footerControls ? /* @__PURE__ */
|
|
1512
|
+
footerControls ? /* @__PURE__ */ jsx7(Box5, { flexDirection: "column", marginTop: 1, children: footerControls }) : null
|
|
1449
1513
|
] });
|
|
1450
1514
|
if (variant === "dock") {
|
|
1451
|
-
return /* @__PURE__ */
|
|
1452
|
-
|
|
1515
|
+
return /* @__PURE__ */ jsx7(
|
|
1516
|
+
Box5,
|
|
1453
1517
|
{
|
|
1454
1518
|
flexDirection: "column",
|
|
1455
1519
|
borderStyle: "single",
|
|
@@ -1459,7 +1523,7 @@ var InputBox = ({
|
|
|
1459
1523
|
}
|
|
1460
1524
|
);
|
|
1461
1525
|
}
|
|
1462
|
-
return /* @__PURE__ */
|
|
1526
|
+
return /* @__PURE__ */ jsx7(
|
|
1463
1527
|
TitledBox,
|
|
1464
1528
|
{
|
|
1465
1529
|
title,
|
|
@@ -1473,7 +1537,7 @@ var InputBox = ({
|
|
|
1473
1537
|
};
|
|
1474
1538
|
|
|
1475
1539
|
// src/ui/components/NoticeLine.tsx
|
|
1476
|
-
import { Text as
|
|
1540
|
+
import { Text as Text8 } from "ink";
|
|
1477
1541
|
|
|
1478
1542
|
// src/ui/noticeTone.ts
|
|
1479
1543
|
var matchesAny = (message, patterns) => patterns.some((pattern) => pattern.test(message));
|
|
@@ -1535,7 +1599,7 @@ var classifyNoticeTone = (message) => {
|
|
|
1535
1599
|
};
|
|
1536
1600
|
|
|
1537
1601
|
// src/ui/components/NoticeLine.tsx
|
|
1538
|
-
import { jsx as
|
|
1602
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1539
1603
|
var toneColor = (tone) => {
|
|
1540
1604
|
switch (tone) {
|
|
1541
1605
|
case "success":
|
|
@@ -1554,7 +1618,7 @@ var NoticeLine = ({ message }) => {
|
|
|
1554
1618
|
const tone = classifyNoticeTone(message);
|
|
1555
1619
|
const color = toneColor(tone);
|
|
1556
1620
|
const bold = tone === "success" || tone === "danger";
|
|
1557
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsx8(Text8, { wrap: "wrap", color, bold, children: message });
|
|
1558
1622
|
};
|
|
1559
1623
|
|
|
1560
1624
|
// src/ui/layout.ts
|
|
@@ -1740,8 +1804,8 @@ var buildTuiHeaderDetails = (options) => buildBannerDetailLines(options).map(
|
|
|
1740
1804
|
);
|
|
1741
1805
|
|
|
1742
1806
|
// src/ui/components/Scrollbar.tsx
|
|
1743
|
-
import { Box as
|
|
1744
|
-
import { jsx as
|
|
1807
|
+
import { Box as Box6, Text as Text9 } from "ink";
|
|
1808
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1745
1809
|
var Scrollbar2 = ({
|
|
1746
1810
|
scrollOffset,
|
|
1747
1811
|
contentHeight,
|
|
@@ -1763,8 +1827,8 @@ var Scrollbar2 = ({
|
|
|
1763
1827
|
scrollbarLines.push("\u2502");
|
|
1764
1828
|
}
|
|
1765
1829
|
}
|
|
1766
|
-
return /* @__PURE__ */
|
|
1767
|
-
|
|
1830
|
+
return /* @__PURE__ */ jsx9(Box6, { flexDirection: "column", marginLeft: 1, flexShrink: 0, width: 1, children: scrollbarLines.map((line, idx) => /* @__PURE__ */ jsx9(
|
|
1831
|
+
Text9,
|
|
1768
1832
|
{
|
|
1769
1833
|
color: line === "\u2588" ? terminalTheme.focus : terminalTheme.muted,
|
|
1770
1834
|
children: line
|
|
@@ -1775,8 +1839,8 @@ var Scrollbar2 = ({
|
|
|
1775
1839
|
|
|
1776
1840
|
// src/ui/components/ProjectSelector.tsx
|
|
1777
1841
|
import { useState as useState3, useEffect as useEffect3 } from "react";
|
|
1778
|
-
import { Box as
|
|
1779
|
-
import { jsx as
|
|
1842
|
+
import { Box as Box7, Text as Text10, useInput as useInput2 } from "ink";
|
|
1843
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1780
1844
|
function ProjectSelector({
|
|
1781
1845
|
items,
|
|
1782
1846
|
onSubmit,
|
|
@@ -1836,16 +1900,16 @@ function ProjectSelector({
|
|
|
1836
1900
|
);
|
|
1837
1901
|
const visibleItems = items.slice(windowStart, windowStart + visibleCount);
|
|
1838
1902
|
if (items.length === 0) {
|
|
1839
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx10(Text10, { dimColor: true, children: "No projects available." });
|
|
1840
1904
|
}
|
|
1841
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", gap: 0, children: [
|
|
1842
1906
|
visibleItems.map((item, idx) => {
|
|
1843
1907
|
const actualIndex = windowStart + idx;
|
|
1844
1908
|
const isSelected = multiple ? selected.has(actualIndex) : highlighted === actualIndex;
|
|
1845
1909
|
const isHighlighted = highlighted === actualIndex;
|
|
1846
1910
|
const marker = isHighlighted ? ">" : isSelected ? "*" : " ";
|
|
1847
|
-
return /* @__PURE__ */
|
|
1848
|
-
|
|
1911
|
+
return /* @__PURE__ */ jsxs6(
|
|
1912
|
+
Text10,
|
|
1849
1913
|
{
|
|
1850
1914
|
bold: isHighlighted || isSelected,
|
|
1851
1915
|
color: isSelected ? terminalTheme.selected : isHighlighted ? terminalTheme.focus : void 0,
|
|
@@ -1859,8 +1923,8 @@ function ProjectSelector({
|
|
|
1859
1923
|
`${actualIndex}-${item.label}`
|
|
1860
1924
|
);
|
|
1861
1925
|
}),
|
|
1862
|
-
/* @__PURE__ */
|
|
1863
|
-
items.length > visibleItems.length ? /* @__PURE__ */
|
|
1926
|
+
/* @__PURE__ */ jsx10(Text10, { dimColor: true, children: multiple ? "Use arrows to navigate, Space to toggle, Enter to confirm" : "Use arrows to navigate and Enter to select" }),
|
|
1927
|
+
items.length > visibleItems.length ? /* @__PURE__ */ jsxs6(Text10, { dimColor: true, children: [
|
|
1864
1928
|
"Showing ",
|
|
1865
1929
|
windowStart + 1,
|
|
1866
1930
|
"-",
|
|
@@ -1873,8 +1937,8 @@ function ProjectSelector({
|
|
|
1873
1937
|
|
|
1874
1938
|
// src/ui/components/SelectPanel.tsx
|
|
1875
1939
|
import React6 from "react";
|
|
1876
|
-
import { Box as
|
|
1877
|
-
import { jsx as
|
|
1940
|
+
import { Box as Box8, Text as Text11, useInput as useInput3 } from "ink";
|
|
1941
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1878
1942
|
function SelectPanel({
|
|
1879
1943
|
title,
|
|
1880
1944
|
items,
|
|
@@ -1919,15 +1983,15 @@ function SelectPanel({
|
|
|
1919
1983
|
Math.max(0, items.length - visibleCount)
|
|
1920
1984
|
);
|
|
1921
1985
|
const visibleItems = items.slice(windowStart, windowStart + visibleCount);
|
|
1922
|
-
return /* @__PURE__ */
|
|
1923
|
-
items.length === 0 ? /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsxs7(TitledBox, { title, borderStyle: "round", borderColor: terminalTheme.focus, padding: 1, children: [
|
|
1987
|
+
items.length === 0 ? /* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "No options available." }) : visibleItems.map((item, offset) => {
|
|
1924
1988
|
const index = windowStart + offset;
|
|
1925
1989
|
const isHighlighted = index === highlighted;
|
|
1926
1990
|
const isSelected = index === normalizedSelectedIndex;
|
|
1927
1991
|
const marker = isHighlighted ? "\u25B8" : isSelected ? "\u2022" : " ";
|
|
1928
|
-
return /* @__PURE__ */
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
|
|
1992
|
+
return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", children: [
|
|
1993
|
+
/* @__PURE__ */ jsxs7(
|
|
1994
|
+
Text11,
|
|
1931
1995
|
{
|
|
1932
1996
|
bold: isHighlighted || isSelected,
|
|
1933
1997
|
color: isSelected ? terminalTheme.selected : isHighlighted ? terminalTheme.focus : void 0,
|
|
@@ -1939,13 +2003,13 @@ function SelectPanel({
|
|
|
1939
2003
|
]
|
|
1940
2004
|
}
|
|
1941
2005
|
),
|
|
1942
|
-
isHighlighted && item.description ? /* @__PURE__ */
|
|
2006
|
+
isHighlighted && item.description ? /* @__PURE__ */ jsxs7(Text11, { dimColor: true, children: [
|
|
1943
2007
|
" ",
|
|
1944
2008
|
item.description
|
|
1945
2009
|
] }) : null
|
|
1946
2010
|
] }, `${index}-${item.label}`);
|
|
1947
2011
|
}),
|
|
1948
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ jsx11(Text11, { dimColor: true, children: "Use Up/Down, Enter to select, Esc to cancel." })
|
|
1949
2013
|
] });
|
|
1950
2014
|
}
|
|
1951
2015
|
|
|
@@ -4055,7 +4119,7 @@ var loadWorkspacePanelData = async ({
|
|
|
4055
4119
|
|
|
4056
4120
|
// src/ui/workspacePanel.tsx
|
|
4057
4121
|
import React7 from "react";
|
|
4058
|
-
import { Box as
|
|
4122
|
+
import { Box as Box9, Text as Text12 } from "ink";
|
|
4059
4123
|
import { plot as plotAsciiChart } from "asciichart";
|
|
4060
4124
|
|
|
4061
4125
|
// src/ui/workspaceEntityDetails.ts
|
|
@@ -4251,7 +4315,7 @@ var buildConnectionDetailModel = ({
|
|
|
4251
4315
|
};
|
|
4252
4316
|
|
|
4253
4317
|
// src/ui/workspacePanel.tsx
|
|
4254
|
-
import { Fragment as Fragment2, jsx as
|
|
4318
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4255
4319
|
var toRecord5 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
4256
4320
|
var directArray3 = (value) => {
|
|
4257
4321
|
if (Array.isArray(value)) {
|
|
@@ -4401,12 +4465,12 @@ var sparkBlocks = ["\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "
|
|
|
4401
4465
|
var InlineSparkline = ({ values, width, tone }) => {
|
|
4402
4466
|
const sampled = sampleValues(values, Math.max(4, width));
|
|
4403
4467
|
if (!sampled.length) {
|
|
4404
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "no trend data" });
|
|
4405
4469
|
}
|
|
4406
4470
|
const max = Math.max(...sampled);
|
|
4407
4471
|
const min = Math.min(...sampled);
|
|
4408
4472
|
const span = max - min || 1;
|
|
4409
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ jsx12(Text12, { color: metricColor(tone) ?? terminalTheme.brand, children: sampled.map((value) => {
|
|
4410
4474
|
const index = Math.min(
|
|
4411
4475
|
sparkBlocks.length - 1,
|
|
4412
4476
|
Math.max(
|
|
@@ -4420,8 +4484,8 @@ var InlineSparkline = ({ values, width, tone }) => {
|
|
|
4420
4484
|
var AsciiLineChart = ({ values, width, height = 4, tone }) => {
|
|
4421
4485
|
const sampled = sampleValues(values, Math.max(8, width - 8));
|
|
4422
4486
|
if (sampled.length < 2) {
|
|
4423
|
-
return /* @__PURE__ */
|
|
4424
|
-
/* @__PURE__ */
|
|
4487
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
4488
|
+
/* @__PURE__ */ jsx12(
|
|
4425
4489
|
InlineSparkline,
|
|
4426
4490
|
{
|
|
4427
4491
|
values: sampled,
|
|
@@ -4429,7 +4493,7 @@ var AsciiLineChart = ({ values, width, height = 4, tone }) => {
|
|
|
4429
4493
|
tone
|
|
4430
4494
|
}
|
|
4431
4495
|
),
|
|
4432
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: " current only" })
|
|
4433
4497
|
] });
|
|
4434
4498
|
}
|
|
4435
4499
|
const chart = plotAsciiChart(sampled, {
|
|
@@ -4438,8 +4502,8 @@ var AsciiLineChart = ({ values, width, height = 4, tone }) => {
|
|
|
4438
4502
|
padding: " ",
|
|
4439
4503
|
format: (value) => String(Math.round(value)).padStart(3, " ").slice(-3)
|
|
4440
4504
|
});
|
|
4441
|
-
return /* @__PURE__ */
|
|
4442
|
-
|
|
4505
|
+
return /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", children: chart.split("\n").map((line, index) => /* @__PURE__ */ jsx12(
|
|
4506
|
+
Text12,
|
|
4443
4507
|
{
|
|
4444
4508
|
color: metricColor(tone) ?? terminalTheme.brand,
|
|
4445
4509
|
wrap: "truncate",
|
|
@@ -4501,28 +4565,28 @@ var rowDetail = (value) => {
|
|
|
4501
4565
|
};
|
|
4502
4566
|
var Bar = ({ value, width = 28, tone }) => {
|
|
4503
4567
|
if (value === void 0) {
|
|
4504
|
-
return /* @__PURE__ */
|
|
4568
|
+
return /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "-".repeat(Math.min(width, 28)) });
|
|
4505
4569
|
}
|
|
4506
4570
|
const ratio = Math.max(0, Math.min(1, value));
|
|
4507
4571
|
const filled = Math.round(ratio * width);
|
|
4508
4572
|
if (filled <= 0) {
|
|
4509
|
-
return /* @__PURE__ */
|
|
4573
|
+
return /* @__PURE__ */ jsx12(Text12, { children: " ".repeat(width) });
|
|
4510
4574
|
}
|
|
4511
|
-
return /* @__PURE__ */
|
|
4575
|
+
return /* @__PURE__ */ jsxs8(Text12, { color: metricColor(tone) ?? terminalTheme.brand, children: [
|
|
4512
4576
|
"\u2588".repeat(filled),
|
|
4513
4577
|
" ".repeat(width - filled)
|
|
4514
4578
|
] });
|
|
4515
4579
|
};
|
|
4516
4580
|
var BarList = ({ bars, width, emptyLabel, labelWidth = 18 }) => {
|
|
4517
4581
|
const barWidth = Math.max(12, Math.min(32, width));
|
|
4518
|
-
return /* @__PURE__ */
|
|
4519
|
-
/* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", children: bars.length ? bars.slice(0, 6).map((bar) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
4583
|
+
/* @__PURE__ */ jsx12(Box9, { width: labelWidth, children: /* @__PURE__ */ jsx12(Text12, { wrap: "truncate", children: truncateForTerminal(normalizeLabel(bar.label), labelWidth - 2) }) }),
|
|
4584
|
+
/* @__PURE__ */ jsx12(Bar, { value: bar.ratio, width: barWidth, tone: bar.tone }),
|
|
4585
|
+
/* @__PURE__ */ jsxs8(Text12, { color: metricColor(bar.tone), children: [
|
|
4522
4586
|
" ",
|
|
4523
4587
|
chartValue(bar.value)
|
|
4524
4588
|
] })
|
|
4525
|
-
] }, bar.label)) : /* @__PURE__ */
|
|
4589
|
+
] }, bar.label)) : /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: emptyLabel }) });
|
|
4526
4590
|
};
|
|
4527
4591
|
var TrendSummary = ({
|
|
4528
4592
|
trend,
|
|
@@ -4531,16 +4595,16 @@ var TrendSummary = ({
|
|
|
4531
4595
|
const chartWidth = Math.max(18, Math.min(44, width));
|
|
4532
4596
|
const labelWidth = Math.min(24, Math.max(14, Math.floor(chartWidth * 0.55)));
|
|
4533
4597
|
const icon = trend.delta === void 0 ? "\u2022" : trend.delta > 0 ? "\u2191" : trend.delta < 0 ? "\u2193" : "\u2192";
|
|
4534
|
-
return /* @__PURE__ */
|
|
4535
|
-
/* @__PURE__ */
|
|
4536
|
-
/* @__PURE__ */
|
|
4537
|
-
/* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
4599
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
4600
|
+
/* @__PURE__ */ jsx12(Box9, { width: labelWidth, children: /* @__PURE__ */ jsx12(Text12, { bold: true, wrap: "truncate", children: truncateForTerminal(trend.label, labelWidth - 1) }) }),
|
|
4601
|
+
/* @__PURE__ */ jsxs8(Text12, { color: metricColor(trend.tone), children: [
|
|
4538
4602
|
icon,
|
|
4539
4603
|
" ",
|
|
4540
4604
|
trend.summary
|
|
4541
4605
|
] })
|
|
4542
4606
|
] }),
|
|
4543
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx12(
|
|
4544
4608
|
AsciiLineChart,
|
|
4545
4609
|
{
|
|
4546
4610
|
values: trend.values,
|
|
@@ -4551,7 +4615,7 @@ var TrendSummary = ({
|
|
|
4551
4615
|
)
|
|
4552
4616
|
] });
|
|
4553
4617
|
};
|
|
4554
|
-
var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */
|
|
4618
|
+
var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */ jsx12(
|
|
4555
4619
|
TitledBox,
|
|
4556
4620
|
{
|
|
4557
4621
|
title,
|
|
@@ -4559,16 +4623,16 @@ var SectionCard = ({ title, children, borderColor }) => /* @__PURE__ */ jsx11(
|
|
|
4559
4623
|
borderColor: borderColor ?? terminalTheme.muted,
|
|
4560
4624
|
padding: 0,
|
|
4561
4625
|
paddingX: 1,
|
|
4562
|
-
children: /* @__PURE__ */
|
|
4626
|
+
children: /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", marginTop: 1, children })
|
|
4563
4627
|
}
|
|
4564
4628
|
);
|
|
4565
4629
|
var CreditProgress = ({ remaining, total, width = 12, tone }) => {
|
|
4566
4630
|
const ratio = total > 0 ? Math.min(1, Math.max(0, remaining / total)) : 0;
|
|
4567
4631
|
const safeWidth = Math.max(6, width);
|
|
4568
4632
|
const filled = Math.round(ratio * safeWidth);
|
|
4569
|
-
return /* @__PURE__ */
|
|
4633
|
+
return /* @__PURE__ */ jsxs8(Text12, { children: [
|
|
4570
4634
|
"[",
|
|
4571
|
-
/* @__PURE__ */
|
|
4635
|
+
/* @__PURE__ */ jsx12(Text12, { color: billingToneColor(tone), children: "\u2588".repeat(filled) }),
|
|
4572
4636
|
" ".repeat(safeWidth - filled),
|
|
4573
4637
|
"] ",
|
|
4574
4638
|
Math.round(ratio * 100),
|
|
@@ -4577,19 +4641,19 @@ var CreditProgress = ({ remaining, total, width = 12, tone }) => {
|
|
|
4577
4641
|
};
|
|
4578
4642
|
var BillingSummaryLine = ({
|
|
4579
4643
|
billing
|
|
4580
|
-
}) => /* @__PURE__ */
|
|
4581
|
-
/* @__PURE__ */
|
|
4644
|
+
}) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", flexWrap: "wrap", columnGap: 1, children: [
|
|
4645
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4582
4646
|
"Plan: ",
|
|
4583
|
-
/* @__PURE__ */
|
|
4647
|
+
/* @__PURE__ */ jsx12(Text12, { children: billing.plan })
|
|
4584
4648
|
] }),
|
|
4585
|
-
/* @__PURE__ */
|
|
4649
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4586
4650
|
"Credits:",
|
|
4587
4651
|
" ",
|
|
4588
|
-
/* @__PURE__ */
|
|
4652
|
+
/* @__PURE__ */ jsx12(Text12, { color: billingToneColor(billing.tone), children: Math.max(Number(billing.reportedUsed ?? billing.used ?? 0), 0) > 0 ? `${formatCredits(billing.remaining)} left | Used ${formatCredits(
|
|
4589
4653
|
Math.max(Number(billing.reportedUsed ?? billing.used ?? 0), 0)
|
|
4590
4654
|
)}` : `${formatCredits(billing.remaining)}/${formatCredits(billing.total)}` })
|
|
4591
4655
|
] }),
|
|
4592
|
-
/* @__PURE__ */
|
|
4656
|
+
/* @__PURE__ */ jsx12(
|
|
4593
4657
|
CreditProgress,
|
|
4594
4658
|
{
|
|
4595
4659
|
remaining: billing.remaining,
|
|
@@ -4598,18 +4662,18 @@ var BillingSummaryLine = ({
|
|
|
4598
4662
|
tone: billing.tone
|
|
4599
4663
|
}
|
|
4600
4664
|
),
|
|
4601
|
-
/* @__PURE__ */
|
|
4665
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "O opens billing" })
|
|
4602
4666
|
] });
|
|
4603
4667
|
var MetricStrip = ({
|
|
4604
4668
|
metrics,
|
|
4605
4669
|
compact
|
|
4606
|
-
}) => /* @__PURE__ */
|
|
4670
|
+
}) => /* @__PURE__ */ jsx12(Box9, { flexDirection: compact ? "column" : "row", gap: 1, flexWrap: "wrap", children: metrics.map((metric) => {
|
|
4607
4671
|
const width = Math.max(
|
|
4608
4672
|
metric.label.length + 8,
|
|
4609
4673
|
metric.value.length + 6,
|
|
4610
4674
|
compact ? 0 : 17
|
|
4611
4675
|
);
|
|
4612
|
-
return /* @__PURE__ */
|
|
4676
|
+
return /* @__PURE__ */ jsx12(
|
|
4613
4677
|
TitledBox,
|
|
4614
4678
|
{
|
|
4615
4679
|
title: metric.label,
|
|
@@ -4620,7 +4684,7 @@ var MetricStrip = ({
|
|
|
4620
4684
|
paddingX: 1,
|
|
4621
4685
|
width,
|
|
4622
4686
|
flexShrink: 0,
|
|
4623
|
-
children: /* @__PURE__ */
|
|
4687
|
+
children: /* @__PURE__ */ jsx12(Text12, { bold: true, color: metricColor(metric.tone), wrap: "truncate", children: metric.value })
|
|
4624
4688
|
},
|
|
4625
4689
|
metric.label
|
|
4626
4690
|
);
|
|
@@ -4637,16 +4701,16 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
|
|
|
4637
4701
|
const hiddenCount = Math.max(0, rows.length - visibleRows.length);
|
|
4638
4702
|
const narrow = terminalColumns < 76;
|
|
4639
4703
|
if (narrow) {
|
|
4640
|
-
return /* @__PURE__ */
|
|
4641
|
-
visibleRows.map((row, index) => /* @__PURE__ */
|
|
4642
|
-
/* @__PURE__ */
|
|
4704
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
4705
|
+
visibleRows.map((row, index) => /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", marginBottom: 1, children: columns.map((column) => /* @__PURE__ */ jsxs8(Text12, { wrap: "truncate", children: [
|
|
4706
|
+
/* @__PURE__ */ jsxs8(Text12, { color: terminalTheme.muted, children: [
|
|
4643
4707
|
column,
|
|
4644
4708
|
": "
|
|
4645
4709
|
] }),
|
|
4646
4710
|
String(row[column] ?? "")
|
|
4647
4711
|
] }, column)) }, index)),
|
|
4648
|
-
/* @__PURE__ */
|
|
4649
|
-
/* @__PURE__ */
|
|
4712
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", justifyContent: "space-between", children: [
|
|
4713
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4650
4714
|
"rows ",
|
|
4651
4715
|
startIndex + 1,
|
|
4652
4716
|
"-",
|
|
@@ -4655,7 +4719,7 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
|
|
|
4655
4719
|
" ",
|
|
4656
4720
|
rows.length
|
|
4657
4721
|
] }),
|
|
4658
|
-
/* @__PURE__ */
|
|
4722
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "[ prev | ] next | D download" })
|
|
4659
4723
|
] })
|
|
4660
4724
|
] });
|
|
4661
4725
|
}
|
|
@@ -4679,11 +4743,11 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
|
|
|
4679
4743
|
return Math.max(min, scaled);
|
|
4680
4744
|
});
|
|
4681
4745
|
const columnWidth = (column) => widths[columns.indexOf(column)] ?? 10;
|
|
4682
|
-
const renderRow = (row, key, heading = false) => /* @__PURE__ */
|
|
4746
|
+
const renderRow = (row, key, heading = false) => /* @__PURE__ */ jsx12(Box9, { flexDirection: "row", children: columns.map((column) => {
|
|
4683
4747
|
const width = columnWidth(column);
|
|
4684
4748
|
const value = heading ? column : String(row[column] ?? "");
|
|
4685
|
-
return /* @__PURE__ */
|
|
4686
|
-
|
|
4749
|
+
return /* @__PURE__ */ jsx12(Box9, { width, marginRight: 1, children: /* @__PURE__ */ jsx12(
|
|
4750
|
+
Text12,
|
|
4687
4751
|
{
|
|
4688
4752
|
bold: heading,
|
|
4689
4753
|
color: heading ? terminalTheme.brand : void 0,
|
|
@@ -4692,22 +4756,22 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
|
|
|
4692
4756
|
}
|
|
4693
4757
|
) }, column);
|
|
4694
4758
|
}) }, key);
|
|
4695
|
-
return /* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
4696
4760
|
renderRow({}, "header", true),
|
|
4697
|
-
/* @__PURE__ */
|
|
4698
|
-
/* @__PURE__ */
|
|
4699
|
-
/* @__PURE__ */
|
|
4700
|
-
hiddenCount > 0 ? /* @__PURE__ */
|
|
4701
|
-
/* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: truncateForTerminal("\u2500".repeat(availableWidth), availableWidth) }),
|
|
4762
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
4763
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "column", flexGrow: 1, children: visibleRows.map((row, index) => renderRow(row, String(index))) }),
|
|
4764
|
+
hiddenCount > 0 ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", marginLeft: 1, children: [
|
|
4765
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "\u2503" }),
|
|
4702
4766
|
Array.from(
|
|
4703
4767
|
{ length: Math.max(1, visibleRows.length - 2) },
|
|
4704
|
-
(_, index) => /* @__PURE__ */
|
|
4768
|
+
(_, index) => /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "\u2502" }, index)
|
|
4705
4769
|
),
|
|
4706
|
-
/* @__PURE__ */
|
|
4770
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "\u2575" })
|
|
4707
4771
|
] }) : null
|
|
4708
4772
|
] }),
|
|
4709
|
-
/* @__PURE__ */
|
|
4710
|
-
/* @__PURE__ */
|
|
4773
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", justifyContent: "space-between", children: [
|
|
4774
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4711
4775
|
"rows ",
|
|
4712
4776
|
startIndex + 1,
|
|
4713
4777
|
"-",
|
|
@@ -4716,7 +4780,7 @@ var ResponsiveTable = ({ rows, columns, terminalColumns, maxRows = 12, page = 0
|
|
|
4716
4780
|
" ",
|
|
4717
4781
|
rows.length
|
|
4718
4782
|
] }),
|
|
4719
|
-
/* @__PURE__ */
|
|
4783
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4720
4784
|
"page ",
|
|
4721
4785
|
safePage + 1,
|
|
4722
4786
|
"/",
|
|
@@ -4742,10 +4806,10 @@ var HelpLegend = ({
|
|
|
4742
4806
|
{ key: "D", label: "download", color: terminalTheme.success },
|
|
4743
4807
|
...includeQuit ? [{ key: "Ctrl+Q", label: "quit", color: terminalTheme.danger }] : []
|
|
4744
4808
|
];
|
|
4745
|
-
return /* @__PURE__ */
|
|
4746
|
-
index > 0 ? /* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
/* @__PURE__ */
|
|
4809
|
+
return /* @__PURE__ */ jsx12(Box9, { flexDirection: "row", flexWrap: wrap ? "wrap" : "nowrap", columnGap: 1, children: segments.map((segment, index) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
4810
|
+
index > 0 ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "| " }) : null,
|
|
4811
|
+
/* @__PURE__ */ jsx12(Text12, { bold: true, color: segment.color, children: segment.key }),
|
|
4812
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4749
4813
|
" ",
|
|
4750
4814
|
segment.label
|
|
4751
4815
|
] })
|
|
@@ -4753,17 +4817,17 @@ var HelpLegend = ({
|
|
|
4753
4817
|
};
|
|
4754
4818
|
var ResourceSummary = ({ label, value, terminalColumns }) => {
|
|
4755
4819
|
const rows = directArray3(value);
|
|
4756
|
-
return /* @__PURE__ */
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
rows.slice(0, 5).map((row, index) => /* @__PURE__ */
|
|
4820
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
4821
|
+
/* @__PURE__ */ jsx12(Text12, { bold: true, children: label }),
|
|
4822
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: rows.length ? `${rows.length} row(s) returned` : `keys: ${truncateForTerminal(keySummary(value), Math.max(32, terminalColumns - 14))}` }),
|
|
4823
|
+
rows.slice(0, 5).map((row, index) => /* @__PURE__ */ jsxs8(Text12, { wrap: "truncate", children: [
|
|
4760
4824
|
index + 1,
|
|
4761
4825
|
".",
|
|
4762
4826
|
" ",
|
|
4763
4827
|
truncateForTerminal(rowLabel(row, `row ${index + 1}`), 36),
|
|
4764
4828
|
rowDetail(row) ? ` - ${truncateForTerminal(rowDetail(row), 64)}` : ""
|
|
4765
4829
|
] }, `${label}-${index}`)),
|
|
4766
|
-
!rows.length && !toRecord5(value) ? /* @__PURE__ */
|
|
4830
|
+
!rows.length && !toRecord5(value) ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "No data returned." }) : null
|
|
4767
4831
|
] });
|
|
4768
4832
|
};
|
|
4769
4833
|
var cleanBackendWarning = (warning, terminalColumns) => {
|
|
@@ -4785,29 +4849,29 @@ var entityToneColor = (tone) => {
|
|
|
4785
4849
|
};
|
|
4786
4850
|
var EntityDetailPanel = ({ model, emptyLabel, compact, terminalColumns }) => {
|
|
4787
4851
|
if (!model) {
|
|
4788
|
-
return /* @__PURE__ */
|
|
4852
|
+
return /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: emptyLabel });
|
|
4789
4853
|
}
|
|
4790
|
-
return /* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
4794
|
-
model.subtitle ? /* @__PURE__ */
|
|
4854
|
+
return /* @__PURE__ */ jsx12(SectionCard, { title: "Selected detail", borderColor: terminalTheme.focus, children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
4855
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", justifyContent: "space-between", gap: 1, children: [
|
|
4856
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", flexShrink: 1, children: [
|
|
4857
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.focus, bold: true, wrap: "truncate", children: truncateForTerminal(model.title, Math.max(24, terminalColumns - 32)) }),
|
|
4858
|
+
model.subtitle ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "truncate", children: model.subtitle }) : null
|
|
4795
4859
|
] }),
|
|
4796
|
-
/* @__PURE__ */
|
|
4860
|
+
/* @__PURE__ */ jsx12(MetricStrip, { metrics: model.metrics, compact })
|
|
4797
4861
|
] }),
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
4862
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "column", children: model.detailRows.map((row) => /* @__PURE__ */ jsxs8(Text12, { wrap: "truncate", children: [
|
|
4863
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4800
4864
|
row.label.padEnd(16),
|
|
4801
4865
|
" "
|
|
4802
4866
|
] }),
|
|
4803
|
-
/* @__PURE__ */
|
|
4867
|
+
/* @__PURE__ */ jsx12(Text12, { color: entityToneColor(row.tone), children: truncateForTerminal(row.value || "-", Math.max(20, terminalColumns - 24)) })
|
|
4804
4868
|
] }, `${row.label}-${row.value}`)) }),
|
|
4805
|
-
model.relatedItems.length ? /* @__PURE__ */
|
|
4806
|
-
/* @__PURE__ */
|
|
4807
|
-
model.relatedItems.slice(0, 5).map((item, index) => /* @__PURE__ */
|
|
4808
|
-
/* @__PURE__ */
|
|
4869
|
+
model.relatedItems.length ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
4870
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Linked" }),
|
|
4871
|
+
model.relatedItems.slice(0, 5).map((item, index) => /* @__PURE__ */ jsxs8(Text12, { wrap: "truncate", children: [
|
|
4872
|
+
/* @__PURE__ */ jsx12(Text12, { color: entityToneColor(item.tone), children: "\u25CF " }),
|
|
4809
4873
|
truncateForTerminal(item.label, 36),
|
|
4810
|
-
item.detail ? /* @__PURE__ */
|
|
4874
|
+
item.detail ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4811
4875
|
" - ",
|
|
4812
4876
|
truncateForTerminal(item.detail, 36)
|
|
4813
4877
|
] }) : null
|
|
@@ -4821,8 +4885,8 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
|
|
|
4821
4885
|
connections,
|
|
4822
4886
|
reportsSummary
|
|
4823
4887
|
});
|
|
4824
|
-
return /* @__PURE__ */
|
|
4825
|
-
/* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
4889
|
+
/* @__PURE__ */ jsx12(
|
|
4826
4890
|
MetricStrip,
|
|
4827
4891
|
{
|
|
4828
4892
|
compact,
|
|
@@ -4832,14 +4896,14 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
|
|
|
4832
4896
|
]
|
|
4833
4897
|
}
|
|
4834
4898
|
),
|
|
4835
|
-
/* @__PURE__ */
|
|
4836
|
-
/* @__PURE__ */
|
|
4837
|
-
/* @__PURE__ */
|
|
4838
|
-
/* @__PURE__ */
|
|
4899
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "J/K or Up/Down selects project | Enter confirms | O opens frontend" }),
|
|
4900
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 2, children: [
|
|
4901
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", flexBasis: compact ? void 0 : 52, flexShrink: 0, children: [
|
|
4902
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Project list" }),
|
|
4839
4903
|
projects.length ? projects.slice(0, 12).map((project, index) => {
|
|
4840
4904
|
const active = project.id === (selectedProject ?? projects[0])?.id;
|
|
4841
|
-
return /* @__PURE__ */
|
|
4842
|
-
|
|
4905
|
+
return /* @__PURE__ */ jsxs8(
|
|
4906
|
+
Text12,
|
|
4843
4907
|
{
|
|
4844
4908
|
color: active ? terminalTheme.focus : void 0,
|
|
4845
4909
|
backgroundColor: active ? terminalTheme.selectedBackground : void 0,
|
|
@@ -4850,16 +4914,16 @@ var ProjectsView = ({ projects, selectedProject, connections, reportsSummary, co
|
|
|
4850
4914
|
" ",
|
|
4851
4915
|
truncateForTerminal(project.name, 30),
|
|
4852
4916
|
" ",
|
|
4853
|
-
/* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: project.cloud_provider ?? "cloud" }),
|
|
4854
4918
|
" ",
|
|
4855
|
-
/* @__PURE__ */
|
|
4919
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: project.id })
|
|
4856
4920
|
]
|
|
4857
4921
|
},
|
|
4858
4922
|
project.id ?? index
|
|
4859
4923
|
);
|
|
4860
|
-
}) : /* @__PURE__ */
|
|
4924
|
+
}) : /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "No projects returned by the backend." })
|
|
4861
4925
|
] }),
|
|
4862
|
-
/* @__PURE__ */
|
|
4926
|
+
/* @__PURE__ */ jsx12(Box9, { flexGrow: 1, children: /* @__PURE__ */ jsx12(
|
|
4863
4927
|
EntityDetailPanel,
|
|
4864
4928
|
{
|
|
4865
4929
|
model: selectedModel,
|
|
@@ -4878,22 +4942,22 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
|
|
|
4878
4942
|
connection: selectedConnection,
|
|
4879
4943
|
projects
|
|
4880
4944
|
});
|
|
4881
|
-
return /* @__PURE__ */
|
|
4882
|
-
/* @__PURE__ */
|
|
4945
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
4946
|
+
/* @__PURE__ */ jsx12(
|
|
4883
4947
|
MetricStrip,
|
|
4884
4948
|
{
|
|
4885
4949
|
compact,
|
|
4886
4950
|
metrics: [{ label: "Connections", value: String(connections.length) }]
|
|
4887
4951
|
}
|
|
4888
4952
|
),
|
|
4889
|
-
/* @__PURE__ */
|
|
4890
|
-
/* @__PURE__ */
|
|
4891
|
-
/* @__PURE__ */
|
|
4892
|
-
/* @__PURE__ */
|
|
4953
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "J/K or Up/Down selects connection | Enter confirms | O opens frontend | D downloads table data" }),
|
|
4954
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 2, children: [
|
|
4955
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", flexBasis: compact ? void 0 : 58, flexShrink: 0, children: [
|
|
4956
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Connection list" }),
|
|
4893
4957
|
connections.length ? connections.slice(0, 12).map((connection, index) => {
|
|
4894
4958
|
const active = index === safeIndex;
|
|
4895
|
-
return /* @__PURE__ */
|
|
4896
|
-
|
|
4959
|
+
return /* @__PURE__ */ jsxs8(
|
|
4960
|
+
Text12,
|
|
4897
4961
|
{
|
|
4898
4962
|
color: active ? terminalTheme.focus : void 0,
|
|
4899
4963
|
backgroundColor: active ? terminalTheme.selectedBackground : void 0,
|
|
@@ -4905,7 +4969,7 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
|
|
|
4905
4969
|
String(index + 1).padStart(2),
|
|
4906
4970
|
" ",
|
|
4907
4971
|
truncateForTerminal(rowLabel(connection, "connection"), 34),
|
|
4908
|
-
rowDetail(connection) ? /* @__PURE__ */
|
|
4972
|
+
rowDetail(connection) ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
4909
4973
|
" - ",
|
|
4910
4974
|
truncateForTerminal(rowDetail(connection), 28)
|
|
4911
4975
|
] }) : ""
|
|
@@ -4913,9 +4977,9 @@ var ConnectionsView = ({ connections, projects, selectedIndex, compact, terminal
|
|
|
4913
4977
|
},
|
|
4914
4978
|
String(firstString5(connection, ["id"], String(index)))
|
|
4915
4979
|
);
|
|
4916
|
-
}) : /* @__PURE__ */
|
|
4980
|
+
}) : /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "No connections returned by the backend." })
|
|
4917
4981
|
] }),
|
|
4918
|
-
/* @__PURE__ */
|
|
4982
|
+
/* @__PURE__ */ jsx12(Box9, { flexGrow: 1, children: /* @__PURE__ */ jsx12(
|
|
4919
4983
|
EntityDetailPanel,
|
|
4920
4984
|
{
|
|
4921
4985
|
model: selectedModel,
|
|
@@ -4969,11 +5033,11 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
4969
5033
|
value: formatNumber3(firstNumber5(creditStatus, ["topUpBalance"]))
|
|
4970
5034
|
}
|
|
4971
5035
|
];
|
|
4972
|
-
return /* @__PURE__ */
|
|
4973
|
-
/* @__PURE__ */
|
|
4974
|
-
/* @__PURE__ */
|
|
4975
|
-
/* @__PURE__ */
|
|
4976
|
-
remaining !== void 0 && total !== void 0 ? /* @__PURE__ */
|
|
5036
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5037
|
+
/* @__PURE__ */ jsx12(MetricStrip, { metrics, compact }),
|
|
5038
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
|
|
5039
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Credit balance" }),
|
|
5040
|
+
remaining !== void 0 && total !== void 0 ? /* @__PURE__ */ jsx12(
|
|
4977
5041
|
CreditProgress,
|
|
4978
5042
|
{
|
|
4979
5043
|
remaining,
|
|
@@ -4981,18 +5045,18 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
4981
5045
|
width: 28,
|
|
4982
5046
|
tone: creditTone
|
|
4983
5047
|
}
|
|
4984
|
-
) : /* @__PURE__ */
|
|
4985
|
-
/* @__PURE__ */
|
|
4986
|
-
/* @__PURE__ */
|
|
5048
|
+
) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5049
|
+
/* @__PURE__ */ jsx12(Bar, { value: remainingRatio, tone }),
|
|
5050
|
+
/* @__PURE__ */ jsx12(Text12, { children: formatPercent(remainingRatio) })
|
|
4987
5051
|
] })
|
|
4988
5052
|
] }),
|
|
4989
|
-
/* @__PURE__ */
|
|
5053
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, wrap: "wrap", children: [
|
|
4990
5054
|
"Subscribe: ",
|
|
4991
5055
|
plansUrl,
|
|
4992
5056
|
" | Top up: ",
|
|
4993
5057
|
topUpUrl
|
|
4994
5058
|
] }),
|
|
4995
|
-
/* @__PURE__ */
|
|
5059
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Usage trend", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsx12(
|
|
4996
5060
|
AsciiLineChart,
|
|
4997
5061
|
{
|
|
4998
5062
|
values: usageValues,
|
|
@@ -5001,7 +5065,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
5001
5065
|
tone: "normal"
|
|
5002
5066
|
}
|
|
5003
5067
|
) }),
|
|
5004
|
-
/* @__PURE__ */
|
|
5068
|
+
/* @__PURE__ */ jsx12(
|
|
5005
5069
|
ResourceSummary,
|
|
5006
5070
|
{
|
|
5007
5071
|
label: "Recent ledger",
|
|
@@ -5009,7 +5073,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
5009
5073
|
terminalColumns
|
|
5010
5074
|
}
|
|
5011
5075
|
),
|
|
5012
|
-
/* @__PURE__ */
|
|
5076
|
+
/* @__PURE__ */ jsx12(
|
|
5013
5077
|
ResourceSummary,
|
|
5014
5078
|
{
|
|
5015
5079
|
label: "Invoices",
|
|
@@ -5017,7 +5081,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
5017
5081
|
terminalColumns
|
|
5018
5082
|
}
|
|
5019
5083
|
),
|
|
5020
|
-
/* @__PURE__ */
|
|
5084
|
+
/* @__PURE__ */ jsx12(
|
|
5021
5085
|
ResourceSummary,
|
|
5022
5086
|
{
|
|
5023
5087
|
label: "Top-ups",
|
|
@@ -5025,7 +5089,7 @@ var BillingView = ({ state, compact, terminalColumns, frontendUrl }) => {
|
|
|
5025
5089
|
terminalColumns
|
|
5026
5090
|
}
|
|
5027
5091
|
),
|
|
5028
|
-
/* @__PURE__ */
|
|
5092
|
+
/* @__PURE__ */ jsx12(
|
|
5029
5093
|
ResourceSummary,
|
|
5030
5094
|
{
|
|
5031
5095
|
label: "Notifications",
|
|
@@ -5070,13 +5134,13 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
|
|
|
5070
5134
|
const startIndex = safePage * maxRows;
|
|
5071
5135
|
const visibleRows = rows.slice(startIndex, startIndex + maxRows);
|
|
5072
5136
|
if (!visibleRows.length) {
|
|
5073
|
-
return /* @__PURE__ */
|
|
5137
|
+
return /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "No project report status data returned." });
|
|
5074
5138
|
}
|
|
5075
5139
|
const statusCell = (status, width) => {
|
|
5076
5140
|
const label = compactStatusLabel(status);
|
|
5077
|
-
return /* @__PURE__ */
|
|
5078
|
-
/* @__PURE__ */
|
|
5079
|
-
/* @__PURE__ */
|
|
5141
|
+
return /* @__PURE__ */ jsxs8(Box9, { width, children: [
|
|
5142
|
+
/* @__PURE__ */ jsx12(Text12, { color: statusHeatColor(status), children: "\u25CF " }),
|
|
5143
|
+
/* @__PURE__ */ jsx12(Text12, { wrap: "truncate", children: truncateForTerminal(label, Math.max(4, width - 2)) })
|
|
5080
5144
|
] });
|
|
5081
5145
|
};
|
|
5082
5146
|
const nameWidth = Math.max(
|
|
@@ -5090,36 +5154,36 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
|
|
|
5090
5154
|
{ key: "unitTestsStatus", label: "Tests" },
|
|
5091
5155
|
{ key: "freshness", label: "Freshness" }
|
|
5092
5156
|
];
|
|
5093
|
-
return /* @__PURE__ */
|
|
5094
|
-
/* @__PURE__ */
|
|
5095
|
-
/* @__PURE__ */
|
|
5096
|
-
/* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5100
|
-
/* @__PURE__ */
|
|
5157
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5158
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: "Each row shows whether the selected project has generated report artifacts and whether they are current." }),
|
|
5159
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5160
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.success, children: "\u25CF ready" }),
|
|
5161
|
+
/* @__PURE__ */ jsx12(Text12, { children: " " }),
|
|
5162
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.warning, children: "\u25CF running/partial/stale" }),
|
|
5163
|
+
/* @__PURE__ */ jsx12(Text12, { children: " " }),
|
|
5164
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.danger, children: "\u25CF failed/missing/outdated" })
|
|
5101
5165
|
] }),
|
|
5102
|
-
/* @__PURE__ */
|
|
5103
|
-
/* @__PURE__ */
|
|
5104
|
-
columns.map((column) => /* @__PURE__ */
|
|
5105
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
5167
|
+
/* @__PURE__ */ jsx12(Box9, { width: nameWidth, children: /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: "Project" }) }),
|
|
5168
|
+
columns.map((column) => /* @__PURE__ */ jsx12(Box9, { width: statusWidth, children: /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: column.label }) }, column.key)),
|
|
5169
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: "Critical issues" })
|
|
5106
5170
|
] }),
|
|
5107
|
-
visibleRows.map((row) => /* @__PURE__ */
|
|
5108
|
-
/* @__PURE__ */
|
|
5171
|
+
visibleRows.map((row) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", children: [
|
|
5172
|
+
/* @__PURE__ */ jsx12(Box9, { width: nameWidth, children: /* @__PURE__ */ jsx12(Text12, { wrap: "truncate", children: row.projectName }) }),
|
|
5109
5173
|
columns.map((column) => {
|
|
5110
5174
|
const status = row[column.key];
|
|
5111
|
-
return /* @__PURE__ */
|
|
5175
|
+
return /* @__PURE__ */ jsx12(React7.Fragment, { children: statusCell(status, statusWidth) }, column.key);
|
|
5112
5176
|
}),
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
|
|
5177
|
+
/* @__PURE__ */ jsx12(
|
|
5178
|
+
Text12,
|
|
5115
5179
|
{
|
|
5116
5180
|
color: row.criticalIssues ? terminalTheme.danger : terminalTheme.success,
|
|
5117
5181
|
children: row.criticalIssues
|
|
5118
5182
|
}
|
|
5119
5183
|
)
|
|
5120
5184
|
] }, row.projectId)),
|
|
5121
|
-
/* @__PURE__ */
|
|
5122
|
-
/* @__PURE__ */
|
|
5185
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", justifyContent: "space-between", children: [
|
|
5186
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5123
5187
|
"rows ",
|
|
5124
5188
|
startIndex + 1,
|
|
5125
5189
|
"-",
|
|
@@ -5128,7 +5192,7 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
|
|
|
5128
5192
|
" ",
|
|
5129
5193
|
rows.length
|
|
5130
5194
|
] }),
|
|
5131
|
-
/* @__PURE__ */
|
|
5195
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5132
5196
|
"page ",
|
|
5133
5197
|
safePage + 1,
|
|
5134
5198
|
"/",
|
|
@@ -5138,24 +5202,24 @@ var ReportsHeatmap = ({ rows, terminalColumns, page = 0 }) => {
|
|
|
5138
5202
|
] })
|
|
5139
5203
|
] });
|
|
5140
5204
|
};
|
|
5141
|
-
var ReportRunActions = ({ compact }) => /* @__PURE__ */
|
|
5142
|
-
/* @__PURE__ */
|
|
5143
|
-
/* @__PURE__ */
|
|
5205
|
+
var ReportRunActions = ({ compact }) => /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5206
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: "Run report generation directly through backend report APIs using the selected project context." }),
|
|
5207
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "row", gap: 1, flexWrap: "wrap", children: [
|
|
5144
5208
|
["W", "Well-Architected"],
|
|
5145
5209
|
["K", "Cost"],
|
|
5146
5210
|
["U", "Unit tests"],
|
|
5147
5211
|
["A", "All reports"],
|
|
5148
5212
|
["O", "Open frontend"]
|
|
5149
|
-
].map(([keyName, label]) => /* @__PURE__ */
|
|
5150
|
-
|
|
5213
|
+
].map(([keyName, label]) => /* @__PURE__ */ jsx12(
|
|
5214
|
+
Box9,
|
|
5151
5215
|
{
|
|
5152
5216
|
borderStyle: raisedButtonStyle.border,
|
|
5153
5217
|
borderColor: terminalTheme.muted,
|
|
5154
5218
|
paddingX: 1,
|
|
5155
5219
|
minWidth: compact ? void 0 : 18,
|
|
5156
|
-
children: /* @__PURE__ */
|
|
5157
|
-
/* @__PURE__ */
|
|
5158
|
-
/* @__PURE__ */
|
|
5220
|
+
children: /* @__PURE__ */ jsxs8(Text12, { children: [
|
|
5221
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, bold: true, children: keyName }),
|
|
5222
|
+
/* @__PURE__ */ jsxs8(Text12, { children: [
|
|
5159
5223
|
" ",
|
|
5160
5224
|
label
|
|
5161
5225
|
] })
|
|
@@ -5164,14 +5228,14 @@ var ReportRunActions = ({ compact }) => /* @__PURE__ */ jsxs7(Box8, { flexDirect
|
|
|
5164
5228
|
keyName
|
|
5165
5229
|
)) })
|
|
5166
5230
|
] });
|
|
5167
|
-
var ProjectDropdownButton = ({ projectName: projectName2, compact }) => /* @__PURE__ */
|
|
5168
|
-
|
|
5231
|
+
var ProjectDropdownButton = ({ projectName: projectName2, compact }) => /* @__PURE__ */ jsx12(
|
|
5232
|
+
Box9,
|
|
5169
5233
|
{
|
|
5170
5234
|
borderStyle: raisedButtonStyle.border,
|
|
5171
5235
|
borderColor: terminalTheme.brand,
|
|
5172
5236
|
paddingX: 1,
|
|
5173
5237
|
minWidth: compact ? void 0 : 28,
|
|
5174
|
-
children: /* @__PURE__ */
|
|
5238
|
+
children: /* @__PURE__ */ jsxs8(Text12, { color: terminalTheme.brand, bold: true, wrap: "truncate", children: [
|
|
5175
5239
|
raisedButtonStyle.activeMarker,
|
|
5176
5240
|
" Project [",
|
|
5177
5241
|
truncateForTerminal(projectName2, compact ? 28 : 36),
|
|
@@ -5199,40 +5263,40 @@ var ReportsView = ({
|
|
|
5199
5263
|
const selectedSummary = model.selectedProjectSummary;
|
|
5200
5264
|
const selectedStatuses = selectedSummary.reportStatuses;
|
|
5201
5265
|
const hasReportData = Boolean(toRecord5(state.data.reportsSummary));
|
|
5202
|
-
return /* @__PURE__ */
|
|
5203
|
-
/* @__PURE__ */
|
|
5204
|
-
|
|
5266
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5267
|
+
/* @__PURE__ */ jsxs8(
|
|
5268
|
+
Box9,
|
|
5205
5269
|
{
|
|
5206
5270
|
flexDirection: compact ? "column" : "row",
|
|
5207
5271
|
justifyContent: "space-between",
|
|
5208
5272
|
gap: 1,
|
|
5209
5273
|
children: [
|
|
5210
|
-
/* @__PURE__ */
|
|
5211
|
-
/* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5274
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", flexShrink: 1, children: [
|
|
5275
|
+
/* @__PURE__ */ jsx12(Text12, { bold: true, children: "Reports home" }),
|
|
5276
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: "Portfolio summary, score signals, report health, and selected project drilldown." })
|
|
5213
5277
|
] }),
|
|
5214
|
-
/* @__PURE__ */
|
|
5215
|
-
/* @__PURE__ */
|
|
5278
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", children: [
|
|
5279
|
+
/* @__PURE__ */ jsx12(
|
|
5216
5280
|
ProjectDropdownButton,
|
|
5217
5281
|
{
|
|
5218
5282
|
projectName: selectedProject?.name ?? selectedSummary.projectName,
|
|
5219
5283
|
compact
|
|
5220
5284
|
}
|
|
5221
5285
|
),
|
|
5222
|
-
/* @__PURE__ */
|
|
5286
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Press P or Enter to choose project" })
|
|
5223
5287
|
] })
|
|
5224
5288
|
]
|
|
5225
5289
|
}
|
|
5226
5290
|
),
|
|
5227
|
-
!hasReportData ? /* @__PURE__ */
|
|
5228
|
-
/* @__PURE__ */
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
/* @__PURE__ */
|
|
5291
|
+
!hasReportData ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "No report summary returned yet. Generate a report or refresh this tab." }) : null,
|
|
5292
|
+
/* @__PURE__ */ jsx12(MetricStrip, { metrics: model.metrics, compact }),
|
|
5293
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Report sections", children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5294
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: compact ? "column" : "row", gap: 1, children: model.reportTabs.map((tab) => /* @__PURE__ */ jsxs8(Text12, { color: tab.selected ? "cyan" : void 0, children: [
|
|
5231
5295
|
tab.selected ? ">" : "-",
|
|
5232
5296
|
" ",
|
|
5233
5297
|
tab.label
|
|
5234
5298
|
] }, tab.id)) }),
|
|
5235
|
-
/* @__PURE__ */
|
|
5299
|
+
/* @__PURE__ */ jsx12(
|
|
5236
5300
|
ResponsiveTable,
|
|
5237
5301
|
{
|
|
5238
5302
|
terminalColumns,
|
|
@@ -5246,8 +5310,8 @@ var ReportsView = ({
|
|
|
5246
5310
|
}
|
|
5247
5311
|
)
|
|
5248
5312
|
] }) }),
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
/* @__PURE__ */
|
|
5313
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Run reports", children: /* @__PURE__ */ jsx12(ReportRunActions, { compact }) }),
|
|
5314
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Project report status", children: /* @__PURE__ */ jsx12(
|
|
5251
5315
|
ReportsHeatmap,
|
|
5252
5316
|
{
|
|
5253
5317
|
rows: model.projectRows,
|
|
@@ -5255,12 +5319,12 @@ var ReportsView = ({
|
|
|
5255
5319
|
page: tablePage
|
|
5256
5320
|
}
|
|
5257
5321
|
) }),
|
|
5258
|
-
/* @__PURE__ */
|
|
5259
|
-
/* @__PURE__ */
|
|
5260
|
-
/* @__PURE__ */
|
|
5261
|
-
/* @__PURE__ */
|
|
5262
|
-
/* @__PURE__ */
|
|
5263
|
-
/* @__PURE__ */
|
|
5322
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 2, children: [
|
|
5323
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
|
|
5324
|
+
/* @__PURE__ */ jsxs8(SectionCard, { title: "Portfolio coverage", children: [
|
|
5325
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
|
|
5326
|
+
/* @__PURE__ */ jsx12(Text12, { wrap: "truncate", children: model.coverageLabel }),
|
|
5327
|
+
/* @__PURE__ */ jsx12(
|
|
5264
5328
|
Bar,
|
|
5265
5329
|
{
|
|
5266
5330
|
value: model.coverageRatio,
|
|
@@ -5268,11 +5332,11 @@ var ReportsView = ({
|
|
|
5268
5332
|
tone: "success"
|
|
5269
5333
|
}
|
|
5270
5334
|
),
|
|
5271
|
-
/* @__PURE__ */
|
|
5335
|
+
/* @__PURE__ */ jsx12(Text12, { children: formatPercent(model.coverageRatio) })
|
|
5272
5336
|
] }),
|
|
5273
|
-
/* @__PURE__ */
|
|
5337
|
+
/* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(TrendSummary, { trend: model.activityTrend, width: chartWidth }) })
|
|
5274
5338
|
] }),
|
|
5275
|
-
/* @__PURE__ */
|
|
5339
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Report types", children: /* @__PURE__ */ jsx12(
|
|
5276
5340
|
BarList,
|
|
5277
5341
|
{
|
|
5278
5342
|
bars: model.reportTypeBars,
|
|
@@ -5281,8 +5345,8 @@ var ReportsView = ({
|
|
|
5281
5345
|
}
|
|
5282
5346
|
) })
|
|
5283
5347
|
] }),
|
|
5284
|
-
/* @__PURE__ */
|
|
5285
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
|
|
5349
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx12(
|
|
5286
5350
|
BarList,
|
|
5287
5351
|
{
|
|
5288
5352
|
bars: model.statusBars,
|
|
@@ -5290,7 +5354,7 @@ var ReportsView = ({
|
|
|
5290
5354
|
emptyLabel: "No report status breakdown returned."
|
|
5291
5355
|
}
|
|
5292
5356
|
) }),
|
|
5293
|
-
/* @__PURE__ */
|
|
5357
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Freshness", children: /* @__PURE__ */ jsx12(
|
|
5294
5358
|
BarList,
|
|
5295
5359
|
{
|
|
5296
5360
|
bars: model.freshnessBars,
|
|
@@ -5300,35 +5364,35 @@ var ReportsView = ({
|
|
|
5300
5364
|
) })
|
|
5301
5365
|
] })
|
|
5302
5366
|
] }),
|
|
5303
|
-
/* @__PURE__ */
|
|
5304
|
-
/* @__PURE__ */
|
|
5305
|
-
|
|
5367
|
+
/* @__PURE__ */ jsxs8(SectionCard, { title: "Project reports", children: [
|
|
5368
|
+
/* @__PURE__ */ jsxs8(
|
|
5369
|
+
Box9,
|
|
5306
5370
|
{
|
|
5307
5371
|
flexDirection: compact ? "column" : "row",
|
|
5308
5372
|
justifyContent: "space-between",
|
|
5309
5373
|
gap: 1,
|
|
5310
5374
|
children: [
|
|
5311
|
-
/* @__PURE__ */
|
|
5312
|
-
/* @__PURE__ */
|
|
5313
|
-
selectedSummary.projectId ? /* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", flexShrink: 1, children: [
|
|
5376
|
+
/* @__PURE__ */ jsx12(Text12, { bold: true, wrap: "truncate", children: selectedSummary.projectName }),
|
|
5377
|
+
selectedSummary.projectId ? /* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "truncate", children: selectedSummary.projectId }) : /* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Select a project to load cost and architecture report details." })
|
|
5314
5378
|
] }),
|
|
5315
|
-
selectedSummary.lastReportAt ? /* @__PURE__ */
|
|
5379
|
+
selectedSummary.lastReportAt ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5316
5380
|
"last report ",
|
|
5317
5381
|
selectedSummary.lastReportAt
|
|
5318
5382
|
] }) : null
|
|
5319
5383
|
]
|
|
5320
5384
|
}
|
|
5321
5385
|
),
|
|
5322
|
-
/* @__PURE__ */
|
|
5323
|
-
selectedStatuses ? /* @__PURE__ */
|
|
5324
|
-
/* @__PURE__ */
|
|
5325
|
-
/* @__PURE__ */
|
|
5326
|
-
/* @__PURE__ */
|
|
5386
|
+
/* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(MetricStrip, { metrics: selectedSummary.metrics, compact }) }),
|
|
5387
|
+
selectedStatuses ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 1, marginTop: 1, children: [
|
|
5388
|
+
/* @__PURE__ */ jsxs8(Text12, { children: [
|
|
5389
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Cost " }),
|
|
5390
|
+
/* @__PURE__ */ jsx12(Text12, { color: statusTextColor(selectedStatuses.cost ?? ""), children: compactStatusLabel(selectedStatuses.cost ?? "not_started") })
|
|
5327
5391
|
] }),
|
|
5328
|
-
/* @__PURE__ */
|
|
5329
|
-
/* @__PURE__ */
|
|
5330
|
-
/* @__PURE__ */
|
|
5331
|
-
|
|
5392
|
+
/* @__PURE__ */ jsxs8(Text12, { children: [
|
|
5393
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Architecture " }),
|
|
5394
|
+
/* @__PURE__ */ jsx12(
|
|
5395
|
+
Text12,
|
|
5332
5396
|
{
|
|
5333
5397
|
color: statusTextColor(selectedStatuses.architecture ?? ""),
|
|
5334
5398
|
children: compactStatusLabel(
|
|
@@ -5337,14 +5401,14 @@ var ReportsView = ({
|
|
|
5337
5401
|
}
|
|
5338
5402
|
)
|
|
5339
5403
|
] }),
|
|
5340
|
-
/* @__PURE__ */
|
|
5341
|
-
/* @__PURE__ */
|
|
5342
|
-
/* @__PURE__ */
|
|
5404
|
+
/* @__PURE__ */ jsxs8(Text12, { children: [
|
|
5405
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "Unit tests " }),
|
|
5406
|
+
/* @__PURE__ */ jsx12(Text12, { color: statusTextColor(selectedStatuses.unitTests ?? ""), children: compactStatusLabel(
|
|
5343
5407
|
selectedStatuses.unitTests ?? "not_started"
|
|
5344
5408
|
) })
|
|
5345
5409
|
] })
|
|
5346
5410
|
] }) : null,
|
|
5347
|
-
/* @__PURE__ */
|
|
5411
|
+
/* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(
|
|
5348
5412
|
BarList,
|
|
5349
5413
|
{
|
|
5350
5414
|
bars: selectedSummary.pillarScores,
|
|
@@ -5353,7 +5417,7 @@ var ReportsView = ({
|
|
|
5353
5417
|
}
|
|
5354
5418
|
) })
|
|
5355
5419
|
] }),
|
|
5356
|
-
model.projectRows.length ? /* @__PURE__ */
|
|
5420
|
+
model.projectRows.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx12(
|
|
5357
5421
|
ResponsiveTable,
|
|
5358
5422
|
{
|
|
5359
5423
|
terminalColumns,
|
|
@@ -5378,7 +5442,7 @@ var ReportsView = ({
|
|
|
5378
5442
|
page: tablePage
|
|
5379
5443
|
}
|
|
5380
5444
|
) }) : null,
|
|
5381
|
-
model.topActions.length ? /* @__PURE__ */
|
|
5445
|
+
model.topActions.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx12(
|
|
5382
5446
|
ResponsiveTable,
|
|
5383
5447
|
{
|
|
5384
5448
|
terminalColumns,
|
|
@@ -5393,7 +5457,7 @@ var ReportsView = ({
|
|
|
5393
5457
|
page: tablePage
|
|
5394
5458
|
}
|
|
5395
5459
|
) }) : null,
|
|
5396
|
-
model.topInsights.length ? /* @__PURE__ */
|
|
5460
|
+
model.topInsights.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx12(
|
|
5397
5461
|
ResponsiveTable,
|
|
5398
5462
|
{
|
|
5399
5463
|
terminalColumns,
|
|
@@ -5405,7 +5469,7 @@ var ReportsView = ({
|
|
|
5405
5469
|
page: tablePage
|
|
5406
5470
|
}
|
|
5407
5471
|
) }) : null,
|
|
5408
|
-
projects.length && !model.projectRows.length ? /* @__PURE__ */
|
|
5472
|
+
projects.length && !model.projectRows.length ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5409
5473
|
projects.length,
|
|
5410
5474
|
" project(s) available. Pick a project from the dropdown to inspect specific reports."
|
|
5411
5475
|
] }) : null
|
|
@@ -5428,21 +5492,21 @@ var OverviewView = ({
|
|
|
5428
5492
|
});
|
|
5429
5493
|
const chartWidth = compact ? Math.max(24, terminalColumns - 28) : 42;
|
|
5430
5494
|
const barWidth = compact ? Math.max(14, terminalColumns - 42) : 24;
|
|
5431
|
-
return /* @__PURE__ */
|
|
5432
|
-
/* @__PURE__ */
|
|
5433
|
-
/* @__PURE__ */
|
|
5495
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5496
|
+
/* @__PURE__ */ jsx12(MetricStrip, { metrics: model.metrics, compact }),
|
|
5497
|
+
/* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5434
5498
|
"Project: ",
|
|
5435
5499
|
selectedProject?.name ?? "none",
|
|
5436
5500
|
" ",
|
|
5437
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: selectedProject?.id ? `(${selectedProject.id})` : "" })
|
|
5438
5502
|
] }),
|
|
5439
|
-
/* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
/* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5443
|
-
/* @__PURE__ */
|
|
5503
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 2, children: [
|
|
5504
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsxs8(SectionCard, { title: "Trends", children: [
|
|
5505
|
+
/* @__PURE__ */ jsx12(TrendSummary, { trend: model.trends.score, width: chartWidth }),
|
|
5506
|
+
/* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(TrendSummary, { trend: model.trends.cost, width: chartWidth }) }),
|
|
5507
|
+
/* @__PURE__ */ jsx12(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx12(TrendSummary, { trend: model.trends.reports, width: chartWidth }) })
|
|
5444
5508
|
] }) }),
|
|
5445
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: /* @__PURE__ */ jsx12(SectionCard, { title: "Architecture scores", children: /* @__PURE__ */ jsx12(
|
|
5446
5510
|
BarList,
|
|
5447
5511
|
{
|
|
5448
5512
|
bars: model.pillarScores,
|
|
@@ -5451,9 +5515,9 @@ var OverviewView = ({
|
|
|
5451
5515
|
}
|
|
5452
5516
|
) }) })
|
|
5453
5517
|
] }),
|
|
5454
|
-
/* @__PURE__ */
|
|
5455
|
-
/* @__PURE__ */
|
|
5456
|
-
/* @__PURE__ */
|
|
5518
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: compact ? "column" : "row", gap: 2, children: [
|
|
5519
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
|
|
5520
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Issues by pillar", children: /* @__PURE__ */ jsx12(
|
|
5457
5521
|
BarList,
|
|
5458
5522
|
{
|
|
5459
5523
|
bars: model.issuesByPillar,
|
|
@@ -5461,7 +5525,7 @@ var OverviewView = ({
|
|
|
5461
5525
|
emptyLabel: "No issue breakdown returned by /dashboard/user."
|
|
5462
5526
|
}
|
|
5463
5527
|
) }),
|
|
5464
|
-
/* @__PURE__ */
|
|
5528
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Project health", children: /* @__PURE__ */ jsx12(
|
|
5465
5529
|
BarList,
|
|
5466
5530
|
{
|
|
5467
5531
|
bars: model.projectHealth,
|
|
@@ -5470,8 +5534,8 @@ var OverviewView = ({
|
|
|
5470
5534
|
}
|
|
5471
5535
|
) })
|
|
5472
5536
|
] }),
|
|
5473
|
-
/* @__PURE__ */
|
|
5474
|
-
/* @__PURE__ */
|
|
5537
|
+
/* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
|
|
5538
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Monthly cost by service", children: /* @__PURE__ */ jsx12(
|
|
5475
5539
|
BarList,
|
|
5476
5540
|
{
|
|
5477
5541
|
bars: model.serviceCosts,
|
|
@@ -5479,7 +5543,7 @@ var OverviewView = ({
|
|
|
5479
5543
|
emptyLabel: "No service cost breakdown returned."
|
|
5480
5544
|
}
|
|
5481
5545
|
) }),
|
|
5482
|
-
/* @__PURE__ */
|
|
5546
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Report pipeline", children: /* @__PURE__ */ jsx12(
|
|
5483
5547
|
BarList,
|
|
5484
5548
|
{
|
|
5485
5549
|
bars: model.reportStatus,
|
|
@@ -5489,7 +5553,7 @@ var OverviewView = ({
|
|
|
5489
5553
|
) })
|
|
5490
5554
|
] })
|
|
5491
5555
|
] }),
|
|
5492
|
-
/* @__PURE__ */
|
|
5556
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Report freshness", children: /* @__PURE__ */ jsx12(
|
|
5493
5557
|
BarList,
|
|
5494
5558
|
{
|
|
5495
5559
|
bars: model.reportFreshness,
|
|
@@ -5497,7 +5561,7 @@ var OverviewView = ({
|
|
|
5497
5561
|
emptyLabel: "No report freshness breakdown returned."
|
|
5498
5562
|
}
|
|
5499
5563
|
) }),
|
|
5500
|
-
model.topActions.length ? /* @__PURE__ */
|
|
5564
|
+
model.topActions.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Top actions", children: /* @__PURE__ */ jsx12(
|
|
5501
5565
|
ResponsiveTable,
|
|
5502
5566
|
{
|
|
5503
5567
|
terminalColumns,
|
|
@@ -5512,7 +5576,7 @@ var OverviewView = ({
|
|
|
5512
5576
|
page: tablePage
|
|
5513
5577
|
}
|
|
5514
5578
|
) }) : null,
|
|
5515
|
-
model.topRecommendations.length ? /* @__PURE__ */
|
|
5579
|
+
model.topRecommendations.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Recommendations", children: /* @__PURE__ */ jsx12(
|
|
5516
5580
|
ResponsiveTable,
|
|
5517
5581
|
{
|
|
5518
5582
|
terminalColumns,
|
|
@@ -5526,7 +5590,7 @@ var OverviewView = ({
|
|
|
5526
5590
|
page: tablePage
|
|
5527
5591
|
}
|
|
5528
5592
|
) }) : null,
|
|
5529
|
-
model.topInsights.length ? /* @__PURE__ */
|
|
5593
|
+
model.topInsights.length ? /* @__PURE__ */ jsx12(SectionCard, { title: "Key insights", children: /* @__PURE__ */ jsx12(
|
|
5530
5594
|
ResponsiveTable,
|
|
5531
5595
|
{
|
|
5532
5596
|
terminalColumns,
|
|
@@ -5549,8 +5613,8 @@ var OptionsView = ({
|
|
|
5549
5613
|
frontendUrl
|
|
5550
5614
|
}) => {
|
|
5551
5615
|
const keys = getTuiKeyBindings();
|
|
5552
|
-
return /* @__PURE__ */
|
|
5553
|
-
/* @__PURE__ */
|
|
5616
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5617
|
+
/* @__PURE__ */ jsx12(
|
|
5554
5618
|
MetricStrip,
|
|
5555
5619
|
{
|
|
5556
5620
|
compact: false,
|
|
@@ -5561,19 +5625,19 @@ var OptionsView = ({
|
|
|
5561
5625
|
]
|
|
5562
5626
|
}
|
|
5563
5627
|
),
|
|
5564
|
-
/* @__PURE__ */
|
|
5628
|
+
/* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5565
5629
|
"User: ",
|
|
5566
5630
|
currentUserId ?? "unknown"
|
|
5567
5631
|
] }),
|
|
5568
|
-
/* @__PURE__ */
|
|
5632
|
+
/* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5569
5633
|
"API: ",
|
|
5570
5634
|
apiBase
|
|
5571
5635
|
] }),
|
|
5572
|
-
/* @__PURE__ */
|
|
5636
|
+
/* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5573
5637
|
"Frontend: ",
|
|
5574
5638
|
frontendUrl
|
|
5575
5639
|
] }),
|
|
5576
|
-
/* @__PURE__ */
|
|
5640
|
+
/* @__PURE__ */ jsxs8(Text12, { dimColor: true, wrap: "wrap", children: [
|
|
5577
5641
|
"Keys: 1-",
|
|
5578
5642
|
workspaceTabs.length,
|
|
5579
5643
|
" jump tabs | ",
|
|
@@ -5604,16 +5668,16 @@ var HelpView = () => {
|
|
|
5604
5668
|
"cloudeval completion <shell> | completion install --shell <shell>",
|
|
5605
5669
|
"cloudeval banner - print the ASCII banner"
|
|
5606
5670
|
];
|
|
5607
|
-
return /* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5610
|
-
/* @__PURE__ */
|
|
5671
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 1, children: [
|
|
5672
|
+
/* @__PURE__ */ jsxs8(SectionCard, { title: "Navigation", borderColor: terminalTheme.brand, children: [
|
|
5673
|
+
/* @__PURE__ */ jsx12(HelpLegend, { includeQuit: true, wrap: true }),
|
|
5674
|
+
/* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5611
5675
|
keys.mouse,
|
|
5612
5676
|
" | ",
|
|
5613
5677
|
keys.scroll
|
|
5614
5678
|
] })
|
|
5615
5679
|
] }),
|
|
5616
|
-
/* @__PURE__ */
|
|
5680
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Prompt Input", borderColor: terminalTheme.brand, children: /* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5617
5681
|
keys.submit,
|
|
5618
5682
|
" | ",
|
|
5619
5683
|
keys.newline,
|
|
@@ -5627,20 +5691,20 @@ var HelpView = () => {
|
|
|
5627
5691
|
" | ",
|
|
5628
5692
|
keys.quit
|
|
5629
5693
|
] }) }),
|
|
5630
|
-
/* @__PURE__ */
|
|
5694
|
+
/* @__PURE__ */ jsx12(SectionCard, { title: "Slash Commands", borderColor: terminalTheme.brand, children: slashCommands.map((command) => /* @__PURE__ */ jsxs8(Text12, { wrap: "wrap", children: [
|
|
5631
5695
|
command.name.padEnd(10),
|
|
5632
5696
|
" ",
|
|
5633
5697
|
command.description
|
|
5634
5698
|
] }, command.name)) }),
|
|
5635
|
-
/* @__PURE__ */
|
|
5636
|
-
cliCommands.map((command) => /* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5699
|
+
/* @__PURE__ */ jsxs8(SectionCard, { title: "CLI Commands", borderColor: terminalTheme.muted, children: [
|
|
5700
|
+
cliCommands.map((command) => /* @__PURE__ */ jsx12(Text12, { wrap: "wrap", children: command }, command)),
|
|
5701
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, wrap: "wrap", children: "Common flags: --base-url, --access-key, --access-key-stdin, --frontend-url, --format, --json, --verbose, --help" })
|
|
5638
5702
|
] })
|
|
5639
5703
|
] });
|
|
5640
5704
|
};
|
|
5641
5705
|
var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
|
|
5642
|
-
return /* @__PURE__ */
|
|
5643
|
-
showBrand ? /* @__PURE__ */
|
|
5706
|
+
return /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", gap: 0, children: [
|
|
5707
|
+
showBrand ? /* @__PURE__ */ jsx12(
|
|
5644
5708
|
TitledBox,
|
|
5645
5709
|
{
|
|
5646
5710
|
title: "Console",
|
|
@@ -5650,23 +5714,23 @@ var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
|
|
|
5650
5714
|
borderColor: terminalTheme.muted,
|
|
5651
5715
|
padding: 0,
|
|
5652
5716
|
paddingX: 1,
|
|
5653
|
-
children: /* @__PURE__ */
|
|
5654
|
-
/* @__PURE__ */
|
|
5655
|
-
/* @__PURE__ */
|
|
5717
|
+
children: /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
|
|
5718
|
+
/* @__PURE__ */ jsx12(Text12, { bold: true, color: terminalTheme.brand, children: "CloudEval" }),
|
|
5719
|
+
/* @__PURE__ */ jsx12(Text12, { dimColor: true, children: "agent console" })
|
|
5656
5720
|
] })
|
|
5657
5721
|
}
|
|
5658
5722
|
) : null,
|
|
5659
|
-
/* @__PURE__ */
|
|
5723
|
+
/* @__PURE__ */ jsx12(Box9, { flexDirection: "row", gap: 0, flexWrap: "wrap", children: workspaceTabs.map((tab) => {
|
|
5660
5724
|
const active = tab === activeTab;
|
|
5661
5725
|
const style = workspaceTabButtonStyle(active);
|
|
5662
|
-
return /* @__PURE__ */
|
|
5663
|
-
|
|
5726
|
+
return /* @__PURE__ */ jsx12(
|
|
5727
|
+
Box9,
|
|
5664
5728
|
{
|
|
5665
5729
|
borderStyle: style.borderStyle,
|
|
5666
5730
|
borderColor: style.borderColor,
|
|
5667
5731
|
marginRight: 1,
|
|
5668
|
-
children: /* @__PURE__ */
|
|
5669
|
-
|
|
5732
|
+
children: /* @__PURE__ */ jsx12(
|
|
5733
|
+
Text12,
|
|
5670
5734
|
{
|
|
5671
5735
|
bold: style.bold,
|
|
5672
5736
|
color: style.color,
|
|
@@ -5679,8 +5743,8 @@ var WorkspaceTabBar = ({ activeTab, showBrand = false, billingSummary }) => {
|
|
|
5679
5743
|
tab
|
|
5680
5744
|
);
|
|
5681
5745
|
}) }),
|
|
5682
|
-
/* @__PURE__ */
|
|
5683
|
-
billingSummary ? /* @__PURE__ */
|
|
5746
|
+
/* @__PURE__ */ jsx12(HelpLegend, {}),
|
|
5747
|
+
billingSummary ? /* @__PURE__ */ jsx12(BillingSummaryLine, { billing: billingSummary }) : null
|
|
5684
5748
|
] });
|
|
5685
5749
|
};
|
|
5686
5750
|
var WorkspacePanel = (props) => {
|
|
@@ -5693,20 +5757,20 @@ var WorkspacePanel = (props) => {
|
|
|
5693
5757
|
const isBackgroundRefreshing = Boolean(
|
|
5694
5758
|
state.isRefreshing && !isInitialLoading
|
|
5695
5759
|
);
|
|
5696
|
-
const content = /* @__PURE__ */
|
|
5697
|
-
state.loadedAt && !isInitialLoading && !isBackgroundRefreshing ? /* @__PURE__ */
|
|
5760
|
+
const content = /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
5761
|
+
state.loadedAt && !isInitialLoading && !isBackgroundRefreshing ? /* @__PURE__ */ jsx12(Box9, { flexDirection: "row", justifyContent: "flex-end", children: /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5698
5762
|
"loaded ",
|
|
5699
5763
|
new Date(state.loadedAt).toLocaleTimeString()
|
|
5700
5764
|
] }) }) : null,
|
|
5701
|
-
isInitialLoading ? /* @__PURE__ */
|
|
5702
|
-
/* @__PURE__ */
|
|
5703
|
-
/* @__PURE__ */
|
|
5765
|
+
isInitialLoading ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
|
|
5766
|
+
/* @__PURE__ */ jsx12(Spinner, { type: "dots", animate }),
|
|
5767
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Loading workspace data..." })
|
|
5704
5768
|
] }) : null,
|
|
5705
|
-
isBackgroundRefreshing ? /* @__PURE__ */
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
/* @__PURE__ */
|
|
5769
|
+
isBackgroundRefreshing ? /* @__PURE__ */ jsxs8(Box9, { flexDirection: "row", gap: 1, children: [
|
|
5770
|
+
/* @__PURE__ */ jsx12(Spinner, { type: "dots", animate }),
|
|
5771
|
+
/* @__PURE__ */ jsx12(Text12, { color: terminalTheme.brand, children: "Refreshing in background, showing cached data..." })
|
|
5708
5772
|
] }) : null,
|
|
5709
|
-
state.status === "error" ? /* @__PURE__ */
|
|
5773
|
+
state.status === "error" ? /* @__PURE__ */ jsx12(
|
|
5710
5774
|
TitledBox,
|
|
5711
5775
|
{
|
|
5712
5776
|
title: "Backend Data Unavailable",
|
|
@@ -5714,13 +5778,13 @@ var WorkspacePanel = (props) => {
|
|
|
5714
5778
|
borderColor: terminalTheme.danger,
|
|
5715
5779
|
padding: 0,
|
|
5716
5780
|
paddingX: 1,
|
|
5717
|
-
children: /* @__PURE__ */
|
|
5781
|
+
children: /* @__PURE__ */ jsxs8(Text12, { color: terminalTheme.danger, wrap: "wrap", children: [
|
|
5718
5782
|
" ",
|
|
5719
5783
|
state.error ?? "Unable to load this tab."
|
|
5720
5784
|
] })
|
|
5721
5785
|
}
|
|
5722
5786
|
) : null,
|
|
5723
|
-
state.warnings.length ? /* @__PURE__ */
|
|
5787
|
+
state.warnings.length ? /* @__PURE__ */ jsxs8(
|
|
5724
5788
|
TitledBox,
|
|
5725
5789
|
{
|
|
5726
5790
|
title: "Backend Warnings",
|
|
@@ -5729,8 +5793,8 @@ var WorkspacePanel = (props) => {
|
|
|
5729
5793
|
padding: 0,
|
|
5730
5794
|
paddingX: 1,
|
|
5731
5795
|
children: [
|
|
5732
|
-
state.warnings.slice(0, 4).map((warning) => /* @__PURE__ */
|
|
5733
|
-
state.warnings.length > 4 ? /* @__PURE__ */
|
|
5796
|
+
state.warnings.slice(0, 4).map((warning) => /* @__PURE__ */ jsx12(Text12, { color: terminalTheme.warning, wrap: "truncate", children: cleanBackendWarning(warning, props.terminalColumns) }, warning)),
|
|
5797
|
+
state.warnings.length > 4 ? /* @__PURE__ */ jsxs8(Text12, { dimColor: true, children: [
|
|
5734
5798
|
"+",
|
|
5735
5799
|
state.warnings.length - 4,
|
|
5736
5800
|
" more warning(s)"
|
|
@@ -5738,7 +5802,7 @@ var WorkspacePanel = (props) => {
|
|
|
5738
5802
|
]
|
|
5739
5803
|
}
|
|
5740
5804
|
) : null,
|
|
5741
|
-
props.tab === "overview" ? /* @__PURE__ */
|
|
5805
|
+
props.tab === "overview" ? /* @__PURE__ */ jsx12(
|
|
5742
5806
|
OverviewView,
|
|
5743
5807
|
{
|
|
5744
5808
|
state,
|
|
@@ -5749,7 +5813,7 @@ var WorkspacePanel = (props) => {
|
|
|
5749
5813
|
tablePage: props.tablePage
|
|
5750
5814
|
}
|
|
5751
5815
|
) : null,
|
|
5752
|
-
props.tab === "reports" ? /* @__PURE__ */
|
|
5816
|
+
props.tab === "reports" ? /* @__PURE__ */ jsx12(
|
|
5753
5817
|
ReportsView,
|
|
5754
5818
|
{
|
|
5755
5819
|
state,
|
|
@@ -5760,7 +5824,7 @@ var WorkspacePanel = (props) => {
|
|
|
5760
5824
|
tablePage: props.tablePage
|
|
5761
5825
|
}
|
|
5762
5826
|
) : null,
|
|
5763
|
-
props.tab === "projects" ? /* @__PURE__ */
|
|
5827
|
+
props.tab === "projects" ? /* @__PURE__ */ jsx12(
|
|
5764
5828
|
ProjectsView,
|
|
5765
5829
|
{
|
|
5766
5830
|
projects: props.projects,
|
|
@@ -5771,7 +5835,7 @@ var WorkspacePanel = (props) => {
|
|
|
5771
5835
|
terminalColumns: props.terminalColumns
|
|
5772
5836
|
}
|
|
5773
5837
|
) : null,
|
|
5774
|
-
props.tab === "connections" ? /* @__PURE__ */
|
|
5838
|
+
props.tab === "connections" ? /* @__PURE__ */ jsx12(
|
|
5775
5839
|
ConnectionsView,
|
|
5776
5840
|
{
|
|
5777
5841
|
connections,
|
|
@@ -5781,7 +5845,7 @@ var WorkspacePanel = (props) => {
|
|
|
5781
5845
|
terminalColumns: props.terminalColumns
|
|
5782
5846
|
}
|
|
5783
5847
|
) : null,
|
|
5784
|
-
props.tab === "billing" ? /* @__PURE__ */
|
|
5848
|
+
props.tab === "billing" ? /* @__PURE__ */ jsx12(
|
|
5785
5849
|
BillingView,
|
|
5786
5850
|
{
|
|
5787
5851
|
state,
|
|
@@ -5790,13 +5854,13 @@ var WorkspacePanel = (props) => {
|
|
|
5790
5854
|
frontendUrl: props.frontendUrl
|
|
5791
5855
|
}
|
|
5792
5856
|
) : null,
|
|
5793
|
-
props.tab === "options" ? /* @__PURE__ */
|
|
5794
|
-
props.tab === "help" ? /* @__PURE__ */
|
|
5857
|
+
props.tab === "options" ? /* @__PURE__ */ jsx12(OptionsView, { ...props }) : null,
|
|
5858
|
+
props.tab === "help" ? /* @__PURE__ */ jsx12(HelpView, {}) : null
|
|
5795
5859
|
] });
|
|
5796
5860
|
if (!framed) {
|
|
5797
|
-
return /* @__PURE__ */
|
|
5861
|
+
return /* @__PURE__ */ jsx12(Box9, { flexDirection: "column", gap: 1, children: content });
|
|
5798
5862
|
}
|
|
5799
|
-
return /* @__PURE__ */
|
|
5863
|
+
return /* @__PURE__ */ jsx12(
|
|
5800
5864
|
TitledBox,
|
|
5801
5865
|
{
|
|
5802
5866
|
title: workspaceTabLabels[props.tab],
|
|
@@ -5836,7 +5900,7 @@ var shouldEnableTuiAnimations = ({
|
|
|
5836
5900
|
};
|
|
5837
5901
|
|
|
5838
5902
|
// src/ui/App.tsx
|
|
5839
|
-
import { Fragment as Fragment3, jsx as
|
|
5903
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5840
5904
|
var bootSteps = [
|
|
5841
5905
|
"Loading config",
|
|
5842
5906
|
"Validating auth",
|
|
@@ -6286,7 +6350,7 @@ var selectorValueText = ({
|
|
|
6286
6350
|
var QueuePanel = ({ messages, compact, terminalColumns }) => {
|
|
6287
6351
|
const previewLimit = compact ? Math.max(28, terminalColumns - 18) : Math.min(120, Math.max(60, terminalColumns - 28));
|
|
6288
6352
|
const visibleMessages = messages.slice(0, compact ? 2 : 3);
|
|
6289
|
-
return /* @__PURE__ */
|
|
6353
|
+
return /* @__PURE__ */ jsxs9(
|
|
6290
6354
|
TitledBox,
|
|
6291
6355
|
{
|
|
6292
6356
|
title: `Queue (${messages.length})`,
|
|
@@ -6296,8 +6360,8 @@ var QueuePanel = ({ messages, compact, terminalColumns }) => {
|
|
|
6296
6360
|
paddingX: 1,
|
|
6297
6361
|
marginTop: 1,
|
|
6298
6362
|
children: [
|
|
6299
|
-
visibleMessages.map((message, index) => /* @__PURE__ */
|
|
6300
|
-
|
|
6363
|
+
visibleMessages.map((message, index) => /* @__PURE__ */ jsxs9(
|
|
6364
|
+
Text13,
|
|
6301
6365
|
{
|
|
6302
6366
|
color: index === 0 ? terminalTheme.warning : void 0,
|
|
6303
6367
|
dimColor: index > 0,
|
|
@@ -6311,7 +6375,7 @@ var QueuePanel = ({ messages, compact, terminalColumns }) => {
|
|
|
6311
6375
|
},
|
|
6312
6376
|
message.id
|
|
6313
6377
|
)),
|
|
6314
|
-
messages.length > visibleMessages.length ? /* @__PURE__ */
|
|
6378
|
+
messages.length > visibleMessages.length ? /* @__PURE__ */ jsxs9(Text13, { dimColor: true, children: [
|
|
6315
6379
|
"+",
|
|
6316
6380
|
messages.length - visibleMessages.length,
|
|
6317
6381
|
" more queued"
|
|
@@ -6332,10 +6396,10 @@ var ArtifactStrip = ({ chips, compact = false, terminalColumns }) => {
|
|
|
6332
6396
|
return null;
|
|
6333
6397
|
}
|
|
6334
6398
|
const valueLimit = compact ? Math.max(10, terminalColumns - 15) : 24;
|
|
6335
|
-
return /* @__PURE__ */
|
|
6336
|
-
/* @__PURE__ */
|
|
6337
|
-
/* @__PURE__ */
|
|
6338
|
-
/* @__PURE__ */
|
|
6399
|
+
return /* @__PURE__ */ jsx13(Box10, { flexDirection: compact ? "column" : "row", gap: compact ? 0 : 1, flexWrap: "wrap", children: chips.map((chip) => /* @__PURE__ */ jsxs9(Text13, { children: [
|
|
6400
|
+
/* @__PURE__ */ jsx13(Text13, { color: artifactToneColor(chip.tone), bold: true, children: chip.label }),
|
|
6401
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: " " }),
|
|
6402
|
+
/* @__PURE__ */ jsx13(Text13, { color: artifactToneColor(chip.tone), children: truncateForTerminal(chip.value, valueLimit) })
|
|
6339
6403
|
] }, `${chip.label}-${chip.value}`)) });
|
|
6340
6404
|
};
|
|
6341
6405
|
var PromptControlBar = ({
|
|
@@ -6362,15 +6426,15 @@ var PromptControlBar = ({
|
|
|
6362
6426
|
];
|
|
6363
6427
|
const showActivity = hasThinkingSteps || busy || statusText !== "Idle";
|
|
6364
6428
|
if (compact) {
|
|
6365
|
-
return /* @__PURE__ */
|
|
6366
|
-
compactGroups.map((group, index) => /* @__PURE__ */
|
|
6367
|
-
|
|
6429
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", gap: 0, children: [
|
|
6430
|
+
compactGroups.map((group, index) => /* @__PURE__ */ jsxs9(
|
|
6431
|
+
Box10,
|
|
6368
6432
|
{
|
|
6369
6433
|
flexDirection: "column",
|
|
6370
6434
|
gap: 0,
|
|
6371
6435
|
marginTop: index === 0 ? 0 : 1,
|
|
6372
6436
|
children: [
|
|
6373
|
-
/* @__PURE__ */
|
|
6437
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: group.label }),
|
|
6374
6438
|
group.controls.map((kind) => {
|
|
6375
6439
|
const isFocused = focused === kind;
|
|
6376
6440
|
const label = kind.charAt(0).toUpperCase() + kind.slice(1);
|
|
@@ -6384,8 +6448,8 @@ var PromptControlBar = ({
|
|
|
6384
6448
|
});
|
|
6385
6449
|
const valueLimit = Math.max(14, terminalColumns - label.length - 8);
|
|
6386
6450
|
const value = truncateForTerminal(rawValue, valueLimit);
|
|
6387
|
-
return /* @__PURE__ */
|
|
6388
|
-
|
|
6451
|
+
return /* @__PURE__ */ jsxs9(
|
|
6452
|
+
Text13,
|
|
6389
6453
|
{
|
|
6390
6454
|
color: isFocused ? "white" : void 0,
|
|
6391
6455
|
backgroundColor: isFocused ? terminalTheme.selectedBackground : void 0,
|
|
@@ -6408,10 +6472,10 @@ var PromptControlBar = ({
|
|
|
6408
6472
|
},
|
|
6409
6473
|
group.label
|
|
6410
6474
|
)),
|
|
6411
|
-
showActivity ? /* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
hasThinkingSteps ? /* @__PURE__ */
|
|
6414
|
-
|
|
6475
|
+
showActivity ? /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", gap: 0, marginTop: 1, children: [
|
|
6476
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "Activity" }),
|
|
6477
|
+
hasThinkingSteps ? /* @__PURE__ */ jsxs9(
|
|
6478
|
+
Text13,
|
|
6415
6479
|
{
|
|
6416
6480
|
color: focused === "thinking" ? "white" : void 0,
|
|
6417
6481
|
backgroundColor: focused === "thinking" ? terminalTheme.selectedBackground : void 0,
|
|
@@ -6425,16 +6489,16 @@ var PromptControlBar = ({
|
|
|
6425
6489
|
]
|
|
6426
6490
|
}
|
|
6427
6491
|
) : null,
|
|
6428
|
-
/* @__PURE__ */
|
|
6429
|
-
busy ? /* @__PURE__ */
|
|
6430
|
-
/* @__PURE__ */
|
|
6492
|
+
/* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", gap: 1, children: [
|
|
6493
|
+
busy ? /* @__PURE__ */ jsx13(Spinner, { type: "line", animate }) : null,
|
|
6494
|
+
/* @__PURE__ */ jsx13(Text13, { color: statusColor, children: statusText })
|
|
6431
6495
|
] })
|
|
6432
6496
|
] }) : null
|
|
6433
6497
|
] });
|
|
6434
6498
|
}
|
|
6435
|
-
return /* @__PURE__ */
|
|
6436
|
-
/* @__PURE__ */
|
|
6437
|
-
/* @__PURE__ */
|
|
6499
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", gap: 0, children: [
|
|
6500
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "Command context" }),
|
|
6501
|
+
/* @__PURE__ */ jsxs9(Box10, { flexDirection: compact ? "column" : "row", gap: controlGap, flexWrap: "wrap", children: [
|
|
6438
6502
|
selectorOrder.map((kind) => {
|
|
6439
6503
|
const isFocused = focused === kind;
|
|
6440
6504
|
const label = kind.charAt(0).toUpperCase() + kind.slice(1);
|
|
@@ -6448,14 +6512,14 @@ var PromptControlBar = ({
|
|
|
6448
6512
|
});
|
|
6449
6513
|
const valueLimit = compact ? Math.max(18, terminalColumns - label.length - 8) : kind === "project" ? 30 : 20;
|
|
6450
6514
|
const value = truncateForTerminal(rawValue, valueLimit);
|
|
6451
|
-
return /* @__PURE__ */
|
|
6452
|
-
|
|
6515
|
+
return /* @__PURE__ */ jsx13(
|
|
6516
|
+
Box10,
|
|
6453
6517
|
{
|
|
6454
6518
|
borderStyle: raisedButtonStyle.border,
|
|
6455
6519
|
borderColor: isFocused ? terminalTheme.focus : terminalTheme.muted,
|
|
6456
6520
|
paddingX: 1,
|
|
6457
|
-
children: /* @__PURE__ */
|
|
6458
|
-
|
|
6521
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6522
|
+
Text13,
|
|
6459
6523
|
{
|
|
6460
6524
|
color: isFocused ? "white" : void 0,
|
|
6461
6525
|
backgroundColor: isFocused ? terminalTheme.selectedBackground : void 0,
|
|
@@ -6475,14 +6539,14 @@ var PromptControlBar = ({
|
|
|
6475
6539
|
kind
|
|
6476
6540
|
);
|
|
6477
6541
|
}),
|
|
6478
|
-
hasThinkingSteps ? /* @__PURE__ */
|
|
6479
|
-
|
|
6542
|
+
hasThinkingSteps ? /* @__PURE__ */ jsx13(
|
|
6543
|
+
Box10,
|
|
6480
6544
|
{
|
|
6481
6545
|
borderStyle: raisedButtonStyle.border,
|
|
6482
6546
|
borderColor: focused === "thinking" ? terminalTheme.focus : terminalTheme.muted,
|
|
6483
6547
|
paddingX: 1,
|
|
6484
|
-
children: /* @__PURE__ */
|
|
6485
|
-
|
|
6548
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6549
|
+
Text13,
|
|
6486
6550
|
{
|
|
6487
6551
|
color: focused === "thinking" ? "white" : void 0,
|
|
6488
6552
|
backgroundColor: focused === "thinking" ? terminalTheme.selectedBackground : void 0,
|
|
@@ -6497,9 +6561,9 @@ var PromptControlBar = ({
|
|
|
6497
6561
|
)
|
|
6498
6562
|
}
|
|
6499
6563
|
) : null,
|
|
6500
|
-
/* @__PURE__ */
|
|
6501
|
-
busy ? /* @__PURE__ */
|
|
6502
|
-
/* @__PURE__ */
|
|
6564
|
+
/* @__PURE__ */ jsx13(Box10, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", gap: 1, children: [
|
|
6565
|
+
busy ? /* @__PURE__ */ jsx13(Spinner, { type: "line", animate }) : null,
|
|
6566
|
+
/* @__PURE__ */ jsx13(Text13, { color: statusColor, children: statusText })
|
|
6503
6567
|
] }) })
|
|
6504
6568
|
] })
|
|
6505
6569
|
] });
|
|
@@ -6524,7 +6588,7 @@ var ChatContextPanel = ({
|
|
|
6524
6588
|
busy,
|
|
6525
6589
|
animate
|
|
6526
6590
|
}) => {
|
|
6527
|
-
return /* @__PURE__ */
|
|
6591
|
+
return /* @__PURE__ */ jsxs9(
|
|
6528
6592
|
TitledBox,
|
|
6529
6593
|
{
|
|
6530
6594
|
title: "Context",
|
|
@@ -6535,9 +6599,9 @@ var ChatContextPanel = ({
|
|
|
6535
6599
|
width,
|
|
6536
6600
|
height,
|
|
6537
6601
|
children: [
|
|
6538
|
-
artifactChips.length ? /* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6540
|
-
/* @__PURE__ */
|
|
6602
|
+
artifactChips.length ? /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", marginBottom: 1, children: [
|
|
6603
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.brand, children: "Artifacts" }),
|
|
6604
|
+
/* @__PURE__ */ jsx13(
|
|
6541
6605
|
ArtifactStrip,
|
|
6542
6606
|
{
|
|
6543
6607
|
chips: artifactChips,
|
|
@@ -6546,7 +6610,7 @@ var ChatContextPanel = ({
|
|
|
6546
6610
|
}
|
|
6547
6611
|
)
|
|
6548
6612
|
] }) : null,
|
|
6549
|
-
/* @__PURE__ */
|
|
6613
|
+
/* @__PURE__ */ jsx13(
|
|
6550
6614
|
PromptControlBar,
|
|
6551
6615
|
{
|
|
6552
6616
|
focused,
|
|
@@ -6570,40 +6634,40 @@ var ChatContextPanel = ({
|
|
|
6570
6634
|
}
|
|
6571
6635
|
);
|
|
6572
6636
|
};
|
|
6573
|
-
var BottomControls = ({ tab }) => /* @__PURE__ */
|
|
6574
|
-
/* @__PURE__ */
|
|
6575
|
-
/* @__PURE__ */
|
|
6576
|
-
/* @__PURE__ */
|
|
6577
|
-
/* @__PURE__ */
|
|
6578
|
-
/* @__PURE__ */
|
|
6579
|
-
tab === "chat" ? /* @__PURE__ */
|
|
6580
|
-
/* @__PURE__ */
|
|
6581
|
-
/* @__PURE__ */
|
|
6582
|
-
/* @__PURE__ */
|
|
6583
|
-
/* @__PURE__ */
|
|
6584
|
-
/* @__PURE__ */
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6587
|
-
] }) : /* @__PURE__ */
|
|
6588
|
-
/* @__PURE__ */
|
|
6589
|
-
/* @__PURE__ */
|
|
6590
|
-
/* @__PURE__ */
|
|
6591
|
-
/* @__PURE__ */
|
|
6592
|
-
/* @__PURE__ */
|
|
6593
|
-
/* @__PURE__ */
|
|
6594
|
-
tab === "projects" || tab === "connections" ? /* @__PURE__ */
|
|
6595
|
-
/* @__PURE__ */
|
|
6596
|
-
/* @__PURE__ */
|
|
6597
|
-
/* @__PURE__ */
|
|
6598
|
-
/* @__PURE__ */
|
|
6637
|
+
var BottomControls = ({ tab }) => /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", justifyContent: "space-between", children: [
|
|
6638
|
+
/* @__PURE__ */ jsxs9(Text13, { dimColor: true, children: [
|
|
6639
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "\u2303Q" }),
|
|
6640
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Quit " }),
|
|
6641
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "\u2303T" }),
|
|
6642
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Tabs " }),
|
|
6643
|
+
tab === "chat" ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
6644
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "Y" }),
|
|
6645
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Copy " }),
|
|
6646
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "D" }),
|
|
6647
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Download " }),
|
|
6648
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "O" }),
|
|
6649
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Open " }),
|
|
6650
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.brand, children: "/ Commands" })
|
|
6651
|
+
] }) : /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
6652
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "R" }),
|
|
6653
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Refresh " }),
|
|
6654
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "O" }),
|
|
6655
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Open " }),
|
|
6656
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "D" }),
|
|
6657
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Download " }),
|
|
6658
|
+
tab === "projects" || tab === "connections" ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
6659
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "\u2191\u2193/J/K" }),
|
|
6660
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Select " }),
|
|
6661
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "Enter" }),
|
|
6662
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Confirm " })
|
|
6599
6663
|
] }) : null,
|
|
6600
|
-
/* @__PURE__ */
|
|
6601
|
-
/* @__PURE__ */
|
|
6664
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.accent, bold: true, children: "[/]" }),
|
|
6665
|
+
/* @__PURE__ */ jsx13(Text13, { children: " Page" })
|
|
6602
6666
|
] })
|
|
6603
6667
|
] }),
|
|
6604
|
-
tab === "reports" ? /* @__PURE__ */
|
|
6605
|
-
/* @__PURE__ */
|
|
6606
|
-
/* @__PURE__ */
|
|
6668
|
+
tab === "reports" ? /* @__PURE__ */ jsxs9(Text13, { dimColor: true, children: [
|
|
6669
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.brand, bold: true, children: "Reports" }),
|
|
6670
|
+
/* @__PURE__ */ jsx13(Text13, { children: " W WAF | K cost | U tests | A all | P project" })
|
|
6607
6671
|
] }) : null
|
|
6608
6672
|
] });
|
|
6609
6673
|
var recommendedOptionIndex = (question) => {
|
|
@@ -6618,7 +6682,7 @@ var isSpecifyOption = (option) => option?.id === "specify" || option?.label ===
|
|
|
6618
6682
|
var HitlPanel = ({ hitl, questionIndex, optionIndex, answers, frontendUrl }) => {
|
|
6619
6683
|
const question = hitl.questions[questionIndex] ?? hitl.questions[0];
|
|
6620
6684
|
const options = question?.options ?? [];
|
|
6621
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsxs9(
|
|
6622
6686
|
TitledBox,
|
|
6623
6687
|
{
|
|
6624
6688
|
title: "Human Approval",
|
|
@@ -6626,18 +6690,18 @@ var HitlPanel = ({ hitl, questionIndex, optionIndex, answers, frontendUrl }) =>
|
|
|
6626
6690
|
borderColor: terminalTheme.warning,
|
|
6627
6691
|
padding: 1,
|
|
6628
6692
|
children: [
|
|
6629
|
-
/* @__PURE__ */
|
|
6693
|
+
/* @__PURE__ */ jsxs9(Text13, { wrap: "wrap", children: [
|
|
6630
6694
|
questionIndex + 1,
|
|
6631
6695
|
"/",
|
|
6632
6696
|
hitl.questions.length,
|
|
6633
6697
|
": ",
|
|
6634
6698
|
question?.text ?? "Action required"
|
|
6635
6699
|
] }),
|
|
6636
|
-
options.length ? /* @__PURE__ */
|
|
6700
|
+
options.length ? /* @__PURE__ */ jsx13(Box10, { flexDirection: "column", marginTop: 1, children: options.map((option, index) => {
|
|
6637
6701
|
const highlighted = index === optionIndex;
|
|
6638
6702
|
const selected = answers[question.id] === option.id;
|
|
6639
|
-
return /* @__PURE__ */
|
|
6640
|
-
|
|
6703
|
+
return /* @__PURE__ */ jsxs9(
|
|
6704
|
+
Text13,
|
|
6641
6705
|
{
|
|
6642
6706
|
color: highlighted ? terminalTheme.focus : selected ? terminalTheme.selected : void 0,
|
|
6643
6707
|
dimColor: !highlighted && !selected,
|
|
@@ -6655,9 +6719,9 @@ var HitlPanel = ({ hitl, questionIndex, optionIndex, answers, frontendUrl }) =>
|
|
|
6655
6719
|
},
|
|
6656
6720
|
option.id
|
|
6657
6721
|
);
|
|
6658
|
-
}) }) : /* @__PURE__ */
|
|
6659
|
-
/* @__PURE__ */
|
|
6660
|
-
/* @__PURE__ */
|
|
6722
|
+
}) }) : /* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "Type the answer in the prompt and press Enter, or open the frontend." }),
|
|
6723
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "Up/Down choose | Enter answer | Left/Right switch question | O or /open opens frontend" }),
|
|
6724
|
+
/* @__PURE__ */ jsxs9(Text13, { dimColor: true, wrap: "wrap", children: [
|
|
6661
6725
|
"Frontend: ",
|
|
6662
6726
|
frontendUrl
|
|
6663
6727
|
] })
|
|
@@ -6752,6 +6816,7 @@ var App = ({
|
|
|
6752
6816
|
const [chatMiddleScrollOffset, setChatMiddleScrollOffset] = useState4(0);
|
|
6753
6817
|
const [chatMiddleContentHeight, setChatMiddleContentHeight] = useState4(0);
|
|
6754
6818
|
const [chatMiddleViewportHeight, setChatMiddleViewportHeight] = useState4(12);
|
|
6819
|
+
const [citationInspectorRef, setCitationInspectorRef] = useState4(null);
|
|
6755
6820
|
const apiBase = useMemo(() => normalizeApiBase(baseUrl), [baseUrl]);
|
|
6756
6821
|
const frontendBaseUrl = useMemo(
|
|
6757
6822
|
() => resolveFrontendBaseUrl2(apiBase, frontendUrl),
|
|
@@ -8714,6 +8779,30 @@ var App = ({
|
|
|
8714
8779
|
return;
|
|
8715
8780
|
}
|
|
8716
8781
|
}
|
|
8782
|
+
if (phase === "ready" && activeWorkspaceTab === "chat" && !input.trim() && key.escape && citationInspectorRef) {
|
|
8783
|
+
setCitationInspectorRef(null);
|
|
8784
|
+
return;
|
|
8785
|
+
}
|
|
8786
|
+
if (phase === "ready" && activeWorkspaceTab === "chat" && !input.trim() && !activeSelector && /^[1-9]$/.test(inputKey)) {
|
|
8787
|
+
const citationNumber = Number.parseInt(inputKey, 10);
|
|
8788
|
+
const lastAssistant = [...displayedMessages].reverse().find(
|
|
8789
|
+
(message) => message.role === "assistant" && typeof message.content === "string" && message.content.trim().length > 0
|
|
8790
|
+
);
|
|
8791
|
+
if (lastAssistant) {
|
|
8792
|
+
const references = buildCitationReferences({
|
|
8793
|
+
content: lastAssistant.content,
|
|
8794
|
+
toolsUsed: lastAssistant.toolsUsed,
|
|
8795
|
+
citations: lastAssistant.citations
|
|
8796
|
+
});
|
|
8797
|
+
const match = references.find(
|
|
8798
|
+
(reference) => reference.number === citationNumber
|
|
8799
|
+
);
|
|
8800
|
+
if (match) {
|
|
8801
|
+
setCitationInspectorRef(match);
|
|
8802
|
+
return;
|
|
8803
|
+
}
|
|
8804
|
+
}
|
|
8805
|
+
}
|
|
8717
8806
|
if (phase === "ready" && key.ctrl && lowerInput === "t") {
|
|
8718
8807
|
setActiveWorkspaceTab((current) => nextWorkspaceTab(current));
|
|
8719
8808
|
setActiveSelector(null);
|
|
@@ -9102,8 +9191,8 @@ var App = ({
|
|
|
9102
9191
|
{ isActive: phase === "ready" }
|
|
9103
9192
|
);
|
|
9104
9193
|
if (phase === "boot") {
|
|
9105
|
-
return /* @__PURE__ */
|
|
9106
|
-
/* @__PURE__ */
|
|
9194
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, height: terminalSize.rows, children: [
|
|
9195
|
+
/* @__PURE__ */ jsx13(
|
|
9107
9196
|
Banner,
|
|
9108
9197
|
{
|
|
9109
9198
|
disable: bannerDisabled,
|
|
@@ -9111,14 +9200,14 @@ var App = ({
|
|
|
9111
9200
|
terminalColumns: bannerContentColumns
|
|
9112
9201
|
}
|
|
9113
9202
|
),
|
|
9114
|
-
isLoggingIn ? /* @__PURE__ */
|
|
9115
|
-
/* @__PURE__ */
|
|
9116
|
-
/* @__PURE__ */
|
|
9117
|
-
] }) : /* @__PURE__ */
|
|
9203
|
+
isLoggingIn ? /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", gap: 1, padding: 1, children: [
|
|
9204
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.brand, bold: true, children: "Signing in..." }),
|
|
9205
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, children: "Please complete authentication in your browser." })
|
|
9206
|
+
] }) : /* @__PURE__ */ jsx13(Loader, { step: loaderStep, steps: bootSteps, animate: animationsEnabled })
|
|
9118
9207
|
] });
|
|
9119
9208
|
}
|
|
9120
9209
|
if (needsOnboarding && phase === "ready" && authToken) {
|
|
9121
|
-
return /* @__PURE__ */
|
|
9210
|
+
return /* @__PURE__ */ jsx13(
|
|
9122
9211
|
Onboarding,
|
|
9123
9212
|
{
|
|
9124
9213
|
baseUrl,
|
|
@@ -9138,15 +9227,15 @@ var App = ({
|
|
|
9138
9227
|
);
|
|
9139
9228
|
}
|
|
9140
9229
|
if (phase === "error") {
|
|
9141
|
-
return /* @__PURE__ */
|
|
9142
|
-
/* @__PURE__ */
|
|
9143
|
-
/* @__PURE__ */
|
|
9144
|
-
/* @__PURE__ */
|
|
9230
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", padding: 1, height: terminalSize.rows, children: [
|
|
9231
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.danger, children: "Failed to start CLI." }),
|
|
9232
|
+
/* @__PURE__ */ jsx13(Text13, { children: bootError ?? "Unknown error" }),
|
|
9233
|
+
/* @__PURE__ */ jsxs9(Text13, { children: [
|
|
9145
9234
|
"Base URL: ",
|
|
9146
9235
|
apiBase,
|
|
9147
9236
|
" (set via CLOUDEVAL_BASE_URL or --base-url)"
|
|
9148
9237
|
] }),
|
|
9149
|
-
/* @__PURE__ */
|
|
9238
|
+
/* @__PURE__ */ jsx13(Text13, { children: "Press Ctrl+C to quit." })
|
|
9150
9239
|
] });
|
|
9151
9240
|
}
|
|
9152
9241
|
const chatStatusText = (() => {
|
|
@@ -9163,7 +9252,7 @@ var App = ({
|
|
|
9163
9252
|
const chatStatusColor = chatState.status === "error" ? terminalTheme.danger : chatState.status === "complete" ? terminalTheme.success : chatState.status === "canceled" ? terminalTheme.warning : isBusyStatus(chatState.status) ? terminalTheme.brand : void 0;
|
|
9164
9253
|
const chatBusy = chatState.status === "connecting" || chatState.status === "thinking" || chatState.status === "streaming" || chatState.status === "tool_running";
|
|
9165
9254
|
const promptActionIsCancel = isBusyStatus(chatState.status) || Boolean(controllerRef.current) || hasCancellableReasoning;
|
|
9166
|
-
const threadPanel = /* @__PURE__ */
|
|
9255
|
+
const threadPanel = /* @__PURE__ */ jsx13(
|
|
9167
9256
|
TitledBox,
|
|
9168
9257
|
{
|
|
9169
9258
|
title: selectedThreadTitle,
|
|
@@ -9172,8 +9261,8 @@ var App = ({
|
|
|
9172
9261
|
padding: 1,
|
|
9173
9262
|
width: chatThreadPanelWidth,
|
|
9174
9263
|
height: chatMainPanelRows,
|
|
9175
|
-
children: /* @__PURE__ */
|
|
9176
|
-
/* @__PURE__ */
|
|
9264
|
+
children: /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", children: [
|
|
9265
|
+
/* @__PURE__ */ jsx13(Box10, { flexShrink: 1, width: threadContentWidth, children: /* @__PURE__ */ jsxs9(
|
|
9177
9266
|
ScrollView,
|
|
9178
9267
|
{
|
|
9179
9268
|
ref: scrollViewRef,
|
|
@@ -9196,20 +9285,29 @@ var App = ({
|
|
|
9196
9285
|
});
|
|
9197
9286
|
},
|
|
9198
9287
|
onViewportSizeChange: (size) => setViewportHeight(size.height),
|
|
9199
|
-
children:
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9288
|
+
children: [
|
|
9289
|
+
/* @__PURE__ */ jsx13(
|
|
9290
|
+
Transcript,
|
|
9291
|
+
{
|
|
9292
|
+
messages: displayedMessages,
|
|
9293
|
+
userName,
|
|
9294
|
+
excludeStreaming: false,
|
|
9295
|
+
expandedThinkingMessageIds,
|
|
9296
|
+
emptyLabel: isSearching ? "No matching messages." : "Thread is empty.",
|
|
9297
|
+
animate: animationsEnabled
|
|
9298
|
+
}
|
|
9299
|
+
),
|
|
9300
|
+
/* @__PURE__ */ jsx13(
|
|
9301
|
+
CitationSourceInspector,
|
|
9302
|
+
{
|
|
9303
|
+
reference: citationInspectorRef,
|
|
9304
|
+
onClose: () => setCitationInspectorRef(null)
|
|
9305
|
+
}
|
|
9306
|
+
)
|
|
9307
|
+
]
|
|
9210
9308
|
}
|
|
9211
9309
|
) }),
|
|
9212
|
-
/* @__PURE__ */
|
|
9310
|
+
/* @__PURE__ */ jsx13(
|
|
9213
9311
|
Scrollbar2,
|
|
9214
9312
|
{
|
|
9215
9313
|
scrollOffset,
|
|
@@ -9220,7 +9318,7 @@ var App = ({
|
|
|
9220
9318
|
] })
|
|
9221
9319
|
}
|
|
9222
9320
|
);
|
|
9223
|
-
const promptFooterControls = splitChatLayout ? void 0 : /* @__PURE__ */
|
|
9321
|
+
const promptFooterControls = splitChatLayout ? void 0 : /* @__PURE__ */ jsx13(
|
|
9224
9322
|
PromptControlBar,
|
|
9225
9323
|
{
|
|
9226
9324
|
focused: focusedControl,
|
|
@@ -9245,8 +9343,8 @@ var App = ({
|
|
|
9245
9343
|
label: `${p.name} (${p.cloud_provider ?? "cloud"})${p.name === "Playground" ? " [Playground]" : ""}`,
|
|
9246
9344
|
value: p
|
|
9247
9345
|
}));
|
|
9248
|
-
return /* @__PURE__ */
|
|
9249
|
-
/* @__PURE__ */
|
|
9346
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
|
|
9347
|
+
/* @__PURE__ */ jsx13(
|
|
9250
9348
|
Banner,
|
|
9251
9349
|
{
|
|
9252
9350
|
disable: bannerDisabled,
|
|
@@ -9254,11 +9352,11 @@ var App = ({
|
|
|
9254
9352
|
terminalColumns: bannerContentColumns
|
|
9255
9353
|
}
|
|
9256
9354
|
),
|
|
9257
|
-
/* @__PURE__ */
|
|
9258
|
-
loadingProjects ? /* @__PURE__ */
|
|
9259
|
-
/* @__PURE__ */
|
|
9260
|
-
/* @__PURE__ */
|
|
9261
|
-
] }) : /* @__PURE__ */
|
|
9355
|
+
/* @__PURE__ */ jsx13(Text13, { children: "Select a project to chat with:" }),
|
|
9356
|
+
loadingProjects ? /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", gap: 1, children: [
|
|
9357
|
+
/* @__PURE__ */ jsx13(Spinner, { type: "line", animate: animationsEnabled }),
|
|
9358
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.brand, children: "Loading projects..." })
|
|
9359
|
+
] }) : /* @__PURE__ */ jsx13(
|
|
9262
9360
|
ProjectSelector,
|
|
9263
9361
|
{
|
|
9264
9362
|
items,
|
|
@@ -9274,8 +9372,8 @@ var App = ({
|
|
|
9274
9372
|
] });
|
|
9275
9373
|
}
|
|
9276
9374
|
if (activeWorkspaceTab !== "chat") {
|
|
9277
|
-
return /* @__PURE__ */
|
|
9278
|
-
/* @__PURE__ */
|
|
9375
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
|
|
9376
|
+
/* @__PURE__ */ jsx13(
|
|
9279
9377
|
Banner,
|
|
9280
9378
|
{
|
|
9281
9379
|
disable: bannerDisabled,
|
|
@@ -9283,7 +9381,7 @@ var App = ({
|
|
|
9283
9381
|
terminalColumns: bannerContentColumns
|
|
9284
9382
|
}
|
|
9285
9383
|
),
|
|
9286
|
-
/* @__PURE__ */
|
|
9384
|
+
/* @__PURE__ */ jsx13(
|
|
9287
9385
|
WorkspaceTabBar,
|
|
9288
9386
|
{
|
|
9289
9387
|
activeTab: activeWorkspaceTab,
|
|
@@ -9291,9 +9389,9 @@ var App = ({
|
|
|
9291
9389
|
billingSummary: bannerDisabled ? billingHeader : void 0
|
|
9292
9390
|
}
|
|
9293
9391
|
),
|
|
9294
|
-
/* @__PURE__ */
|
|
9295
|
-
notice ? /* @__PURE__ */
|
|
9296
|
-
/* @__PURE__ */
|
|
9392
|
+
/* @__PURE__ */ jsx13(Text13, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions[activeWorkspaceTab] }),
|
|
9393
|
+
notice ? /* @__PURE__ */ jsx13(NoticeLine, { message: notice }) : null,
|
|
9394
|
+
/* @__PURE__ */ jsx13(
|
|
9297
9395
|
TitledBox,
|
|
9298
9396
|
{
|
|
9299
9397
|
title: workspaceTabLabels[activeWorkspaceTab],
|
|
@@ -9303,8 +9401,8 @@ var App = ({
|
|
|
9303
9401
|
marginTop: 1,
|
|
9304
9402
|
height: workspacePanelViewportRows,
|
|
9305
9403
|
width: workspaceContentWidth,
|
|
9306
|
-
children: /* @__PURE__ */
|
|
9307
|
-
/* @__PURE__ */
|
|
9404
|
+
children: /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", children: [
|
|
9405
|
+
/* @__PURE__ */ jsx13(Box10, { flexShrink: 1, width: workspacePanelBodyWidth, children: /* @__PURE__ */ jsx13(
|
|
9308
9406
|
ScrollView,
|
|
9309
9407
|
{
|
|
9310
9408
|
ref: workspaceScrollViewRef,
|
|
@@ -9312,7 +9410,7 @@ var App = ({
|
|
|
9312
9410
|
onScroll: (offset) => setWorkspaceScrollOffset(offset),
|
|
9313
9411
|
onContentHeightChange: (height) => setWorkspaceContentHeight(height),
|
|
9314
9412
|
onViewportSizeChange: (size) => setWorkspaceViewportHeight(size.height),
|
|
9315
|
-
children: /* @__PURE__ */
|
|
9413
|
+
children: /* @__PURE__ */ jsx13(
|
|
9316
9414
|
WorkspacePanel,
|
|
9317
9415
|
{
|
|
9318
9416
|
tab: activeWorkspaceTab,
|
|
@@ -9333,7 +9431,7 @@ var App = ({
|
|
|
9333
9431
|
)
|
|
9334
9432
|
}
|
|
9335
9433
|
) }),
|
|
9336
|
-
workspacePanelOverflowing ? /* @__PURE__ */
|
|
9434
|
+
workspacePanelOverflowing ? /* @__PURE__ */ jsx13(
|
|
9337
9435
|
Scrollbar2,
|
|
9338
9436
|
{
|
|
9339
9437
|
scrollOffset: workspaceScrollOffset,
|
|
@@ -9344,8 +9442,8 @@ var App = ({
|
|
|
9344
9442
|
] })
|
|
9345
9443
|
}
|
|
9346
9444
|
),
|
|
9347
|
-
/* @__PURE__ */
|
|
9348
|
-
activeSelector === "project" ? /* @__PURE__ */
|
|
9445
|
+
/* @__PURE__ */ jsx13(BottomControls, { tab: activeWorkspaceTab }),
|
|
9446
|
+
activeSelector === "project" ? /* @__PURE__ */ jsx13(
|
|
9349
9447
|
SelectPanel,
|
|
9350
9448
|
{
|
|
9351
9449
|
title: "Select Project",
|
|
@@ -9371,8 +9469,8 @@ var App = ({
|
|
|
9371
9469
|
) : null
|
|
9372
9470
|
] });
|
|
9373
9471
|
}
|
|
9374
|
-
return /* @__PURE__ */
|
|
9375
|
-
/* @__PURE__ */
|
|
9472
|
+
return /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", paddingX: tuiLayout.paddingX, paddingY: 0, gap: 0, height: terminalSize.rows, children: [
|
|
9473
|
+
/* @__PURE__ */ jsx13(Box10, { flexShrink: 0, children: /* @__PURE__ */ jsx13(
|
|
9376
9474
|
Banner,
|
|
9377
9475
|
{
|
|
9378
9476
|
disable: bannerDisabled,
|
|
@@ -9380,7 +9478,7 @@ var App = ({
|
|
|
9380
9478
|
terminalColumns: bannerContentColumns
|
|
9381
9479
|
}
|
|
9382
9480
|
) }),
|
|
9383
|
-
/* @__PURE__ */
|
|
9481
|
+
/* @__PURE__ */ jsx13(Box10, { flexShrink: 0, children: /* @__PURE__ */ jsx13(
|
|
9384
9482
|
WorkspaceTabBar,
|
|
9385
9483
|
{
|
|
9386
9484
|
activeTab: activeWorkspaceTab,
|
|
@@ -9388,14 +9486,14 @@ var App = ({
|
|
|
9388
9486
|
billingSummary: bannerDisabled ? billingHeader : void 0
|
|
9389
9487
|
}
|
|
9390
9488
|
) }),
|
|
9391
|
-
/* @__PURE__ */
|
|
9392
|
-
/* @__PURE__ */
|
|
9393
|
-
/* @__PURE__ */
|
|
9394
|
-
|
|
9489
|
+
/* @__PURE__ */ jsx13(Box10, { flexShrink: 0, children: /* @__PURE__ */ jsx13(Text13, { dimColor: true, wrap: "wrap", children: workspaceTabDescriptions.chat }) }),
|
|
9490
|
+
/* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", marginTop: 1, children: [
|
|
9491
|
+
/* @__PURE__ */ jsx13(
|
|
9492
|
+
Box10,
|
|
9395
9493
|
{
|
|
9396
9494
|
flexShrink: 1,
|
|
9397
9495
|
width: Math.max(24, chatAvailableWidth - (chatMiddleOverflowing ? 2 : 0)),
|
|
9398
|
-
children: /* @__PURE__ */
|
|
9496
|
+
children: /* @__PURE__ */ jsx13(
|
|
9399
9497
|
ScrollView,
|
|
9400
9498
|
{
|
|
9401
9499
|
ref: chatMiddleScrollViewRef,
|
|
@@ -9403,8 +9501,8 @@ var App = ({
|
|
|
9403
9501
|
onScroll: (offset) => setChatMiddleScrollOffset(offset),
|
|
9404
9502
|
onContentHeightChange: (height) => setChatMiddleContentHeight(height),
|
|
9405
9503
|
onViewportSizeChange: (size) => setChatMiddleViewportHeight(size.height),
|
|
9406
|
-
children: /* @__PURE__ */
|
|
9407
|
-
isSearching ? /* @__PURE__ */
|
|
9504
|
+
children: /* @__PURE__ */ jsxs9(Box10, { flexDirection: "column", children: [
|
|
9505
|
+
isSearching ? /* @__PURE__ */ jsx13(
|
|
9408
9506
|
TitledBox,
|
|
9409
9507
|
{
|
|
9410
9508
|
title: "Search",
|
|
@@ -9412,14 +9510,14 @@ var App = ({
|
|
|
9412
9510
|
borderColor: terminalTheme.warning,
|
|
9413
9511
|
padding: 0,
|
|
9414
9512
|
paddingX: 1,
|
|
9415
|
-
children: /* @__PURE__ */
|
|
9513
|
+
children: /* @__PURE__ */ jsxs9(Text13, { children: [
|
|
9416
9514
|
"Found: ",
|
|
9417
9515
|
displayedMessages.length,
|
|
9418
9516
|
" matches"
|
|
9419
9517
|
] })
|
|
9420
9518
|
}
|
|
9421
9519
|
) : null,
|
|
9422
|
-
queuedMessages.length > 0 ? /* @__PURE__ */
|
|
9520
|
+
queuedMessages.length > 0 ? /* @__PURE__ */ jsx13(
|
|
9423
9521
|
QueuePanel,
|
|
9424
9522
|
{
|
|
9425
9523
|
messages: queuedMessages,
|
|
@@ -9427,8 +9525,8 @@ var App = ({
|
|
|
9427
9525
|
terminalColumns: terminalSize.columns
|
|
9428
9526
|
}
|
|
9429
9527
|
) : null,
|
|
9430
|
-
notice ? /* @__PURE__ */
|
|
9431
|
-
errorText ? /* @__PURE__ */
|
|
9528
|
+
notice ? /* @__PURE__ */ jsx13(NoticeLine, { message: notice }) : null,
|
|
9529
|
+
errorText ? /* @__PURE__ */ jsxs9(
|
|
9432
9530
|
TitledBox,
|
|
9433
9531
|
{
|
|
9434
9532
|
title: "Error Details",
|
|
@@ -9438,20 +9536,20 @@ var App = ({
|
|
|
9438
9536
|
paddingX: 1,
|
|
9439
9537
|
marginTop: 1,
|
|
9440
9538
|
children: [
|
|
9441
|
-
/* @__PURE__ */
|
|
9442
|
-
!hasThinkingSteps ? /* @__PURE__ */
|
|
9539
|
+
/* @__PURE__ */ jsx13(Text13, { color: terminalTheme.danger, wrap: "wrap", children: errorText }),
|
|
9540
|
+
!hasThinkingSteps ? /* @__PURE__ */ jsx13(Text13, { dimColor: true, wrap: "wrap", children: "No thinking steps were received before the backend returned this error." }) : null
|
|
9443
9541
|
]
|
|
9444
9542
|
}
|
|
9445
9543
|
) : null,
|
|
9446
|
-
!splitChatLayout && chatArtifactChips.length ? /* @__PURE__ */
|
|
9544
|
+
!splitChatLayout && chatArtifactChips.length ? /* @__PURE__ */ jsx13(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx13(
|
|
9447
9545
|
ArtifactStrip,
|
|
9448
9546
|
{
|
|
9449
9547
|
chips: chatArtifactChips,
|
|
9450
9548
|
terminalColumns: chatAvailableWidth
|
|
9451
9549
|
}
|
|
9452
9550
|
) }) : null,
|
|
9453
|
-
showChatThreadPanel ? splitChatLayout ? /* @__PURE__ */
|
|
9454
|
-
/* @__PURE__ */
|
|
9551
|
+
showChatThreadPanel ? splitChatLayout ? /* @__PURE__ */ jsxs9(Box10, { flexDirection: "row", columnGap: chatSplitGap, children: [
|
|
9552
|
+
/* @__PURE__ */ jsx13(
|
|
9455
9553
|
ChatContextPanel,
|
|
9456
9554
|
{
|
|
9457
9555
|
width: chatContextPanelWidth,
|
|
@@ -9476,7 +9574,7 @@ var App = ({
|
|
|
9476
9574
|
),
|
|
9477
9575
|
threadPanel
|
|
9478
9576
|
] }) : threadPanel : null,
|
|
9479
|
-
chatState.status === "hitl_waiting" && chatState.hitl?.waiting ? /* @__PURE__ */
|
|
9577
|
+
chatState.status === "hitl_waiting" && chatState.hitl?.waiting ? /* @__PURE__ */ jsx13(
|
|
9480
9578
|
HitlPanel,
|
|
9481
9579
|
{
|
|
9482
9580
|
hitl: chatState.hitl,
|
|
@@ -9491,7 +9589,7 @@ var App = ({
|
|
|
9491
9589
|
)
|
|
9492
9590
|
}
|
|
9493
9591
|
),
|
|
9494
|
-
chatMiddleOverflowing ? /* @__PURE__ */
|
|
9592
|
+
chatMiddleOverflowing ? /* @__PURE__ */ jsx13(
|
|
9495
9593
|
Scrollbar2,
|
|
9496
9594
|
{
|
|
9497
9595
|
scrollOffset: chatMiddleScrollOffset,
|
|
@@ -9500,7 +9598,7 @@ var App = ({
|
|
|
9500
9598
|
}
|
|
9501
9599
|
) : null
|
|
9502
9600
|
] }),
|
|
9503
|
-
activeSelector === "thread" ? /* @__PURE__ */
|
|
9601
|
+
activeSelector === "thread" ? /* @__PURE__ */ jsx13(
|
|
9504
9602
|
SelectPanel,
|
|
9505
9603
|
{
|
|
9506
9604
|
title: "Select Thread",
|
|
@@ -9522,7 +9620,7 @@ var App = ({
|
|
|
9522
9620
|
limit: tuiLayout.selectorLimit
|
|
9523
9621
|
}
|
|
9524
9622
|
) : null,
|
|
9525
|
-
activeSelector === "project" ? /* @__PURE__ */
|
|
9623
|
+
activeSelector === "project" ? /* @__PURE__ */ jsx13(
|
|
9526
9624
|
SelectPanel,
|
|
9527
9625
|
{
|
|
9528
9626
|
title: "Select Project",
|
|
@@ -9545,7 +9643,7 @@ var App = ({
|
|
|
9545
9643
|
limit: tuiLayout.selectorLimit
|
|
9546
9644
|
}
|
|
9547
9645
|
) : null,
|
|
9548
|
-
activeSelector === "model" ? /* @__PURE__ */
|
|
9646
|
+
activeSelector === "model" ? /* @__PURE__ */ jsx13(
|
|
9549
9647
|
SelectPanel,
|
|
9550
9648
|
{
|
|
9551
9649
|
title: "Select Model",
|
|
@@ -9562,7 +9660,7 @@ var App = ({
|
|
|
9562
9660
|
limit: tuiLayout.selectorLimit
|
|
9563
9661
|
}
|
|
9564
9662
|
) : null,
|
|
9565
|
-
activeSelector === "mode" ? /* @__PURE__ */
|
|
9663
|
+
activeSelector === "mode" ? /* @__PURE__ */ jsx13(
|
|
9566
9664
|
SelectPanel,
|
|
9567
9665
|
{
|
|
9568
9666
|
title: "Select Mode",
|
|
@@ -9585,7 +9683,7 @@ var App = ({
|
|
|
9585
9683
|
limit: tuiLayout.selectorLimit
|
|
9586
9684
|
}
|
|
9587
9685
|
) : null,
|
|
9588
|
-
activeSelector === "profile" ? /* @__PURE__ */
|
|
9686
|
+
activeSelector === "profile" ? /* @__PURE__ */ jsx13(
|
|
9589
9687
|
SelectPanel,
|
|
9590
9688
|
{
|
|
9591
9689
|
title: "Select Agent Profile",
|
|
@@ -9602,7 +9700,7 @@ var App = ({
|
|
|
9602
9700
|
limit: tuiLayout.selectorLimit
|
|
9603
9701
|
}
|
|
9604
9702
|
) : null,
|
|
9605
|
-
isSearching ? /* @__PURE__ */
|
|
9703
|
+
isSearching ? /* @__PURE__ */ jsx13(
|
|
9606
9704
|
InputBox,
|
|
9607
9705
|
{
|
|
9608
9706
|
title: "Search History",
|
|
@@ -9616,7 +9714,7 @@ var App = ({
|
|
|
9616
9714
|
setSearchQuery("");
|
|
9617
9715
|
}
|
|
9618
9716
|
}
|
|
9619
|
-
) : activeSelector ? null : /* @__PURE__ */
|
|
9717
|
+
) : activeSelector ? null : /* @__PURE__ */ jsx13(
|
|
9620
9718
|
InputBox,
|
|
9621
9719
|
{
|
|
9622
9720
|
variant: "dock",
|
|
@@ -9674,7 +9772,7 @@ var App = ({
|
|
|
9674
9772
|
placeholder: chatState.status === "hitl_waiting" ? "Answer HITL prompt, or /open for frontend..." : isBusyStatus(chatState.status) ? "Response in progress. Enter queues next message..." : "Ask Cloudeval..."
|
|
9675
9773
|
}
|
|
9676
9774
|
),
|
|
9677
|
-
/* @__PURE__ */
|
|
9775
|
+
/* @__PURE__ */ jsx13(BottomControls, { tab: activeWorkspaceTab })
|
|
9678
9776
|
] });
|
|
9679
9777
|
};
|
|
9680
9778
|
export {
|