@trydecember/cli 0.2.24 → 0.2.25
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/december.js +1095 -664
- package/package.json +1 -1
package/dist/december.js
CHANGED
|
@@ -169887,7 +169887,6 @@ var init_shortcuts_menu = __esm(async () => {
|
|
|
169887
169887
|
{ key: "ctrl+k", desc: "Delete to end" },
|
|
169888
169888
|
{ key: "ctrl+u", desc: "Delete to start" },
|
|
169889
169889
|
{ key: "ctrl+w", desc: "Delete word" },
|
|
169890
|
-
{ key: "up/down", desc: "Input history" },
|
|
169891
169890
|
{ key: "ctrl+y", desc: "Quick copy (yank)" },
|
|
169892
169891
|
{ key: "ctrl+c", desc: "Exit / Graceful interrupt" },
|
|
169893
169892
|
{ key: "ctrl+h", desc: "Session history" },
|
|
@@ -169900,16 +169899,8 @@ var init_shortcuts_menu = __esm(async () => {
|
|
|
169900
169899
|
});
|
|
169901
169900
|
|
|
169902
169901
|
// ../../packages/tui/src/components/text-area.tsx
|
|
169903
|
-
function TextArea({
|
|
169904
|
-
value,
|
|
169905
|
-
onChange,
|
|
169906
|
-
onSubmit,
|
|
169907
|
-
placeholder = "",
|
|
169908
|
-
focus = true,
|
|
169909
|
-
history = []
|
|
169910
|
-
}) {
|
|
169902
|
+
function TextArea({ value, onChange, onSubmit, placeholder = "", focus = true }) {
|
|
169911
169903
|
const [cursorOffset, setCursorOffset] = import_react40.useState(value.length);
|
|
169912
|
-
const [historyIndex, setHistoryIndex] = import_react40.useState(-1);
|
|
169913
169904
|
import_react40.useEffect(() => {
|
|
169914
169905
|
if (cursorOffset > value.length) {
|
|
169915
169906
|
setCursorOffset(value.length);
|
|
@@ -169926,7 +169917,6 @@ function TextArea({
|
|
|
169926
169917
|
setCursorOffset((prev2) => prev2 + 1);
|
|
169927
169918
|
} else {
|
|
169928
169919
|
onSubmit(value);
|
|
169929
|
-
setHistoryIndex(-1);
|
|
169930
169920
|
}
|
|
169931
169921
|
return;
|
|
169932
169922
|
}
|
|
@@ -169948,17 +169938,7 @@ function TextArea({
|
|
|
169948
169938
|
const newOffset = cursorOffset - currentLineLength - 1 - (prevLineLength - newCol);
|
|
169949
169939
|
setCursorOffset(Math.max(0, newOffset));
|
|
169950
169940
|
} else {
|
|
169951
|
-
|
|
169952
|
-
const nextIdx = Math.min(history.length - 1, historyIndex + 1);
|
|
169953
|
-
if (nextIdx !== historyIndex) {
|
|
169954
|
-
setHistoryIndex(nextIdx);
|
|
169955
|
-
const hVal = history[history.length - 1 - nextIdx] || "";
|
|
169956
|
-
onChange(hVal);
|
|
169957
|
-
setCursorOffset(hVal.length);
|
|
169958
|
-
}
|
|
169959
|
-
} else {
|
|
169960
|
-
setCursorOffset(0);
|
|
169961
|
-
}
|
|
169941
|
+
setCursorOffset(0);
|
|
169962
169942
|
}
|
|
169963
169943
|
return;
|
|
169964
169944
|
}
|
|
@@ -169975,15 +169955,7 @@ function TextArea({
|
|
|
169975
169955
|
const newOffset = cursorOffset + postLineZeroLength + 1 + newCol;
|
|
169976
169956
|
setCursorOffset(Math.min(value.length, newOffset));
|
|
169977
169957
|
} else {
|
|
169978
|
-
|
|
169979
|
-
const nextIdx = historyIndex - 1;
|
|
169980
|
-
setHistoryIndex(nextIdx);
|
|
169981
|
-
const hVal = nextIdx >= 0 ? history[history.length - 1 - nextIdx] || "" : "";
|
|
169982
|
-
onChange(hVal);
|
|
169983
|
-
setCursorOffset(hVal.length);
|
|
169984
|
-
} else {
|
|
169985
|
-
setCursorOffset(value.length);
|
|
169986
|
-
}
|
|
169958
|
+
setCursorOffset(value.length);
|
|
169987
169959
|
}
|
|
169988
169960
|
return;
|
|
169989
169961
|
}
|
|
@@ -170067,7 +170039,6 @@ function InputBar({
|
|
|
170067
170039
|
onInterrupt,
|
|
170068
170040
|
onCopy,
|
|
170069
170041
|
contextTokens,
|
|
170070
|
-
history,
|
|
170071
170042
|
showExitConfirm = false,
|
|
170072
170043
|
toasts,
|
|
170073
170044
|
queuedPrompts
|
|
@@ -170229,8 +170200,7 @@ function InputBar({
|
|
|
170229
170200
|
onChange: handleChange,
|
|
170230
170201
|
onSubmit: handleSubmit,
|
|
170231
170202
|
placeholder: customInputMode ? "Type your custom answer..." : grillMode ? "" : placeholder,
|
|
170232
|
-
focus: !disabled && !dialog.isOpen
|
|
170233
|
-
history
|
|
170203
|
+
focus: !disabled && !dialog.isOpen
|
|
170234
170204
|
}, undefined, false, undefined, this)
|
|
170235
170205
|
]
|
|
170236
170206
|
}, undefined, true, undefined, this),
|
|
@@ -214493,122 +214463,611 @@ var init_marked_esm = __esm(() => {
|
|
|
214493
214463
|
Yt = x2.lex;
|
|
214494
214464
|
});
|
|
214495
214465
|
|
|
214496
|
-
// ../../packages/tui/src/components/
|
|
214497
|
-
function
|
|
214466
|
+
// ../../packages/tui/src/components/mermaid.tsx
|
|
214467
|
+
function parseFlowchart(code) {
|
|
214468
|
+
const lines = code.split(/\r?\n/);
|
|
214469
|
+
let direction = "TD";
|
|
214470
|
+
const nodesMap = new Map;
|
|
214471
|
+
const edges = [];
|
|
214472
|
+
for (const rawLine of lines) {
|
|
214473
|
+
const line = rawLine.trim();
|
|
214474
|
+
if (!line || line.startsWith("%%"))
|
|
214475
|
+
continue;
|
|
214476
|
+
if (line.startsWith("graph") || line.startsWith("flowchart")) {
|
|
214477
|
+
const parts = line.split(/\s+/);
|
|
214478
|
+
if (parts.length > 1) {
|
|
214479
|
+
const dir = parts[1].toUpperCase();
|
|
214480
|
+
if (dir === "LR" || dir === "RL" || dir === "TD" || dir === "TB" || dir === "BT") {
|
|
214481
|
+
direction = dir;
|
|
214482
|
+
}
|
|
214483
|
+
}
|
|
214484
|
+
continue;
|
|
214485
|
+
}
|
|
214486
|
+
const edgeRegex = /^([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})?\s*(\-\-\>|\-\-\-|\=\=\>|\-\.\-\>)(?:\|(.*?)\|)?\s*([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})?/;
|
|
214487
|
+
const match2 = line.match(edgeRegex);
|
|
214488
|
+
if (match2) {
|
|
214489
|
+
const fromId = match2[1];
|
|
214490
|
+
const fromLabel = match2[2] || match2[3] || match2[4] || fromId;
|
|
214491
|
+
const arrow = match2[5];
|
|
214492
|
+
const edgeLabel = match2[6];
|
|
214493
|
+
const toId = match2[7];
|
|
214494
|
+
const toLabel = match2[8] || match2[9] || match2[10] || toId;
|
|
214495
|
+
if (!nodesMap.has(fromId)) {
|
|
214496
|
+
nodesMap.set(fromId, {
|
|
214497
|
+
id: fromId,
|
|
214498
|
+
label: fromLabel,
|
|
214499
|
+
shape: match2[2] ? "box" : match2[3] ? "round" : match2[4] ? "diamond" : "box"
|
|
214500
|
+
});
|
|
214501
|
+
}
|
|
214502
|
+
if (!nodesMap.has(toId)) {
|
|
214503
|
+
nodesMap.set(toId, {
|
|
214504
|
+
id: toId,
|
|
214505
|
+
label: toLabel,
|
|
214506
|
+
shape: match2[8] ? "box" : match2[9] ? "round" : match2[10] ? "diamond" : "box"
|
|
214507
|
+
});
|
|
214508
|
+
}
|
|
214509
|
+
edges.push({
|
|
214510
|
+
from: fromId,
|
|
214511
|
+
to: toId,
|
|
214512
|
+
label: edgeLabel,
|
|
214513
|
+
style: arrow === "==>" ? "thick" : arrow === "-.->" ? "dashed" : "solid"
|
|
214514
|
+
});
|
|
214515
|
+
continue;
|
|
214516
|
+
}
|
|
214517
|
+
const nodeRegex = /^([A-Za-z0-9_]+)(?:\[(.*?)\]|\((.*?)\)|\{(.*?)\})/;
|
|
214518
|
+
const nodeMatch = line.match(nodeRegex);
|
|
214519
|
+
if (nodeMatch) {
|
|
214520
|
+
const id = nodeMatch[1];
|
|
214521
|
+
const label = nodeMatch[2] || nodeMatch[3] || nodeMatch[4] || id;
|
|
214522
|
+
if (!nodesMap.has(id)) {
|
|
214523
|
+
nodesMap.set(id, {
|
|
214524
|
+
id,
|
|
214525
|
+
label,
|
|
214526
|
+
shape: nodeMatch[2] ? "box" : nodeMatch[3] ? "round" : nodeMatch[4] ? "diamond" : "box"
|
|
214527
|
+
});
|
|
214528
|
+
}
|
|
214529
|
+
}
|
|
214530
|
+
}
|
|
214531
|
+
return { direction, nodes: Array.from(nodesMap.values()), edges };
|
|
214532
|
+
}
|
|
214533
|
+
function parseSequence(code) {
|
|
214534
|
+
const lines = code.split(/\r?\n/);
|
|
214535
|
+
const participantsSet = new Set;
|
|
214536
|
+
const messages = [];
|
|
214537
|
+
for (const rawLine of lines) {
|
|
214538
|
+
const line = rawLine.trim();
|
|
214539
|
+
if (!line || line.startsWith("%%") || line.startsWith("sequenceDiagram"))
|
|
214540
|
+
continue;
|
|
214541
|
+
if (line.startsWith("participant ")) {
|
|
214542
|
+
const name = line.replace("participant ", "").trim();
|
|
214543
|
+
participantsSet.add(name);
|
|
214544
|
+
continue;
|
|
214545
|
+
}
|
|
214546
|
+
const msgMatch = line.match(/^([A-Za-z0-9_]+)\s*(\-\>\>|\-\-\>\>|\-\>)\s*([A-Za-z0-9_]+)\s*:\s*(.*)$/);
|
|
214547
|
+
if (msgMatch) {
|
|
214548
|
+
const from = msgMatch[1];
|
|
214549
|
+
const arrow = msgMatch[2];
|
|
214550
|
+
const to = msgMatch[3];
|
|
214551
|
+
const text3 = msgMatch[4];
|
|
214552
|
+
participantsSet.add(from);
|
|
214553
|
+
participantsSet.add(to);
|
|
214554
|
+
messages.push({
|
|
214555
|
+
from,
|
|
214556
|
+
to,
|
|
214557
|
+
text: text3,
|
|
214558
|
+
style: arrow.includes("--") ? "dashed" : "solid"
|
|
214559
|
+
});
|
|
214560
|
+
}
|
|
214561
|
+
}
|
|
214562
|
+
return { participants: Array.from(participantsSet), messages };
|
|
214563
|
+
}
|
|
214564
|
+
function parsePie(code) {
|
|
214565
|
+
const lines = code.split(/\r?\n/);
|
|
214566
|
+
let title = "Chart";
|
|
214567
|
+
const slices = [];
|
|
214568
|
+
for (const rawLine of lines) {
|
|
214569
|
+
const line = rawLine.trim();
|
|
214570
|
+
if (!line || line.startsWith("%%"))
|
|
214571
|
+
continue;
|
|
214572
|
+
if (line.startsWith("pie")) {
|
|
214573
|
+
if (line.includes("title ")) {
|
|
214574
|
+
title = line.split("title ")[1].trim();
|
|
214575
|
+
}
|
|
214576
|
+
continue;
|
|
214577
|
+
}
|
|
214578
|
+
const sliceMatch = line.match(/^"([^"]+)"\s*:\s*([0-9.]+)/);
|
|
214579
|
+
if (sliceMatch) {
|
|
214580
|
+
slices.push({
|
|
214581
|
+
label: sliceMatch[1],
|
|
214582
|
+
value: parseFloat(sliceMatch[2])
|
|
214583
|
+
});
|
|
214584
|
+
}
|
|
214585
|
+
}
|
|
214586
|
+
return { title, slices };
|
|
214587
|
+
}
|
|
214588
|
+
function Mermaid({ code }) {
|
|
214498
214589
|
const { isFocused } = use_focus_default({ autoFocus: true });
|
|
214499
|
-
const [
|
|
214590
|
+
const [showRaw, setShowRaw] = import_react43.useState(false);
|
|
214500
214591
|
use_input_default((input, key) => {
|
|
214501
|
-
if (key.ctrl && (key.name === "o" || input?.toLowerCase() === "o") || input === "\x0F"
|
|
214502
|
-
|
|
214592
|
+
if (key.ctrl && (key.name === "o" || input?.toLowerCase() === "o") || input === "\x0F") {
|
|
214593
|
+
setShowRaw((prev2) => !prev2);
|
|
214503
214594
|
}
|
|
214504
214595
|
});
|
|
214505
|
-
const
|
|
214506
|
-
const
|
|
214507
|
-
const
|
|
214508
|
-
const
|
|
214509
|
-
const topBar = `┌── ${lang} ${"─".repeat(topBarLength)}`;
|
|
214510
|
-
const bottomBar = `└${"─".repeat(barWidth - 1)}`;
|
|
214511
|
-
const MAX_VISIBLE_LINES = 20;
|
|
214512
|
-
const visibleLines = expanded ? lines.slice(0, MAX_VISIBLE_LINES) : [];
|
|
214513
|
-
const isTruncated = expanded && lines.length > MAX_VISIBLE_LINES;
|
|
214514
|
-
const highlighted = import_react43.default.useMemo(() => {
|
|
214515
|
-
if (visibleLines.length === 0)
|
|
214516
|
-
return "";
|
|
214517
|
-
return import_cli_highlight.highlight(visibleLines.join(`
|
|
214518
|
-
`), {
|
|
214519
|
-
language: lang,
|
|
214520
|
-
ignoreIllegals: true
|
|
214521
|
-
});
|
|
214522
|
-
}, [visibleLines, lang]);
|
|
214596
|
+
const firstLine = code.split(/\r?\n/).map((l3) => l3.trim()).find((l3) => l3.length > 0 && !l3.startsWith("%%")) || "";
|
|
214597
|
+
const isSequence = firstLine.startsWith("sequenceDiagram");
|
|
214598
|
+
const isPie = firstLine.startsWith("pie");
|
|
214599
|
+
const isFlowchart = firstLine.startsWith("graph") || firstLine.startsWith("flowchart");
|
|
214523
214600
|
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214524
214601
|
flexDirection: "column",
|
|
214602
|
+
paddingX: 2,
|
|
214525
214603
|
paddingY: 1,
|
|
214604
|
+
borderStyle: "round",
|
|
214605
|
+
borderColor: "#A78BFA",
|
|
214526
214606
|
children: [
|
|
214527
214607
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214608
|
+
justifyContent: "space-between",
|
|
214528
214609
|
alignItems: "center",
|
|
214529
|
-
|
|
214610
|
+
marginBottom: 1,
|
|
214530
214611
|
children: [
|
|
214531
214612
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214532
|
-
color:
|
|
214533
|
-
|
|
214534
|
-
|
|
214613
|
+
color: "#A78BFA",
|
|
214614
|
+
bold: true,
|
|
214615
|
+
children: [
|
|
214616
|
+
"❖ Mermaid Diagram (",
|
|
214617
|
+
isSequence ? "sequence" : isPie ? "pie" : isFlowchart ? "flowchart" : "diagram",
|
|
214618
|
+
")"
|
|
214619
|
+
]
|
|
214620
|
+
}, undefined, true, undefined, this),
|
|
214535
214621
|
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214536
214622
|
color: "gray",
|
|
214537
214623
|
children: [
|
|
214538
214624
|
"(",
|
|
214539
|
-
|
|
214625
|
+
showRaw ? "ctrl+o for visual" : "ctrl+o for code",
|
|
214540
214626
|
")"
|
|
214541
214627
|
]
|
|
214542
214628
|
}, undefined, true, undefined, this)
|
|
214543
214629
|
]
|
|
214544
214630
|
}, undefined, true, undefined, this),
|
|
214545
|
-
|
|
214546
|
-
|
|
214547
|
-
|
|
214631
|
+
showRaw ? /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214632
|
+
flexDirection: "column",
|
|
214633
|
+
paddingLeft: 1,
|
|
214634
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214635
|
+
color: "#AAAAAA",
|
|
214636
|
+
children: code
|
|
214637
|
+
}, undefined, false, undefined, this)
|
|
214638
|
+
}, undefined, false, undefined, this) : isSequence ? /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(RenderSequence, {
|
|
214639
|
+
code
|
|
214640
|
+
}, undefined, false, undefined, this) : isPie ? /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(RenderPie, {
|
|
214641
|
+
code
|
|
214642
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(RenderFlowchart, {
|
|
214643
|
+
code
|
|
214644
|
+
}, undefined, false, undefined, this)
|
|
214645
|
+
]
|
|
214646
|
+
}, undefined, true, undefined, this);
|
|
214647
|
+
}
|
|
214648
|
+
function RenderFlowchart({ code }) {
|
|
214649
|
+
const { direction, nodes, edges } = parseFlowchart(code);
|
|
214650
|
+
if (nodes.length === 0) {
|
|
214651
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214652
|
+
color: "#AAAAAA",
|
|
214653
|
+
children: code
|
|
214654
|
+
}, undefined, false, undefined, this);
|
|
214655
|
+
}
|
|
214656
|
+
const isLR = direction === "LR" || direction === "RL";
|
|
214657
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214658
|
+
flexDirection: "column",
|
|
214659
|
+
gap: 1,
|
|
214660
|
+
children: [
|
|
214661
|
+
isLR ? /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214662
|
+
flexDirection: "row",
|
|
214663
|
+
flexWrap: "wrap",
|
|
214664
|
+
alignItems: "center",
|
|
214665
|
+
gap: 1,
|
|
214666
|
+
children: nodes.map((node2, i2) => {
|
|
214667
|
+
const outgoingEdges = edges.filter((e2) => e2.from === node2.id);
|
|
214668
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(import_react43.default.Fragment, {
|
|
214669
|
+
children: [
|
|
214670
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214671
|
+
borderStyle: "round",
|
|
214672
|
+
borderColor: "#89B4F8",
|
|
214673
|
+
paddingX: 1,
|
|
214674
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214675
|
+
bold: true,
|
|
214676
|
+
color: "white",
|
|
214677
|
+
children: node2.label
|
|
214678
|
+
}, undefined, false, undefined, this)
|
|
214679
|
+
}, undefined, false, undefined, this),
|
|
214680
|
+
outgoingEdges.length > 0 && i2 < nodes.length - 1 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214681
|
+
flexDirection: "column",
|
|
214682
|
+
alignItems: "center",
|
|
214683
|
+
children: [
|
|
214684
|
+
outgoingEdges[0].label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214685
|
+
color: "#A78BFA",
|
|
214686
|
+
italic: true,
|
|
214687
|
+
children: [
|
|
214688
|
+
"[",
|
|
214689
|
+
outgoingEdges[0].label,
|
|
214690
|
+
"]"
|
|
214691
|
+
]
|
|
214692
|
+
}, undefined, true, undefined, this),
|
|
214693
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214694
|
+
color: "#89B4F8",
|
|
214695
|
+
children: outgoingEdges[0].style === "dashed" ? " ┈► " : outgoingEdges[0].style === "thick" ? " ══► " : " ──► "
|
|
214696
|
+
}, undefined, false, undefined, this)
|
|
214697
|
+
]
|
|
214698
|
+
}, undefined, true, undefined, this)
|
|
214699
|
+
]
|
|
214700
|
+
}, node2.id, true, undefined, this);
|
|
214701
|
+
})
|
|
214702
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214703
|
+
flexDirection: "column",
|
|
214704
|
+
alignItems: "flex-start",
|
|
214705
|
+
gap: 0,
|
|
214706
|
+
children: nodes.map((node2, i2) => {
|
|
214707
|
+
const outgoingEdges = edges.filter((e2) => e2.from === node2.id);
|
|
214708
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214548
214709
|
flexDirection: "column",
|
|
214549
|
-
|
|
214550
|
-
|
|
214551
|
-
|
|
214552
|
-
|
|
214710
|
+
children: [
|
|
214711
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214712
|
+
borderStyle: "round",
|
|
214713
|
+
borderColor: "#89B4F8",
|
|
214714
|
+
paddingX: 1,
|
|
214715
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214716
|
+
bold: true,
|
|
214717
|
+
color: "white",
|
|
214718
|
+
children: node2.label
|
|
214719
|
+
}, undefined, false, undefined, this)
|
|
214720
|
+
}, undefined, false, undefined, this),
|
|
214721
|
+
outgoingEdges.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214722
|
+
flexDirection: "column",
|
|
214723
|
+
paddingLeft: 3,
|
|
214724
|
+
children: [
|
|
214725
|
+
outgoingEdges[0].label && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214726
|
+
color: "#A78BFA",
|
|
214727
|
+
italic: true,
|
|
214728
|
+
children: [
|
|
214729
|
+
"[",
|
|
214730
|
+
outgoingEdges[0].label,
|
|
214731
|
+
"]"
|
|
214732
|
+
]
|
|
214733
|
+
}, undefined, true, undefined, this),
|
|
214734
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214735
|
+
color: "#89B4F8",
|
|
214736
|
+
children: outgoingEdges[0].style === "dashed" ? ` ┆
|
|
214737
|
+
▼ ` : ` │
|
|
214738
|
+
▼ `
|
|
214739
|
+
}, undefined, false, undefined, this)
|
|
214740
|
+
]
|
|
214741
|
+
}, undefined, true, undefined, this)
|
|
214742
|
+
]
|
|
214743
|
+
}, node2.id, true, undefined, this);
|
|
214744
|
+
})
|
|
214745
|
+
}, undefined, false, undefined, this),
|
|
214746
|
+
edges.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214747
|
+
flexDirection: "column",
|
|
214748
|
+
marginTop: 1,
|
|
214749
|
+
paddingLeft: 1,
|
|
214750
|
+
children: [
|
|
214751
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214752
|
+
color: "gray",
|
|
214753
|
+
bold: true,
|
|
214754
|
+
children: "Connections:"
|
|
214553
214755
|
}, undefined, false, undefined, this),
|
|
214554
|
-
|
|
214555
|
-
|
|
214556
|
-
|
|
214557
|
-
|
|
214558
|
-
color: "#
|
|
214756
|
+
edges.map((edge, idx) => {
|
|
214757
|
+
const fromNode = nodes.find((n) => n.id === edge.from)?.label || edge.from;
|
|
214758
|
+
const toNode = nodes.find((n) => n.id === edge.to)?.label || edge.to;
|
|
214759
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214760
|
+
color: "#CCCCCC",
|
|
214559
214761
|
children: [
|
|
214560
|
-
"
|
|
214561
|
-
|
|
214562
|
-
"
|
|
214762
|
+
"• ",
|
|
214763
|
+
fromNode,
|
|
214764
|
+
" ",
|
|
214765
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214766
|
+
color: "#89B4F8",
|
|
214767
|
+
children: edge.style === "dashed" ? "┈►" : "──►"
|
|
214768
|
+
}, undefined, false, undefined, this),
|
|
214769
|
+
" ",
|
|
214770
|
+
toNode,
|
|
214771
|
+
edge.label ? ` (${edge.label})` : ""
|
|
214772
|
+
]
|
|
214773
|
+
}, idx, true, undefined, this);
|
|
214774
|
+
})
|
|
214775
|
+
]
|
|
214776
|
+
}, undefined, true, undefined, this)
|
|
214777
|
+
]
|
|
214778
|
+
}, undefined, true, undefined, this);
|
|
214779
|
+
}
|
|
214780
|
+
function RenderSequence({ code }) {
|
|
214781
|
+
const { participants, messages } = parseSequence(code);
|
|
214782
|
+
if (participants.length === 0) {
|
|
214783
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214784
|
+
color: "#AAAAAA",
|
|
214785
|
+
children: code
|
|
214786
|
+
}, undefined, false, undefined, this);
|
|
214787
|
+
}
|
|
214788
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214789
|
+
flexDirection: "column",
|
|
214790
|
+
gap: 1,
|
|
214791
|
+
children: [
|
|
214792
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214793
|
+
flexDirection: "row",
|
|
214794
|
+
gap: 2,
|
|
214795
|
+
children: participants.map((p) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214796
|
+
borderStyle: "single",
|
|
214797
|
+
borderColor: "#89B4F8",
|
|
214798
|
+
paddingX: 1,
|
|
214799
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214800
|
+
bold: true,
|
|
214801
|
+
color: "white",
|
|
214802
|
+
children: p
|
|
214803
|
+
}, undefined, false, undefined, this)
|
|
214804
|
+
}, p, false, undefined, this))
|
|
214805
|
+
}, undefined, false, undefined, this),
|
|
214806
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214807
|
+
flexDirection: "column",
|
|
214808
|
+
paddingLeft: 1,
|
|
214809
|
+
marginTop: 1,
|
|
214810
|
+
children: messages.map((msg, idx) => /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214811
|
+
color: "#DDDDDD",
|
|
214812
|
+
children: [
|
|
214813
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214814
|
+
color: "#89B4F8",
|
|
214815
|
+
bold: true,
|
|
214816
|
+
children: msg.from
|
|
214817
|
+
}, undefined, false, undefined, this),
|
|
214818
|
+
" ",
|
|
214819
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214820
|
+
color: msg.style === "dashed" ? "#A78BFA" : "#89B4F8",
|
|
214821
|
+
children: msg.style === "dashed" ? "◄┄┄" : "──►"
|
|
214822
|
+
}, undefined, false, undefined, this),
|
|
214823
|
+
" ",
|
|
214824
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214825
|
+
color: "#89B4F8",
|
|
214826
|
+
bold: true,
|
|
214827
|
+
children: msg.to
|
|
214828
|
+
}, undefined, false, undefined, this),
|
|
214829
|
+
": ",
|
|
214830
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214831
|
+
color: "white",
|
|
214832
|
+
children: msg.text
|
|
214833
|
+
}, undefined, false, undefined, this)
|
|
214834
|
+
]
|
|
214835
|
+
}, idx, true, undefined, this))
|
|
214836
|
+
}, undefined, false, undefined, this)
|
|
214837
|
+
]
|
|
214838
|
+
}, undefined, true, undefined, this);
|
|
214839
|
+
}
|
|
214840
|
+
function RenderPie({ code }) {
|
|
214841
|
+
const { title, slices } = parsePie(code);
|
|
214842
|
+
const total = slices.reduce((sum2, s2) => sum2 + s2.value, 0);
|
|
214843
|
+
if (slices.length === 0) {
|
|
214844
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214845
|
+
color: "#AAAAAA",
|
|
214846
|
+
children: code
|
|
214847
|
+
}, undefined, false, undefined, this);
|
|
214848
|
+
}
|
|
214849
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214850
|
+
flexDirection: "column",
|
|
214851
|
+
gap: 1,
|
|
214852
|
+
children: [
|
|
214853
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214854
|
+
bold: true,
|
|
214855
|
+
color: "white",
|
|
214856
|
+
children: title
|
|
214857
|
+
}, undefined, false, undefined, this),
|
|
214858
|
+
slices.map((slice3, idx) => {
|
|
214859
|
+
const percentage = total > 0 ? Math.round(slice3.value / total * 100) : 0;
|
|
214860
|
+
const filledWidth = Math.round(percentage / 100 * 20);
|
|
214861
|
+
const emptyWidth = 20 - filledWidth;
|
|
214862
|
+
const bar = "█".repeat(filledWidth) + "░".repeat(emptyWidth);
|
|
214863
|
+
const color = idx % 2 === 0 ? "#89B4F8" : "#A78BFA";
|
|
214864
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214865
|
+
flexDirection: "row",
|
|
214866
|
+
gap: 2,
|
|
214867
|
+
children: [
|
|
214868
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
214869
|
+
width: 15,
|
|
214870
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214871
|
+
color: "white",
|
|
214872
|
+
children: slice3.label
|
|
214873
|
+
}, undefined, false, undefined, this)
|
|
214874
|
+
}, undefined, false, undefined, this),
|
|
214875
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214876
|
+
color,
|
|
214877
|
+
children: bar
|
|
214878
|
+
}, undefined, false, undefined, this),
|
|
214879
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214880
|
+
color: "gray",
|
|
214881
|
+
children: [
|
|
214882
|
+
percentage,
|
|
214883
|
+
"%"
|
|
214563
214884
|
]
|
|
214564
214885
|
}, undefined, true, undefined, this)
|
|
214886
|
+
]
|
|
214887
|
+
}, idx, true, undefined, this);
|
|
214888
|
+
})
|
|
214889
|
+
]
|
|
214890
|
+
}, undefined, true, undefined, this);
|
|
214891
|
+
}
|
|
214892
|
+
var import_react43, jsx_dev_runtime9;
|
|
214893
|
+
var init_mermaid = __esm(async () => {
|
|
214894
|
+
await init_build2();
|
|
214895
|
+
import_react43 = __toESM(require_react(), 1);
|
|
214896
|
+
jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
|
|
214897
|
+
});
|
|
214898
|
+
|
|
214899
|
+
// ../../packages/tui/src/components/markdown.tsx
|
|
214900
|
+
function renderTableCell(cell, index2) {
|
|
214901
|
+
if (cell?.tokens && Array.isArray(cell.tokens)) {
|
|
214902
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214903
|
+
children: cell.tokens.map((t2, i2) => renderToken(t2, i2))
|
|
214904
|
+
}, index2, false, undefined, this);
|
|
214905
|
+
}
|
|
214906
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214907
|
+
children: cell?.text || cell?.raw || ""
|
|
214908
|
+
}, index2, false, undefined, this);
|
|
214909
|
+
}
|
|
214910
|
+
function getCellTextLength(cell) {
|
|
214911
|
+
if (!cell)
|
|
214912
|
+
return 0;
|
|
214913
|
+
if (typeof cell === "string")
|
|
214914
|
+
return cell.length;
|
|
214915
|
+
if (cell.text)
|
|
214916
|
+
return cell.text.length;
|
|
214917
|
+
if (cell.tokens && Array.isArray(cell.tokens)) {
|
|
214918
|
+
return cell.tokens.reduce((acc, t2) => acc + (t2.text?.length || t2.raw?.length || 0), 0);
|
|
214919
|
+
}
|
|
214920
|
+
return cell.raw?.length || 0;
|
|
214921
|
+
}
|
|
214922
|
+
function Table({ token }) {
|
|
214923
|
+
const headers = token.header || [];
|
|
214924
|
+
const rows = token.rows || [];
|
|
214925
|
+
if (headers.length === 0 && rows.length === 0) {
|
|
214926
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214927
|
+
children: token.raw
|
|
214928
|
+
}, undefined, false, undefined, this);
|
|
214929
|
+
}
|
|
214930
|
+
const colCount = Math.max(headers.length, ...rows.map((r2) => r2.length));
|
|
214931
|
+
const colWidths = [];
|
|
214932
|
+
for (let c = 0;c < colCount; c++) {
|
|
214933
|
+
let maxLen = headers[c] ? getCellTextLength(headers[c]) : 0;
|
|
214934
|
+
for (const row of rows) {
|
|
214935
|
+
if (row[c]) {
|
|
214936
|
+
maxLen = Math.max(maxLen, getCellTextLength(row[c]));
|
|
214937
|
+
}
|
|
214938
|
+
}
|
|
214939
|
+
colWidths[c] = Math.min(Math.max(maxLen, 3), 40);
|
|
214940
|
+
}
|
|
214941
|
+
const topBorder = `┌${colWidths.map((w2) => "─".repeat(w2 + 2)).join("┬")}┐`;
|
|
214942
|
+
const headerSep = `├${colWidths.map((w2) => "─".repeat(w2 + 2)).join("┼")}┤`;
|
|
214943
|
+
const bottomBorder = `└${colWidths.map((w2) => "─".repeat(w2 + 2)).join("┴")}┘`;
|
|
214944
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214945
|
+
flexDirection: "column",
|
|
214946
|
+
marginY: 1,
|
|
214947
|
+
children: [
|
|
214948
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214949
|
+
color: "#555555",
|
|
214950
|
+
children: topBorder
|
|
214951
|
+
}, undefined, false, undefined, this),
|
|
214952
|
+
headers.length > 0 && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
214953
|
+
children: [
|
|
214954
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214955
|
+
flexDirection: "row",
|
|
214956
|
+
children: [
|
|
214957
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214958
|
+
color: "#555555",
|
|
214959
|
+
children: "│"
|
|
214960
|
+
}, undefined, false, undefined, this),
|
|
214961
|
+
headers.map((cell, c) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_react44.default.Fragment, {
|
|
214962
|
+
children: [
|
|
214963
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214964
|
+
width: colWidths[c] + 2,
|
|
214965
|
+
paddingX: 1,
|
|
214966
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214967
|
+
bold: true,
|
|
214968
|
+
color: "white",
|
|
214969
|
+
children: renderTableCell(cell, c)
|
|
214970
|
+
}, undefined, false, undefined, this)
|
|
214971
|
+
}, undefined, false, undefined, this),
|
|
214972
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214973
|
+
color: "#555555",
|
|
214974
|
+
children: "│"
|
|
214975
|
+
}, undefined, false, undefined, this)
|
|
214976
|
+
]
|
|
214977
|
+
}, c, true, undefined, this))
|
|
214978
|
+
]
|
|
214979
|
+
}, undefined, true, undefined, this),
|
|
214980
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214981
|
+
color: "#555555",
|
|
214982
|
+
children: headerSep
|
|
214565
214983
|
}, undefined, false, undefined, this)
|
|
214566
214984
|
]
|
|
214567
214985
|
}, undefined, true, undefined, this),
|
|
214568
|
-
/* @__PURE__ */
|
|
214569
|
-
|
|
214570
|
-
children:
|
|
214986
|
+
rows.map((row, r2) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214987
|
+
flexDirection: "row",
|
|
214988
|
+
children: [
|
|
214989
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214990
|
+
color: "#555555",
|
|
214991
|
+
children: "│"
|
|
214992
|
+
}, undefined, false, undefined, this),
|
|
214993
|
+
row.map((cell, c) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(import_react44.default.Fragment, {
|
|
214994
|
+
children: [
|
|
214995
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214996
|
+
width: colWidths[c] + 2,
|
|
214997
|
+
paddingX: 1,
|
|
214998
|
+
children: renderTableCell(cell, c)
|
|
214999
|
+
}, undefined, false, undefined, this),
|
|
215000
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
215001
|
+
color: "#555555",
|
|
215002
|
+
children: "│"
|
|
215003
|
+
}, undefined, false, undefined, this)
|
|
215004
|
+
]
|
|
215005
|
+
}, c, true, undefined, this))
|
|
215006
|
+
]
|
|
215007
|
+
}, r2, true, undefined, this)),
|
|
215008
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
215009
|
+
color: "#555555",
|
|
215010
|
+
children: bottomBorder
|
|
214571
215011
|
}, undefined, false, undefined, this)
|
|
214572
215012
|
]
|
|
214573
215013
|
}, undefined, true, undefined, this);
|
|
214574
215014
|
}
|
|
215015
|
+
function CodeBlock({ token }) {
|
|
215016
|
+
const lang = token.lang || "typescript";
|
|
215017
|
+
const highlighted = import_react44.default.useMemo(() => {
|
|
215018
|
+
if (!token.text)
|
|
215019
|
+
return "";
|
|
215020
|
+
return import_cli_highlight.highlight(token.text, {
|
|
215021
|
+
language: lang,
|
|
215022
|
+
ignoreIllegals: true
|
|
215023
|
+
});
|
|
215024
|
+
}, [token.text, lang]);
|
|
215025
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
215026
|
+
flexDirection: "column",
|
|
215027
|
+
paddingY: 1,
|
|
215028
|
+
paddingLeft: 2,
|
|
215029
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
215030
|
+
children: highlighted
|
|
215031
|
+
}, undefined, false, undefined, this)
|
|
215032
|
+
}, undefined, false, undefined, this);
|
|
215033
|
+
}
|
|
214575
215034
|
function Markdown({ children: children2 }) {
|
|
214576
215035
|
if (!children2)
|
|
214577
215036
|
return null;
|
|
214578
215037
|
const tokens = g.lexer(children2).filter((t2) => t2.type !== "space");
|
|
214579
|
-
return /* @__PURE__ */
|
|
215038
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214580
215039
|
flexDirection: "column",
|
|
214581
215040
|
gap: 1,
|
|
214582
215041
|
children: tokens.map((token, index2) => renderToken(token, index2))
|
|
214583
215042
|
}, undefined, false, undefined, this);
|
|
214584
215043
|
}
|
|
214585
|
-
var import_cli_highlight,
|
|
215044
|
+
var import_cli_highlight, import_react44, jsx_dev_runtime10, renderToken = (token, index2) => {
|
|
214586
215045
|
switch (token.type) {
|
|
214587
215046
|
case "paragraph":
|
|
214588
|
-
return /* @__PURE__ */
|
|
215047
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214589
215048
|
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
214590
215049
|
}, index2, false, undefined, this);
|
|
214591
215050
|
case "text":
|
|
214592
215051
|
if ("tokens" in token && token.tokens) {
|
|
214593
|
-
return /* @__PURE__ */
|
|
215052
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214594
215053
|
children: token.tokens.map((t2, i2) => renderToken(t2, i2))
|
|
214595
215054
|
}, index2, false, undefined, this);
|
|
214596
215055
|
}
|
|
214597
|
-
return /* @__PURE__ */
|
|
215056
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214598
215057
|
children: token.text || token.raw
|
|
214599
215058
|
}, index2, false, undefined, this);
|
|
214600
215059
|
case "strong":
|
|
214601
|
-
return /* @__PURE__ */
|
|
215060
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214602
215061
|
bold: true,
|
|
214603
215062
|
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
214604
215063
|
}, index2, false, undefined, this);
|
|
214605
215064
|
case "em":
|
|
214606
|
-
return /* @__PURE__ */
|
|
215065
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214607
215066
|
italic: true,
|
|
214608
215067
|
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
214609
215068
|
}, index2, false, undefined, this);
|
|
214610
215069
|
case "codespan":
|
|
214611
|
-
return /* @__PURE__ */
|
|
215070
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214612
215071
|
backgroundColor: "#303030",
|
|
214613
215072
|
color: "#89B4F8",
|
|
214614
215073
|
bold: false,
|
|
@@ -214622,40 +215081,25 @@ var import_cli_highlight, import_react43, jsx_dev_runtime9, renderToken = (token
|
|
|
214622
215081
|
return null;
|
|
214623
215082
|
case "code":
|
|
214624
215083
|
if (token.lang === "mermaid") {
|
|
214625
|
-
return /* @__PURE__ */
|
|
214626
|
-
|
|
214627
|
-
|
|
214628
|
-
paddingY: 1,
|
|
214629
|
-
borderStyle: "round",
|
|
214630
|
-
borderColor: "#A78BFA",
|
|
214631
|
-
children: [
|
|
214632
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214633
|
-
color: "#A78BFA",
|
|
214634
|
-
bold: true,
|
|
214635
|
-
children: "Mermaid Diagram"
|
|
214636
|
-
}, undefined, false, undefined, this),
|
|
214637
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214638
|
-
color: "#AAAAAA",
|
|
214639
|
-
children: token.text
|
|
214640
|
-
}, undefined, false, undefined, this)
|
|
214641
|
-
]
|
|
214642
|
-
}, index2, true, undefined, this);
|
|
215084
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Mermaid, {
|
|
215085
|
+
code: token.text
|
|
215086
|
+
}, index2, false, undefined, this);
|
|
214643
215087
|
}
|
|
214644
|
-
return /* @__PURE__ */
|
|
215088
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(CodeBlock, {
|
|
214645
215089
|
token
|
|
214646
215090
|
}, index2, false, undefined, this);
|
|
214647
215091
|
case "list":
|
|
214648
|
-
return /* @__PURE__ */
|
|
215092
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214649
215093
|
flexDirection: "column",
|
|
214650
215094
|
paddingLeft: 1,
|
|
214651
|
-
children: token.items.map((item, i2) => /* @__PURE__ */
|
|
215095
|
+
children: token.items.map((item, i2) => /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214652
215096
|
flexDirection: "row",
|
|
214653
215097
|
children: [
|
|
214654
|
-
/* @__PURE__ */
|
|
215098
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214655
215099
|
color: "gray",
|
|
214656
215100
|
children: "• "
|
|
214657
215101
|
}, undefined, false, undefined, this),
|
|
214658
|
-
/* @__PURE__ */
|
|
215102
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
214659
215103
|
flexDirection: "column",
|
|
214660
215104
|
children: item.tokens.map((t2, j2) => renderToken(t2, j2))
|
|
214661
215105
|
}, undefined, false, undefined, this)
|
|
@@ -214663,67 +215107,76 @@ var import_cli_highlight, import_react43, jsx_dev_runtime9, renderToken = (token
|
|
|
214663
215107
|
}, i2, true, undefined, this))
|
|
214664
215108
|
}, index2, false, undefined, this);
|
|
214665
215109
|
case "heading":
|
|
214666
|
-
return /* @__PURE__ */
|
|
214667
|
-
children: /* @__PURE__ */
|
|
215110
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
215111
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214668
215112
|
bold: true,
|
|
214669
215113
|
color: "white",
|
|
214670
|
-
underline: true,
|
|
214671
215114
|
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
214672
215115
|
}, undefined, false, undefined, this)
|
|
214673
215116
|
}, index2, false, undefined, this);
|
|
214674
215117
|
case "link":
|
|
214675
|
-
return /* @__PURE__ */
|
|
214676
|
-
color: "
|
|
215118
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
215119
|
+
color: "#89B4F8",
|
|
214677
215120
|
underline: true,
|
|
214678
215121
|
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
214679
215122
|
}, index2, false, undefined, this);
|
|
215123
|
+
case "hr":
|
|
215124
|
+
return null;
|
|
215125
|
+
case "blockquote":
|
|
215126
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
215127
|
+
borderStyle: "single",
|
|
215128
|
+
borderLeft: true,
|
|
215129
|
+
borderRight: false,
|
|
215130
|
+
borderTop: false,
|
|
215131
|
+
borderBottom: false,
|
|
215132
|
+
borderColor: "#89B4F8",
|
|
215133
|
+
paddingLeft: 1,
|
|
215134
|
+
children: token.tokens?.map((t2, i2) => renderToken(t2, i2))
|
|
215135
|
+
}, index2, false, undefined, this);
|
|
214680
215136
|
case "html":
|
|
214681
|
-
return /* @__PURE__ */
|
|
215137
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214682
215138
|
children: token.text
|
|
214683
215139
|
}, index2, false, undefined, this);
|
|
214684
215140
|
case "escape":
|
|
214685
|
-
return /* @__PURE__ */
|
|
215141
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214686
215142
|
children: token.text
|
|
214687
215143
|
}, index2, false, undefined, this);
|
|
214688
215144
|
case "table":
|
|
214689
|
-
return /* @__PURE__ */
|
|
214690
|
-
|
|
214691
|
-
paddingY: 1,
|
|
214692
|
-
borderStyle: "round",
|
|
214693
|
-
borderColor: "#555555",
|
|
214694
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text3, {
|
|
214695
|
-
children: token.raw
|
|
214696
|
-
}, undefined, false, undefined, this)
|
|
215145
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Table, {
|
|
215146
|
+
token
|
|
214697
215147
|
}, index2, false, undefined, this);
|
|
214698
215148
|
default:
|
|
214699
|
-
return /* @__PURE__ */
|
|
215149
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text3, {
|
|
214700
215150
|
children: token.raw
|
|
214701
215151
|
}, index2, false, undefined, this);
|
|
214702
215152
|
}
|
|
214703
215153
|
};
|
|
214704
215154
|
var init_markdown = __esm(async () => {
|
|
214705
215155
|
init_marked_esm();
|
|
214706
|
-
await
|
|
215156
|
+
await __promiseAll([
|
|
215157
|
+
init_build2(),
|
|
215158
|
+
init_mermaid()
|
|
215159
|
+
]);
|
|
214707
215160
|
import_cli_highlight = __toESM(require_dist4(), 1);
|
|
214708
|
-
|
|
214709
|
-
|
|
215161
|
+
import_react44 = __toESM(require_react(), 1);
|
|
215162
|
+
jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
214710
215163
|
});
|
|
214711
215164
|
|
|
214712
215165
|
// ../../packages/tui/src/components/messages/smooth-markdown.tsx
|
|
214713
215166
|
function SmoothMarkdown({ text: text3, isRunning }) {
|
|
214714
|
-
return /* @__PURE__ */
|
|
215167
|
+
return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Markdown, {
|
|
214715
215168
|
children: text3
|
|
214716
215169
|
}, undefined, false, undefined, this);
|
|
214717
215170
|
}
|
|
214718
|
-
var
|
|
215171
|
+
var jsx_dev_runtime11;
|
|
214719
215172
|
var init_smooth_markdown = __esm(async () => {
|
|
214720
215173
|
await init_markdown();
|
|
214721
|
-
|
|
215174
|
+
jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
|
|
214722
215175
|
});
|
|
214723
215176
|
|
|
214724
215177
|
// ../../packages/tui/src/components/messages/bot-message.tsx
|
|
214725
215178
|
function CollapsibleThought({ content, isStreaming }) {
|
|
214726
|
-
const [expanded, setExpanded] =
|
|
215179
|
+
const [expanded, setExpanded] = import_react45.useState(false);
|
|
214727
215180
|
const words2 = content.trim() ? content.trim().split(/\s+/).length : 0;
|
|
214728
215181
|
const tokenCount = Math.max(1, Math.round(words2 * 1.33));
|
|
214729
215182
|
use_input_default((input, key) => {
|
|
@@ -214732,20 +215185,20 @@ function CollapsibleThought({ content, isStreaming }) {
|
|
|
214732
215185
|
}
|
|
214733
215186
|
});
|
|
214734
215187
|
if (isStreaming) {
|
|
214735
|
-
return /* @__PURE__ */
|
|
215188
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214736
215189
|
flexDirection: "column",
|
|
214737
215190
|
marginY: 0.5,
|
|
214738
|
-
children: /* @__PURE__ */
|
|
215191
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214739
215192
|
color: "gray",
|
|
214740
215193
|
children: content
|
|
214741
215194
|
}, undefined, false, undefined, this)
|
|
214742
215195
|
}, undefined, false, undefined, this);
|
|
214743
215196
|
}
|
|
214744
|
-
return /* @__PURE__ */
|
|
215197
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214745
215198
|
flexDirection: "column",
|
|
214746
215199
|
marginY: 0.5,
|
|
214747
215200
|
children: [
|
|
214748
|
-
/* @__PURE__ */
|
|
215201
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214749
215202
|
color: "gray",
|
|
214750
215203
|
italic: true,
|
|
214751
215204
|
children: [
|
|
@@ -214756,10 +215209,10 @@ function CollapsibleThought({ content, isStreaming }) {
|
|
|
214756
215209
|
")"
|
|
214757
215210
|
]
|
|
214758
215211
|
}, undefined, true, undefined, this),
|
|
214759
|
-
expanded && /* @__PURE__ */
|
|
215212
|
+
expanded && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214760
215213
|
paddingLeft: 1,
|
|
214761
215214
|
paddingTop: 0.5,
|
|
214762
|
-
children: /* @__PURE__ */
|
|
215215
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214763
215216
|
color: "gray",
|
|
214764
215217
|
children: content
|
|
214765
215218
|
}, undefined, false, undefined, this)
|
|
@@ -214775,18 +215228,18 @@ function StyledCommand({ command, truncate: truncate3 = true }) {
|
|
|
214775
215228
|
args = args.substring(0, 80) + "...";
|
|
214776
215229
|
}
|
|
214777
215230
|
const cmdColor = "#fef08a";
|
|
214778
|
-
return /* @__PURE__ */
|
|
215231
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214779
215232
|
children: [
|
|
214780
|
-
/* @__PURE__ */
|
|
215233
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214781
215234
|
color: cmdColor,
|
|
214782
215235
|
children: "● "
|
|
214783
215236
|
}, undefined, false, undefined, this),
|
|
214784
|
-
/* @__PURE__ */
|
|
215237
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214785
215238
|
color: cmdColor,
|
|
214786
215239
|
bold: true,
|
|
214787
215240
|
children: match2[1]
|
|
214788
215241
|
}, undefined, false, undefined, this),
|
|
214789
|
-
/* @__PURE__ */
|
|
215242
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214790
215243
|
color: "#cbd5e1",
|
|
214791
215244
|
children: [
|
|
214792
215245
|
"(",
|
|
@@ -214801,7 +215254,7 @@ function StyledCommand({ command, truncate: truncate3 = true }) {
|
|
|
214801
215254
|
if (truncate3 && displayCmd.length > 80) {
|
|
214802
215255
|
displayCmd = displayCmd.substring(0, 80) + "...";
|
|
214803
215256
|
}
|
|
214804
|
-
return /* @__PURE__ */
|
|
215257
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214805
215258
|
color: "white",
|
|
214806
215259
|
children: displayCmd
|
|
214807
215260
|
}, undefined, false, undefined, this);
|
|
@@ -214812,7 +215265,7 @@ function CollapsibleCommandOutput({
|
|
|
214812
215265
|
forceExpanded
|
|
214813
215266
|
}) {
|
|
214814
215267
|
const { isFocused } = use_focus_default({ autoFocus: true });
|
|
214815
|
-
const [userExpanded, setUserExpanded] =
|
|
215268
|
+
const [userExpanded, setUserExpanded] = import_react45.useState(false);
|
|
214816
215269
|
const isExpanded = userExpanded || Boolean(forceExpanded);
|
|
214817
215270
|
use_input_default((input, key) => {
|
|
214818
215271
|
if (key.ctrl && (key.name === "o" || input?.toLowerCase() === "o") || input === "\x0F") {
|
|
@@ -214823,18 +215276,18 @@ function CollapsibleCommandOutput({
|
|
|
214823
215276
|
const MAX_VISIBLE_LINES = 20;
|
|
214824
215277
|
const visibleLines = isExpanded ? lines.slice(0, MAX_VISIBLE_LINES) : [];
|
|
214825
215278
|
const isTruncated = isExpanded && lines.length > MAX_VISIBLE_LINES;
|
|
214826
|
-
return /* @__PURE__ */
|
|
215279
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214827
215280
|
flexDirection: "column",
|
|
214828
215281
|
marginY: 0,
|
|
214829
215282
|
children: [
|
|
214830
|
-
/* @__PURE__ */
|
|
215283
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214831
215284
|
alignItems: "center",
|
|
214832
215285
|
gap: 1,
|
|
214833
215286
|
children: [
|
|
214834
|
-
/* @__PURE__ */
|
|
215287
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StyledCommand, {
|
|
214835
215288
|
command
|
|
214836
215289
|
}, undefined, false, undefined, this),
|
|
214837
|
-
lines.length > 0 && /* @__PURE__ */
|
|
215290
|
+
lines.length > 0 && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214838
215291
|
color: "gray",
|
|
214839
215292
|
children: [
|
|
214840
215293
|
"(",
|
|
@@ -214844,7 +215297,7 @@ function CollapsibleCommandOutput({
|
|
|
214844
215297
|
}, undefined, true, undefined, this)
|
|
214845
215298
|
]
|
|
214846
215299
|
}, undefined, true, undefined, this),
|
|
214847
|
-
isExpanded && lines.length > 0 && /* @__PURE__ */
|
|
215300
|
+
isExpanded && lines.length > 0 && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214848
215301
|
flexDirection: "column",
|
|
214849
215302
|
marginTop: 0,
|
|
214850
215303
|
paddingX: 1,
|
|
@@ -214861,19 +215314,19 @@ function CollapsibleCommandOutput({
|
|
|
214861
215314
|
} else if (line.startsWith("@@") || line.startsWith("diff --git") || line.startsWith("---") || line.startsWith("+++")) {
|
|
214862
215315
|
color = "#d1d5db";
|
|
214863
215316
|
}
|
|
214864
|
-
return /* @__PURE__ */
|
|
215317
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214865
215318
|
backgroundColor: bgColor,
|
|
214866
215319
|
flexDirection: "row",
|
|
214867
|
-
children: /* @__PURE__ */
|
|
215320
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214868
215321
|
color,
|
|
214869
215322
|
wrap: "truncate-end",
|
|
214870
215323
|
children: line
|
|
214871
215324
|
}, undefined, false, undefined, this)
|
|
214872
215325
|
}, lidx, false, undefined, this);
|
|
214873
215326
|
}),
|
|
214874
|
-
isTruncated && /* @__PURE__ */
|
|
215327
|
+
isTruncated && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214875
215328
|
paddingTop: 0,
|
|
214876
|
-
children: /* @__PURE__ */
|
|
215329
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214877
215330
|
color: "#AAAAAA",
|
|
214878
215331
|
children: [
|
|
214879
215332
|
"... (",
|
|
@@ -214888,7 +215341,7 @@ function CollapsibleCommandOutput({
|
|
|
214888
215341
|
}, undefined, true, undefined, this);
|
|
214889
215342
|
}
|
|
214890
215343
|
function BotMessage({ blocks, usage, expandCommands }) {
|
|
214891
|
-
return /* @__PURE__ */
|
|
215344
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214892
215345
|
flexDirection: "column",
|
|
214893
215346
|
paddingX: 4,
|
|
214894
215347
|
paddingY: 0,
|
|
@@ -214914,18 +215367,18 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214914
215367
|
if (isThinking) {
|
|
214915
215368
|
if (idx !== blocks.length - 1)
|
|
214916
215369
|
return null;
|
|
214917
|
-
return /* @__PURE__ */
|
|
215370
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214918
215371
|
flexDirection: "column",
|
|
214919
215372
|
children: [
|
|
214920
|
-
needsTopMargin && /* @__PURE__ */
|
|
215373
|
+
needsTopMargin && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214921
215374
|
children: " "
|
|
214922
215375
|
}, undefined, false, undefined, this),
|
|
214923
|
-
/* @__PURE__ */
|
|
215376
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214924
215377
|
gap: 1,
|
|
214925
215378
|
alignItems: "center",
|
|
214926
215379
|
children: [
|
|
214927
|
-
/* @__PURE__ */
|
|
214928
|
-
/* @__PURE__ */
|
|
215380
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Spinner2, {}, undefined, false, undefined, this),
|
|
215381
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214929
215382
|
color: "gray",
|
|
214930
215383
|
children: block.content
|
|
214931
215384
|
}, undefined, false, undefined, this)
|
|
@@ -214935,13 +215388,13 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214935
215388
|
}, idx, true, undefined, this);
|
|
214936
215389
|
}
|
|
214937
215390
|
if (block.color) {
|
|
214938
|
-
return /* @__PURE__ */
|
|
215391
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214939
215392
|
flexDirection: "column",
|
|
214940
215393
|
children: [
|
|
214941
|
-
needsTopMargin && /* @__PURE__ */
|
|
215394
|
+
needsTopMargin && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214942
215395
|
children: " "
|
|
214943
215396
|
}, undefined, false, undefined, this),
|
|
214944
|
-
/* @__PURE__ */
|
|
215397
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214945
215398
|
color: block.color,
|
|
214946
215399
|
children: block.content
|
|
214947
215400
|
}, undefined, false, undefined, this)
|
|
@@ -214949,10 +215402,10 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214949
215402
|
}, idx, true, undefined, this);
|
|
214950
215403
|
}
|
|
214951
215404
|
const parts = block.content.split(/(<thought(?:>| [^>]*>)[\s\S]*?<\/thought>|<thought(?:>| [^>]*>)[\s\S]*)/i);
|
|
214952
|
-
return /* @__PURE__ */
|
|
215405
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214953
215406
|
flexDirection: "column",
|
|
214954
215407
|
children: [
|
|
214955
|
-
needsTopMargin && /* @__PURE__ */
|
|
215408
|
+
needsTopMargin && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214956
215409
|
children: " "
|
|
214957
215410
|
}, undefined, false, undefined, this),
|
|
214958
215411
|
parts.map((part, pidx) => {
|
|
@@ -214960,15 +215413,15 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214960
215413
|
const isClosed = /<\/thought>$/i.test(part);
|
|
214961
215414
|
const isStreaming = !isClosed && idx === blocks.length - 1 && pidx === parts.length - 1;
|
|
214962
215415
|
const thoughtContent = part.replace(/^<thought(?:>| [^>]*>)/i, "").replace(/<\/thought>$/i, "").trim();
|
|
214963
|
-
return /* @__PURE__ */
|
|
215416
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CollapsibleThought, {
|
|
214964
215417
|
content: thoughtContent,
|
|
214965
215418
|
isStreaming
|
|
214966
215419
|
}, pidx, false, undefined, this);
|
|
214967
215420
|
}
|
|
214968
215421
|
if (part.trim() === "")
|
|
214969
215422
|
return null;
|
|
214970
|
-
return /* @__PURE__ */
|
|
214971
|
-
children: /* @__PURE__ */
|
|
215423
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215424
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(SmoothMarkdown, {
|
|
214972
215425
|
text: part.trim(),
|
|
214973
215426
|
isRunning: true
|
|
214974
215427
|
}, undefined, false, undefined, this)
|
|
@@ -214978,13 +215431,13 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214978
215431
|
}, idx, true, undefined, this);
|
|
214979
215432
|
}
|
|
214980
215433
|
case "error": {
|
|
214981
|
-
return /* @__PURE__ */
|
|
215434
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214982
215435
|
flexDirection: "column",
|
|
214983
215436
|
children: [
|
|
214984
|
-
needsTopMargin && /* @__PURE__ */
|
|
215437
|
+
needsTopMargin && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214985
215438
|
children: " "
|
|
214986
215439
|
}, undefined, false, undefined, this),
|
|
214987
|
-
/* @__PURE__ */
|
|
215440
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214988
215441
|
color: "#FCA5A5",
|
|
214989
215442
|
children: block.error
|
|
214990
215443
|
}, undefined, false, undefined, this)
|
|
@@ -214992,10 +215445,10 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
214992
215445
|
}, idx, true, undefined, this);
|
|
214993
215446
|
}
|
|
214994
215447
|
case "interrupt": {
|
|
214995
|
-
return /* @__PURE__ */
|
|
215448
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
214996
215449
|
flexDirection: "row",
|
|
214997
215450
|
paddingY: 1,
|
|
214998
|
-
children: /* @__PURE__ */
|
|
215451
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
214999
215452
|
color: "gray",
|
|
215000
215453
|
children: "Interrupted · What should December do instead?"
|
|
215001
215454
|
}, undefined, false, undefined, this)
|
|
@@ -215003,30 +215456,30 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
215003
215456
|
}
|
|
215004
215457
|
case "thinking": {
|
|
215005
215458
|
const isStreaming = block.isStreaming ?? idx === blocks.length - 1;
|
|
215006
|
-
return /* @__PURE__ */
|
|
215459
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CollapsibleThought, {
|
|
215007
215460
|
content: block.content,
|
|
215008
215461
|
isStreaming
|
|
215009
215462
|
}, idx, false, undefined, this);
|
|
215010
215463
|
}
|
|
215011
215464
|
case "compaction": {
|
|
215012
|
-
return /* @__PURE__ */
|
|
215465
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215013
215466
|
flexDirection: "column",
|
|
215014
215467
|
paddingY: 1,
|
|
215015
215468
|
children: [
|
|
215016
|
-
/* @__PURE__ */
|
|
215469
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215017
215470
|
flexDirection: "row",
|
|
215018
215471
|
gap: 1,
|
|
215019
215472
|
alignItems: "center",
|
|
215020
|
-
children: /* @__PURE__ */
|
|
215473
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215021
215474
|
color: "#fef08a",
|
|
215022
215475
|
italic: true,
|
|
215023
215476
|
children: "Context Compacted"
|
|
215024
215477
|
}, undefined, false, undefined, this)
|
|
215025
215478
|
}, undefined, false, undefined, this),
|
|
215026
|
-
/* @__PURE__ */
|
|
215479
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215027
215480
|
paddingLeft: 1,
|
|
215028
215481
|
paddingTop: 1,
|
|
215029
|
-
children: /* @__PURE__ */
|
|
215482
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215030
215483
|
color: "gray",
|
|
215031
215484
|
children: block.summary.replace(/^\[COMPACTED HISTORY SUMMARY\]\n/, "")
|
|
215032
215485
|
}, undefined, false, undefined, this)
|
|
@@ -215044,12 +215497,12 @@ function BotMessage({ blocks, usage, expandCommands }) {
|
|
|
215044
215497
|
if (!isRunning) {
|
|
215045
215498
|
const isNoOutputTool = block.toolName === "read_file" || block.toolName === "view_file" || block.toolName === "ask_permission" || block.toolName === "list_permissions";
|
|
215046
215499
|
if (isNoOutputTool) {
|
|
215047
|
-
return /* @__PURE__ */
|
|
215500
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215048
215501
|
flexDirection: "column",
|
|
215049
|
-
children: /* @__PURE__ */
|
|
215502
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215050
215503
|
alignItems: "center",
|
|
215051
215504
|
gap: 1,
|
|
215052
|
-
children: /* @__PURE__ */
|
|
215505
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(StyledCommand, {
|
|
215053
215506
|
command: block.command
|
|
215054
215507
|
}, undefined, false, undefined, this)
|
|
215055
215508
|
}, undefined, false, undefined, this)
|
|
@@ -215086,7 +215539,7 @@ ${r2}`;
|
|
|
215086
215539
|
`);
|
|
215087
215540
|
}
|
|
215088
215541
|
}
|
|
215089
|
-
return /* @__PURE__ */
|
|
215542
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CollapsibleCommandOutput, {
|
|
215090
215543
|
command: block.command,
|
|
215091
215544
|
output: displayOutput,
|
|
215092
215545
|
forceExpanded: expandCommands
|
|
@@ -215119,27 +215572,27 @@ ${r2}`;
|
|
|
215119
215572
|
statusLabel = "Sending message...";
|
|
215120
215573
|
else if (block.toolName === "schedule")
|
|
215121
215574
|
statusLabel = "Scheduling timer...";
|
|
215122
|
-
return /* @__PURE__ */
|
|
215575
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215123
215576
|
flexDirection: "column",
|
|
215124
215577
|
children: [
|
|
215125
|
-
/* @__PURE__ */
|
|
215578
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215126
215579
|
gap: 1,
|
|
215127
215580
|
alignItems: "center",
|
|
215128
215581
|
children: [
|
|
215129
|
-
/* @__PURE__ */
|
|
215130
|
-
/* @__PURE__ */
|
|
215582
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Spinner2, {}, undefined, false, undefined, this),
|
|
215583
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215131
215584
|
color: "gray",
|
|
215132
215585
|
children: statusLabel
|
|
215133
215586
|
}, undefined, false, undefined, this)
|
|
215134
215587
|
]
|
|
215135
215588
|
}, undefined, true, undefined, this),
|
|
215136
|
-
block.output && /* @__PURE__ */
|
|
215589
|
+
block.output && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215137
215590
|
flexDirection: "column",
|
|
215138
215591
|
marginLeft: 0,
|
|
215139
215592
|
marginTop: 0.5,
|
|
215140
215593
|
paddingX: 1,
|
|
215141
215594
|
paddingY: 0.5,
|
|
215142
|
-
children: block.output.trim().split(/\r?\n/).slice(-2).map((line, lidx) => /* @__PURE__ */
|
|
215595
|
+
children: block.output.trim().split(/\r?\n/).slice(-2).map((line, lidx) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215143
215596
|
color: "#94a3b8",
|
|
215144
215597
|
wrap: "truncate-end",
|
|
215145
215598
|
children: [
|
|
@@ -215155,20 +215608,20 @@ ${r2}`;
|
|
|
215155
215608
|
const isCreated = block.action === "created";
|
|
215156
215609
|
const isDeleted = block.action === "deleted";
|
|
215157
215610
|
const actionLabel = isCreated ? "CREATED" : isDeleted ? "DELETED" : "MODIFIED";
|
|
215158
|
-
return /* @__PURE__ */
|
|
215611
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215159
215612
|
gap: 1,
|
|
215160
215613
|
alignItems: "center",
|
|
215161
215614
|
children: [
|
|
215162
|
-
/* @__PURE__ */
|
|
215615
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215163
215616
|
color: "#fef08a",
|
|
215164
215617
|
children: "● "
|
|
215165
215618
|
}, undefined, false, undefined, this),
|
|
215166
|
-
/* @__PURE__ */
|
|
215619
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215167
215620
|
color: "#fef08a",
|
|
215168
215621
|
bold: true,
|
|
215169
215622
|
children: actionLabel
|
|
215170
215623
|
}, undefined, false, undefined, this),
|
|
215171
|
-
/* @__PURE__ */
|
|
215624
|
+
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215172
215625
|
color: "#cbd5e1",
|
|
215173
215626
|
children: block.filePath
|
|
215174
215627
|
}, undefined, false, undefined, this)
|
|
@@ -215176,37 +215629,21 @@ ${r2}`;
|
|
|
215176
215629
|
}, idx, true, undefined, this);
|
|
215177
215630
|
}
|
|
215178
215631
|
case "code": {
|
|
215179
|
-
|
|
215180
|
-
const borderLine = "─".repeat(borderLength);
|
|
215181
|
-
return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
215632
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215182
215633
|
flexDirection: "column",
|
|
215183
|
-
paddingLeft:
|
|
215184
|
-
|
|
215185
|
-
|
|
215186
|
-
|
|
215187
|
-
|
|
215188
|
-
|
|
215189
|
-
|
|
215190
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Box_default, {
|
|
215191
|
-
flexDirection: "column",
|
|
215192
|
-
paddingLeft: 2,
|
|
215193
|
-
children: block.code.split(/\r?\n/).map((line, lidx) => /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text3, {
|
|
215194
|
-
color: "#E2E8F0",
|
|
215195
|
-
children: line
|
|
215196
|
-
}, lidx, false, undefined, this))
|
|
215197
|
-
}, undefined, false, undefined, this),
|
|
215198
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(Text3, {
|
|
215199
|
-
color: "#4A5568",
|
|
215200
|
-
children: "└──"
|
|
215201
|
-
}, undefined, false, undefined, this)
|
|
215202
|
-
]
|
|
215203
|
-
}, idx, true, undefined, this);
|
|
215634
|
+
paddingLeft: 2,
|
|
215635
|
+
paddingY: 0.5,
|
|
215636
|
+
children: block.code.split(/\r?\n/).map((line, lidx) => /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215637
|
+
color: "#E2E8F0",
|
|
215638
|
+
children: line
|
|
215639
|
+
}, lidx, false, undefined, this))
|
|
215640
|
+
}, idx, false, undefined, this);
|
|
215204
215641
|
}
|
|
215205
215642
|
case "status": {
|
|
215206
|
-
return /* @__PURE__ */
|
|
215643
|
+
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
|
|
215207
215644
|
gap: 1,
|
|
215208
215645
|
alignItems: "center",
|
|
215209
|
-
children: /* @__PURE__ */
|
|
215646
|
+
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
|
|
215210
215647
|
color: block.success ? "#6EE7B7" : "#FCA5A5",
|
|
215211
215648
|
children: block.label
|
|
215212
215649
|
}, undefined, false, undefined, this)
|
|
@@ -215218,15 +215655,15 @@ ${r2}`;
|
|
|
215218
215655
|
})
|
|
215219
215656
|
}, undefined, false, undefined, this);
|
|
215220
215657
|
}
|
|
215221
|
-
var
|
|
215658
|
+
var import_react45, jsx_dev_runtime12;
|
|
215222
215659
|
var init_bot_message = __esm(async () => {
|
|
215223
215660
|
await __promiseAll([
|
|
215224
215661
|
init_build2(),
|
|
215225
215662
|
init_spinner(),
|
|
215226
215663
|
init_smooth_markdown()
|
|
215227
215664
|
]);
|
|
215228
|
-
|
|
215229
|
-
|
|
215665
|
+
import_react45 = __toESM(require_react(), 1);
|
|
215666
|
+
jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215230
215667
|
});
|
|
215231
215668
|
|
|
215232
215669
|
// ../../packages/tui/src/components/header.tsx
|
|
@@ -215254,13 +215691,13 @@ function Header({
|
|
|
215254
215691
|
}) {
|
|
215255
215692
|
const cwd2 = getCwd();
|
|
215256
215693
|
const branch = getGitBranch();
|
|
215257
|
-
return /* @__PURE__ */
|
|
215694
|
+
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
|
|
215258
215695
|
flexDirection: "column",
|
|
215259
215696
|
paddingLeft: 2,
|
|
215260
215697
|
paddingTop: 1,
|
|
215261
215698
|
paddingBottom: 0,
|
|
215262
215699
|
children: [
|
|
215263
|
-
/* @__PURE__ */
|
|
215700
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215264
215701
|
bold: true,
|
|
215265
215702
|
color: "white",
|
|
215266
215703
|
children: [
|
|
@@ -215268,18 +215705,18 @@ function Header({
|
|
|
215268
215705
|
cliVersion.replace(/^v/, "")
|
|
215269
215706
|
]
|
|
215270
215707
|
}, undefined, true, undefined, this),
|
|
215271
|
-
userEmail && /* @__PURE__ */
|
|
215708
|
+
userEmail && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215272
215709
|
color: "gray",
|
|
215273
215710
|
children: userEmail
|
|
215274
215711
|
}, undefined, false, undefined, this),
|
|
215275
|
-
/* @__PURE__ */
|
|
215712
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
|
|
215276
215713
|
gap: 1,
|
|
215277
215714
|
children: [
|
|
215278
|
-
/* @__PURE__ */
|
|
215715
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215279
215716
|
color: "gray",
|
|
215280
215717
|
children: cwd2
|
|
215281
215718
|
}, undefined, false, undefined, this),
|
|
215282
|
-
branch && /* @__PURE__ */
|
|
215719
|
+
branch && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215283
215720
|
color: "gray",
|
|
215284
215721
|
children: [
|
|
215285
215722
|
"(",
|
|
@@ -215289,19 +215726,19 @@ function Header({
|
|
|
215289
215726
|
}, undefined, true, undefined, this)
|
|
215290
215727
|
]
|
|
215291
215728
|
}, undefined, true, undefined, this),
|
|
215292
|
-
/* @__PURE__ */
|
|
215729
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Box_default, {
|
|
215293
215730
|
flexDirection: "column",
|
|
215294
215731
|
marginTop: 1,
|
|
215295
215732
|
children: [
|
|
215296
|
-
/* @__PURE__ */
|
|
215733
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215297
215734
|
color: "#89B4F8",
|
|
215298
215735
|
children: "Tips for getting started"
|
|
215299
215736
|
}, undefined, false, undefined, this),
|
|
215300
|
-
/* @__PURE__ */
|
|
215737
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215301
215738
|
color: "gray",
|
|
215302
215739
|
children: "Run /init to scaffold .december workspace for custom rules and skills"
|
|
215303
215740
|
}, undefined, false, undefined, this),
|
|
215304
|
-
/* @__PURE__ */
|
|
215741
|
+
/* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
|
|
215305
215742
|
color: "gray",
|
|
215306
215743
|
children: "Use /handoff to continue this session in December (trydecember.com)"
|
|
215307
215744
|
}, undefined, false, undefined, this)
|
|
@@ -215310,38 +215747,38 @@ function Header({
|
|
|
215310
215747
|
]
|
|
215311
215748
|
}, undefined, true, undefined, this);
|
|
215312
215749
|
}
|
|
215313
|
-
var
|
|
215750
|
+
var jsx_dev_runtime13;
|
|
215314
215751
|
var init_header = __esm(async () => {
|
|
215315
215752
|
await init_build2();
|
|
215316
|
-
|
|
215753
|
+
jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215317
215754
|
});
|
|
215318
215755
|
|
|
215319
215756
|
// ../../packages/tui/src/components/messages/error-message.tsx
|
|
215320
215757
|
function ErrorMessage({ message, hasTopMargin = false }) {
|
|
215321
|
-
return /* @__PURE__ */
|
|
215758
|
+
return /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Box_default, {
|
|
215322
215759
|
paddingX: 4,
|
|
215323
215760
|
paddingY: 0,
|
|
215324
215761
|
flexDirection: "column",
|
|
215325
215762
|
children: [
|
|
215326
|
-
hasTopMargin && /* @__PURE__ */
|
|
215763
|
+
hasTopMargin && /* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
|
|
215327
215764
|
children: " "
|
|
215328
215765
|
}, undefined, false, undefined, this),
|
|
215329
|
-
/* @__PURE__ */
|
|
215766
|
+
/* @__PURE__ */ jsx_dev_runtime14.jsxDEV(Text3, {
|
|
215330
215767
|
color: "#FCA5A5",
|
|
215331
215768
|
children: message.trim()
|
|
215332
215769
|
}, undefined, false, undefined, this)
|
|
215333
215770
|
]
|
|
215334
215771
|
}, undefined, true, undefined, this);
|
|
215335
215772
|
}
|
|
215336
|
-
var
|
|
215773
|
+
var jsx_dev_runtime14;
|
|
215337
215774
|
var init_error_message = __esm(async () => {
|
|
215338
215775
|
await init_build2();
|
|
215339
|
-
|
|
215776
|
+
jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215340
215777
|
});
|
|
215341
215778
|
|
|
215342
215779
|
// ../../packages/tui/src/components/messages/user-message.tsx
|
|
215343
215780
|
function UserMessage({ message }) {
|
|
215344
|
-
return /* @__PURE__ */
|
|
215781
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
215345
215782
|
paddingLeft: 2,
|
|
215346
215783
|
paddingRight: 4,
|
|
215347
215784
|
paddingY: 0,
|
|
@@ -215349,16 +215786,16 @@ function UserMessage({ message }) {
|
|
|
215349
215786
|
marginBottom: 1,
|
|
215350
215787
|
flexDirection: "row",
|
|
215351
215788
|
children: [
|
|
215352
|
-
/* @__PURE__ */
|
|
215789
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
215353
215790
|
marginRight: 1,
|
|
215354
|
-
children: /* @__PURE__ */
|
|
215791
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text3, {
|
|
215355
215792
|
color: "#89B4F8",
|
|
215356
215793
|
children: "❭"
|
|
215357
215794
|
}, undefined, false, undefined, this)
|
|
215358
215795
|
}, undefined, false, undefined, this),
|
|
215359
|
-
/* @__PURE__ */
|
|
215796
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Box_default, {
|
|
215360
215797
|
flexShrink: 1,
|
|
215361
|
-
children: /* @__PURE__ */
|
|
215798
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Text3, {
|
|
215362
215799
|
color: "#89B4F8",
|
|
215363
215800
|
children: message
|
|
215364
215801
|
}, undefined, false, undefined, this)
|
|
@@ -215366,13 +215803,39 @@ function UserMessage({ message }) {
|
|
|
215366
215803
|
]
|
|
215367
215804
|
}, undefined, true, undefined, this);
|
|
215368
215805
|
}
|
|
215369
|
-
var
|
|
215806
|
+
var jsx_dev_runtime15;
|
|
215370
215807
|
var init_user_message = __esm(async () => {
|
|
215371
215808
|
await init_build2();
|
|
215372
|
-
|
|
215809
|
+
jsx_dev_runtime15 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215373
215810
|
});
|
|
215374
215811
|
|
|
215375
215812
|
// ../../packages/tui/src/components/message-list.tsx
|
|
215813
|
+
function renderSingleMessage(msg, index2, allMessages, cliVersion, userEmail, expandCommands) {
|
|
215814
|
+
const key = msg.id != null ? `${msg.id}-${index2}` : `msg-idx-${index2}`;
|
|
215815
|
+
if (msg.role === "header") {
|
|
215816
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Header, {
|
|
215817
|
+
cliVersion,
|
|
215818
|
+
userEmail
|
|
215819
|
+
}, key, false, undefined, this);
|
|
215820
|
+
}
|
|
215821
|
+
if (msg.role === "user")
|
|
215822
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(UserMessage, {
|
|
215823
|
+
message: msg.text ?? ""
|
|
215824
|
+
}, key, false, undefined, this);
|
|
215825
|
+
if (msg.role === "error") {
|
|
215826
|
+
const prevRole = index2 > 0 ? allMessages[index2 - 1]?.role : null;
|
|
215827
|
+
const hasTopMargin = prevRole !== "user";
|
|
215828
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(ErrorMessage, {
|
|
215829
|
+
message: msg.text ?? "",
|
|
215830
|
+
hasTopMargin
|
|
215831
|
+
}, key, false, undefined, this);
|
|
215832
|
+
}
|
|
215833
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(BotMessage, {
|
|
215834
|
+
blocks: msg.blocks ?? [],
|
|
215835
|
+
usage: msg.usage,
|
|
215836
|
+
expandCommands
|
|
215837
|
+
}, key, false, undefined, this);
|
|
215838
|
+
}
|
|
215376
215839
|
function MessageList({
|
|
215377
215840
|
staticKey,
|
|
215378
215841
|
staticMessages,
|
|
@@ -215383,37 +215846,12 @@ function MessageList({
|
|
|
215383
215846
|
expandCommands
|
|
215384
215847
|
}) {
|
|
215385
215848
|
const allMessages = [...staticMessages, ...activeMessages];
|
|
215386
|
-
return /* @__PURE__ */
|
|
215849
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(Box_default, {
|
|
215387
215850
|
flexDirection: "column",
|
|
215388
|
-
children: allMessages.map((msg, index2) =>
|
|
215389
|
-
const key = msg.id != null ? `${msg.id}-${index2}` : `msg-idx-${index2}`;
|
|
215390
|
-
if (msg.role === "header") {
|
|
215391
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(Header, {
|
|
215392
|
-
cliVersion,
|
|
215393
|
-
userEmail
|
|
215394
|
-
}, key, false, undefined, this);
|
|
215395
|
-
}
|
|
215396
|
-
if (msg.role === "user")
|
|
215397
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(UserMessage, {
|
|
215398
|
-
message: msg.text ?? ""
|
|
215399
|
-
}, key, false, undefined, this);
|
|
215400
|
-
if (msg.role === "error") {
|
|
215401
|
-
const prevRole = index2 > 0 ? allMessages[index2 - 1]?.role : null;
|
|
215402
|
-
const hasTopMargin = prevRole !== "user";
|
|
215403
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(ErrorMessage, {
|
|
215404
|
-
message: msg.text ?? "",
|
|
215405
|
-
hasTopMargin
|
|
215406
|
-
}, key, false, undefined, this);
|
|
215407
|
-
}
|
|
215408
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(BotMessage, {
|
|
215409
|
-
blocks: msg.blocks ?? [],
|
|
215410
|
-
usage: msg.usage,
|
|
215411
|
-
expandCommands
|
|
215412
|
-
}, key, false, undefined, this);
|
|
215413
|
-
})
|
|
215851
|
+
children: allMessages.map((msg, index2) => renderSingleMessage(msg, index2, allMessages, cliVersion, userEmail, expandCommands))
|
|
215414
215852
|
}, undefined, false, undefined, this);
|
|
215415
215853
|
}
|
|
215416
|
-
var
|
|
215854
|
+
var jsx_dev_runtime16;
|
|
215417
215855
|
var init_message_list = __esm(async () => {
|
|
215418
215856
|
await __promiseAll([
|
|
215419
215857
|
init_build2(),
|
|
@@ -215422,7 +215860,7 @@ var init_message_list = __esm(async () => {
|
|
|
215422
215860
|
init_error_message(),
|
|
215423
215861
|
init_user_message()
|
|
215424
215862
|
]);
|
|
215425
|
-
|
|
215863
|
+
jsx_dev_runtime16 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215426
215864
|
});
|
|
215427
215865
|
// ../../packages/tui/src/theme.ts
|
|
215428
215866
|
var COLORS;
|
|
@@ -215439,33 +215877,33 @@ var init_theme = __esm(() => {
|
|
|
215439
215877
|
|
|
215440
215878
|
// ../../packages/tui/src/providers/theme/index.tsx
|
|
215441
215879
|
function ThemeProvider({ children: children2 }) {
|
|
215442
|
-
return /* @__PURE__ */
|
|
215880
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(ThemeContext.Provider, {
|
|
215443
215881
|
value: { colors: COLORS },
|
|
215444
215882
|
children: children2
|
|
215445
215883
|
}, undefined, false, undefined, this);
|
|
215446
215884
|
}
|
|
215447
|
-
var
|
|
215885
|
+
var import_react46, jsx_dev_runtime17, ThemeContext;
|
|
215448
215886
|
var init_theme2 = __esm(() => {
|
|
215449
215887
|
init_theme();
|
|
215450
|
-
|
|
215451
|
-
|
|
215452
|
-
ThemeContext =
|
|
215888
|
+
import_react46 = __toESM(require_react(), 1);
|
|
215889
|
+
jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215890
|
+
ThemeContext = import_react46.createContext({ colors: COLORS });
|
|
215453
215891
|
});
|
|
215454
215892
|
|
|
215455
215893
|
// ../../packages/tui/src/layouts/root-layout.tsx
|
|
215456
215894
|
function RootLayout({ children: children2, onToast }) {
|
|
215457
|
-
return /* @__PURE__ */
|
|
215458
|
-
children: /* @__PURE__ */
|
|
215459
|
-
children: /* @__PURE__ */
|
|
215895
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(ThemeProvider, {
|
|
215896
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(KeyboardLayerProvider, {
|
|
215897
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(ToastProvider, {
|
|
215460
215898
|
onToast,
|
|
215461
|
-
children: /* @__PURE__ */
|
|
215899
|
+
children: /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(DialogProvider, {
|
|
215462
215900
|
children: children2
|
|
215463
215901
|
}, undefined, false, undefined, this)
|
|
215464
215902
|
}, undefined, false, undefined, this)
|
|
215465
215903
|
}, undefined, false, undefined, this)
|
|
215466
215904
|
}, undefined, false, undefined, this);
|
|
215467
215905
|
}
|
|
215468
|
-
var
|
|
215906
|
+
var jsx_dev_runtime18;
|
|
215469
215907
|
var init_root_layout = __esm(async () => {
|
|
215470
215908
|
init_theme2();
|
|
215471
215909
|
await __promiseAll([
|
|
@@ -215473,33 +215911,33 @@ var init_root_layout = __esm(async () => {
|
|
|
215473
215911
|
init_keyboard_layer(),
|
|
215474
215912
|
init_toast()
|
|
215475
215913
|
]);
|
|
215476
|
-
|
|
215914
|
+
jsx_dev_runtime18 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215477
215915
|
});
|
|
215478
215916
|
|
|
215479
215917
|
// ../../packages/tui/src/components/menus/menu-items.tsx
|
|
215480
|
-
var
|
|
215918
|
+
var jsx_dev_runtime19, CustomIndicator = ({ isSelected }) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Box_default, {
|
|
215481
215919
|
marginRight: 1,
|
|
215482
|
-
children: /* @__PURE__ */
|
|
215920
|
+
children: /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text3, {
|
|
215483
215921
|
color: "#89B4F8",
|
|
215484
215922
|
children: isSelected ? "❯" : " "
|
|
215485
215923
|
}, undefined, false, undefined, this)
|
|
215486
|
-
}, undefined, false, undefined, this), CustomItem = ({ label, isSelected }) => /* @__PURE__ */
|
|
215924
|
+
}, undefined, false, undefined, this), CustomItem = ({ label, isSelected }) => /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(Text3, {
|
|
215487
215925
|
color: isSelected ? "#89B4F8" : "white",
|
|
215488
215926
|
children: isSelected ? label : label
|
|
215489
215927
|
}, undefined, false, undefined, this);
|
|
215490
215928
|
var init_menu_items = __esm(async () => {
|
|
215491
215929
|
await init_build2();
|
|
215492
|
-
|
|
215930
|
+
jsx_dev_runtime19 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215493
215931
|
});
|
|
215494
215932
|
|
|
215495
215933
|
// ../../node_modules/.bun/ink-text-input@6.0.0+99d24c251f842efe/node_modules/ink-text-input/build/index.js
|
|
215496
215934
|
function TextInput({ value: originalValue, placeholder = "", focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit }) {
|
|
215497
|
-
const [state, setState] =
|
|
215935
|
+
const [state, setState] = import_react47.useState({
|
|
215498
215936
|
cursorOffset: (originalValue || "").length,
|
|
215499
215937
|
cursorWidth: 0
|
|
215500
215938
|
});
|
|
215501
215939
|
const { cursorOffset, cursorWidth } = state;
|
|
215502
|
-
|
|
215940
|
+
import_react47.useEffect(() => {
|
|
215503
215941
|
setState((previousState) => {
|
|
215504
215942
|
if (!focus || !showCursor) {
|
|
215505
215943
|
return previousState;
|
|
@@ -215577,26 +216015,26 @@ function TextInput({ value: originalValue, placeholder = "", focus = true, mask,
|
|
|
215577
216015
|
onChange(nextValue);
|
|
215578
216016
|
}
|
|
215579
216017
|
}, { isActive: focus });
|
|
215580
|
-
return
|
|
216018
|
+
return import_react47.default.createElement(Text3, null, placeholder ? value.length > 0 ? renderedValue : renderedPlaceholder : renderedValue);
|
|
215581
216019
|
}
|
|
215582
|
-
var
|
|
216020
|
+
var import_react47, build_default2;
|
|
215583
216021
|
var init_build4 = __esm(async () => {
|
|
215584
216022
|
init_source();
|
|
215585
216023
|
await init_build2();
|
|
215586
|
-
|
|
216024
|
+
import_react47 = __toESM(require_react(), 1);
|
|
215587
216025
|
build_default2 = TextInput;
|
|
215588
216026
|
});
|
|
215589
216027
|
|
|
215590
216028
|
// ../../packages/tui/src/components/menus/byok-key-menu.tsx
|
|
215591
216029
|
function ByokKeyMenu(props) {
|
|
215592
216030
|
const { selectedProvider, apiKey, setApiKey, handleKeySubmit } = props;
|
|
215593
|
-
return /* @__PURE__ */
|
|
216031
|
+
return /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215594
216032
|
flexDirection: "column",
|
|
215595
216033
|
paddingX: 1,
|
|
215596
216034
|
children: [
|
|
215597
|
-
/* @__PURE__ */
|
|
216035
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215598
216036
|
marginBottom: 1,
|
|
215599
|
-
children: /* @__PURE__ */
|
|
216037
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215600
216038
|
color: "white",
|
|
215601
216039
|
children: [
|
|
215602
216040
|
"Enter API Key for ",
|
|
@@ -215605,9 +216043,9 @@ function ByokKeyMenu(props) {
|
|
|
215605
216043
|
]
|
|
215606
216044
|
}, undefined, true, undefined, this)
|
|
215607
216045
|
}, undefined, false, undefined, this),
|
|
215608
|
-
/* @__PURE__ */
|
|
216046
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215609
216047
|
children: [
|
|
215610
|
-
/* @__PURE__ */
|
|
216048
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215611
216049
|
color: "#89B4F8",
|
|
215612
216050
|
bold: false,
|
|
215613
216051
|
children: [
|
|
@@ -215615,7 +216053,7 @@ function ByokKeyMenu(props) {
|
|
|
215615
216053
|
" "
|
|
215616
216054
|
]
|
|
215617
216055
|
}, undefined, true, undefined, this),
|
|
215618
|
-
/* @__PURE__ */
|
|
216056
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(build_default2, {
|
|
215619
216057
|
focus: true,
|
|
215620
216058
|
value: apiKey,
|
|
215621
216059
|
onChange: setApiKey,
|
|
@@ -215623,35 +216061,35 @@ function ByokKeyMenu(props) {
|
|
|
215623
216061
|
}, undefined, false, undefined, this)
|
|
215624
216062
|
]
|
|
215625
216063
|
}, undefined, true, undefined, this),
|
|
215626
|
-
props.authError && /* @__PURE__ */
|
|
216064
|
+
props.authError && /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215627
216065
|
marginTop: 1,
|
|
215628
|
-
children: /* @__PURE__ */
|
|
216066
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215629
216067
|
color: "#FCA5A5",
|
|
215630
216068
|
children: props.authError
|
|
215631
216069
|
}, undefined, false, undefined, this)
|
|
215632
216070
|
}, undefined, false, undefined, this),
|
|
215633
|
-
/* @__PURE__ */
|
|
216071
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215634
216072
|
paddingTop: 1,
|
|
215635
|
-
children: /* @__PURE__ */
|
|
216073
|
+
children: /* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Box_default, {
|
|
215636
216074
|
gap: 1,
|
|
215637
216075
|
children: [
|
|
215638
|
-
/* @__PURE__ */
|
|
216076
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215639
216077
|
color: "#89B4F8",
|
|
215640
216078
|
children: "enter"
|
|
215641
216079
|
}, undefined, false, undefined, this),
|
|
215642
|
-
/* @__PURE__ */
|
|
216080
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215643
216081
|
color: "#AAAAAA",
|
|
215644
216082
|
children: "Submit"
|
|
215645
216083
|
}, undefined, false, undefined, this),
|
|
215646
|
-
/* @__PURE__ */
|
|
216084
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215647
216085
|
color: "#AAAAAA",
|
|
215648
216086
|
children: "·"
|
|
215649
216087
|
}, undefined, false, undefined, this),
|
|
215650
|
-
/* @__PURE__ */
|
|
216088
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215651
216089
|
color: "#89B4F8",
|
|
215652
216090
|
children: "esc"
|
|
215653
216091
|
}, undefined, false, undefined, this),
|
|
215654
|
-
/* @__PURE__ */
|
|
216092
|
+
/* @__PURE__ */ jsx_dev_runtime20.jsxDEV(Text3, {
|
|
215655
216093
|
color: "#AAAAAA",
|
|
215656
216094
|
children: "Cancel"
|
|
215657
216095
|
}, undefined, false, undefined, this)
|
|
@@ -215661,13 +216099,13 @@ function ByokKeyMenu(props) {
|
|
|
215661
216099
|
]
|
|
215662
216100
|
}, undefined, true, undefined, this);
|
|
215663
216101
|
}
|
|
215664
|
-
var
|
|
216102
|
+
var jsx_dev_runtime20;
|
|
215665
216103
|
var init_byok_key_menu = __esm(async () => {
|
|
215666
216104
|
await __promiseAll([
|
|
215667
216105
|
init_build2(),
|
|
215668
216106
|
init_build4()
|
|
215669
216107
|
]);
|
|
215670
|
-
|
|
216108
|
+
jsx_dev_runtime20 = __toESM(require_jsx_dev_runtime(), 1);
|
|
215671
216109
|
});
|
|
215672
216110
|
|
|
215673
216111
|
// ../../node_modules/.bun/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
@@ -215964,24 +216402,24 @@ var init_figures = __esm(() => {
|
|
|
215964
216402
|
|
|
215965
216403
|
// ../../node_modules/.bun/ink-select-input@6.2.0+99d24c251f842efe/node_modules/ink-select-input/build/Indicator.js
|
|
215966
216404
|
function Indicator({ isSelected = false }) {
|
|
215967
|
-
return
|
|
216405
|
+
return import_react48.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react48.default.createElement(Text3, { color: "blue" }, figures_default.pointer) : import_react48.default.createElement(Text3, null, " "));
|
|
215968
216406
|
}
|
|
215969
|
-
var
|
|
216407
|
+
var import_react48, Indicator_default;
|
|
215970
216408
|
var init_Indicator = __esm(async () => {
|
|
215971
216409
|
init_figures();
|
|
215972
216410
|
await init_build2();
|
|
215973
|
-
|
|
216411
|
+
import_react48 = __toESM(require_react(), 1);
|
|
215974
216412
|
Indicator_default = Indicator;
|
|
215975
216413
|
});
|
|
215976
216414
|
|
|
215977
216415
|
// ../../node_modules/.bun/ink-select-input@6.2.0+99d24c251f842efe/node_modules/ink-select-input/build/Item.js
|
|
215978
216416
|
function Item({ isSelected = false, label }) {
|
|
215979
|
-
return
|
|
216417
|
+
return React20.createElement(Text3, { color: isSelected ? "blue" : undefined }, label);
|
|
215980
216418
|
}
|
|
215981
|
-
var
|
|
216419
|
+
var React20, Item_default;
|
|
215982
216420
|
var init_Item = __esm(async () => {
|
|
215983
216421
|
await init_build2();
|
|
215984
|
-
|
|
216422
|
+
React20 = __toESM(require_react(), 1);
|
|
215985
216423
|
Item_default = Item;
|
|
215986
216424
|
});
|
|
215987
216425
|
|
|
@@ -216013,17 +216451,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
|
|
|
216013
216451
|
const hasLimit = typeof customLimit === "number" && items.length > customLimit;
|
|
216014
216452
|
const limit3 = hasLimit ? Math.min(customLimit, items.length) : items.length;
|
|
216015
216453
|
const lastIndex = limit3 - 1;
|
|
216016
|
-
const [rotateIndex, setRotateIndex] =
|
|
216017
|
-
const [selectedIndex, setSelectedIndex] =
|
|
216018
|
-
const previousItems =
|
|
216019
|
-
|
|
216454
|
+
const [rotateIndex, setRotateIndex] = import_react49.useState(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
|
|
216455
|
+
const [selectedIndex, setSelectedIndex] = import_react49.useState(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
|
|
216456
|
+
const previousItems = import_react49.useRef(items);
|
|
216457
|
+
import_react49.useEffect(() => {
|
|
216020
216458
|
if (!isDeepStrictEqual(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
|
|
216021
216459
|
setRotateIndex(0);
|
|
216022
216460
|
setSelectedIndex(0);
|
|
216023
216461
|
}
|
|
216024
216462
|
previousItems.current = items;
|
|
216025
216463
|
}, [items]);
|
|
216026
|
-
use_input_default(
|
|
216464
|
+
use_input_default(import_react49.useCallback((input, key) => {
|
|
216027
216465
|
if (input === "k" || key.upArrow) {
|
|
216028
216466
|
const lastIndex2 = (hasLimit ? limit3 : items.length) - 1;
|
|
216029
216467
|
const atFirstIndex = selectedIndex === 0;
|
|
@@ -216075,19 +216513,19 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
|
|
|
216075
216513
|
onHighlight
|
|
216076
216514
|
]), { isActive: isFocused });
|
|
216077
216515
|
const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit3) : items;
|
|
216078
|
-
return
|
|
216516
|
+
return import_react49.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index2) => {
|
|
216079
216517
|
const isSelected = index2 === selectedIndex;
|
|
216080
|
-
return
|
|
216518
|
+
return import_react49.default.createElement(Box_default, { key: item.key ?? item.value }, import_react49.default.createElement(indicatorComponent, { isSelected }), import_react49.default.createElement(itemComponent, { ...item, isSelected }));
|
|
216081
216519
|
}));
|
|
216082
216520
|
}
|
|
216083
|
-
var
|
|
216521
|
+
var import_react49, SelectInput_default;
|
|
216084
216522
|
var init_SelectInput = __esm(async () => {
|
|
216085
216523
|
await __promiseAll([
|
|
216086
216524
|
init_build2(),
|
|
216087
216525
|
init_Indicator(),
|
|
216088
216526
|
init_Item()
|
|
216089
216527
|
]);
|
|
216090
|
-
|
|
216528
|
+
import_react49 = __toESM(require_react(), 1);
|
|
216091
216529
|
SelectInput_default = SelectInput;
|
|
216092
216530
|
});
|
|
216093
216531
|
|
|
@@ -216103,18 +216541,18 @@ var init_build5 = __esm(async () => {
|
|
|
216103
216541
|
// ../../packages/tui/src/components/menus/byok-provider-menu.tsx
|
|
216104
216542
|
function ByokProviderMenu(props) {
|
|
216105
216543
|
const { handleProviderSelect } = props;
|
|
216106
|
-
return /* @__PURE__ */
|
|
216544
|
+
return /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
216107
216545
|
flexDirection: "column",
|
|
216108
216546
|
paddingX: 1,
|
|
216109
216547
|
children: [
|
|
216110
|
-
/* @__PURE__ */
|
|
216548
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
216111
216549
|
marginBottom: 1,
|
|
216112
|
-
children: /* @__PURE__ */
|
|
216550
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216113
216551
|
color: "white",
|
|
216114
216552
|
children: "Select API Provider:"
|
|
216115
216553
|
}, undefined, false, undefined, this)
|
|
216116
216554
|
}, undefined, false, undefined, this),
|
|
216117
|
-
/* @__PURE__ */
|
|
216555
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(SelectInput_default, {
|
|
216118
216556
|
items: [
|
|
216119
216557
|
{ label: "Anthropic", value: "anthropic" },
|
|
216120
216558
|
{ label: "DeepSeek", value: "deepseek" },
|
|
@@ -216133,40 +216571,40 @@ function ByokProviderMenu(props) {
|
|
|
216133
216571
|
indicatorComponent: CustomIndicator,
|
|
216134
216572
|
itemComponent: CustomItem
|
|
216135
216573
|
}, undefined, false, undefined, this),
|
|
216136
|
-
/* @__PURE__ */
|
|
216574
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
216137
216575
|
paddingTop: 1,
|
|
216138
|
-
children: /* @__PURE__ */
|
|
216576
|
+
children: /* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Box_default, {
|
|
216139
216577
|
gap: 1,
|
|
216140
216578
|
children: [
|
|
216141
|
-
/* @__PURE__ */
|
|
216579
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216142
216580
|
color: "#89B4F8",
|
|
216143
216581
|
children: "↑↓"
|
|
216144
216582
|
}, undefined, false, undefined, this),
|
|
216145
|
-
/* @__PURE__ */
|
|
216583
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216146
216584
|
color: "#AAAAAA",
|
|
216147
216585
|
children: "Navigate"
|
|
216148
216586
|
}, undefined, false, undefined, this),
|
|
216149
|
-
/* @__PURE__ */
|
|
216587
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216150
216588
|
color: "#AAAAAA",
|
|
216151
216589
|
children: "·"
|
|
216152
216590
|
}, undefined, false, undefined, this),
|
|
216153
|
-
/* @__PURE__ */
|
|
216591
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216154
216592
|
color: "#89B4F8",
|
|
216155
216593
|
children: "enter"
|
|
216156
216594
|
}, undefined, false, undefined, this),
|
|
216157
|
-
/* @__PURE__ */
|
|
216595
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216158
216596
|
color: "#AAAAAA",
|
|
216159
216597
|
children: "Select"
|
|
216160
216598
|
}, undefined, false, undefined, this),
|
|
216161
|
-
/* @__PURE__ */
|
|
216599
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216162
216600
|
color: "#AAAAAA",
|
|
216163
216601
|
children: "·"
|
|
216164
216602
|
}, undefined, false, undefined, this),
|
|
216165
|
-
/* @__PURE__ */
|
|
216603
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216166
216604
|
color: "#89B4F8",
|
|
216167
216605
|
children: "esc"
|
|
216168
216606
|
}, undefined, false, undefined, this),
|
|
216169
|
-
/* @__PURE__ */
|
|
216607
|
+
/* @__PURE__ */ jsx_dev_runtime21.jsxDEV(Text3, {
|
|
216170
216608
|
color: "#AAAAAA",
|
|
216171
216609
|
children: "Cancel"
|
|
216172
216610
|
}, undefined, false, undefined, this)
|
|
@@ -216176,14 +216614,14 @@ function ByokProviderMenu(props) {
|
|
|
216176
216614
|
]
|
|
216177
216615
|
}, undefined, true, undefined, this);
|
|
216178
216616
|
}
|
|
216179
|
-
var
|
|
216617
|
+
var jsx_dev_runtime21;
|
|
216180
216618
|
var init_byok_provider_menu = __esm(async () => {
|
|
216181
216619
|
await __promiseAll([
|
|
216182
216620
|
init_build2(),
|
|
216183
216621
|
init_build5(),
|
|
216184
216622
|
init_menu_items()
|
|
216185
216623
|
]);
|
|
216186
|
-
|
|
216624
|
+
jsx_dev_runtime21 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216187
216625
|
});
|
|
216188
216626
|
|
|
216189
216627
|
// ../../packages/tui/src/components/menus/context-select-menu.tsx
|
|
@@ -216208,7 +216646,7 @@ function ContextSelectMenu(props) {
|
|
|
216208
216646
|
let filled = 0;
|
|
216209
216647
|
const addSquares = (count, char, color) => {
|
|
216210
216648
|
for (let i2 = 0;i2 < count && filled < totalSquares; i2++) {
|
|
216211
|
-
squares.push(/* @__PURE__ */
|
|
216649
|
+
squares.push(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216212
216650
|
color,
|
|
216213
216651
|
children: char
|
|
216214
216652
|
}, filled, false, undefined, this));
|
|
@@ -216220,7 +216658,7 @@ function ContextSelectMenu(props) {
|
|
|
216220
216658
|
addSquares(Math.round(toolTokens / maxTokens * totalSquares), "●", "#FCD34D");
|
|
216221
216659
|
addSquares(Math.round(sysTokens / maxTokens * totalSquares), "●", "#AAAAAA");
|
|
216222
216660
|
while (filled < totalSquares) {
|
|
216223
|
-
squares.push(/* @__PURE__ */
|
|
216661
|
+
squares.push(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216224
216662
|
color: "#444444",
|
|
216225
216663
|
children: "□"
|
|
216226
216664
|
}, filled, false, undefined, this));
|
|
@@ -216228,37 +216666,37 @@ function ContextSelectMenu(props) {
|
|
|
216228
216666
|
}
|
|
216229
216667
|
const gridRows = [];
|
|
216230
216668
|
for (let i2 = 0;i2 < totalSquares; i2 += 20) {
|
|
216231
|
-
gridRows.push(/* @__PURE__ */
|
|
216669
|
+
gridRows.push(/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216232
216670
|
gap: 1,
|
|
216233
216671
|
children: squares.slice(i2, i2 + 20)
|
|
216234
216672
|
}, i2, false, undefined, this));
|
|
216235
216673
|
}
|
|
216236
|
-
return /* @__PURE__ */
|
|
216674
|
+
return /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216237
216675
|
flexDirection: "column",
|
|
216238
216676
|
paddingX: 1,
|
|
216239
216677
|
children: [
|
|
216240
|
-
/* @__PURE__ */
|
|
216678
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216241
216679
|
marginBottom: 1,
|
|
216242
|
-
children: /* @__PURE__ */
|
|
216680
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216243
216681
|
bold: true,
|
|
216244
216682
|
color: "white",
|
|
216245
216683
|
children: "Context"
|
|
216246
216684
|
}, undefined, false, undefined, this)
|
|
216247
216685
|
}, undefined, false, undefined, this),
|
|
216248
|
-
/* @__PURE__ */
|
|
216686
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216249
216687
|
flexDirection: "row",
|
|
216250
216688
|
gap: 4,
|
|
216251
216689
|
children: [
|
|
216252
|
-
/* @__PURE__ */
|
|
216690
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216253
216691
|
flexDirection: "column",
|
|
216254
216692
|
children: gridRows
|
|
216255
216693
|
}, undefined, false, undefined, this),
|
|
216256
|
-
/* @__PURE__ */
|
|
216694
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216257
216695
|
flexDirection: "column",
|
|
216258
216696
|
children: [
|
|
216259
|
-
/* @__PURE__ */
|
|
216697
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216260
216698
|
gap: 1,
|
|
216261
|
-
children: /* @__PURE__ */
|
|
216699
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216262
216700
|
color: "#AAAAAA",
|
|
216263
216701
|
children: [
|
|
216264
216702
|
currentModelName,
|
|
@@ -216272,24 +216710,24 @@ function ContextSelectMenu(props) {
|
|
|
216272
216710
|
]
|
|
216273
216711
|
}, undefined, true, undefined, this)
|
|
216274
216712
|
}, undefined, false, undefined, this),
|
|
216275
|
-
/* @__PURE__ */
|
|
216713
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216276
216714
|
marginTop: 1,
|
|
216277
|
-
children: /* @__PURE__ */
|
|
216715
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216278
216716
|
color: "white",
|
|
216279
216717
|
children: "Token usage by category"
|
|
216280
216718
|
}, undefined, false, undefined, this)
|
|
216281
216719
|
}, undefined, false, undefined, this),
|
|
216282
|
-
/* @__PURE__ */
|
|
216720
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216283
216721
|
flexDirection: "column",
|
|
216284
216722
|
children: [
|
|
216285
|
-
/* @__PURE__ */
|
|
216723
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216286
216724
|
gap: 1,
|
|
216287
216725
|
children: [
|
|
216288
|
-
/* @__PURE__ */
|
|
216726
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216289
216727
|
color: "#89B4F8",
|
|
216290
216728
|
children: "●"
|
|
216291
216729
|
}, undefined, false, undefined, this),
|
|
216292
|
-
/* @__PURE__ */
|
|
216730
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216293
216731
|
color: "#AAAAAA",
|
|
216294
216732
|
children: [
|
|
216295
216733
|
"User messages: ",
|
|
@@ -216301,14 +216739,14 @@ function ContextSelectMenu(props) {
|
|
|
216301
216739
|
}, undefined, true, undefined, this)
|
|
216302
216740
|
]
|
|
216303
216741
|
}, undefined, true, undefined, this),
|
|
216304
|
-
/* @__PURE__ */
|
|
216742
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216305
216743
|
gap: 1,
|
|
216306
216744
|
children: [
|
|
216307
|
-
/* @__PURE__ */
|
|
216745
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216308
216746
|
color: "#6EE7B7",
|
|
216309
216747
|
children: "●"
|
|
216310
216748
|
}, undefined, false, undefined, this),
|
|
216311
|
-
/* @__PURE__ */
|
|
216749
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216312
216750
|
color: "#AAAAAA",
|
|
216313
216751
|
children: [
|
|
216314
216752
|
"Agent responses: ",
|
|
@@ -216320,14 +216758,14 @@ function ContextSelectMenu(props) {
|
|
|
216320
216758
|
}, undefined, true, undefined, this)
|
|
216321
216759
|
]
|
|
216322
216760
|
}, undefined, true, undefined, this),
|
|
216323
|
-
/* @__PURE__ */
|
|
216761
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216324
216762
|
gap: 1,
|
|
216325
216763
|
children: [
|
|
216326
|
-
/* @__PURE__ */
|
|
216764
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216327
216765
|
color: "#FCD34D",
|
|
216328
216766
|
children: "●"
|
|
216329
216767
|
}, undefined, false, undefined, this),
|
|
216330
|
-
/* @__PURE__ */
|
|
216768
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216331
216769
|
color: "#AAAAAA",
|
|
216332
216770
|
children: [
|
|
216333
216771
|
"Tool calls: ",
|
|
@@ -216339,14 +216777,14 @@ function ContextSelectMenu(props) {
|
|
|
216339
216777
|
}, undefined, true, undefined, this)
|
|
216340
216778
|
]
|
|
216341
216779
|
}, undefined, true, undefined, this),
|
|
216342
|
-
/* @__PURE__ */
|
|
216780
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216343
216781
|
gap: 1,
|
|
216344
216782
|
children: [
|
|
216345
|
-
/* @__PURE__ */
|
|
216783
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216346
216784
|
color: "#AAAAAA",
|
|
216347
216785
|
children: "●"
|
|
216348
216786
|
}, undefined, false, undefined, this),
|
|
216349
|
-
/* @__PURE__ */
|
|
216787
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216350
216788
|
color: "#AAAAAA",
|
|
216351
216789
|
children: [
|
|
216352
216790
|
"System prompt: ",
|
|
@@ -216358,14 +216796,14 @@ function ContextSelectMenu(props) {
|
|
|
216358
216796
|
}, undefined, true, undefined, this)
|
|
216359
216797
|
]
|
|
216360
216798
|
}, undefined, true, undefined, this),
|
|
216361
|
-
/* @__PURE__ */
|
|
216799
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216362
216800
|
gap: 1,
|
|
216363
216801
|
children: [
|
|
216364
|
-
/* @__PURE__ */
|
|
216802
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216365
216803
|
color: "#444444",
|
|
216366
216804
|
children: "□"
|
|
216367
216805
|
}, undefined, false, undefined, this),
|
|
216368
|
-
/* @__PURE__ */
|
|
216806
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216369
216807
|
color: "#AAAAAA",
|
|
216370
216808
|
children: [
|
|
216371
216809
|
"Free space: ",
|
|
@@ -216383,16 +216821,16 @@ function ContextSelectMenu(props) {
|
|
|
216383
216821
|
}, undefined, true, undefined, this)
|
|
216384
216822
|
]
|
|
216385
216823
|
}, undefined, true, undefined, this),
|
|
216386
|
-
/* @__PURE__ */
|
|
216824
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216387
216825
|
paddingTop: 1,
|
|
216388
|
-
children: /* @__PURE__ */
|
|
216826
|
+
children: /* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Box_default, {
|
|
216389
216827
|
gap: 1,
|
|
216390
216828
|
children: [
|
|
216391
|
-
/* @__PURE__ */
|
|
216829
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216392
216830
|
color: "#89B4F8",
|
|
216393
216831
|
children: "esc"
|
|
216394
216832
|
}, undefined, false, undefined, this),
|
|
216395
|
-
/* @__PURE__ */
|
|
216833
|
+
/* @__PURE__ */ jsx_dev_runtime22.jsxDEV(Text3, {
|
|
216396
216834
|
color: "#AAAAAA",
|
|
216397
216835
|
children: "Cancel"
|
|
216398
216836
|
}, undefined, false, undefined, this)
|
|
@@ -216402,11 +216840,11 @@ function ContextSelectMenu(props) {
|
|
|
216402
216840
|
]
|
|
216403
216841
|
}, undefined, true, undefined, this);
|
|
216404
216842
|
}
|
|
216405
|
-
var
|
|
216843
|
+
var jsx_dev_runtime22;
|
|
216406
216844
|
var init_context_select_menu = __esm(async () => {
|
|
216407
216845
|
init_src3();
|
|
216408
216846
|
await init_build2();
|
|
216409
|
-
|
|
216847
|
+
jsx_dev_runtime22 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216410
216848
|
});
|
|
216411
216849
|
|
|
216412
216850
|
// ../../packages/tui/src/components/menus/grill-question-menu.tsx
|
|
@@ -216430,15 +216868,15 @@ function GrillQuestionMenu(props) {
|
|
|
216430
216868
|
...q2.options.map((opt, i2) => ({ label: `${i2 + 1}. ${opt}`, value: opt })),
|
|
216431
216869
|
{ label: `${q2.options.length + 1}. Write-in...`, value: "custom" }
|
|
216432
216870
|
];
|
|
216433
|
-
return /* @__PURE__ */
|
|
216871
|
+
return /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216434
216872
|
flexDirection: "column",
|
|
216435
216873
|
paddingX: 1,
|
|
216436
216874
|
children: [
|
|
216437
|
-
/* @__PURE__ */
|
|
216875
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216438
216876
|
marginBottom: 1,
|
|
216439
216877
|
flexDirection: "column",
|
|
216440
216878
|
children: [
|
|
216441
|
-
q2.docSource && /* @__PURE__ */
|
|
216879
|
+
q2.docSource && /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216442
216880
|
color: "#7DD3FC",
|
|
216443
216881
|
bold: true,
|
|
216444
216882
|
children: [
|
|
@@ -216447,7 +216885,7 @@ function GrillQuestionMenu(props) {
|
|
|
216447
216885
|
"]"
|
|
216448
216886
|
]
|
|
216449
216887
|
}, undefined, true, undefined, this),
|
|
216450
|
-
/* @__PURE__ */
|
|
216888
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216451
216889
|
color: "#89B4F8",
|
|
216452
216890
|
bold: true,
|
|
216453
216891
|
children: [
|
|
@@ -216458,55 +216896,55 @@ function GrillQuestionMenu(props) {
|
|
|
216458
216896
|
":"
|
|
216459
216897
|
]
|
|
216460
216898
|
}, undefined, true, undefined, this),
|
|
216461
|
-
/* @__PURE__ */
|
|
216899
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216462
216900
|
color: "white",
|
|
216463
216901
|
bold: true,
|
|
216464
216902
|
children: q2.question
|
|
216465
216903
|
}, undefined, false, undefined, this)
|
|
216466
216904
|
]
|
|
216467
216905
|
}, undefined, true, undefined, this),
|
|
216468
|
-
!customInputMode ? /* @__PURE__ */
|
|
216906
|
+
!customInputMode ? /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(jsx_dev_runtime23.Fragment, {
|
|
216469
216907
|
children: [
|
|
216470
|
-
/* @__PURE__ */
|
|
216908
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(SelectInput_default, {
|
|
216471
216909
|
items,
|
|
216472
216910
|
onSelect: handleGrillSelect,
|
|
216473
216911
|
indicatorComponent: CustomIndicator,
|
|
216474
216912
|
itemComponent: CustomItem
|
|
216475
216913
|
}, undefined, false, undefined, this),
|
|
216476
|
-
/* @__PURE__ */
|
|
216914
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216477
216915
|
paddingTop: 1,
|
|
216478
|
-
children: /* @__PURE__ */
|
|
216916
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216479
216917
|
gap: 1,
|
|
216480
216918
|
children: [
|
|
216481
|
-
/* @__PURE__ */
|
|
216919
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216482
216920
|
color: "#89B4F8",
|
|
216483
216921
|
children: "↑↓"
|
|
216484
216922
|
}, undefined, false, undefined, this),
|
|
216485
|
-
/* @__PURE__ */
|
|
216923
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216486
216924
|
color: "#AAAAAA",
|
|
216487
216925
|
children: "Navigate"
|
|
216488
216926
|
}, undefined, false, undefined, this),
|
|
216489
|
-
/* @__PURE__ */
|
|
216927
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216490
216928
|
color: "#AAAAAA",
|
|
216491
216929
|
children: "·"
|
|
216492
216930
|
}, undefined, false, undefined, this),
|
|
216493
|
-
/* @__PURE__ */
|
|
216931
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216494
216932
|
color: "#89B4F8",
|
|
216495
216933
|
children: "enter"
|
|
216496
216934
|
}, undefined, false, undefined, this),
|
|
216497
|
-
/* @__PURE__ */
|
|
216935
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216498
216936
|
color: "#AAAAAA",
|
|
216499
216937
|
children: "Select"
|
|
216500
216938
|
}, undefined, false, undefined, this),
|
|
216501
|
-
/* @__PURE__ */
|
|
216939
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216502
216940
|
color: "#AAAAAA",
|
|
216503
216941
|
children: "·"
|
|
216504
216942
|
}, undefined, false, undefined, this),
|
|
216505
|
-
/* @__PURE__ */
|
|
216943
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216506
216944
|
color: "#89B4F8",
|
|
216507
216945
|
children: "esc"
|
|
216508
216946
|
}, undefined, false, undefined, this),
|
|
216509
|
-
/* @__PURE__ */
|
|
216947
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216510
216948
|
color: "#AAAAAA",
|
|
216511
216949
|
children: "Cancel"
|
|
216512
216950
|
}, undefined, false, undefined, this)
|
|
@@ -216514,19 +216952,19 @@ function GrillQuestionMenu(props) {
|
|
|
216514
216952
|
}, undefined, true, undefined, this)
|
|
216515
216953
|
}, undefined, false, undefined, this)
|
|
216516
216954
|
]
|
|
216517
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */
|
|
216955
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216518
216956
|
flexDirection: "column",
|
|
216519
216957
|
gap: 1,
|
|
216520
216958
|
children: [
|
|
216521
|
-
/* @__PURE__ */
|
|
216959
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216522
216960
|
flexDirection: "row",
|
|
216523
216961
|
gap: 1,
|
|
216524
216962
|
children: [
|
|
216525
|
-
/* @__PURE__ */
|
|
216963
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216526
216964
|
color: "#89B4F8",
|
|
216527
216965
|
children: "Your answer:"
|
|
216528
216966
|
}, undefined, false, undefined, this),
|
|
216529
|
-
/* @__PURE__ */
|
|
216967
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(build_default2, {
|
|
216530
216968
|
focus: true,
|
|
216531
216969
|
value: customAnswer,
|
|
216532
216970
|
onChange: setCustomAnswer,
|
|
@@ -216549,28 +216987,28 @@ function GrillQuestionMenu(props) {
|
|
|
216549
216987
|
}, undefined, false, undefined, this)
|
|
216550
216988
|
]
|
|
216551
216989
|
}, undefined, true, undefined, this),
|
|
216552
|
-
/* @__PURE__ */
|
|
216990
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216553
216991
|
paddingTop: 1,
|
|
216554
|
-
children: /* @__PURE__ */
|
|
216992
|
+
children: /* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Box_default, {
|
|
216555
216993
|
gap: 1,
|
|
216556
216994
|
children: [
|
|
216557
|
-
/* @__PURE__ */
|
|
216995
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216558
216996
|
color: "#89B4F8",
|
|
216559
216997
|
children: "enter"
|
|
216560
216998
|
}, undefined, false, undefined, this),
|
|
216561
|
-
/* @__PURE__ */
|
|
216999
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216562
217000
|
color: "#AAAAAA",
|
|
216563
217001
|
children: "Submit"
|
|
216564
217002
|
}, undefined, false, undefined, this),
|
|
216565
|
-
/* @__PURE__ */
|
|
217003
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216566
217004
|
color: "#AAAAAA",
|
|
216567
217005
|
children: "·"
|
|
216568
217006
|
}, undefined, false, undefined, this),
|
|
216569
|
-
/* @__PURE__ */
|
|
217007
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216570
217008
|
color: "#89B4F8",
|
|
216571
217009
|
children: "esc"
|
|
216572
217010
|
}, undefined, false, undefined, this),
|
|
216573
|
-
/* @__PURE__ */
|
|
217011
|
+
/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(Text3, {
|
|
216574
217012
|
color: "#AAAAAA",
|
|
216575
217013
|
children: "Cancel"
|
|
216576
217014
|
}, undefined, false, undefined, this)
|
|
@@ -216584,7 +217022,7 @@ function GrillQuestionMenu(props) {
|
|
|
216584
217022
|
}
|
|
216585
217023
|
return null;
|
|
216586
217024
|
}
|
|
216587
|
-
var
|
|
217025
|
+
var jsx_dev_runtime23;
|
|
216588
217026
|
var init_grill_question_menu = __esm(async () => {
|
|
216589
217027
|
await __promiseAll([
|
|
216590
217028
|
init_build2(),
|
|
@@ -216592,63 +217030,63 @@ var init_grill_question_menu = __esm(async () => {
|
|
|
216592
217030
|
init_build4(),
|
|
216593
217031
|
init_menu_items()
|
|
216594
217032
|
]);
|
|
216595
|
-
|
|
217033
|
+
jsx_dev_runtime23 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216596
217034
|
});
|
|
216597
217035
|
|
|
216598
217036
|
// ../../packages/tui/src/components/menus/logout-select-menu.tsx
|
|
216599
217037
|
function LogoutSelectMenu(props) {
|
|
216600
217038
|
const { handleLogoutSelect, logoutItems } = props;
|
|
216601
|
-
return /* @__PURE__ */
|
|
217039
|
+
return /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
216602
217040
|
flexDirection: "column",
|
|
216603
217041
|
paddingX: 1,
|
|
216604
217042
|
children: [
|
|
216605
|
-
/* @__PURE__ */
|
|
217043
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
216606
217044
|
marginBottom: 1,
|
|
216607
|
-
children: /* @__PURE__ */
|
|
217045
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216608
217046
|
color: "white",
|
|
216609
217047
|
children: "Select credential to remove:"
|
|
216610
217048
|
}, undefined, false, undefined, this)
|
|
216611
217049
|
}, undefined, false, undefined, this),
|
|
216612
|
-
/* @__PURE__ */
|
|
217050
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(SelectInput_default, {
|
|
216613
217051
|
items: logoutItems,
|
|
216614
217052
|
onSelect: (item) => handleLogoutSelect(item.value),
|
|
216615
217053
|
indicatorComponent: CustomIndicator,
|
|
216616
217054
|
itemComponent: CustomItem
|
|
216617
217055
|
}, undefined, false, undefined, this),
|
|
216618
|
-
/* @__PURE__ */
|
|
217056
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
216619
217057
|
paddingTop: 1,
|
|
216620
|
-
children: /* @__PURE__ */
|
|
217058
|
+
children: /* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Box_default, {
|
|
216621
217059
|
gap: 1,
|
|
216622
217060
|
children: [
|
|
216623
|
-
/* @__PURE__ */
|
|
217061
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216624
217062
|
color: "#89B4F8",
|
|
216625
217063
|
children: "↑↓"
|
|
216626
217064
|
}, undefined, false, undefined, this),
|
|
216627
|
-
/* @__PURE__ */
|
|
217065
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216628
217066
|
color: "#AAAAAA",
|
|
216629
217067
|
children: "Navigate"
|
|
216630
217068
|
}, undefined, false, undefined, this),
|
|
216631
|
-
/* @__PURE__ */
|
|
217069
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216632
217070
|
color: "#AAAAAA",
|
|
216633
217071
|
children: "·"
|
|
216634
217072
|
}, undefined, false, undefined, this),
|
|
216635
|
-
/* @__PURE__ */
|
|
217073
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216636
217074
|
color: "#89B4F8",
|
|
216637
217075
|
children: "enter"
|
|
216638
217076
|
}, undefined, false, undefined, this),
|
|
216639
|
-
/* @__PURE__ */
|
|
217077
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216640
217078
|
color: "#AAAAAA",
|
|
216641
217079
|
children: "Select"
|
|
216642
217080
|
}, undefined, false, undefined, this),
|
|
216643
|
-
/* @__PURE__ */
|
|
217081
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216644
217082
|
color: "#AAAAAA",
|
|
216645
217083
|
children: "·"
|
|
216646
217084
|
}, undefined, false, undefined, this),
|
|
216647
|
-
/* @__PURE__ */
|
|
217085
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216648
217086
|
color: "#89B4F8",
|
|
216649
217087
|
children: "esc"
|
|
216650
217088
|
}, undefined, false, undefined, this),
|
|
216651
|
-
/* @__PURE__ */
|
|
217089
|
+
/* @__PURE__ */ jsx_dev_runtime24.jsxDEV(Text3, {
|
|
216652
217090
|
color: "#AAAAAA",
|
|
216653
217091
|
children: "Cancel"
|
|
216654
217092
|
}, undefined, false, undefined, this)
|
|
@@ -216658,73 +217096,73 @@ function LogoutSelectMenu(props) {
|
|
|
216658
217096
|
]
|
|
216659
217097
|
}, undefined, true, undefined, this);
|
|
216660
217098
|
}
|
|
216661
|
-
var
|
|
217099
|
+
var jsx_dev_runtime24;
|
|
216662
217100
|
var init_logout_select_menu = __esm(async () => {
|
|
216663
217101
|
await __promiseAll([
|
|
216664
217102
|
init_build2(),
|
|
216665
217103
|
init_build5(),
|
|
216666
217104
|
init_menu_items()
|
|
216667
217105
|
]);
|
|
216668
|
-
|
|
217106
|
+
jsx_dev_runtime24 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216669
217107
|
});
|
|
216670
217108
|
|
|
216671
217109
|
// ../../packages/tui/src/components/menus/menu-menu.tsx
|
|
216672
217110
|
function MenuMenu(props) {
|
|
216673
217111
|
const { handleAuthMenuSelect } = props;
|
|
216674
|
-
return /* @__PURE__ */
|
|
217112
|
+
return /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
216675
217113
|
flexDirection: "column",
|
|
216676
217114
|
paddingX: 1,
|
|
216677
217115
|
children: [
|
|
216678
|
-
/* @__PURE__ */
|
|
217116
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
216679
217117
|
marginBottom: 1,
|
|
216680
|
-
children: /* @__PURE__ */
|
|
217118
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216681
217119
|
color: "white",
|
|
216682
217120
|
children: "Select authentication method:"
|
|
216683
217121
|
}, undefined, false, undefined, this)
|
|
216684
217122
|
}, undefined, false, undefined, this),
|
|
216685
|
-
/* @__PURE__ */
|
|
217123
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(SelectInput_default, {
|
|
216686
217124
|
items: [
|
|
216687
|
-
{ label: "
|
|
216688
|
-
{ label: "
|
|
217125
|
+
{ label: "Bring Your Own Key (BYOK)", value: "byok" },
|
|
217126
|
+
{ label: "Login via December (Cloud Wallet)", value: "december" }
|
|
216689
217127
|
],
|
|
216690
217128
|
onSelect: handleAuthMenuSelect,
|
|
216691
217129
|
indicatorComponent: CustomIndicator,
|
|
216692
217130
|
itemComponent: CustomItem
|
|
216693
217131
|
}, undefined, false, undefined, this),
|
|
216694
|
-
/* @__PURE__ */
|
|
217132
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
216695
217133
|
paddingTop: 1,
|
|
216696
|
-
children: /* @__PURE__ */
|
|
217134
|
+
children: /* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Box_default, {
|
|
216697
217135
|
gap: 1,
|
|
216698
217136
|
children: [
|
|
216699
|
-
/* @__PURE__ */
|
|
217137
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216700
217138
|
color: "#89B4F8",
|
|
216701
217139
|
children: "↑↓"
|
|
216702
217140
|
}, undefined, false, undefined, this),
|
|
216703
|
-
/* @__PURE__ */
|
|
217141
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216704
217142
|
color: "#AAAAAA",
|
|
216705
217143
|
children: "Navigate"
|
|
216706
217144
|
}, undefined, false, undefined, this),
|
|
216707
|
-
/* @__PURE__ */
|
|
217145
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216708
217146
|
color: "#AAAAAA",
|
|
216709
217147
|
children: "·"
|
|
216710
217148
|
}, undefined, false, undefined, this),
|
|
216711
|
-
/* @__PURE__ */
|
|
217149
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216712
217150
|
color: "#89B4F8",
|
|
216713
217151
|
children: "enter"
|
|
216714
217152
|
}, undefined, false, undefined, this),
|
|
216715
|
-
/* @__PURE__ */
|
|
217153
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216716
217154
|
color: "#AAAAAA",
|
|
216717
217155
|
children: "Select"
|
|
216718
217156
|
}, undefined, false, undefined, this),
|
|
216719
|
-
/* @__PURE__ */
|
|
217157
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216720
217158
|
color: "#AAAAAA",
|
|
216721
217159
|
children: "·"
|
|
216722
217160
|
}, undefined, false, undefined, this),
|
|
216723
|
-
/* @__PURE__ */
|
|
217161
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216724
217162
|
color: "#89B4F8",
|
|
216725
217163
|
children: "esc"
|
|
216726
217164
|
}, undefined, false, undefined, this),
|
|
216727
|
-
/* @__PURE__ */
|
|
217165
|
+
/* @__PURE__ */ jsx_dev_runtime25.jsxDEV(Text3, {
|
|
216728
217166
|
color: "#AAAAAA",
|
|
216729
217167
|
children: "Cancel"
|
|
216730
217168
|
}, undefined, false, undefined, this)
|
|
@@ -216734,70 +217172,70 @@ function MenuMenu(props) {
|
|
|
216734
217172
|
]
|
|
216735
217173
|
}, undefined, true, undefined, this);
|
|
216736
217174
|
}
|
|
216737
|
-
var
|
|
217175
|
+
var jsx_dev_runtime25;
|
|
216738
217176
|
var init_menu_menu = __esm(async () => {
|
|
216739
217177
|
await __promiseAll([
|
|
216740
217178
|
init_build2(),
|
|
216741
217179
|
init_build5(),
|
|
216742
217180
|
init_menu_items()
|
|
216743
217181
|
]);
|
|
216744
|
-
|
|
217182
|
+
jsx_dev_runtime25 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216745
217183
|
});
|
|
216746
217184
|
|
|
216747
217185
|
// ../../packages/tui/src/components/menus/model-select-menu.tsx
|
|
216748
217186
|
function ModelSelectMenu(props) {
|
|
216749
217187
|
const { handleModelSelect, selectedProvider, openRouterModels, getProviderModels } = props;
|
|
216750
|
-
return /* @__PURE__ */
|
|
217188
|
+
return /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
216751
217189
|
flexDirection: "column",
|
|
216752
217190
|
paddingX: 1,
|
|
216753
217191
|
children: [
|
|
216754
|
-
/* @__PURE__ */
|
|
217192
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
216755
217193
|
marginBottom: 1,
|
|
216756
|
-
children: /* @__PURE__ */
|
|
217194
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216757
217195
|
color: "white",
|
|
216758
217196
|
children: "Select Model:"
|
|
216759
217197
|
}, undefined, false, undefined, this)
|
|
216760
217198
|
}, undefined, false, undefined, this),
|
|
216761
|
-
/* @__PURE__ */
|
|
217199
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(SelectInput_default, {
|
|
216762
217200
|
items: selectedProvider === "openrouter" ? openRouterModels || [{ label: "Loading models...", value: "loading" }] : getProviderModels(selectedProvider),
|
|
216763
217201
|
onSelect: handleModelSelect,
|
|
216764
217202
|
indicatorComponent: CustomIndicator,
|
|
216765
217203
|
itemComponent: CustomItem
|
|
216766
217204
|
}, undefined, false, undefined, this),
|
|
216767
|
-
/* @__PURE__ */
|
|
217205
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
216768
217206
|
paddingTop: 1,
|
|
216769
|
-
children: /* @__PURE__ */
|
|
217207
|
+
children: /* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Box_default, {
|
|
216770
217208
|
gap: 1,
|
|
216771
217209
|
children: [
|
|
216772
|
-
/* @__PURE__ */
|
|
217210
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216773
217211
|
color: "#89B4F8",
|
|
216774
217212
|
children: "↑↓"
|
|
216775
217213
|
}, undefined, false, undefined, this),
|
|
216776
|
-
/* @__PURE__ */
|
|
217214
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216777
217215
|
color: "#AAAAAA",
|
|
216778
217216
|
children: "Navigate"
|
|
216779
217217
|
}, undefined, false, undefined, this),
|
|
216780
|
-
/* @__PURE__ */
|
|
217218
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216781
217219
|
color: "#AAAAAA",
|
|
216782
217220
|
children: "·"
|
|
216783
217221
|
}, undefined, false, undefined, this),
|
|
216784
|
-
/* @__PURE__ */
|
|
217222
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216785
217223
|
color: "#89B4F8",
|
|
216786
217224
|
children: "enter"
|
|
216787
217225
|
}, undefined, false, undefined, this),
|
|
216788
|
-
/* @__PURE__ */
|
|
217226
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216789
217227
|
color: "#AAAAAA",
|
|
216790
217228
|
children: "Select"
|
|
216791
217229
|
}, undefined, false, undefined, this),
|
|
216792
|
-
/* @__PURE__ */
|
|
217230
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216793
217231
|
color: "#AAAAAA",
|
|
216794
217232
|
children: "·"
|
|
216795
217233
|
}, undefined, false, undefined, this),
|
|
216796
|
-
/* @__PURE__ */
|
|
217234
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216797
217235
|
color: "#89B4F8",
|
|
216798
217236
|
children: "esc"
|
|
216799
217237
|
}, undefined, false, undefined, this),
|
|
216800
|
-
/* @__PURE__ */
|
|
217238
|
+
/* @__PURE__ */ jsx_dev_runtime26.jsxDEV(Text3, {
|
|
216801
217239
|
color: "#AAAAAA",
|
|
216802
217240
|
children: "Cancel"
|
|
216803
217241
|
}, undefined, false, undefined, this)
|
|
@@ -216807,14 +217245,14 @@ function ModelSelectMenu(props) {
|
|
|
216807
217245
|
]
|
|
216808
217246
|
}, undefined, true, undefined, this);
|
|
216809
217247
|
}
|
|
216810
|
-
var
|
|
217248
|
+
var jsx_dev_runtime26;
|
|
216811
217249
|
var init_model_select_menu = __esm(async () => {
|
|
216812
217250
|
await __promiseAll([
|
|
216813
217251
|
init_build2(),
|
|
216814
217252
|
init_build5(),
|
|
216815
217253
|
init_menu_items()
|
|
216816
217254
|
]);
|
|
216817
|
-
|
|
217255
|
+
jsx_dev_runtime26 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216818
217256
|
});
|
|
216819
217257
|
|
|
216820
217258
|
// ../../packages/tui/src/components/menus/plan-approve-menu.tsx
|
|
@@ -216824,59 +217262,59 @@ function PlanApproveMenu(props) {
|
|
|
216824
217262
|
{ label: "1. Approve and Execute", value: "approve" },
|
|
216825
217263
|
{ label: "2. Reject / Cancel", value: "reject" }
|
|
216826
217264
|
];
|
|
216827
|
-
return /* @__PURE__ */
|
|
217265
|
+
return /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
216828
217266
|
flexDirection: "column",
|
|
216829
217267
|
paddingX: 1,
|
|
216830
217268
|
children: [
|
|
216831
|
-
/* @__PURE__ */
|
|
217269
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
216832
217270
|
marginBottom: 1,
|
|
216833
217271
|
flexDirection: "column",
|
|
216834
217272
|
gap: 1,
|
|
216835
217273
|
children: [
|
|
216836
|
-
planSummary && /* @__PURE__ */
|
|
217274
|
+
planSummary && /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
216837
217275
|
borderStyle: "round",
|
|
216838
217276
|
borderColor: "cyan",
|
|
216839
217277
|
paddingX: 1,
|
|
216840
|
-
children: /* @__PURE__ */
|
|
217278
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216841
217279
|
color: "cyan",
|
|
216842
217280
|
children: planSummary
|
|
216843
217281
|
}, undefined, false, undefined, this)
|
|
216844
217282
|
}, undefined, false, undefined, this),
|
|
216845
|
-
/* @__PURE__ */
|
|
217283
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216846
217284
|
color: "white",
|
|
216847
217285
|
bold: true,
|
|
216848
217286
|
children: "Plan generated. Please approve or reject:"
|
|
216849
217287
|
}, undefined, false, undefined, this)
|
|
216850
217288
|
]
|
|
216851
217289
|
}, undefined, true, undefined, this),
|
|
216852
|
-
/* @__PURE__ */
|
|
217290
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(SelectInput_default, {
|
|
216853
217291
|
items: planItems,
|
|
216854
217292
|
onSelect: handlePlanApprovalSelect,
|
|
216855
217293
|
indicatorComponent: CustomIndicator,
|
|
216856
217294
|
itemComponent: CustomItem
|
|
216857
217295
|
}, undefined, false, undefined, this),
|
|
216858
|
-
/* @__PURE__ */
|
|
217296
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
216859
217297
|
paddingTop: 1,
|
|
216860
|
-
children: /* @__PURE__ */
|
|
217298
|
+
children: /* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Box_default, {
|
|
216861
217299
|
gap: 1,
|
|
216862
217300
|
children: [
|
|
216863
|
-
/* @__PURE__ */
|
|
217301
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216864
217302
|
color: "#89B4F8",
|
|
216865
217303
|
children: "↑↓"
|
|
216866
217304
|
}, undefined, false, undefined, this),
|
|
216867
|
-
/* @__PURE__ */
|
|
217305
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216868
217306
|
color: "#AAAAAA",
|
|
216869
217307
|
children: "Navigate"
|
|
216870
217308
|
}, undefined, false, undefined, this),
|
|
216871
|
-
/* @__PURE__ */
|
|
217309
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216872
217310
|
color: "#AAAAAA",
|
|
216873
217311
|
children: "·"
|
|
216874
217312
|
}, undefined, false, undefined, this),
|
|
216875
|
-
/* @__PURE__ */
|
|
217313
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216876
217314
|
color: "#89B4F8",
|
|
216877
217315
|
children: "enter"
|
|
216878
217316
|
}, undefined, false, undefined, this),
|
|
216879
|
-
/* @__PURE__ */
|
|
217317
|
+
/* @__PURE__ */ jsx_dev_runtime27.jsxDEV(Text3, {
|
|
216880
217318
|
color: "#AAAAAA",
|
|
216881
217319
|
children: "Select"
|
|
216882
217320
|
}, undefined, false, undefined, this)
|
|
@@ -216886,14 +217324,14 @@ function PlanApproveMenu(props) {
|
|
|
216886
217324
|
]
|
|
216887
217325
|
}, undefined, true, undefined, this);
|
|
216888
217326
|
}
|
|
216889
|
-
var
|
|
217327
|
+
var jsx_dev_runtime27;
|
|
216890
217328
|
var init_plan_approve_menu = __esm(async () => {
|
|
216891
217329
|
await __promiseAll([
|
|
216892
217330
|
init_build2(),
|
|
216893
217331
|
init_build5(),
|
|
216894
217332
|
init_menu_items()
|
|
216895
217333
|
]);
|
|
216896
|
-
|
|
217334
|
+
jsx_dev_runtime27 = __toESM(require_jsx_dev_runtime(), 1);
|
|
216897
217335
|
});
|
|
216898
217336
|
|
|
216899
217337
|
// ../../packages/tui/src/components/menus/session-select-menu.tsx
|
|
@@ -217013,13 +217451,13 @@ function SessionSelectMenu(props) {
|
|
|
217013
217451
|
}
|
|
217014
217452
|
}
|
|
217015
217453
|
});
|
|
217016
|
-
return /* @__PURE__ */
|
|
217454
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217017
217455
|
flexDirection: "column",
|
|
217018
217456
|
paddingX: 1,
|
|
217019
217457
|
children: [
|
|
217020
|
-
/* @__PURE__ */
|
|
217458
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217021
217459
|
marginBottom: 1,
|
|
217022
|
-
children: /* @__PURE__ */
|
|
217460
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217023
217461
|
bold: true,
|
|
217024
217462
|
color: "white",
|
|
217025
217463
|
children: "Sessions"
|
|
@@ -217028,17 +217466,17 @@ function SessionSelectMenu(props) {
|
|
|
217028
217466
|
visibleItems.map((session, idx) => {
|
|
217029
217467
|
const isSelected = idx === sessionSelectedIndex;
|
|
217030
217468
|
if (isSelected && sessionRenameMode) {
|
|
217031
|
-
return /* @__PURE__ */
|
|
217469
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217032
217470
|
flexDirection: "row",
|
|
217033
217471
|
children: [
|
|
217034
|
-
/* @__PURE__ */
|
|
217472
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217035
217473
|
width: 2,
|
|
217036
|
-
children: /* @__PURE__ */
|
|
217474
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217037
217475
|
color: "#89B4F8",
|
|
217038
217476
|
children: "❭ "
|
|
217039
217477
|
}, undefined, false, undefined, this)
|
|
217040
217478
|
}, undefined, false, undefined, this),
|
|
217041
|
-
/* @__PURE__ */
|
|
217479
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(build_default2, {
|
|
217042
217480
|
value: sessionNewName,
|
|
217043
217481
|
onChange: setSessionNewName,
|
|
217044
217482
|
onSubmit: handleRenameSubmit,
|
|
@@ -217052,27 +217490,27 @@ function SessionSelectMenu(props) {
|
|
|
217052
217490
|
const singleLineTitle = (rawTitle || "").replace(/\s+/g, " ").trim();
|
|
217053
217491
|
const title = singleLineTitle.length > 50 ? singleLineTitle.slice(0, 50) + "..." : singleLineTitle;
|
|
217054
217492
|
const timeStr = timeAgo(session.updatedAt).padStart(10);
|
|
217055
|
-
return /* @__PURE__ */
|
|
217493
|
+
return /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217056
217494
|
flexDirection: "row",
|
|
217057
217495
|
children: [
|
|
217058
|
-
/* @__PURE__ */
|
|
217496
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217059
217497
|
width: 2,
|
|
217060
|
-
children: /* @__PURE__ */
|
|
217498
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217061
217499
|
color: isSelected ? "#89B4F8" : "white",
|
|
217062
217500
|
children: isSelected ? "❭ " : " "
|
|
217063
217501
|
}, undefined, false, undefined, this)
|
|
217064
217502
|
}, undefined, false, undefined, this),
|
|
217065
|
-
/* @__PURE__ */
|
|
217503
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217066
217504
|
width: 97,
|
|
217067
|
-
children: /* @__PURE__ */
|
|
217505
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217068
217506
|
color: isSelected ? "#89B4F8" : "#AAAAAA",
|
|
217069
217507
|
wrap: "truncate",
|
|
217070
217508
|
children: title
|
|
217071
217509
|
}, undefined, false, undefined, this)
|
|
217072
217510
|
}, undefined, false, undefined, this),
|
|
217073
|
-
/* @__PURE__ */
|
|
217511
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217074
217512
|
width: 12,
|
|
217075
|
-
children: /* @__PURE__ */
|
|
217513
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217076
217514
|
color: "#AAAAAA",
|
|
217077
217515
|
children: timeStr
|
|
217078
217516
|
}, undefined, false, undefined, this)
|
|
@@ -217080,17 +217518,17 @@ function SessionSelectMenu(props) {
|
|
|
217080
217518
|
]
|
|
217081
217519
|
}, session.id, true, undefined, this);
|
|
217082
217520
|
}),
|
|
217083
|
-
totalItems === 0 && /* @__PURE__ */
|
|
217521
|
+
totalItems === 0 && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217084
217522
|
paddingLeft: 2,
|
|
217085
|
-
children: /* @__PURE__ */
|
|
217523
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217086
217524
|
color: "#555555",
|
|
217087
217525
|
children: "No sessions found."
|
|
217088
217526
|
}, undefined, false, undefined, this)
|
|
217089
217527
|
}, undefined, false, undefined, this),
|
|
217090
|
-
totalItems > 0 && /* @__PURE__ */
|
|
217528
|
+
totalItems > 0 && /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217091
217529
|
marginTop: 1,
|
|
217092
217530
|
paddingLeft: 2,
|
|
217093
|
-
children: /* @__PURE__ */
|
|
217531
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217094
217532
|
color: "#555555",
|
|
217095
217533
|
children: [
|
|
217096
217534
|
"[",
|
|
@@ -217104,76 +217542,76 @@ function SessionSelectMenu(props) {
|
|
|
217104
217542
|
]
|
|
217105
217543
|
}, undefined, true, undefined, this)
|
|
217106
217544
|
}, undefined, false, undefined, this),
|
|
217107
|
-
/* @__PURE__ */
|
|
217545
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217108
217546
|
paddingTop: 1,
|
|
217109
|
-
children: /* @__PURE__ */
|
|
217547
|
+
children: /* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Box_default, {
|
|
217110
217548
|
gap: 1,
|
|
217111
217549
|
children: [
|
|
217112
|
-
/* @__PURE__ */
|
|
217550
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217113
217551
|
color: "#89B4F8",
|
|
217114
217552
|
children: "↑/↓"
|
|
217115
217553
|
}, undefined, false, undefined, this),
|
|
217116
|
-
/* @__PURE__ */
|
|
217554
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217117
217555
|
color: "#AAAAAA",
|
|
217118
217556
|
children: "Navigate"
|
|
217119
217557
|
}, undefined, false, undefined, this),
|
|
217120
|
-
/* @__PURE__ */
|
|
217558
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217121
217559
|
color: "#AAAAAA",
|
|
217122
217560
|
children: "·"
|
|
217123
217561
|
}, undefined, false, undefined, this),
|
|
217124
|
-
/* @__PURE__ */
|
|
217562
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217125
217563
|
color: "#89B4F8",
|
|
217126
217564
|
children: "←/→"
|
|
217127
217565
|
}, undefined, false, undefined, this),
|
|
217128
|
-
/* @__PURE__ */
|
|
217566
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217129
217567
|
color: "#AAAAAA",
|
|
217130
217568
|
children: "Page"
|
|
217131
217569
|
}, undefined, false, undefined, this),
|
|
217132
|
-
/* @__PURE__ */
|
|
217570
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217133
217571
|
color: "#AAAAAA",
|
|
217134
217572
|
children: "·"
|
|
217135
217573
|
}, undefined, false, undefined, this),
|
|
217136
|
-
/* @__PURE__ */
|
|
217574
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217137
217575
|
color: "#89B4F8",
|
|
217138
217576
|
children: "enter"
|
|
217139
217577
|
}, undefined, false, undefined, this),
|
|
217140
|
-
/* @__PURE__ */
|
|
217578
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217141
217579
|
color: "#AAAAAA",
|
|
217142
217580
|
children: "Select"
|
|
217143
217581
|
}, undefined, false, undefined, this),
|
|
217144
|
-
/* @__PURE__ */
|
|
217582
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217145
217583
|
color: "#AAAAAA",
|
|
217146
217584
|
children: "·"
|
|
217147
217585
|
}, undefined, false, undefined, this),
|
|
217148
|
-
/* @__PURE__ */
|
|
217586
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217149
217587
|
color: "#89B4F8",
|
|
217150
217588
|
children: "r"
|
|
217151
217589
|
}, undefined, false, undefined, this),
|
|
217152
|
-
/* @__PURE__ */
|
|
217590
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217153
217591
|
color: "#AAAAAA",
|
|
217154
217592
|
children: "Rename"
|
|
217155
217593
|
}, undefined, false, undefined, this),
|
|
217156
|
-
/* @__PURE__ */
|
|
217594
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217157
217595
|
color: "#AAAAAA",
|
|
217158
217596
|
children: "·"
|
|
217159
217597
|
}, undefined, false, undefined, this),
|
|
217160
|
-
/* @__PURE__ */
|
|
217598
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217161
217599
|
color: "#89B4F8",
|
|
217162
217600
|
children: "d"
|
|
217163
217601
|
}, undefined, false, undefined, this),
|
|
217164
|
-
/* @__PURE__ */
|
|
217602
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217165
217603
|
color: "#AAAAAA",
|
|
217166
217604
|
children: "Delete"
|
|
217167
217605
|
}, undefined, false, undefined, this),
|
|
217168
|
-
/* @__PURE__ */
|
|
217606
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217169
217607
|
color: "#AAAAAA",
|
|
217170
217608
|
children: "·"
|
|
217171
217609
|
}, undefined, false, undefined, this),
|
|
217172
|
-
/* @__PURE__ */
|
|
217610
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217173
217611
|
color: "#89B4F8",
|
|
217174
217612
|
children: "esc"
|
|
217175
217613
|
}, undefined, false, undefined, this),
|
|
217176
|
-
/* @__PURE__ */
|
|
217614
|
+
/* @__PURE__ */ jsx_dev_runtime28.jsxDEV(Text3, {
|
|
217177
217615
|
color: "#AAAAAA",
|
|
217178
217616
|
children: "Cancel"
|
|
217179
217617
|
}, undefined, false, undefined, this)
|
|
@@ -217183,13 +217621,13 @@ function SessionSelectMenu(props) {
|
|
|
217183
217621
|
]
|
|
217184
217622
|
}, undefined, true, undefined, this);
|
|
217185
217623
|
}
|
|
217186
|
-
var
|
|
217624
|
+
var jsx_dev_runtime28;
|
|
217187
217625
|
var init_session_select_menu = __esm(async () => {
|
|
217188
217626
|
await __promiseAll([
|
|
217189
217627
|
init_build2(),
|
|
217190
217628
|
init_build4()
|
|
217191
217629
|
]);
|
|
217192
|
-
|
|
217630
|
+
jsx_dev_runtime28 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217193
217631
|
});
|
|
217194
217632
|
|
|
217195
217633
|
// ../../packages/tui/src/components/menus/settings-main-menu.tsx
|
|
@@ -217237,58 +217675,58 @@ function SettingsMainMenu(props) {
|
|
|
217237
217675
|
value: "authPriority"
|
|
217238
217676
|
});
|
|
217239
217677
|
}
|
|
217240
|
-
return /* @__PURE__ */
|
|
217678
|
+
return /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
217241
217679
|
flexDirection: "column",
|
|
217242
217680
|
paddingX: 1,
|
|
217243
217681
|
children: [
|
|
217244
|
-
/* @__PURE__ */
|
|
217682
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
217245
217683
|
marginBottom: 1,
|
|
217246
|
-
children: /* @__PURE__ */
|
|
217684
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217247
217685
|
bold: true,
|
|
217248
217686
|
color: "white",
|
|
217249
217687
|
children: "Settings"
|
|
217250
217688
|
}, undefined, false, undefined, this)
|
|
217251
217689
|
}, undefined, false, undefined, this),
|
|
217252
|
-
/* @__PURE__ */
|
|
217690
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(SelectInput_default, {
|
|
217253
217691
|
items: mainItems,
|
|
217254
217692
|
onSelect: handleSettingsMainSelect,
|
|
217255
217693
|
indicatorComponent: CustomIndicator,
|
|
217256
217694
|
itemComponent: CustomItem
|
|
217257
217695
|
}, undefined, false, undefined, this),
|
|
217258
|
-
/* @__PURE__ */
|
|
217696
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
217259
217697
|
paddingTop: 1,
|
|
217260
|
-
children: /* @__PURE__ */
|
|
217698
|
+
children: /* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Box_default, {
|
|
217261
217699
|
gap: 1,
|
|
217262
217700
|
children: [
|
|
217263
|
-
/* @__PURE__ */
|
|
217701
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217264
217702
|
color: "#89B4F8",
|
|
217265
217703
|
children: "↑↓"
|
|
217266
217704
|
}, undefined, false, undefined, this),
|
|
217267
|
-
/* @__PURE__ */
|
|
217705
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217268
217706
|
color: "#AAAAAA",
|
|
217269
217707
|
children: "Navigate"
|
|
217270
217708
|
}, undefined, false, undefined, this),
|
|
217271
|
-
/* @__PURE__ */
|
|
217709
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217272
217710
|
color: "#AAAAAA",
|
|
217273
217711
|
children: "·"
|
|
217274
217712
|
}, undefined, false, undefined, this),
|
|
217275
|
-
/* @__PURE__ */
|
|
217713
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217276
217714
|
color: "#89B4F8",
|
|
217277
217715
|
children: "enter"
|
|
217278
217716
|
}, undefined, false, undefined, this),
|
|
217279
|
-
/* @__PURE__ */
|
|
217717
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217280
217718
|
color: "#AAAAAA",
|
|
217281
217719
|
children: "Toggle"
|
|
217282
217720
|
}, undefined, false, undefined, this),
|
|
217283
|
-
/* @__PURE__ */
|
|
217721
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217284
217722
|
color: "#AAAAAA",
|
|
217285
217723
|
children: "·"
|
|
217286
217724
|
}, undefined, false, undefined, this),
|
|
217287
|
-
/* @__PURE__ */
|
|
217725
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217288
217726
|
color: "#89B4F8",
|
|
217289
217727
|
children: "esc"
|
|
217290
217728
|
}, undefined, false, undefined, this),
|
|
217291
|
-
/* @__PURE__ */
|
|
217729
|
+
/* @__PURE__ */ jsx_dev_runtime29.jsxDEV(Text3, {
|
|
217292
217730
|
color: "#AAAAAA",
|
|
217293
217731
|
children: "Cancel"
|
|
217294
217732
|
}, undefined, false, undefined, this)
|
|
@@ -217298,14 +217736,14 @@ function SettingsMainMenu(props) {
|
|
|
217298
217736
|
]
|
|
217299
217737
|
}, undefined, true, undefined, this);
|
|
217300
217738
|
}
|
|
217301
|
-
var
|
|
217739
|
+
var jsx_dev_runtime29;
|
|
217302
217740
|
var init_settings_main_menu = __esm(async () => {
|
|
217303
217741
|
await __promiseAll([
|
|
217304
217742
|
init_build2(),
|
|
217305
217743
|
init_build5(),
|
|
217306
217744
|
init_menu_items()
|
|
217307
217745
|
]);
|
|
217308
|
-
|
|
217746
|
+
jsx_dev_runtime29 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217309
217747
|
});
|
|
217310
217748
|
|
|
217311
217749
|
// ../../packages/tui/src/components/menus/tasks-mode-menu.tsx
|
|
@@ -217329,15 +217767,15 @@ function TasksModeMenu(props) {
|
|
|
217329
217767
|
if (task) {
|
|
217330
217768
|
const outputLines = task.output.split("\\n");
|
|
217331
217769
|
const visibleLines = outputLines.slice(taskScrollOffset, taskScrollOffset + 15);
|
|
217332
|
-
return /* @__PURE__ */
|
|
217770
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217333
217771
|
flexDirection: "column",
|
|
217334
217772
|
paddingX: 1,
|
|
217335
217773
|
children: [
|
|
217336
|
-
/* @__PURE__ */
|
|
217774
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217337
217775
|
marginBottom: 1,
|
|
217338
217776
|
justifyContent: "space-between",
|
|
217339
217777
|
children: [
|
|
217340
|
-
/* @__PURE__ */
|
|
217778
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217341
217779
|
bold: true,
|
|
217342
217780
|
color: "white",
|
|
217343
217781
|
children: [
|
|
@@ -217345,7 +217783,7 @@ function TasksModeMenu(props) {
|
|
|
217345
217783
|
task.id
|
|
217346
217784
|
]
|
|
217347
217785
|
}, undefined, true, undefined, this),
|
|
217348
|
-
/* @__PURE__ */
|
|
217786
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217349
217787
|
bold: true,
|
|
217350
217788
|
color: getStatusColor(task.status),
|
|
217351
217789
|
children: [
|
|
@@ -217356,9 +217794,9 @@ function TasksModeMenu(props) {
|
|
|
217356
217794
|
}, undefined, true, undefined, this)
|
|
217357
217795
|
]
|
|
217358
217796
|
}, undefined, true, undefined, this),
|
|
217359
|
-
/* @__PURE__ */
|
|
217797
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217360
217798
|
marginBottom: 1,
|
|
217361
|
-
children: /* @__PURE__ */
|
|
217799
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217362
217800
|
color: "#AAAAAA",
|
|
217363
217801
|
bold: true,
|
|
217364
217802
|
children: [
|
|
@@ -217367,24 +217805,24 @@ function TasksModeMenu(props) {
|
|
|
217367
217805
|
]
|
|
217368
217806
|
}, undefined, true, undefined, this)
|
|
217369
217807
|
}, undefined, false, undefined, this),
|
|
217370
|
-
/* @__PURE__ */
|
|
217808
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217371
217809
|
borderColor: "#333333",
|
|
217372
217810
|
borderStyle: "round",
|
|
217373
217811
|
flexDirection: "column",
|
|
217374
217812
|
minHeight: 8,
|
|
217375
217813
|
paddingX: 1,
|
|
217376
|
-
children: visibleLines.length === 0 || visibleLines.length === 1 && visibleLines[0] === "" ? /* @__PURE__ */
|
|
217814
|
+
children: visibleLines.length === 0 || visibleLines.length === 1 && visibleLines[0] === "" ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217377
217815
|
color: "gray",
|
|
217378
217816
|
children: "[No output recorded yet]"
|
|
217379
|
-
}, undefined, false, undefined, this) : visibleLines.map((line, idx) => /* @__PURE__ */
|
|
217817
|
+
}, undefined, false, undefined, this) : visibleLines.map((line, idx) => /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217380
217818
|
color: "white",
|
|
217381
217819
|
children: line
|
|
217382
217820
|
}, idx, false, undefined, this))
|
|
217383
217821
|
}, undefined, false, undefined, this),
|
|
217384
|
-
/* @__PURE__ */
|
|
217822
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217385
217823
|
marginTop: 1,
|
|
217386
217824
|
justifyContent: "space-between",
|
|
217387
|
-
children: /* @__PURE__ */
|
|
217825
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217388
217826
|
color: "gray",
|
|
217389
217827
|
children: [
|
|
217390
217828
|
"Showing lines ",
|
|
@@ -217397,9 +217835,9 @@ function TasksModeMenu(props) {
|
|
|
217397
217835
|
]
|
|
217398
217836
|
}, undefined, true, undefined, this)
|
|
217399
217837
|
}, undefined, false, undefined, this),
|
|
217400
|
-
/* @__PURE__ */
|
|
217838
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217401
217839
|
paddingTop: 1,
|
|
217402
|
-
children: /* @__PURE__ */
|
|
217840
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217403
217841
|
color: "#555555",
|
|
217404
217842
|
children: "↑/↓ Scroll Line · ←/→ Page · esc Cancel"
|
|
217405
217843
|
}, undefined, false, undefined, this)
|
|
@@ -217408,48 +217846,48 @@ function TasksModeMenu(props) {
|
|
|
217408
217846
|
}, undefined, true, undefined, this);
|
|
217409
217847
|
}
|
|
217410
217848
|
} else {
|
|
217411
|
-
return /* @__PURE__ */
|
|
217849
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217412
217850
|
flexDirection: "column",
|
|
217413
217851
|
paddingX: 1,
|
|
217414
217852
|
children: [
|
|
217415
|
-
/* @__PURE__ */
|
|
217853
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217416
217854
|
marginBottom: 1,
|
|
217417
|
-
children: /* @__PURE__ */
|
|
217855
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217418
217856
|
bold: true,
|
|
217419
217857
|
color: "white",
|
|
217420
217858
|
children: "Tasks"
|
|
217421
217859
|
}, undefined, false, undefined, this)
|
|
217422
217860
|
}, undefined, false, undefined, this),
|
|
217423
|
-
tasksData.length === 0 ? /* @__PURE__ */
|
|
217861
|
+
tasksData.length === 0 ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217424
217862
|
paddingLeft: 2,
|
|
217425
|
-
children: /* @__PURE__ */
|
|
217863
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217426
217864
|
color: "#555555",
|
|
217427
217865
|
children: "No background tasks."
|
|
217428
217866
|
}, undefined, false, undefined, this)
|
|
217429
217867
|
}, undefined, false, undefined, this) : tasksData.map((task, idx) => {
|
|
217430
217868
|
const isSelected = idx === taskSelectedIndex;
|
|
217431
217869
|
const truncatedCommand = task.command.length > 50 ? task.command.slice(0, 47) + "..." : task.command;
|
|
217432
|
-
return /* @__PURE__ */
|
|
217870
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217433
217871
|
flexDirection: "row",
|
|
217434
217872
|
children: [
|
|
217435
|
-
/* @__PURE__ */
|
|
217873
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217436
217874
|
width: 2,
|
|
217437
|
-
children: /* @__PURE__ */
|
|
217875
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217438
217876
|
color: isSelected ? "#89B4F8" : "white",
|
|
217439
217877
|
children: isSelected ? "> " : " "
|
|
217440
217878
|
}, undefined, false, undefined, this)
|
|
217441
217879
|
}, undefined, false, undefined, this),
|
|
217442
|
-
/* @__PURE__ */
|
|
217880
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217443
217881
|
width: 25,
|
|
217444
|
-
children: /* @__PURE__ */
|
|
217882
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217445
217883
|
color: isSelected ? "white" : "#AAAAAA",
|
|
217446
217884
|
wrap: "truncate",
|
|
217447
217885
|
children: task.id
|
|
217448
217886
|
}, undefined, false, undefined, this)
|
|
217449
217887
|
}, undefined, false, undefined, this),
|
|
217450
|
-
/* @__PURE__ */
|
|
217888
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217451
217889
|
width: 15,
|
|
217452
|
-
children: /* @__PURE__ */
|
|
217890
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217453
217891
|
color: getStatusColor(task.status),
|
|
217454
217892
|
children: [
|
|
217455
217893
|
"[",
|
|
@@ -217458,8 +217896,8 @@ function TasksModeMenu(props) {
|
|
|
217458
217896
|
]
|
|
217459
217897
|
}, undefined, true, undefined, this)
|
|
217460
217898
|
}, undefined, false, undefined, this),
|
|
217461
|
-
/* @__PURE__ */
|
|
217462
|
-
children: /* @__PURE__ */
|
|
217899
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217900
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217463
217901
|
color: isSelected ? "white" : "gray",
|
|
217464
217902
|
children: truncatedCommand
|
|
217465
217903
|
}, undefined, false, undefined, this)
|
|
@@ -217467,64 +217905,64 @@ function TasksModeMenu(props) {
|
|
|
217467
217905
|
]
|
|
217468
217906
|
}, task.id, true, undefined, this);
|
|
217469
217907
|
}),
|
|
217470
|
-
/* @__PURE__ */
|
|
217908
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217471
217909
|
paddingTop: 1,
|
|
217472
|
-
children: /* @__PURE__ */
|
|
217910
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
217473
217911
|
gap: 1,
|
|
217474
217912
|
children: [
|
|
217475
|
-
/* @__PURE__ */
|
|
217913
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217476
217914
|
color: "#89B4F8",
|
|
217477
217915
|
children: "↑/↓"
|
|
217478
217916
|
}, undefined, false, undefined, this),
|
|
217479
|
-
/* @__PURE__ */
|
|
217917
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217480
217918
|
color: "#AAAAAA",
|
|
217481
217919
|
children: "Navigate"
|
|
217482
217920
|
}, undefined, false, undefined, this),
|
|
217483
|
-
/* @__PURE__ */
|
|
217921
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217484
217922
|
color: "#AAAAAA",
|
|
217485
217923
|
children: "·"
|
|
217486
217924
|
}, undefined, false, undefined, this),
|
|
217487
|
-
/* @__PURE__ */
|
|
217925
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217488
217926
|
color: "#89B4F8",
|
|
217489
217927
|
children: "←/→"
|
|
217490
217928
|
}, undefined, false, undefined, this),
|
|
217491
|
-
/* @__PURE__ */
|
|
217929
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217492
217930
|
color: "#AAAAAA",
|
|
217493
217931
|
children: "Page"
|
|
217494
217932
|
}, undefined, false, undefined, this),
|
|
217495
|
-
/* @__PURE__ */
|
|
217933
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217496
217934
|
color: "#AAAAAA",
|
|
217497
217935
|
children: "·"
|
|
217498
217936
|
}, undefined, false, undefined, this),
|
|
217499
|
-
/* @__PURE__ */
|
|
217937
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217500
217938
|
color: "#89B4F8",
|
|
217501
217939
|
children: "enter"
|
|
217502
217940
|
}, undefined, false, undefined, this),
|
|
217503
|
-
/* @__PURE__ */
|
|
217941
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217504
217942
|
color: "#AAAAAA",
|
|
217505
217943
|
children: "View output"
|
|
217506
217944
|
}, undefined, false, undefined, this),
|
|
217507
|
-
/* @__PURE__ */
|
|
217945
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217508
217946
|
color: "#AAAAAA",
|
|
217509
217947
|
children: "·"
|
|
217510
217948
|
}, undefined, false, undefined, this),
|
|
217511
|
-
/* @__PURE__ */
|
|
217949
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217512
217950
|
color: "#89B4F8",
|
|
217513
217951
|
children: "k"
|
|
217514
217952
|
}, undefined, false, undefined, this),
|
|
217515
|
-
/* @__PURE__ */
|
|
217953
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217516
217954
|
color: "#AAAAAA",
|
|
217517
217955
|
children: "Kill Task"
|
|
217518
217956
|
}, undefined, false, undefined, this),
|
|
217519
|
-
/* @__PURE__ */
|
|
217957
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217520
217958
|
color: "#AAAAAA",
|
|
217521
217959
|
children: "·"
|
|
217522
217960
|
}, undefined, false, undefined, this),
|
|
217523
|
-
/* @__PURE__ */
|
|
217961
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217524
217962
|
color: "#89B4F8",
|
|
217525
217963
|
children: "esc"
|
|
217526
217964
|
}, undefined, false, undefined, this),
|
|
217527
|
-
/* @__PURE__ */
|
|
217965
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
217528
217966
|
color: "#AAAAAA",
|
|
217529
217967
|
children: "Cancel"
|
|
217530
217968
|
}, undefined, false, undefined, this)
|
|
@@ -217535,10 +217973,10 @@ function TasksModeMenu(props) {
|
|
|
217535
217973
|
}, undefined, true, undefined, this);
|
|
217536
217974
|
}
|
|
217537
217975
|
}
|
|
217538
|
-
var
|
|
217976
|
+
var jsx_dev_runtime30;
|
|
217539
217977
|
var init_tasks_mode_menu = __esm(async () => {
|
|
217540
217978
|
await init_build2();
|
|
217541
|
-
|
|
217979
|
+
jsx_dev_runtime30 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217542
217980
|
});
|
|
217543
217981
|
|
|
217544
217982
|
// ../../packages/tui/src/components/menus/tool-permission-menu.tsx
|
|
@@ -217550,46 +217988,46 @@ function ToolPermissionMenu({ questions, onComplete }) {
|
|
|
217550
217988
|
const handleSelect = (item) => {
|
|
217551
217989
|
onComplete(item.value);
|
|
217552
217990
|
};
|
|
217553
|
-
return /* @__PURE__ */
|
|
217991
|
+
return /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
217554
217992
|
flexDirection: "column",
|
|
217555
217993
|
paddingX: 1,
|
|
217556
217994
|
children: [
|
|
217557
|
-
/* @__PURE__ */
|
|
217995
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
217558
217996
|
marginBottom: 1,
|
|
217559
|
-
children: /* @__PURE__ */
|
|
217997
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217560
217998
|
color: "white",
|
|
217561
217999
|
bold: true,
|
|
217562
218000
|
children: currentQ.question
|
|
217563
218001
|
}, undefined, false, undefined, this)
|
|
217564
218002
|
}, undefined, false, undefined, this),
|
|
217565
|
-
/* @__PURE__ */
|
|
218003
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(SelectInput_default, {
|
|
217566
218004
|
items,
|
|
217567
218005
|
onSelect: handleSelect,
|
|
217568
218006
|
indicatorComponent: CustomIndicator,
|
|
217569
218007
|
itemComponent: CustomItem
|
|
217570
218008
|
}, undefined, false, undefined, this),
|
|
217571
|
-
/* @__PURE__ */
|
|
218009
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
217572
218010
|
paddingTop: 1,
|
|
217573
|
-
children: /* @__PURE__ */
|
|
218011
|
+
children: /* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Box_default, {
|
|
217574
218012
|
gap: 1,
|
|
217575
218013
|
children: [
|
|
217576
|
-
/* @__PURE__ */
|
|
218014
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217577
218015
|
color: "#89B4F8",
|
|
217578
218016
|
children: "↑↓"
|
|
217579
218017
|
}, undefined, false, undefined, this),
|
|
217580
|
-
/* @__PURE__ */
|
|
218018
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217581
218019
|
color: "#AAAAAA",
|
|
217582
218020
|
children: "Navigate"
|
|
217583
218021
|
}, undefined, false, undefined, this),
|
|
217584
|
-
/* @__PURE__ */
|
|
218022
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217585
218023
|
color: "#AAAAAA",
|
|
217586
218024
|
children: "·"
|
|
217587
218025
|
}, undefined, false, undefined, this),
|
|
217588
|
-
/* @__PURE__ */
|
|
218026
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217589
218027
|
color: "#89B4F8",
|
|
217590
218028
|
children: "enter"
|
|
217591
218029
|
}, undefined, false, undefined, this),
|
|
217592
|
-
/* @__PURE__ */
|
|
218030
|
+
/* @__PURE__ */ jsx_dev_runtime31.jsxDEV(Text3, {
|
|
217593
218031
|
color: "#AAAAAA",
|
|
217594
218032
|
children: "Select"
|
|
217595
218033
|
}, undefined, false, undefined, this)
|
|
@@ -217599,65 +218037,65 @@ function ToolPermissionMenu({ questions, onComplete }) {
|
|
|
217599
218037
|
]
|
|
217600
218038
|
}, undefined, true, undefined, this);
|
|
217601
218039
|
}
|
|
217602
|
-
var
|
|
218040
|
+
var jsx_dev_runtime31;
|
|
217603
218041
|
var init_tool_permission_menu = __esm(async () => {
|
|
217604
218042
|
await __promiseAll([
|
|
217605
218043
|
init_build2(),
|
|
217606
218044
|
init_build5(),
|
|
217607
218045
|
init_menu_items()
|
|
217608
218046
|
]);
|
|
217609
|
-
|
|
218047
|
+
jsx_dev_runtime31 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217610
218048
|
});
|
|
217611
218049
|
|
|
217612
218050
|
// ../../packages/tui/src/components/menus/auth-menus.tsx
|
|
217613
218051
|
function AuthMenus(props) {
|
|
217614
218052
|
switch (props.authMode) {
|
|
217615
218053
|
case "menu":
|
|
217616
|
-
return /* @__PURE__ */
|
|
218054
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(MenuMenu, {
|
|
217617
218055
|
...props
|
|
217618
218056
|
}, undefined, false, undefined, this);
|
|
217619
218057
|
case "byok_provider":
|
|
217620
|
-
return /* @__PURE__ */
|
|
218058
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ByokProviderMenu, {
|
|
217621
218059
|
...props
|
|
217622
218060
|
}, undefined, false, undefined, this);
|
|
217623
218061
|
case "byok_key":
|
|
217624
|
-
return /* @__PURE__ */
|
|
218062
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ByokKeyMenu, {
|
|
217625
218063
|
...props
|
|
217626
218064
|
}, undefined, false, undefined, this);
|
|
217627
218065
|
case "model_select":
|
|
217628
|
-
return /* @__PURE__ */
|
|
218066
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ModelSelectMenu, {
|
|
217629
218067
|
...props
|
|
217630
218068
|
}, undefined, false, undefined, this);
|
|
217631
218069
|
case "context_select":
|
|
217632
|
-
return /* @__PURE__ */
|
|
218070
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ContextSelectMenu, {
|
|
217633
218071
|
...props
|
|
217634
218072
|
}, undefined, false, undefined, this);
|
|
217635
218073
|
case "logout_select":
|
|
217636
|
-
return /* @__PURE__ */
|
|
218074
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(LogoutSelectMenu, {
|
|
217637
218075
|
...props
|
|
217638
218076
|
}, undefined, false, undefined, this);
|
|
217639
218077
|
case "session_select":
|
|
217640
|
-
return /* @__PURE__ */
|
|
218078
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(SessionSelectMenu, {
|
|
217641
218079
|
...props
|
|
217642
218080
|
}, undefined, false, undefined, this);
|
|
217643
218081
|
case "tasks_mode":
|
|
217644
|
-
return /* @__PURE__ */
|
|
218082
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(TasksModeMenu, {
|
|
217645
218083
|
...props
|
|
217646
218084
|
}, undefined, false, undefined, this);
|
|
217647
218085
|
case "plan_approve":
|
|
217648
|
-
return /* @__PURE__ */
|
|
218086
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(PlanApproveMenu, {
|
|
217649
218087
|
...props
|
|
217650
218088
|
}, undefined, false, undefined, this);
|
|
217651
218089
|
case "grill_question":
|
|
217652
|
-
return /* @__PURE__ */
|
|
218090
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(GrillQuestionMenu, {
|
|
217653
218091
|
...props
|
|
217654
218092
|
}, undefined, false, undefined, this);
|
|
217655
218093
|
case "settings_main":
|
|
217656
|
-
return /* @__PURE__ */
|
|
218094
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(SettingsMainMenu, {
|
|
217657
218095
|
...props
|
|
217658
218096
|
}, undefined, false, undefined, this);
|
|
217659
218097
|
case "tool_permission":
|
|
217660
|
-
return /* @__PURE__ */
|
|
218098
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(ToolPermissionMenu, {
|
|
217661
218099
|
questions: props.pendingQuestions?.questions || [],
|
|
217662
218100
|
onComplete: (answer) => {
|
|
217663
218101
|
props.pendingQuestions?.resolve(answer);
|
|
@@ -217669,7 +218107,7 @@ function AuthMenus(props) {
|
|
|
217669
218107
|
return null;
|
|
217670
218108
|
}
|
|
217671
218109
|
}
|
|
217672
|
-
var
|
|
218110
|
+
var jsx_dev_runtime32;
|
|
217673
218111
|
var init_auth_menus = __esm(async () => {
|
|
217674
218112
|
await __promiseAll([
|
|
217675
218113
|
init_byok_key_menu(),
|
|
@@ -217685,13 +218123,13 @@ var init_auth_menus = __esm(async () => {
|
|
|
217685
218123
|
init_tasks_mode_menu(),
|
|
217686
218124
|
init_tool_permission_menu()
|
|
217687
218125
|
]);
|
|
217688
|
-
|
|
218126
|
+
jsx_dev_runtime32 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217689
218127
|
});
|
|
217690
218128
|
|
|
217691
218129
|
// ../../packages/tui/src/components/menus/ask-question-menu.tsx
|
|
217692
218130
|
function AskQuestionMenu({ questions, onComplete }) {
|
|
217693
|
-
const [currentQuestionIdx, setCurrentQuestionIdx] =
|
|
217694
|
-
const [answers, setAnswers] =
|
|
218131
|
+
const [currentQuestionIdx, setCurrentQuestionIdx] = import_react50.useState(0);
|
|
218132
|
+
const [answers, setAnswers] = import_react50.useState([]);
|
|
217695
218133
|
const currentQ = questions[currentQuestionIdx];
|
|
217696
218134
|
if (!currentQ)
|
|
217697
218135
|
return null;
|
|
@@ -217705,29 +218143,29 @@ function AskQuestionMenu({ questions, onComplete }) {
|
|
|
217705
218143
|
onComplete(newAnswers.length === 1 ? newAnswers[0] : newAnswers);
|
|
217706
218144
|
}
|
|
217707
218145
|
};
|
|
217708
|
-
return /* @__PURE__ */
|
|
218146
|
+
return /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Box_default, {
|
|
217709
218147
|
flexDirection: "column",
|
|
217710
218148
|
gap: 1,
|
|
217711
218149
|
children: [
|
|
217712
|
-
/* @__PURE__ */
|
|
218150
|
+
/* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Box_default, {
|
|
217713
218151
|
flexDirection: "row",
|
|
217714
218152
|
gap: 1,
|
|
217715
218153
|
children: [
|
|
217716
|
-
/* @__PURE__ */
|
|
218154
|
+
/* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Text3, {
|
|
217717
218155
|
color: "cyan",
|
|
217718
218156
|
bold: true,
|
|
217719
218157
|
children: `Q${currentQuestionIdx + 1}/${questions.length}:`
|
|
217720
218158
|
}, undefined, false, undefined, this),
|
|
217721
|
-
/* @__PURE__ */
|
|
218159
|
+
/* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Text3, {
|
|
217722
218160
|
color: "white",
|
|
217723
218161
|
bold: true,
|
|
217724
218162
|
children: currentQ.question
|
|
217725
218163
|
}, undefined, false, undefined, this)
|
|
217726
218164
|
]
|
|
217727
218165
|
}, undefined, true, undefined, this),
|
|
217728
|
-
/* @__PURE__ */
|
|
218166
|
+
/* @__PURE__ */ jsx_dev_runtime33.jsxDEV(Box_default, {
|
|
217729
218167
|
paddingLeft: 2,
|
|
217730
|
-
children: /* @__PURE__ */
|
|
218168
|
+
children: /* @__PURE__ */ jsx_dev_runtime33.jsxDEV(SelectInput_default, {
|
|
217731
218169
|
items,
|
|
217732
218170
|
onSelect: handleSelect
|
|
217733
218171
|
}, undefined, false, undefined, this)
|
|
@@ -217735,29 +218173,29 @@ function AskQuestionMenu({ questions, onComplete }) {
|
|
|
217735
218173
|
]
|
|
217736
218174
|
}, undefined, true, undefined, this);
|
|
217737
218175
|
}
|
|
217738
|
-
var
|
|
218176
|
+
var import_react50, jsx_dev_runtime33;
|
|
217739
218177
|
var init_ask_question_menu = __esm(async () => {
|
|
217740
218178
|
await __promiseAll([
|
|
217741
218179
|
init_build2(),
|
|
217742
218180
|
init_build5()
|
|
217743
218181
|
]);
|
|
217744
|
-
|
|
217745
|
-
|
|
218182
|
+
import_react50 = __toESM(require_react(), 1);
|
|
218183
|
+
jsx_dev_runtime33 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217746
218184
|
});
|
|
217747
218185
|
|
|
217748
218186
|
// ../../packages/tui/src/components/pill.tsx
|
|
217749
|
-
var
|
|
218187
|
+
var jsx_dev_runtime34;
|
|
217750
218188
|
var init_pill = __esm(async () => {
|
|
217751
218189
|
await init_build2();
|
|
217752
|
-
|
|
218190
|
+
jsx_dev_runtime34 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217753
218191
|
});
|
|
217754
218192
|
|
|
217755
218193
|
// ../../packages/tui/src/components/task-hud.tsx
|
|
217756
218194
|
import fs10 from "fs";
|
|
217757
218195
|
import path9 from "path";
|
|
217758
218196
|
function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
217759
|
-
const [taskLines, setTaskLines] =
|
|
217760
|
-
|
|
218197
|
+
const [taskLines, setTaskLines] = import_react51.useState([]);
|
|
218198
|
+
import_react51.useEffect(() => {
|
|
217761
218199
|
if (!showTasks)
|
|
217762
218200
|
return;
|
|
217763
218201
|
const taskPath = path9.join(cwd2, "task.md");
|
|
@@ -217779,7 +218217,7 @@ function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
|
217779
218217
|
}, [cwd2, showTasks]);
|
|
217780
218218
|
if (!showTasks || taskLines.length === 0)
|
|
217781
218219
|
return null;
|
|
217782
|
-
return /* @__PURE__ */
|
|
218220
|
+
return /* @__PURE__ */ jsx_dev_runtime35.jsxDEV(Box_default, {
|
|
217783
218221
|
position: "absolute",
|
|
217784
218222
|
top: 1,
|
|
217785
218223
|
right: 2,
|
|
@@ -217789,7 +218227,7 @@ function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
|
217789
218227
|
paddingX: 1,
|
|
217790
218228
|
width: 40,
|
|
217791
218229
|
children: [
|
|
217792
|
-
/* @__PURE__ */
|
|
218230
|
+
/* @__PURE__ */ jsx_dev_runtime35.jsxDEV(Text3, {
|
|
217793
218231
|
color: "#A78BFA",
|
|
217794
218232
|
bold: true,
|
|
217795
218233
|
children: "Active Plan (task.md)"
|
|
@@ -217798,7 +218236,7 @@ function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
|
217798
218236
|
const isDone = line.includes("[x]");
|
|
217799
218237
|
const isProg = line.includes("[/]");
|
|
217800
218238
|
const color = isDone ? "#10B981" : isProg ? "#FBBF24" : "#AAAAAA";
|
|
217801
|
-
return /* @__PURE__ */
|
|
218239
|
+
return /* @__PURE__ */ jsx_dev_runtime35.jsxDEV(Text3, {
|
|
217802
218240
|
color,
|
|
217803
218241
|
wrap: "truncate",
|
|
217804
218242
|
children: line.replace(/^- /, "")
|
|
@@ -217807,11 +218245,11 @@ function TaskHUD({ cwd: cwd2, showTasks = true }) {
|
|
|
217807
218245
|
]
|
|
217808
218246
|
}, undefined, true, undefined, this);
|
|
217809
218247
|
}
|
|
217810
|
-
var
|
|
218248
|
+
var import_react51, jsx_dev_runtime35;
|
|
217811
218249
|
var init_task_hud = __esm(async () => {
|
|
217812
218250
|
await init_build2();
|
|
217813
|
-
|
|
217814
|
-
|
|
218251
|
+
import_react51 = __toESM(require_react(), 1);
|
|
218252
|
+
jsx_dev_runtime35 = __toESM(require_jsx_dev_runtime(), 1);
|
|
217815
218253
|
});
|
|
217816
218254
|
|
|
217817
218255
|
// ../../packages/tui/src/components/global-shortcuts.tsx
|
|
@@ -217949,9 +218387,8 @@ function ChatApp({
|
|
|
217949
218387
|
onLogin,
|
|
217950
218388
|
session
|
|
217951
218389
|
}) {
|
|
217952
|
-
const [
|
|
217953
|
-
|
|
217954
|
-
import_react51.useEffect(() => {
|
|
218390
|
+
const [exitConfirm, setExitConfirm] = import_react52.useState(false);
|
|
218391
|
+
import_react52.useEffect(() => {
|
|
217955
218392
|
if (exitConfirm) {
|
|
217956
218393
|
const timer = setTimeout(() => setExitConfirm(false), 3000);
|
|
217957
218394
|
return () => clearTimeout(timer);
|
|
@@ -217970,22 +218407,19 @@ function ChatApp({
|
|
|
217970
218407
|
setActiveMessages,
|
|
217971
218408
|
setAuthMode
|
|
217972
218409
|
} = session;
|
|
217973
|
-
const authUI = authMode !== "none" ? authMode === "ask_question" && session.pendingQuestions ? /* @__PURE__ */
|
|
218410
|
+
const authUI = authMode !== "none" ? authMode === "ask_question" && session.pendingQuestions ? /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(AskQuestionMenu, {
|
|
217974
218411
|
questions: session.pendingQuestions.questions,
|
|
217975
218412
|
onComplete: (answers) => {
|
|
217976
218413
|
session.pendingQuestions?.resolve(typeof answers === "string" ? answers : answers.join(", "));
|
|
217977
218414
|
setAuthMode("none");
|
|
217978
218415
|
session.setPendingQuestions(null);
|
|
217979
218416
|
}
|
|
217980
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
218417
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(AuthMenus, {
|
|
217981
218418
|
...session,
|
|
217982
218419
|
agent: agent2,
|
|
217983
218420
|
getProviderModels: session.getProviderModels
|
|
217984
218421
|
}, undefined, false, undefined, this) : null;
|
|
217985
|
-
const handleFormSubmit =
|
|
217986
|
-
if (text3 && !text3.startsWith("/")) {
|
|
217987
|
-
setInputHistory((prev2) => [...prev2, text3]);
|
|
217988
|
-
}
|
|
218422
|
+
const handleFormSubmit = import_react52.useCallback((text3) => {
|
|
217989
218423
|
session.handleSubmit(text3);
|
|
217990
218424
|
}, [session.handleSubmit]);
|
|
217991
218425
|
const totalTokens = [...staticMessages, ...activeMessages].reduce((acc, msg) => {
|
|
@@ -217994,19 +218428,19 @@ function ChatApp({
|
|
|
217994
218428
|
}
|
|
217995
218429
|
return acc;
|
|
217996
218430
|
}, 0);
|
|
217997
|
-
return /* @__PURE__ */
|
|
218431
|
+
return /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
|
|
217998
218432
|
flexDirection: "column",
|
|
217999
218433
|
width: "100%",
|
|
218000
218434
|
children: [
|
|
218001
|
-
/* @__PURE__ */
|
|
218435
|
+
/* @__PURE__ */ jsx_dev_runtime36.jsxDEV(GlobalShortcuts, {
|
|
218002
218436
|
...session,
|
|
218003
218437
|
agent: agent2
|
|
218004
218438
|
}, undefined, false, undefined, this),
|
|
218005
|
-
/* @__PURE__ */
|
|
218439
|
+
/* @__PURE__ */ jsx_dev_runtime36.jsxDEV(TaskHUD, {
|
|
218006
218440
|
cwd: process.cwd(),
|
|
218007
218441
|
showTasks: session.settingsShowTasks
|
|
218008
218442
|
}, undefined, false, undefined, this),
|
|
218009
|
-
/* @__PURE__ */
|
|
218443
|
+
/* @__PURE__ */ jsx_dev_runtime36.jsxDEV(MessageList, {
|
|
218010
218444
|
staticKey,
|
|
218011
218445
|
staticMessages,
|
|
218012
218446
|
activeMessages,
|
|
@@ -218015,9 +218449,8 @@ function ChatApp({
|
|
|
218015
218449
|
userEmail: currentEmail || userEmail,
|
|
218016
218450
|
expandCommands: session.expandCommands
|
|
218017
218451
|
}, undefined, false, undefined, this),
|
|
218018
|
-
/* @__PURE__ */
|
|
218452
|
+
/* @__PURE__ */ jsx_dev_runtime36.jsxDEV(InputBar, {
|
|
218019
218453
|
onSubmit: handleFormSubmit,
|
|
218020
|
-
history: inputHistory,
|
|
218021
218454
|
disabled: authMode !== "none",
|
|
218022
218455
|
onInterrupt: () => {
|
|
218023
218456
|
if (session.isStreaming) {
|
|
@@ -218065,7 +218498,7 @@ function ChatApp({
|
|
|
218065
218498
|
]
|
|
218066
218499
|
}, undefined, true, undefined, this);
|
|
218067
218500
|
}
|
|
218068
|
-
var
|
|
218501
|
+
var import_react52, jsx_dev_runtime36;
|
|
218069
218502
|
var init_app = __esm(async () => {
|
|
218070
218503
|
await __promiseAll([
|
|
218071
218504
|
init_build2(),
|
|
@@ -218076,8 +218509,8 @@ var init_app = __esm(async () => {
|
|
|
218076
218509
|
init_message_list(),
|
|
218077
218510
|
init_task_hud()
|
|
218078
218511
|
]);
|
|
218079
|
-
|
|
218080
|
-
|
|
218512
|
+
import_react52 = __toESM(require_react(), 1);
|
|
218513
|
+
jsx_dev_runtime36 = __toESM(require_jsx_dev_runtime(), 1);
|
|
218081
218514
|
});
|
|
218082
218515
|
|
|
218083
218516
|
// ../../packages/tui/src/index.tsx
|
|
@@ -218267,11 +218700,11 @@ var init_vanilla = () => {};
|
|
|
218267
218700
|
|
|
218268
218701
|
// ../../node_modules/.bun/zustand@5.0.14+93dbe784b8baa420/node_modules/zustand/esm/react.mjs
|
|
218269
218702
|
function useStore(api2, selector = identity2) {
|
|
218270
|
-
const slice3 =
|
|
218271
|
-
|
|
218703
|
+
const slice3 = import_react53.default.useSyncExternalStore(api2.subscribe, import_react53.default.useCallback(() => selector(api2.getState()), [api2, selector]), import_react53.default.useCallback(() => selector(api2.getInitialState()), [api2, selector]));
|
|
218704
|
+
import_react53.default.useDebugValue(slice3);
|
|
218272
218705
|
return slice3;
|
|
218273
218706
|
}
|
|
218274
|
-
var
|
|
218707
|
+
var import_react53, identity2 = (arg) => arg, createImpl = (createState) => {
|
|
218275
218708
|
const api2 = createStore(createState);
|
|
218276
218709
|
const useBoundStore = (selector) => useStore(api2, selector);
|
|
218277
218710
|
Object.assign(useBoundStore, api2);
|
|
@@ -218279,7 +218712,7 @@ var import_react52, identity2 = (arg) => arg, createImpl = (createState) => {
|
|
|
218279
218712
|
}, create4 = (createState) => createState ? createImpl(createState) : createImpl;
|
|
218280
218713
|
var init_react = __esm(() => {
|
|
218281
218714
|
init_vanilla();
|
|
218282
|
-
|
|
218715
|
+
import_react53 = __toESM(require_react(), 1);
|
|
218283
218716
|
});
|
|
218284
218717
|
|
|
218285
218718
|
// ../../node_modules/.bun/zustand@5.0.14+93dbe784b8baa420/node_modules/zustand/esm/index.mjs
|
|
@@ -241147,14 +241580,14 @@ await __promiseAll([
|
|
|
241147
241580
|
init_src6(),
|
|
241148
241581
|
init_build2()
|
|
241149
241582
|
]);
|
|
241150
|
-
var
|
|
241583
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
241151
241584
|
// package.json
|
|
241152
241585
|
var package_default = {
|
|
241153
241586
|
name: "@trydecember/cli",
|
|
241154
241587
|
module: "src/index.ts",
|
|
241155
241588
|
type: "module",
|
|
241156
241589
|
private: false,
|
|
241157
|
-
version: "0.2.
|
|
241590
|
+
version: "0.2.25",
|
|
241158
241591
|
description: "Turn ideas into reality.",
|
|
241159
241592
|
author: "Chaitanya Sonawane",
|
|
241160
241593
|
license: "Apache-2.0",
|
|
@@ -241735,7 +242168,7 @@ Headless task complete.
|
|
|
241735
242168
|
// src/hooks/use-agent-session.ts
|
|
241736
242169
|
init_src4();
|
|
241737
242170
|
init_config();
|
|
241738
|
-
var
|
|
242171
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
241739
242172
|
|
|
241740
242173
|
// src/constants/prompts.ts
|
|
241741
242174
|
var getGrillPrompt = (userPrompt, projectContext) => `You are a principal software architect interviewing a developer to align on a technical specification before implementation.
|
|
@@ -242783,11 +243216,11 @@ function useAgentSession({
|
|
|
242783
243216
|
settingsFollowUpMode,
|
|
242784
243217
|
setSettingsFollowUpMode
|
|
242785
243218
|
} = state;
|
|
242786
|
-
const [expandCommands, setExpandCommands] =
|
|
242787
|
-
const toggleExpandCommands =
|
|
243219
|
+
const [expandCommands, setExpandCommands] = import_react54.useState(false);
|
|
243220
|
+
const toggleExpandCommands = import_react54.useCallback(() => {
|
|
242788
243221
|
setExpandCommands((prev2) => !prev2);
|
|
242789
243222
|
}, []);
|
|
242790
|
-
|
|
243223
|
+
import_react54.useEffect(() => {
|
|
242791
243224
|
setIsAuthenticated(initialAuth);
|
|
242792
243225
|
setAuthMethod(initialAuthMethod);
|
|
242793
243226
|
if (initialHasBothAuth !== undefined)
|
|
@@ -242808,7 +243241,7 @@ function useAgentSession({
|
|
|
242808
243241
|
setSettingsAuthPriority,
|
|
242809
243242
|
setCurrentEmail
|
|
242810
243243
|
]);
|
|
242811
|
-
|
|
243244
|
+
import_react54.useEffect(() => {
|
|
242812
243245
|
if (agent2) {
|
|
242813
243246
|
if (!agent2.operations)
|
|
242814
243247
|
agent2.operations = {};
|
|
@@ -242842,7 +243275,7 @@ function useAgentSession({
|
|
|
242842
243275
|
};
|
|
242843
243276
|
}
|
|
242844
243277
|
}, [agent2]);
|
|
242845
|
-
|
|
243278
|
+
import_react54.useEffect(() => {
|
|
242846
243279
|
if (authMode === "tasks_mode") {
|
|
242847
243280
|
const update3 = () => {
|
|
242848
243281
|
setTasksData([...taskManager.getTasks()]);
|
|
@@ -242852,11 +243285,11 @@ function useAgentSession({
|
|
|
242852
243285
|
return () => clearInterval(interval);
|
|
242853
243286
|
}
|
|
242854
243287
|
}, [authMode, setTasksData]);
|
|
242855
|
-
const handleKillTask =
|
|
243288
|
+
const handleKillTask = import_react54.useCallback((taskId) => {
|
|
242856
243289
|
taskManager.killTask(taskId);
|
|
242857
243290
|
setTasksData([...taskManager.getTasks()]);
|
|
242858
243291
|
}, [setTasksData]);
|
|
242859
|
-
const generateGrillQuestions =
|
|
243292
|
+
const generateGrillQuestions = import_react54.useCallback(async (userPrompt) => {
|
|
242860
243293
|
setIsStreaming(true);
|
|
242861
243294
|
setStaticMessages((prev2) => [...prev2, ...useCliStore.getState().activeMessages]);
|
|
242862
243295
|
setActiveMessages([
|
|
@@ -242898,7 +243331,7 @@ function useAgentSession({
|
|
|
242898
243331
|
setIsStreaming(false);
|
|
242899
243332
|
}
|
|
242900
243333
|
}, [agent2]);
|
|
242901
|
-
const generatePlanFromGrill =
|
|
243334
|
+
const generatePlanFromGrill = import_react54.useCallback(async (answers) => {
|
|
242902
243335
|
setAuthMode("none");
|
|
242903
243336
|
const originalPrompt = grillPrompt;
|
|
242904
243337
|
setGrillPrompt(null);
|
|
@@ -242932,7 +243365,7 @@ function useAgentSession({
|
|
|
242932
243365
|
setAuthMode("plan_approve");
|
|
242933
243366
|
}
|
|
242934
243367
|
}, [agent2, grillPrompt, grillQuestions, activeMessages]);
|
|
242935
|
-
const handleGrillSelect =
|
|
243368
|
+
const handleGrillSelect = import_react54.useCallback(async (item) => {
|
|
242936
243369
|
if (item.value === "custom") {
|
|
242937
243370
|
setCustomInputMode(true);
|
|
242938
243371
|
return;
|
|
@@ -242945,7 +243378,7 @@ function useAgentSession({
|
|
|
242945
243378
|
await generatePlanFromGrill(nextAnswers);
|
|
242946
243379
|
}
|
|
242947
243380
|
}, [grillAnswers, currentGrillIndex, grillQuestions, generatePlanFromGrill]);
|
|
242948
|
-
const handleSubmit =
|
|
243381
|
+
const handleSubmit = import_react54.useCallback(async (text3) => {
|
|
242949
243382
|
if (text3.trim() === "/exit") {
|
|
242950
243383
|
setShouldExit(true);
|
|
242951
243384
|
process.exit(0);
|
|
@@ -243104,9 +243537,7 @@ Please run \`/login\` to:
|
|
|
243104
243537
|
Opening usage dashboard...
|
|
243105
243538
|
|
|
243106
243539
|
If it doesn't open automatically, please click here:
|
|
243107
|
-
[${url}](${url})
|
|
243108
|
-
|
|
243109
|
-
*Note: BYOK (Bring Your Own Key) usage is not tracked. Only usage via December login (December Wallet) is tracked.*`
|
|
243540
|
+
[${url}](${url})`
|
|
243110
243541
|
}
|
|
243111
243542
|
]
|
|
243112
243543
|
}
|
|
@@ -243219,7 +243650,7 @@ Please run \`/login\` to:
|
|
|
243219
243650
|
grillMode,
|
|
243220
243651
|
setQueuedPrompts
|
|
243221
243652
|
]);
|
|
243222
|
-
const handleAbort =
|
|
243653
|
+
const handleAbort = import_react54.useCallback(() => {
|
|
243223
243654
|
if (isStreaming && agent2) {
|
|
243224
243655
|
agent2.abort();
|
|
243225
243656
|
setQueuedPrompts([]);
|
|
@@ -243239,7 +243670,7 @@ Please run \`/login\` to:
|
|
|
243239
243670
|
handleLogoutSelect,
|
|
243240
243671
|
handleSessionSelect
|
|
243241
243672
|
} = useAuthHandlers(agent2, onLogin, onLoginHeadless);
|
|
243242
|
-
const handlePlanApprovalSelect =
|
|
243673
|
+
const handlePlanApprovalSelect = import_react54.useCallback(async (item) => {
|
|
243243
243674
|
setAuthMode("none");
|
|
243244
243675
|
const originalPrompt = currentPlannedPrompt;
|
|
243245
243676
|
setCurrentPlannedPrompt(null);
|
|
@@ -243512,7 +243943,7 @@ var localOperations = {
|
|
|
243512
243943
|
// src/index.ts
|
|
243513
243944
|
function AppWrapper(props) {
|
|
243514
243945
|
const session = useAgentSession(props);
|
|
243515
|
-
return
|
|
243946
|
+
return import_react55.default.createElement(ChatApp, { ...props, session });
|
|
243516
243947
|
}
|
|
243517
243948
|
async function main() {
|
|
243518
243949
|
process.title = "december";
|
|
@@ -243601,7 +244032,7 @@ Executing Headless Task: "${parsedArgs.prompt}"
|
|
|
243601
244032
|
const result2 = await runHeadlessTask(parsedArgs.prompt, { agent: agent2 });
|
|
243602
244033
|
process.exit(result2.success ? 0 : 1);
|
|
243603
244034
|
}
|
|
243604
|
-
render_default(
|
|
244035
|
+
render_default(import_react55.default.createElement(RootLayout, null, import_react55.default.createElement(AppWrapper, {
|
|
243605
244036
|
agent: agent2,
|
|
243606
244037
|
isAuthenticated,
|
|
243607
244038
|
authMethod: providerConfig?.authMethod,
|