farai 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +523 -327
- package/dist/cli/index.js.map +16 -16
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -33041,16 +33041,32 @@ function createRuntimePort(runtime, options = {}) {
|
|
|
33041
33041
|
}
|
|
33042
33042
|
});
|
|
33043
33043
|
} catch {
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33044
|
+
try {
|
|
33045
|
+
mcpResult = await callMcpServerTool({
|
|
33046
|
+
workspace: session.workspace,
|
|
33047
|
+
configWorkspace: runtime.workspace,
|
|
33048
|
+
session,
|
|
33049
|
+
server: "mitmproxy-mcp",
|
|
33050
|
+
tool: "get_flow_summary_v2",
|
|
33051
|
+
args: {
|
|
33052
|
+
limit: options2.limit ?? 300,
|
|
33053
|
+
...options2.kind ? {
|
|
33054
|
+
kind: options2.kind
|
|
33055
|
+
} : {}
|
|
33056
|
+
}
|
|
33057
|
+
});
|
|
33058
|
+
} catch {
|
|
33059
|
+
mcpResult = await callMcpServerTool({
|
|
33060
|
+
workspace: session.workspace,
|
|
33061
|
+
configWorkspace: runtime.workspace,
|
|
33062
|
+
session,
|
|
33063
|
+
server: "mitmproxy-mcp",
|
|
33064
|
+
tool: "get_traffic_summary",
|
|
33065
|
+
args: {
|
|
33066
|
+
limit: options2.limit ?? 300
|
|
33067
|
+
}
|
|
33068
|
+
});
|
|
33069
|
+
}
|
|
33054
33070
|
}
|
|
33055
33071
|
const flows = proxyFlowsFromMcpTrafficSummary(mcpResult, options2);
|
|
33056
33072
|
if (flows.length > 0 || listMcpServerStatuses(activeSessionId).some((status2) => status2.name === "mitmproxy-mcp" && status2.running))
|
|
@@ -33083,6 +33099,21 @@ function createRuntimePort(runtime, options = {}) {
|
|
|
33083
33099
|
if (detail)
|
|
33084
33100
|
return detail;
|
|
33085
33101
|
} catch {}
|
|
33102
|
+
try {
|
|
33103
|
+
const compatibleResult = await callMcpServerTool({
|
|
33104
|
+
workspace: session.workspace,
|
|
33105
|
+
configWorkspace: runtime.workspace,
|
|
33106
|
+
session,
|
|
33107
|
+
server: "mitmproxy-mcp",
|
|
33108
|
+
tool: "inspect_flow_v2",
|
|
33109
|
+
args: {
|
|
33110
|
+
flow_id: id2
|
|
33111
|
+
}
|
|
33112
|
+
});
|
|
33113
|
+
const compatibleDetail = proxyFlowDetailFromMcpInspect(compatibleResult);
|
|
33114
|
+
if (compatibleDetail)
|
|
33115
|
+
return compatibleDetail;
|
|
33116
|
+
} catch {}
|
|
33086
33117
|
const legacyResult = await callMcpServerTool({
|
|
33087
33118
|
workspace: session.workspace,
|
|
33088
33119
|
configWorkspace: runtime.workspace,
|
|
@@ -38745,6 +38776,18 @@ function routeSlash(key) {
|
|
|
38745
38776
|
}
|
|
38746
38777
|
}
|
|
38747
38778
|
function routeBase(key, ctx) {
|
|
38779
|
+
if (key.meta) {
|
|
38780
|
+
if (key.name === "1")
|
|
38781
|
+
return consumed({
|
|
38782
|
+
kind: "mainTab.set",
|
|
38783
|
+
tab: "chat"
|
|
38784
|
+
});
|
|
38785
|
+
if (key.name === "2")
|
|
38786
|
+
return consumed({
|
|
38787
|
+
kind: "mainTab.set",
|
|
38788
|
+
tab: "proxy"
|
|
38789
|
+
});
|
|
38790
|
+
}
|
|
38748
38791
|
if (key.ctrl) {
|
|
38749
38792
|
switch (key.name) {
|
|
38750
38793
|
case "1":
|
|
@@ -40394,10 +40437,8 @@ function args(value) {
|
|
|
40394
40437
|
|
|
40395
40438
|
// src/agent-tui/transcript/cells/user-cell.tsx
|
|
40396
40439
|
function UserPrompt(props) {
|
|
40397
|
-
const dims = useTerminalDimensions();
|
|
40398
40440
|
const lines = createMemo(() => stripOuterBlankLines2(sanitizeText2(props.row.text)).split(`
|
|
40399
40441
|
`));
|
|
40400
|
-
const width = () => Math.max(1, dims().width);
|
|
40401
40442
|
return (() => {
|
|
40402
40443
|
var _el$ = createElement("box");
|
|
40403
40444
|
insert(_el$, createComponent2(For, {
|
|
@@ -40412,7 +40453,8 @@ function UserPrompt(props) {
|
|
|
40412
40453
|
insert(_el$4, line || " ");
|
|
40413
40454
|
effect((_p$) => {
|
|
40414
40455
|
var _v$ = {
|
|
40415
|
-
width:
|
|
40456
|
+
width: "100%",
|
|
40457
|
+
minWidth: 0,
|
|
40416
40458
|
flexDirection: "row",
|
|
40417
40459
|
backgroundColor: COLOR.userMessageBg
|
|
40418
40460
|
}, _v$2 = index() === 0 ? COLOR.accent : COLOR.dim, _v$3 = COLOR.text;
|
|
@@ -40429,7 +40471,8 @@ function UserPrompt(props) {
|
|
|
40429
40471
|
})()
|
|
40430
40472
|
}));
|
|
40431
40473
|
effect((_$p) => setProp(_el$, "style", {
|
|
40432
|
-
width:
|
|
40474
|
+
width: "100%",
|
|
40475
|
+
minWidth: 0,
|
|
40433
40476
|
flexDirection: "column",
|
|
40434
40477
|
marginTop: 1,
|
|
40435
40478
|
marginBottom: 1,
|
|
@@ -40449,7 +40492,6 @@ var init_user_cell = __esm(() => {
|
|
|
40449
40492
|
init_solid2();
|
|
40450
40493
|
init_solid2();
|
|
40451
40494
|
init_solid();
|
|
40452
|
-
init_solid2();
|
|
40453
40495
|
init_theme();
|
|
40454
40496
|
});
|
|
40455
40497
|
|
|
@@ -42844,6 +42886,7 @@ var init_transcript = __esm(() => {
|
|
|
42844
42886
|
// src/agent-tui/surfaces/center-surface.tsx
|
|
42845
42887
|
function CenterSurfaceView(props) {
|
|
42846
42888
|
const tui = useTuiStore();
|
|
42889
|
+
const dims = useTerminalDimensions();
|
|
42847
42890
|
const loader = createSurfaceLoader(() => props.frame);
|
|
42848
42891
|
const title = () => surfaceTitle(props.frame);
|
|
42849
42892
|
const kindLabel = () => props.frame.kind;
|
|
@@ -42885,13 +42928,13 @@ function CenterSurfaceView(props) {
|
|
|
42885
42928
|
minWidth: 0
|
|
42886
42929
|
});
|
|
42887
42930
|
insertNode(_el$4, createTextNode(`\u203A `));
|
|
42888
|
-
insert(_el$6, () => truncateLine2(title(),
|
|
42931
|
+
insert(_el$6, () => truncateLine2(title(), Math.max(4, dims().width - terminalWidth(kindLabel()) - 10)));
|
|
42889
42932
|
insert(_el$7, kindLabel);
|
|
42890
42933
|
insertNode(_el$8, _el$9);
|
|
42891
42934
|
setProp(_el$8, "style", {
|
|
42892
42935
|
height: 1
|
|
42893
42936
|
});
|
|
42894
|
-
insert(_el$9, () => surfaceSubtitle(props.frame));
|
|
42937
|
+
insert(_el$9, () => truncateLine2(surfaceSubtitle(props.frame), Math.max(1, dims().width - 4)));
|
|
42895
42938
|
insert(_el$, createComponent2(Show, {
|
|
42896
42939
|
get when() {
|
|
42897
42940
|
return props.frame.kind === "proxy_flow";
|
|
@@ -43185,7 +43228,7 @@ function WebSocketFlowView(props) {
|
|
|
43185
43228
|
let lastScrollSequence = 0;
|
|
43186
43229
|
const selectedIndex = createMemo(() => Math.min(Math.max(0, tui.store.ui.proxyWebSocketMessageIndex), Math.max(0, props.flow.messages.length - 1)));
|
|
43187
43230
|
const selectedMessage = createMemo(() => props.flow.messages[selectedIndex()]);
|
|
43188
|
-
const contentWidth = () => Math.max(
|
|
43231
|
+
const contentWidth = () => Math.max(1, dims().width - (props.compact ? 4 : 8));
|
|
43189
43232
|
const inspectorGap = () => dims().height >= 22 ? 1 : 0;
|
|
43190
43233
|
createEffect(() => {
|
|
43191
43234
|
const flowId = props.flow.id;
|
|
@@ -43858,7 +43901,8 @@ function ProxyLogView() {
|
|
|
43858
43901
|
});
|
|
43859
43902
|
const defaultListHeight = () => Math.max(7, Math.min(14, Math.floor(dims().height * 0.34)));
|
|
43860
43903
|
const listHeight = () => clampProxyListHeight(listHeightOverride() ?? defaultListHeight(), dims().height);
|
|
43861
|
-
const
|
|
43904
|
+
const compactHeight = () => dims().height < 20;
|
|
43905
|
+
const tableWidth = () => Math.max(1, dims().width - 4);
|
|
43862
43906
|
const beginListResize = (event) => {
|
|
43863
43907
|
if (event.button !== 0)
|
|
43864
43908
|
return;
|
|
@@ -43966,22 +44010,9 @@ function ProxyLogView() {
|
|
|
43966
44010
|
});
|
|
43967
44011
|
});
|
|
43968
44012
|
return (() => {
|
|
43969
|
-
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("box"), _el$6 = createElement("box"), _el$7 = createElement("text"), _el$8 = createElement("scrollbox")
|
|
44013
|
+
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$5 = createElement("box"), _el$6 = createElement("box"), _el$7 = createElement("text"), _el$8 = createElement("scrollbox");
|
|
43970
44014
|
insertNode(_el$, _el$2);
|
|
43971
44015
|
insertNode(_el$, _el$5);
|
|
43972
|
-
insertNode(_el$, _el$9);
|
|
43973
|
-
insertNode(_el$, _el$10);
|
|
43974
|
-
insertNode(_el$, _el$12);
|
|
43975
|
-
setProp(_el$, "style", {
|
|
43976
|
-
flexGrow: 1,
|
|
43977
|
-
flexShrink: 1,
|
|
43978
|
-
minHeight: 0,
|
|
43979
|
-
flexDirection: "column",
|
|
43980
|
-
paddingTop: 1,
|
|
43981
|
-
paddingBottom: 1,
|
|
43982
|
-
paddingLeft: 2,
|
|
43983
|
-
paddingRight: 2
|
|
43984
|
-
});
|
|
43985
44016
|
setProp(_el$, "onMouseDrag", resizeList);
|
|
43986
44017
|
setProp(_el$, "onMouseDragEnd", finishListResize);
|
|
43987
44018
|
setProp(_el$, "onMouseUp", finishListResize);
|
|
@@ -44038,8 +44069,8 @@ function ProxyLogView() {
|
|
|
44038
44069
|
flexDirection: "column",
|
|
44039
44070
|
marginTop: 1
|
|
44040
44071
|
});
|
|
44041
|
-
insert(_el$14, () => `no ${tui.store.ui.proxyFilter === "all" ? "captured proxy" : tui.store.ui.proxyFilter} flows yet
|
|
44042
|
-
insert(_el$15, () => proxyHint().toLowerCase());
|
|
44072
|
+
insert(_el$14, () => truncate2(`no ${tui.store.ui.proxyFilter === "all" ? "captured proxy" : tui.store.ui.proxyFilter} flows yet`, tableWidth()));
|
|
44073
|
+
insert(_el$15, () => truncate2(proxyHint().toLowerCase(), tableWidth()));
|
|
44043
44074
|
effect((_p$) => {
|
|
44044
44075
|
var _v$7 = COLOR.dim, _v$8 = COLOR.dim;
|
|
44045
44076
|
_v$7 !== _p$.e && (_p$.e = setProp(_el$14, "fg", _v$7, _p$.e));
|
|
@@ -44088,103 +44119,140 @@ function ProxyLogView() {
|
|
|
44088
44119
|
});
|
|
44089
44120
|
}
|
|
44090
44121
|
}));
|
|
44091
|
-
|
|
44092
|
-
insertNode(_el$9, _el$1);
|
|
44093
|
-
setProp(_el$9, "style", {
|
|
44094
|
-
height: 1,
|
|
44095
|
-
flexShrink: 0,
|
|
44096
|
-
flexDirection: "row",
|
|
44097
|
-
justifyContent: "space-between",
|
|
44098
|
-
marginTop: 1
|
|
44099
|
-
});
|
|
44100
|
-
insert(_el$0, () => truncate2(selectedFlow() && selectedPresentation() ? `${selectedPresentation().kind} \xB7 ${selectedPresentation().method} ${selectedFlow().url}` : "no flow selected", Math.max(8, tableWidth() - 20)));
|
|
44101
|
-
insert(_el$1, () => truncate2(detailLoading() ? "loading detail" : detailError() ?? "", 18));
|
|
44102
|
-
insertNode(_el$10, _el$11);
|
|
44103
|
-
setProp(_el$10, "style", {
|
|
44104
|
-
height: 1,
|
|
44105
|
-
flexShrink: 0,
|
|
44106
|
-
alignItems: "center",
|
|
44107
|
-
justifyContent: "flex-start"
|
|
44108
|
-
});
|
|
44109
|
-
setProp(_el$10, "onMouseDown", beginListResize);
|
|
44110
|
-
setProp(_el$11, "selectable", false);
|
|
44111
|
-
insert(_el$11, () => "\u2500".repeat(Math.max(1, dims().width - 4)));
|
|
44112
|
-
setProp(_el$12, "style", {
|
|
44113
|
-
flexGrow: 1,
|
|
44114
|
-
minHeight: 0,
|
|
44115
|
-
flexDirection: "column",
|
|
44116
|
-
paddingTop: 1
|
|
44117
|
-
});
|
|
44118
|
-
insert(_el$12, createComponent2(Show, {
|
|
44122
|
+
insert(_el$, createComponent2(Show, {
|
|
44119
44123
|
get when() {
|
|
44120
|
-
return
|
|
44124
|
+
return !compactHeight();
|
|
44121
44125
|
},
|
|
44122
|
-
get
|
|
44123
|
-
return (() => {
|
|
44124
|
-
var _el$
|
|
44125
|
-
insertNode(_el$
|
|
44126
|
-
|
|
44127
|
-
|
|
44126
|
+
get children() {
|
|
44127
|
+
return [(() => {
|
|
44128
|
+
var _el$9 = createElement("box"), _el$0 = createElement("text"), _el$1 = createElement("text");
|
|
44129
|
+
insertNode(_el$9, _el$0);
|
|
44130
|
+
insertNode(_el$9, _el$1);
|
|
44131
|
+
setProp(_el$9, "style", {
|
|
44132
|
+
height: 1,
|
|
44133
|
+
flexShrink: 0,
|
|
44134
|
+
flexDirection: "row",
|
|
44135
|
+
justifyContent: "space-between",
|
|
44136
|
+
marginTop: 1
|
|
44128
44137
|
});
|
|
44129
|
-
|
|
44130
|
-
|
|
44131
|
-
|
|
44132
|
-
|
|
44133
|
-
|
|
44134
|
-
|
|
44135
|
-
|
|
44136
|
-
|
|
44137
|
-
|
|
44138
|
-
|
|
44139
|
-
|
|
44140
|
-
|
|
44141
|
-
|
|
44142
|
-
|
|
44143
|
-
|
|
44144
|
-
|
|
44145
|
-
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
|
|
44150
|
-
|
|
44151
|
-
|
|
44152
|
-
|
|
44153
|
-
|
|
44154
|
-
|
|
44155
|
-
|
|
44156
|
-
|
|
44157
|
-
|
|
44158
|
-
|
|
44159
|
-
|
|
44160
|
-
|
|
44161
|
-
|
|
44162
|
-
|
|
44163
|
-
|
|
44164
|
-
|
|
44165
|
-
|
|
44166
|
-
|
|
44138
|
+
insert(_el$0, () => truncate2(selectedFlow() && selectedPresentation() ? `${selectedPresentation().kind} \xB7 ${selectedPresentation().method} ${selectedFlow().url}` : "no flow selected", Math.max(8, tableWidth() - 20)));
|
|
44139
|
+
insert(_el$1, () => truncate2(detailLoading() ? "loading detail" : detailError() ?? "", 18));
|
|
44140
|
+
effect((_p$) => {
|
|
44141
|
+
var _v$ = COLOR.dim, _v$2 = detailLoading() ? COLOR.accent : detailError() ? COLOR.error : COLOR.dim;
|
|
44142
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$0, "fg", _v$, _p$.e));
|
|
44143
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$1, "fg", _v$2, _p$.t));
|
|
44144
|
+
return _p$;
|
|
44145
|
+
}, {
|
|
44146
|
+
e: undefined,
|
|
44147
|
+
t: undefined
|
|
44148
|
+
});
|
|
44149
|
+
return _el$9;
|
|
44150
|
+
})(), (() => {
|
|
44151
|
+
var _el$10 = createElement("box"), _el$11 = createElement("text");
|
|
44152
|
+
insertNode(_el$10, _el$11);
|
|
44153
|
+
setProp(_el$10, "style", {
|
|
44154
|
+
height: 1,
|
|
44155
|
+
flexShrink: 0,
|
|
44156
|
+
alignItems: "center",
|
|
44157
|
+
justifyContent: "flex-start"
|
|
44158
|
+
});
|
|
44159
|
+
setProp(_el$10, "onMouseDown", beginListResize);
|
|
44160
|
+
setProp(_el$11, "selectable", false);
|
|
44161
|
+
insert(_el$11, () => "\u2500".repeat(Math.max(1, dims().width - 4)));
|
|
44162
|
+
effect((_$p) => setProp(_el$11, "fg", dividerDragging() ? COLOR.accent : COLOR.border, _$p));
|
|
44163
|
+
return _el$10;
|
|
44164
|
+
})(), (() => {
|
|
44165
|
+
var _el$12 = createElement("box");
|
|
44166
|
+
setProp(_el$12, "style", {
|
|
44167
|
+
flexGrow: 1,
|
|
44168
|
+
minHeight: 0,
|
|
44169
|
+
flexDirection: "column",
|
|
44170
|
+
paddingTop: 1
|
|
44171
|
+
});
|
|
44172
|
+
insert(_el$12, createComponent2(Show, {
|
|
44173
|
+
get when() {
|
|
44174
|
+
return detail();
|
|
44175
|
+
},
|
|
44176
|
+
get fallback() {
|
|
44177
|
+
return (() => {
|
|
44178
|
+
var _el$17 = createElement("box"), _el$18 = createElement("text");
|
|
44179
|
+
insertNode(_el$17, _el$18);
|
|
44180
|
+
setProp(_el$17, "style", {
|
|
44181
|
+
flexDirection: "column"
|
|
44182
|
+
});
|
|
44183
|
+
insertNode(_el$18, createTextNode(`select a flow to inspect protocol-aware details`));
|
|
44184
|
+
effect((_$p) => setProp(_el$18, "fg", COLOR.dim, _$p));
|
|
44185
|
+
return _el$17;
|
|
44186
|
+
})();
|
|
44187
|
+
},
|
|
44188
|
+
children: (flow) => (() => {
|
|
44189
|
+
var _el$20 = createElement("box");
|
|
44190
|
+
setProp(_el$20, "style", {
|
|
44191
|
+
flexGrow: 1,
|
|
44192
|
+
minHeight: 0,
|
|
44193
|
+
flexDirection: "column"
|
|
44194
|
+
});
|
|
44195
|
+
insert(_el$20, createComponent2(Show, {
|
|
44196
|
+
get when() {
|
|
44197
|
+
return isSummaryOnly(flow());
|
|
44198
|
+
},
|
|
44199
|
+
get children() {
|
|
44200
|
+
var _el$21 = createElement("box"), _el$22 = createElement("text");
|
|
44201
|
+
insertNode(_el$21, _el$22);
|
|
44202
|
+
setProp(_el$21, "style", {
|
|
44203
|
+
height: 1,
|
|
44204
|
+
flexShrink: 0,
|
|
44205
|
+
marginBottom: 1
|
|
44206
|
+
});
|
|
44207
|
+
insertNode(_el$22, createTextNode(`full body unavailable; showing captured metadata`));
|
|
44208
|
+
effect((_$p) => setProp(_el$22, "fg", COLOR.warning, _$p));
|
|
44209
|
+
return _el$21;
|
|
44210
|
+
}
|
|
44211
|
+
}), null);
|
|
44212
|
+
insert(_el$20, createComponent2(ProxyFlowSplitView, {
|
|
44213
|
+
get flow() {
|
|
44214
|
+
return flow();
|
|
44215
|
+
},
|
|
44216
|
+
compact: true
|
|
44217
|
+
}), null);
|
|
44218
|
+
return _el$20;
|
|
44219
|
+
})()
|
|
44220
|
+
}));
|
|
44221
|
+
return _el$12;
|
|
44222
|
+
})()];
|
|
44223
|
+
}
|
|
44224
|
+
}), null);
|
|
44167
44225
|
effect((_p$) => {
|
|
44168
|
-
var _v$ =
|
|
44226
|
+
var _v$3 = {
|
|
44227
|
+
flexGrow: 1,
|
|
44228
|
+
flexShrink: 1,
|
|
44229
|
+
minHeight: 0,
|
|
44230
|
+
flexDirection: "column",
|
|
44231
|
+
paddingTop: compactHeight() ? 0 : 1,
|
|
44232
|
+
paddingBottom: compactHeight() ? 0 : 1,
|
|
44233
|
+
paddingLeft: 2,
|
|
44234
|
+
paddingRight: 2
|
|
44235
|
+
}, _v$4 = COLOR.text, _v$5 = compactHeight() ? {
|
|
44236
|
+
flexGrow: 1,
|
|
44237
|
+
flexShrink: 1,
|
|
44238
|
+
minHeight: 0,
|
|
44239
|
+
flexDirection: "column"
|
|
44240
|
+
} : {
|
|
44169
44241
|
height: listHeight(),
|
|
44170
44242
|
flexShrink: 0,
|
|
44171
44243
|
flexDirection: "column",
|
|
44172
44244
|
marginTop: 1
|
|
44173
|
-
}, _v$
|
|
44174
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el
|
|
44175
|
-
_v$
|
|
44176
|
-
_v$
|
|
44177
|
-
_v$
|
|
44178
|
-
_v$5 !== _p$.i && (_p$.i = setProp(_el$1, "fg", _v$5, _p$.i));
|
|
44179
|
-
_v$6 !== _p$.n && (_p$.n = setProp(_el$11, "fg", _v$6, _p$.n));
|
|
44245
|
+
}, _v$6 = COLOR.dim;
|
|
44246
|
+
_v$3 !== _p$.e && (_p$.e = setProp(_el$, "style", _v$3, _p$.e));
|
|
44247
|
+
_v$4 !== _p$.t && (_p$.t = setProp(_el$3, "fg", _v$4, _p$.t));
|
|
44248
|
+
_v$5 !== _p$.a && (_p$.a = setProp(_el$5, "style", _v$5, _p$.a));
|
|
44249
|
+
_v$6 !== _p$.o && (_p$.o = setProp(_el$7, "fg", _v$6, _p$.o));
|
|
44180
44250
|
return _p$;
|
|
44181
44251
|
}, {
|
|
44182
44252
|
e: undefined,
|
|
44183
44253
|
t: undefined,
|
|
44184
44254
|
a: undefined,
|
|
44185
|
-
o: undefined
|
|
44186
|
-
i: undefined,
|
|
44187
|
-
n: undefined
|
|
44255
|
+
o: undefined
|
|
44188
44256
|
});
|
|
44189
44257
|
return _el$;
|
|
44190
44258
|
})();
|
|
@@ -44319,6 +44387,9 @@ function isSummaryOnly(flow) {
|
|
|
44319
44387
|
return !flow.response && flow.answerCount > 0;
|
|
44320
44388
|
}
|
|
44321
44389
|
function proxyHeaderLine(width) {
|
|
44390
|
+
if (width < 38) {
|
|
44391
|
+
return truncate2([pad("", 2), pad("method", 8), "host / path"].join(""), width);
|
|
44392
|
+
}
|
|
44322
44393
|
if (width < 96) {
|
|
44323
44394
|
return truncate2([pad("", 2), pad("proto", 7), pad("method", 8), pad("sts", 5), "host / path"].join(""), width);
|
|
44324
44395
|
}
|
|
@@ -44338,10 +44409,11 @@ function proxyFlowTablePresentation(flow, filter) {
|
|
|
44338
44409
|
function ProxyRow(props) {
|
|
44339
44410
|
const pathWidth = () => Math.max(18, props.width - 98);
|
|
44340
44411
|
const compactTarget = () => truncate2(`${props.flow.host}${props.flow.path || "/"}`, Math.max(8, props.width - 22));
|
|
44412
|
+
const narrowTarget = () => truncate2(`${props.flow.host}${props.flow.path || "/"}`, Math.max(1, props.width - 10));
|
|
44341
44413
|
const presentation = () => proxyFlowTablePresentation(props.flow, props.filter);
|
|
44342
44414
|
return createComponent2(Show, {
|
|
44343
44415
|
get when() {
|
|
44344
|
-
return props.width >=
|
|
44416
|
+
return props.width >= 38;
|
|
44345
44417
|
},
|
|
44346
44418
|
get fallback() {
|
|
44347
44419
|
return [(() => {
|
|
@@ -44353,91 +44425,119 @@ function ProxyRow(props) {
|
|
|
44353
44425
|
})(), (() => {
|
|
44354
44426
|
var _el$38 = createElement("text");
|
|
44355
44427
|
setProp(_el$38, "selectable", false);
|
|
44356
|
-
insert(_el$38, () => pad(presentation().
|
|
44357
|
-
effect((_$p) => setProp(_el$38, "fg",
|
|
44428
|
+
insert(_el$38, () => pad(presentation().method, 8));
|
|
44429
|
+
effect((_$p) => setProp(_el$38, "fg", methodColor(presentation().method), _$p));
|
|
44358
44430
|
return _el$38;
|
|
44359
44431
|
})(), (() => {
|
|
44360
44432
|
var _el$39 = createElement("text");
|
|
44361
44433
|
setProp(_el$39, "selectable", false);
|
|
44362
|
-
insert(_el$39,
|
|
44363
|
-
effect((_$p) => setProp(_el$39, "fg",
|
|
44434
|
+
insert(_el$39, narrowTarget);
|
|
44435
|
+
effect((_$p) => setProp(_el$39, "fg", props.selected ? COLOR.accent : COLOR.text, _$p));
|
|
44364
44436
|
return _el$39;
|
|
44365
|
-
})(), (() => {
|
|
44366
|
-
var _el$40 = createElement("text");
|
|
44367
|
-
setProp(_el$40, "selectable", false);
|
|
44368
|
-
insert(_el$40, () => pad(String(props.flow.status ?? "-"), 5));
|
|
44369
|
-
effect((_$p) => setProp(_el$40, "fg", statusColor(props.flow.status), _$p));
|
|
44370
|
-
return _el$40;
|
|
44371
|
-
})(), (() => {
|
|
44372
|
-
var _el$41 = createElement("text");
|
|
44373
|
-
setProp(_el$41, "selectable", false);
|
|
44374
|
-
insert(_el$41, compactTarget);
|
|
44375
|
-
effect((_$p) => setProp(_el$41, "fg", props.selected ? COLOR.accent : COLOR.text, _$p));
|
|
44376
|
-
return _el$41;
|
|
44377
44437
|
})()];
|
|
44378
44438
|
},
|
|
44379
44439
|
get children() {
|
|
44380
|
-
return
|
|
44381
|
-
|
|
44382
|
-
|
|
44383
|
-
|
|
44384
|
-
|
|
44385
|
-
|
|
44386
|
-
|
|
44387
|
-
|
|
44388
|
-
|
|
44389
|
-
|
|
44390
|
-
|
|
44391
|
-
|
|
44392
|
-
|
|
44393
|
-
|
|
44394
|
-
|
|
44395
|
-
|
|
44396
|
-
|
|
44397
|
-
|
|
44398
|
-
|
|
44399
|
-
|
|
44400
|
-
|
|
44401
|
-
|
|
44402
|
-
|
|
44403
|
-
|
|
44404
|
-
|
|
44405
|
-
|
|
44406
|
-
|
|
44407
|
-
|
|
44408
|
-
|
|
44409
|
-
|
|
44410
|
-
|
|
44411
|
-
|
|
44412
|
-
|
|
44413
|
-
|
|
44414
|
-
|
|
44415
|
-
|
|
44416
|
-
|
|
44417
|
-
|
|
44418
|
-
|
|
44419
|
-
|
|
44420
|
-
|
|
44421
|
-
|
|
44422
|
-
|
|
44423
|
-
|
|
44424
|
-
|
|
44425
|
-
|
|
44426
|
-
|
|
44427
|
-
|
|
44428
|
-
|
|
44429
|
-
|
|
44430
|
-
|
|
44431
|
-
|
|
44432
|
-
|
|
44433
|
-
|
|
44434
|
-
|
|
44435
|
-
|
|
44436
|
-
|
|
44437
|
-
|
|
44438
|
-
|
|
44439
|
-
|
|
44440
|
-
|
|
44440
|
+
return createComponent2(Show, {
|
|
44441
|
+
get when() {
|
|
44442
|
+
return props.width >= 96;
|
|
44443
|
+
},
|
|
44444
|
+
get fallback() {
|
|
44445
|
+
return [(() => {
|
|
44446
|
+
var _el$40 = createElement("text");
|
|
44447
|
+
setProp(_el$40, "selectable", false);
|
|
44448
|
+
insert(_el$40, () => pad(props.selected ? ">" : "", 2));
|
|
44449
|
+
effect((_$p) => setProp(_el$40, "fg", props.selected ? COLOR.accent : COLOR.dim, _$p));
|
|
44450
|
+
return _el$40;
|
|
44451
|
+
})(), (() => {
|
|
44452
|
+
var _el$41 = createElement("text");
|
|
44453
|
+
setProp(_el$41, "selectable", false);
|
|
44454
|
+
insert(_el$41, () => pad(presentation().kind, 7));
|
|
44455
|
+
effect((_$p) => setProp(_el$41, "fg", COLOR.dim, _$p));
|
|
44456
|
+
return _el$41;
|
|
44457
|
+
})(), (() => {
|
|
44458
|
+
var _el$42 = createElement("text");
|
|
44459
|
+
setProp(_el$42, "selectable", false);
|
|
44460
|
+
insert(_el$42, () => pad(presentation().method, 8));
|
|
44461
|
+
effect((_$p) => setProp(_el$42, "fg", methodColor(presentation().method), _$p));
|
|
44462
|
+
return _el$42;
|
|
44463
|
+
})(), (() => {
|
|
44464
|
+
var _el$43 = createElement("text");
|
|
44465
|
+
setProp(_el$43, "selectable", false);
|
|
44466
|
+
insert(_el$43, () => pad(String(props.flow.status ?? "-"), 5));
|
|
44467
|
+
effect((_$p) => setProp(_el$43, "fg", statusColor(props.flow.status), _$p));
|
|
44468
|
+
return _el$43;
|
|
44469
|
+
})(), (() => {
|
|
44470
|
+
var _el$44 = createElement("text");
|
|
44471
|
+
setProp(_el$44, "selectable", false);
|
|
44472
|
+
insert(_el$44, compactTarget);
|
|
44473
|
+
effect((_$p) => setProp(_el$44, "fg", props.selected ? COLOR.accent : COLOR.text, _$p));
|
|
44474
|
+
return _el$44;
|
|
44475
|
+
})()];
|
|
44476
|
+
},
|
|
44477
|
+
get children() {
|
|
44478
|
+
return [(() => {
|
|
44479
|
+
var _el$27 = createElement("text");
|
|
44480
|
+
setProp(_el$27, "selectable", false);
|
|
44481
|
+
insert(_el$27, () => pad(props.selected ? ">" : "", 2));
|
|
44482
|
+
effect((_$p) => setProp(_el$27, "fg", props.selected ? COLOR.accent : COLOR.dim, _$p));
|
|
44483
|
+
return _el$27;
|
|
44484
|
+
})(), (() => {
|
|
44485
|
+
var _el$28 = createElement("text");
|
|
44486
|
+
setProp(_el$28, "selectable", false);
|
|
44487
|
+
insert(_el$28, () => pad(shortTime(props.flow.timestamp), 9));
|
|
44488
|
+
effect((_$p) => setProp(_el$28, "fg", COLOR.dim, _$p));
|
|
44489
|
+
return _el$28;
|
|
44490
|
+
})(), (() => {
|
|
44491
|
+
var _el$29 = createElement("text");
|
|
44492
|
+
setProp(_el$29, "selectable", false);
|
|
44493
|
+
insert(_el$29, () => pad(presentation().kind, 7));
|
|
44494
|
+
effect((_$p) => setProp(_el$29, "fg", COLOR.dim, _$p));
|
|
44495
|
+
return _el$29;
|
|
44496
|
+
})(), (() => {
|
|
44497
|
+
var _el$30 = createElement("text");
|
|
44498
|
+
setProp(_el$30, "selectable", false);
|
|
44499
|
+
insert(_el$30, () => pad(presentation().method, 8));
|
|
44500
|
+
effect((_$p) => setProp(_el$30, "fg", methodColor(presentation().method), _$p));
|
|
44501
|
+
return _el$30;
|
|
44502
|
+
})(), (() => {
|
|
44503
|
+
var _el$31 = createElement("text");
|
|
44504
|
+
setProp(_el$31, "selectable", false);
|
|
44505
|
+
insert(_el$31, () => pad(String(props.flow.status ?? "-"), 5));
|
|
44506
|
+
effect((_$p) => setProp(_el$31, "fg", statusColor(props.flow.status), _$p));
|
|
44507
|
+
return _el$31;
|
|
44508
|
+
})(), (() => {
|
|
44509
|
+
var _el$32 = createElement("text");
|
|
44510
|
+
setProp(_el$32, "selectable", false);
|
|
44511
|
+
insert(_el$32, () => pad(truncate2(props.flow.host, 29), 30));
|
|
44512
|
+
effect((_$p) => setProp(_el$32, "fg", props.selected ? COLOR.accent : COLOR.text, _$p));
|
|
44513
|
+
return _el$32;
|
|
44514
|
+
})(), (() => {
|
|
44515
|
+
var _el$33 = createElement("text");
|
|
44516
|
+
setProp(_el$33, "selectable", false);
|
|
44517
|
+
insert(_el$33, () => pad(truncate2(props.flow.path || "/", pathWidth() - 1), pathWidth()));
|
|
44518
|
+
effect((_$p) => setProp(_el$33, "fg", props.selected ? COLOR.accent : COLOR.text, _$p));
|
|
44519
|
+
return _el$33;
|
|
44520
|
+
})(), (() => {
|
|
44521
|
+
var _el$34 = createElement("text");
|
|
44522
|
+
setProp(_el$34, "selectable", false);
|
|
44523
|
+
insert(_el$34, () => pad(truncate2(normalizeContentType(props.flow.contentType), 15), 16));
|
|
44524
|
+
effect((_$p) => setProp(_el$34, "fg", COLOR.dim, _$p));
|
|
44525
|
+
return _el$34;
|
|
44526
|
+
})(), (() => {
|
|
44527
|
+
var _el$35 = createElement("text");
|
|
44528
|
+
setProp(_el$35, "selectable", false);
|
|
44529
|
+
insert(_el$35, () => pad(formatBytes(props.flow.responseBytes ?? props.flow.requestBytes), 8));
|
|
44530
|
+
effect((_$p) => setProp(_el$35, "fg", COLOR.dim, _$p));
|
|
44531
|
+
return _el$35;
|
|
44532
|
+
})(), (() => {
|
|
44533
|
+
var _el$36 = createElement("text");
|
|
44534
|
+
setProp(_el$36, "selectable", false);
|
|
44535
|
+
insert(_el$36, () => formatDuration(props.flow.durationMs));
|
|
44536
|
+
effect((_$p) => setProp(_el$36, "fg", COLOR.dim, _$p));
|
|
44537
|
+
return _el$36;
|
|
44538
|
+
})()];
|
|
44539
|
+
}
|
|
44540
|
+
});
|
|
44441
44541
|
}
|
|
44442
44542
|
});
|
|
44443
44543
|
}
|
|
@@ -44607,9 +44707,10 @@ function Composer() {
|
|
|
44607
44707
|
const command = () => fitTerminal(option.title, commandWidth());
|
|
44608
44708
|
const desc = () => truncateLine2(option.description ?? "", descWidth());
|
|
44609
44709
|
return (() => {
|
|
44610
|
-
var _el$9 = createElement("box"), _el$0 = createElement("text"), _el$1 = createElement("text");
|
|
44710
|
+
var _el$9 = createElement("box"), _el$0 = createElement("text"), _el$1 = createElement("text"), _el$10 = createElement("text");
|
|
44611
44711
|
insertNode(_el$9, _el$0);
|
|
44612
44712
|
insertNode(_el$9, _el$1);
|
|
44713
|
+
insertNode(_el$9, _el$10);
|
|
44613
44714
|
setProp(_el$9, "style", {
|
|
44614
44715
|
flexDirection: "row"
|
|
44615
44716
|
});
|
|
@@ -44621,17 +44722,21 @@ function Composer() {
|
|
|
44621
44722
|
composer.focus();
|
|
44622
44723
|
});
|
|
44623
44724
|
setProp(_el$0, "selectable", false);
|
|
44624
|
-
insert(_el$0, () =>
|
|
44725
|
+
insert(_el$0, () => active() ? "\u203A " : " ");
|
|
44625
44726
|
setProp(_el$1, "selectable", false);
|
|
44626
|
-
insert(_el$1,
|
|
44727
|
+
insert(_el$1, command);
|
|
44728
|
+
setProp(_el$10, "selectable", false);
|
|
44729
|
+
insert(_el$10, desc);
|
|
44627
44730
|
effect((_p$) => {
|
|
44628
|
-
var _v$0 = active() ? COLOR.accent : COLOR.
|
|
44731
|
+
var _v$0 = active() ? COLOR.accent : COLOR.dim, _v$1 = active() ? COLOR.accent : COLOR.text, _v$10 = COLOR.dim;
|
|
44629
44732
|
_v$0 !== _p$.e && (_p$.e = setProp(_el$0, "fg", _v$0, _p$.e));
|
|
44630
44733
|
_v$1 !== _p$.t && (_p$.t = setProp(_el$1, "fg", _v$1, _p$.t));
|
|
44734
|
+
_v$10 !== _p$.a && (_p$.a = setProp(_el$10, "fg", _v$10, _p$.a));
|
|
44631
44735
|
return _p$;
|
|
44632
44736
|
}, {
|
|
44633
44737
|
e: undefined,
|
|
44634
|
-
t: undefined
|
|
44738
|
+
t: undefined,
|
|
44739
|
+
a: undefined
|
|
44635
44740
|
});
|
|
44636
44741
|
return _el$9;
|
|
44637
44742
|
})();
|
|
@@ -44688,6 +44793,7 @@ var init_composer2 = __esm(() => {
|
|
|
44688
44793
|
init_solid2();
|
|
44689
44794
|
init_solid2();
|
|
44690
44795
|
init_solid2();
|
|
44796
|
+
init_solid2();
|
|
44691
44797
|
init_solid();
|
|
44692
44798
|
init_solid2();
|
|
44693
44799
|
init_store4();
|
|
@@ -45075,6 +45181,8 @@ var init_footer = __esm(() => {
|
|
|
45075
45181
|
// src/agent-tui/bottom-pane/pending-input-preview.tsx
|
|
45076
45182
|
function PendingInputPreview() {
|
|
45077
45183
|
const tui = useTuiStore();
|
|
45184
|
+
const dims = useTerminalDimensions();
|
|
45185
|
+
const contentWidth = () => Math.max(1, dims().width - 4);
|
|
45078
45186
|
return createComponent2(Show, {
|
|
45079
45187
|
get when() {
|
|
45080
45188
|
return tui.store.snapshot.pendingSteers.length > 0 || tui.store.snapshot.queuedPrompts.length > 0;
|
|
@@ -45091,7 +45199,10 @@ function PendingInputPreview() {
|
|
|
45091
45199
|
get children() {
|
|
45092
45200
|
return [(() => {
|
|
45093
45201
|
var _el$2 = createElement("text");
|
|
45094
|
-
|
|
45202
|
+
insert(_el$2, (() => {
|
|
45203
|
+
var _c$ = memo2(() => dims().width >= 42);
|
|
45204
|
+
return () => _c$() ? "\u2022 steering at the next safe boundary" : `\u2022 ${tui.store.snapshot.pendingSteers.length} steering`;
|
|
45205
|
+
})());
|
|
45095
45206
|
effect((_$p) => setProp(_el$2, "fg", COLOR.dim, _$p));
|
|
45096
45207
|
return _el$2;
|
|
45097
45208
|
})(), createComponent2(For, {
|
|
@@ -45099,20 +45210,20 @@ function PendingInputPreview() {
|
|
|
45099
45210
|
return tui.store.snapshot.pendingSteers.slice(0, 3);
|
|
45100
45211
|
},
|
|
45101
45212
|
children: (item) => (() => {
|
|
45102
|
-
var _el$
|
|
45103
|
-
insert(_el$
|
|
45104
|
-
effect((_$p) => setProp(_el$
|
|
45105
|
-
return _el$
|
|
45213
|
+
var _el$6 = createElement("text");
|
|
45214
|
+
insert(_el$6, () => ` \u21B3 ${truncateLine2(item.text.replace(/\s+/g, " "), contentWidth())}`);
|
|
45215
|
+
effect((_$p) => setProp(_el$6, "fg", COLOR.dim, _$p));
|
|
45216
|
+
return _el$6;
|
|
45106
45217
|
})()
|
|
45107
45218
|
}), createComponent2(Show, {
|
|
45108
45219
|
get when() {
|
|
45109
45220
|
return tui.store.snapshot.pendingSteers.length > 3;
|
|
45110
45221
|
},
|
|
45111
45222
|
get children() {
|
|
45112
|
-
var _el$
|
|
45113
|
-
insert(_el$
|
|
45114
|
-
effect((_$p) => setProp(_el$
|
|
45115
|
-
return _el$
|
|
45223
|
+
var _el$3 = createElement("text");
|
|
45224
|
+
insert(_el$3, () => ` \u2026 ${tui.store.snapshot.pendingSteers.length - 3} more`);
|
|
45225
|
+
effect((_$p) => setProp(_el$3, "fg", COLOR.dim, _$p));
|
|
45226
|
+
return _el$3;
|
|
45116
45227
|
}
|
|
45117
45228
|
})];
|
|
45118
45229
|
}
|
|
@@ -45123,29 +45234,32 @@ function PendingInputPreview() {
|
|
|
45123
45234
|
},
|
|
45124
45235
|
get children() {
|
|
45125
45236
|
return [(() => {
|
|
45126
|
-
var _el$
|
|
45127
|
-
|
|
45128
|
-
|
|
45129
|
-
|
|
45237
|
+
var _el$4 = createElement("text");
|
|
45238
|
+
insert(_el$4, (() => {
|
|
45239
|
+
var _c$2 = memo2(() => dims().width >= 42);
|
|
45240
|
+
return () => _c$2() ? "\u2022 queued follow-ups \xB7 \u2191 edit latest" : `\u2022 ${tui.store.snapshot.queuedPrompts.length} queued \xB7 \u2191 edit`;
|
|
45241
|
+
})());
|
|
45242
|
+
effect((_$p) => setProp(_el$4, "fg", COLOR.dim, _$p));
|
|
45243
|
+
return _el$4;
|
|
45130
45244
|
})(), createComponent2(For, {
|
|
45131
45245
|
get each() {
|
|
45132
45246
|
return tui.store.snapshot.queuedPrompts.slice(0, 3);
|
|
45133
45247
|
},
|
|
45134
45248
|
children: (item, index) => (() => {
|
|
45135
|
-
var _el$
|
|
45136
|
-
insert(_el$
|
|
45137
|
-
effect((_$p) => setProp(_el$
|
|
45138
|
-
return _el$
|
|
45249
|
+
var _el$7 = createElement("text");
|
|
45250
|
+
insert(_el$7, () => ` ${index() + 1}. ${truncateLine2(item.text.replace(/\s+/g, " "), contentWidth())}`);
|
|
45251
|
+
effect((_$p) => setProp(_el$7, "fg", COLOR.dim, _$p));
|
|
45252
|
+
return _el$7;
|
|
45139
45253
|
})()
|
|
45140
45254
|
}), createComponent2(Show, {
|
|
45141
45255
|
get when() {
|
|
45142
45256
|
return tui.store.snapshot.queuedPrompts.length > 3;
|
|
45143
45257
|
},
|
|
45144
45258
|
get children() {
|
|
45145
|
-
var _el$
|
|
45146
|
-
insert(_el$
|
|
45147
|
-
effect((_$p) => setProp(_el$
|
|
45148
|
-
return _el$
|
|
45259
|
+
var _el$5 = createElement("text");
|
|
45260
|
+
insert(_el$5, () => ` \u2026 ${tui.store.snapshot.queuedPrompts.length - 3} more`);
|
|
45261
|
+
effect((_$p) => setProp(_el$5, "fg", COLOR.dim, _$p));
|
|
45262
|
+
return _el$5;
|
|
45149
45263
|
}
|
|
45150
45264
|
})];
|
|
45151
45265
|
}
|
|
@@ -45162,7 +45276,6 @@ var init_pending_input_preview = __esm(() => {
|
|
|
45162
45276
|
init_solid2();
|
|
45163
45277
|
init_solid2();
|
|
45164
45278
|
init_solid2();
|
|
45165
|
-
init_solid2();
|
|
45166
45279
|
init_solid();
|
|
45167
45280
|
init_store4();
|
|
45168
45281
|
init_renderers2();
|
|
@@ -45172,15 +45285,18 @@ var init_pending_input_preview = __esm(() => {
|
|
|
45172
45285
|
// src/agent-tui/bottom-pane/status-indicator.tsx
|
|
45173
45286
|
function StatusIndicator(props) {
|
|
45174
45287
|
const tui = useTuiStore();
|
|
45288
|
+
const dims = useTerminalDimensions();
|
|
45175
45289
|
const detail = () => {
|
|
45176
45290
|
const value = tui.store.ui.statusDetail;
|
|
45177
45291
|
return value && value !== "working" && !isFooterStatusDetail(value) ? ` \u2022 ${value}` : "";
|
|
45178
45292
|
};
|
|
45179
45293
|
const text = () => {
|
|
45180
|
-
if (props.activity)
|
|
45181
|
-
|
|
45294
|
+
if (props.activity) {
|
|
45295
|
+
const value2 = dims().width >= 56 ? `\u2022 ${props.activity} (${fmtElapsed(props.elapsed)}${detail()} \u2022 esc to interrupt)` : `\u2022 ${props.activity} ${fmtElapsed(props.elapsed)} \xB7 esc interrupt`;
|
|
45296
|
+
return truncateLine2(value2.toLowerCase(), Math.max(1, dims().width));
|
|
45297
|
+
}
|
|
45182
45298
|
const value = tui.store.ui.statusDetail;
|
|
45183
|
-
return (value && value !== "working" && !isFooterStatusDetail(value) ? `\u2022 ${value}` : "").toLowerCase();
|
|
45299
|
+
return truncateLine2((value && value !== "working" && !isFooterStatusDetail(value) ? `\u2022 ${value}` : "").toLowerCase(), Math.max(1, dims().width));
|
|
45184
45300
|
};
|
|
45185
45301
|
return (() => {
|
|
45186
45302
|
var _el$ = createElement("box"), _el$2 = createElement("text");
|
|
@@ -45200,7 +45316,9 @@ var init_status_indicator = __esm(() => {
|
|
|
45200
45316
|
init_solid2();
|
|
45201
45317
|
init_solid2();
|
|
45202
45318
|
init_solid2();
|
|
45319
|
+
init_solid2();
|
|
45203
45320
|
init_store4();
|
|
45321
|
+
init_renderers2();
|
|
45204
45322
|
init_theme();
|
|
45205
45323
|
init_footer_state();
|
|
45206
45324
|
});
|
|
@@ -45234,13 +45352,14 @@ function displayRows(matches, selectedId) {
|
|
|
45234
45352
|
|
|
45235
45353
|
// src/agent-tui/overlays/selection-row.tsx
|
|
45236
45354
|
function SelectionMenuHint(props) {
|
|
45355
|
+
const dims = useTerminalDimensions();
|
|
45237
45356
|
return (() => {
|
|
45238
45357
|
var _el$ = createElement("box"), _el$2 = createElement("text");
|
|
45239
45358
|
insertNode(_el$, _el$2);
|
|
45240
45359
|
setProp(_el$, "style", {
|
|
45241
45360
|
marginTop: 1
|
|
45242
45361
|
});
|
|
45243
|
-
insert(_el$2, () => ` ${props.text}`);
|
|
45362
|
+
insert(_el$2, () => ` ${truncateLine2(props.text, Math.max(1, dims().width - 2))}`);
|
|
45244
45363
|
effect((_$p) => setProp(_el$2, "fg", COLOR.dim, _$p));
|
|
45245
45364
|
return _el$;
|
|
45246
45365
|
})();
|
|
@@ -45305,6 +45424,7 @@ var init_selection_row = __esm(() => {
|
|
|
45305
45424
|
init_solid2();
|
|
45306
45425
|
init_solid2();
|
|
45307
45426
|
init_solid();
|
|
45427
|
+
init_solid2();
|
|
45308
45428
|
init_mouse();
|
|
45309
45429
|
init_renderers2();
|
|
45310
45430
|
init_theme();
|
|
@@ -45807,9 +45927,7 @@ function AgentsOverlay(props) {
|
|
|
45807
45927
|
const status2 = () => agentStatusLine(item(), current(), now());
|
|
45808
45928
|
const titleWidth = () => Math.max(8, props.width - terminalWidth(status2()) - 10);
|
|
45809
45929
|
const metadata = () => item().role === "main" ? ["main thread", item().model].filter(Boolean).join(" \xB7 ") : [`${" ".repeat(Math.max(0, item().depth - 1))}${item().lane ?? "general"}`, item().mode === "detached" ? "background" : "attached", item().model].filter(Boolean).join(" \xB7 ");
|
|
45810
|
-
const select = (
|
|
45811
|
-
if (!isPrimaryClick(event))
|
|
45812
|
-
return;
|
|
45930
|
+
const select = () => {
|
|
45813
45931
|
const enabled = props.matches.filter((match) => !match.option.disabled);
|
|
45814
45932
|
const index = enabled.findIndex((match) => match.option.id === row.option.id);
|
|
45815
45933
|
if (props.frame.expandedId === row.option.id) {
|
|
@@ -45819,11 +45937,22 @@ function AgentsOverlay(props) {
|
|
|
45819
45937
|
tui.actions.overlaySetIndex(index, enabled.length);
|
|
45820
45938
|
tui.actions.agentDetailToggle(row.option.id);
|
|
45821
45939
|
};
|
|
45940
|
+
const selectClick = createPrimaryClickGesture(select);
|
|
45822
45941
|
return (() => {
|
|
45823
45942
|
var _el$32 = createElement("box"), _el$33 = createElement("box"), _el$34 = createElement("text"), _el$35 = createElement("text"), _el$36 = createElement("text"), _el$37 = createElement("text"), _el$38 = createElement("text");
|
|
45824
45943
|
insertNode(_el$32, _el$33);
|
|
45825
45944
|
insertNode(_el$32, _el$38);
|
|
45826
|
-
|
|
45945
|
+
spread(_el$32, mergeProps3({
|
|
45946
|
+
get style() {
|
|
45947
|
+
return {
|
|
45948
|
+
width: "100%",
|
|
45949
|
+
flexDirection: "column",
|
|
45950
|
+
paddingLeft: 1,
|
|
45951
|
+
paddingRight: 1,
|
|
45952
|
+
backgroundColor: row.selected ? COLOR.panelActive : COLOR.panel
|
|
45953
|
+
};
|
|
45954
|
+
}
|
|
45955
|
+
}, selectClick), true);
|
|
45827
45956
|
insertNode(_el$33, _el$34);
|
|
45828
45957
|
insertNode(_el$33, _el$35);
|
|
45829
45958
|
insertNode(_el$33, _el$36);
|
|
@@ -45869,27 +45998,19 @@ function AgentsOverlay(props) {
|
|
|
45869
45998
|
}
|
|
45870
45999
|
}), null);
|
|
45871
46000
|
effect((_p$) => {
|
|
45872
|
-
var _v$13 =
|
|
45873
|
-
|
|
45874
|
-
|
|
45875
|
-
|
|
45876
|
-
|
|
45877
|
-
|
|
45878
|
-
}, _v$14 = row.selected ? COLOR.accent : COLOR.dim, _v$15 = agentColor(item()), _v$16 = COLOR.text, _v$17 = COLOR.dim, _v$18 = COLOR.dim;
|
|
45879
|
-
_v$13 !== _p$.e && (_p$.e = setProp(_el$32, "style", _v$13, _p$.e));
|
|
45880
|
-
_v$14 !== _p$.t && (_p$.t = setProp(_el$34, "fg", _v$14, _p$.t));
|
|
45881
|
-
_v$15 !== _p$.a && (_p$.a = setProp(_el$35, "fg", _v$15, _p$.a));
|
|
45882
|
-
_v$16 !== _p$.o && (_p$.o = setProp(_el$36, "fg", _v$16, _p$.o));
|
|
45883
|
-
_v$17 !== _p$.i && (_p$.i = setProp(_el$37, "fg", _v$17, _p$.i));
|
|
45884
|
-
_v$18 !== _p$.n && (_p$.n = setProp(_el$38, "fg", _v$18, _p$.n));
|
|
46001
|
+
var _v$13 = row.selected ? COLOR.accent : COLOR.dim, _v$14 = agentColor(item()), _v$15 = COLOR.text, _v$16 = COLOR.dim, _v$17 = COLOR.dim;
|
|
46002
|
+
_v$13 !== _p$.e && (_p$.e = setProp(_el$34, "fg", _v$13, _p$.e));
|
|
46003
|
+
_v$14 !== _p$.t && (_p$.t = setProp(_el$35, "fg", _v$14, _p$.t));
|
|
46004
|
+
_v$15 !== _p$.a && (_p$.a = setProp(_el$36, "fg", _v$15, _p$.a));
|
|
46005
|
+
_v$16 !== _p$.o && (_p$.o = setProp(_el$37, "fg", _v$16, _p$.o));
|
|
46006
|
+
_v$17 !== _p$.i && (_p$.i = setProp(_el$38, "fg", _v$17, _p$.i));
|
|
45885
46007
|
return _p$;
|
|
45886
46008
|
}, {
|
|
45887
46009
|
e: undefined,
|
|
45888
46010
|
t: undefined,
|
|
45889
46011
|
a: undefined,
|
|
45890
46012
|
o: undefined,
|
|
45891
|
-
i: undefined
|
|
45892
|
-
n: undefined
|
|
46013
|
+
i: undefined
|
|
45893
46014
|
});
|
|
45894
46015
|
return _el$32;
|
|
45895
46016
|
})();
|
|
@@ -46067,6 +46188,7 @@ var init_list_overlay = __esm(() => {
|
|
|
46067
46188
|
init_solid2();
|
|
46068
46189
|
init_solid2();
|
|
46069
46190
|
init_solid2();
|
|
46191
|
+
init_solid2();
|
|
46070
46192
|
init_solid();
|
|
46071
46193
|
init_solid2();
|
|
46072
46194
|
init_overlay_options();
|
|
@@ -46630,32 +46752,42 @@ function ModelProviderWizard() {
|
|
|
46630
46752
|
children: (row) => {
|
|
46631
46753
|
const selected = () => wizard().protocol === row[0];
|
|
46632
46754
|
return (() => {
|
|
46633
|
-
var _el$19 = createElement("box"), _el$20 = createElement("text"), _el$21 = createElement("text")
|
|
46755
|
+
var _el$19 = createElement("box"), _el$20 = createElement("text"), _el$21 = createElement("text");
|
|
46634
46756
|
insertNode(_el$19, _el$20);
|
|
46635
46757
|
insertNode(_el$19, _el$21);
|
|
46636
|
-
insertNode(_el$19, _el$22);
|
|
46637
46758
|
setProp(_el$19, "style", {
|
|
46638
46759
|
flexDirection: "row"
|
|
46639
46760
|
});
|
|
46640
|
-
setProp(_el$19, "onMouseUp", () =>
|
|
46641
|
-
|
|
46642
|
-
|
|
46761
|
+
setProp(_el$19, "onMouseUp", (event) => {
|
|
46762
|
+
if (isPrimaryClick(event))
|
|
46763
|
+
tui.actions.modelProviderWizardPatch({
|
|
46764
|
+
protocol: row[0]
|
|
46765
|
+
});
|
|
46766
|
+
});
|
|
46643
46767
|
setProp(_el$20, "selectable", false);
|
|
46644
46768
|
insert(_el$20, () => selected() ? "\u203A " : " ");
|
|
46645
46769
|
setProp(_el$21, "selectable", false);
|
|
46646
46770
|
insert(_el$21, () => row[1]);
|
|
46647
|
-
|
|
46648
|
-
|
|
46771
|
+
insert(_el$19, createComponent2(Show, {
|
|
46772
|
+
get when() {
|
|
46773
|
+
return dims().width >= 56;
|
|
46774
|
+
},
|
|
46775
|
+
get children() {
|
|
46776
|
+
var _el$22 = createElement("text");
|
|
46777
|
+
setProp(_el$22, "selectable", false);
|
|
46778
|
+
insert(_el$22, () => ` ${row[2]}`);
|
|
46779
|
+
effect((_$p) => setProp(_el$22, "fg", COLOR.dim, _$p));
|
|
46780
|
+
return _el$22;
|
|
46781
|
+
}
|
|
46782
|
+
}), null);
|
|
46649
46783
|
effect((_p$) => {
|
|
46650
|
-
var _v$18 = selected() ? COLOR.accent : COLOR.dim, _v$19 = COLOR.text
|
|
46784
|
+
var _v$18 = selected() ? COLOR.accent : COLOR.dim, _v$19 = COLOR.text;
|
|
46651
46785
|
_v$18 !== _p$.e && (_p$.e = setProp(_el$20, "fg", _v$18, _p$.e));
|
|
46652
46786
|
_v$19 !== _p$.t && (_p$.t = setProp(_el$21, "fg", _v$19, _p$.t));
|
|
46653
|
-
_v$20 !== _p$.a && (_p$.a = setProp(_el$22, "fg", _v$20, _p$.a));
|
|
46654
46787
|
return _p$;
|
|
46655
46788
|
}, {
|
|
46656
46789
|
e: undefined,
|
|
46657
|
-
t: undefined
|
|
46658
|
-
a: undefined
|
|
46790
|
+
t: undefined
|
|
46659
46791
|
});
|
|
46660
46792
|
return _el$19;
|
|
46661
46793
|
})();
|
|
@@ -46683,7 +46815,7 @@ function ModelProviderWizard() {
|
|
|
46683
46815
|
setProp(_el$8, "style", {
|
|
46684
46816
|
marginTop: 1
|
|
46685
46817
|
});
|
|
46686
|
-
insert(_el$9, () => ` ${wizardHint(wizard().field, wizard().busy)}`);
|
|
46818
|
+
insert(_el$9, () => ` ${truncateLine2(wizardHint(wizard().field, wizard().busy), Math.max(1, dims().width - 2))}`);
|
|
46687
46819
|
effect((_p$) => {
|
|
46688
46820
|
var _v$ = COLOR.text, _v$2 = COLOR.dim, _v$3 = COLOR.dim;
|
|
46689
46821
|
_v$ !== _p$.e && (_p$.e = setProp(_el$3, "fg", _v$, _p$.e));
|
|
@@ -46700,7 +46832,9 @@ function ModelProviderWizard() {
|
|
|
46700
46832
|
}
|
|
46701
46833
|
function ProviderReview() {
|
|
46702
46834
|
const tui = useTuiStore();
|
|
46835
|
+
const dims = useTerminalDimensions();
|
|
46703
46836
|
const wizard = () => tui.store.ui.modelProviderWizard;
|
|
46837
|
+
const width = () => Math.max(1, dims().width - 2);
|
|
46704
46838
|
return (() => {
|
|
46705
46839
|
var _el$23 = createElement("box"), _el$24 = createElement("text"), _el$25 = createElement("text"), _el$26 = createElement("text"), _el$27 = createElement("text");
|
|
46706
46840
|
insertNode(_el$23, _el$24);
|
|
@@ -46712,23 +46846,17 @@ function ProviderReview() {
|
|
|
46712
46846
|
marginTop: 1,
|
|
46713
46847
|
paddingLeft: 2
|
|
46714
46848
|
});
|
|
46715
|
-
insert(_el$24, () => wizard().id || "unnamed provider");
|
|
46716
|
-
insert(_el$25, () => wizard().baseUrl || "base url missing");
|
|
46717
|
-
insert(_el$26, () => `${modelProviderProtocolLabel(wizard().protocol)} \xB7 ${wizard().model || "discover models automatically"}
|
|
46718
|
-
insert(_el$27, (
|
|
46719
|
-
var _c$ = memo2(() => !!wizard().apiKey);
|
|
46720
|
-
return () => _c$() ? "new api key will be stored securely" : memo2(() => !!wizard().removeCredential)() ? "stored api key will be removed" : wizard().credentialStored ? "stored api key will be retained" : "no api key";
|
|
46721
|
-
})());
|
|
46849
|
+
insert(_el$24, () => truncateLine2(wizard().id || "unnamed provider", width()));
|
|
46850
|
+
insert(_el$25, () => truncateLine2(wizard().baseUrl || "base url missing", width()));
|
|
46851
|
+
insert(_el$26, () => truncateLine2(`${modelProviderProtocolLabel(wizard().protocol)} \xB7 ${wizard().model || "discover models automatically"}`, width()));
|
|
46852
|
+
insert(_el$27, () => truncateLine2(wizard().apiKey ? "new api key will be stored securely" : wizard().removeCredential ? "stored api key will be removed" : wizard().credentialStored ? "stored api key will be retained" : "no api key", width()));
|
|
46722
46853
|
insert(_el$23, createComponent2(Show, {
|
|
46723
46854
|
get when() {
|
|
46724
46855
|
return wizard().probe;
|
|
46725
46856
|
},
|
|
46726
46857
|
get children() {
|
|
46727
46858
|
var _el$28 = createElement("text");
|
|
46728
|
-
insert(_el$28, (
|
|
46729
|
-
var _c$2 = memo2(() => !!wizard().probe?.ok);
|
|
46730
|
-
return () => _c$2() ? `probe ready \xB7 ${wizard().probe?.models.length} models \xB7 ${wizard().probe?.latencyMs}ms` : `probe failed \xB7 ${wizard().probe?.error ?? "unknown error"}`;
|
|
46731
|
-
})());
|
|
46859
|
+
insert(_el$28, () => truncateLine2(wizard().probe?.ok ? `probe ready \xB7 ${wizard().probe?.models.length} models \xB7 ${wizard().probe?.latencyMs}ms` : `probe failed \xB7 ${wizard().probe?.error ?? "unknown error"}`, width()));
|
|
46732
46860
|
effect((_$p) => setProp(_el$28, "fg", wizard().probe?.ok ? COLOR.success : COLOR.error, _$p));
|
|
46733
46861
|
return _el$28;
|
|
46734
46862
|
}
|
|
@@ -46745,11 +46873,11 @@ function ProviderReview() {
|
|
|
46745
46873
|
}
|
|
46746
46874
|
}), null);
|
|
46747
46875
|
effect((_p$) => {
|
|
46748
|
-
var _v$
|
|
46749
|
-
_v$
|
|
46750
|
-
_v$
|
|
46751
|
-
_v$
|
|
46752
|
-
_v$
|
|
46876
|
+
var _v$20 = COLOR.text, _v$21 = COLOR.dim, _v$22 = COLOR.dim, _v$23 = COLOR.dim;
|
|
46877
|
+
_v$20 !== _p$.e && (_p$.e = setProp(_el$24, "fg", _v$20, _p$.e));
|
|
46878
|
+
_v$21 !== _p$.t && (_p$.t = setProp(_el$25, "fg", _v$21, _p$.t));
|
|
46879
|
+
_v$22 !== _p$.a && (_p$.a = setProp(_el$26, "fg", _v$22, _p$.a));
|
|
46880
|
+
_v$23 !== _p$.o && (_p$.o = setProp(_el$27, "fg", _v$23, _p$.o));
|
|
46753
46881
|
return _p$;
|
|
46754
46882
|
}, {
|
|
46755
46883
|
e: undefined,
|
|
@@ -46813,6 +46941,7 @@ var init_model_provider_wizard = __esm(() => {
|
|
|
46813
46941
|
init_model_provider_state();
|
|
46814
46942
|
init_theme();
|
|
46815
46943
|
init_renderers2();
|
|
46944
|
+
init_mouse();
|
|
46816
46945
|
});
|
|
46817
46946
|
|
|
46818
46947
|
// src/agent-tui/bottom-pane/model-provider-removal.tsx
|
|
@@ -46902,6 +47031,7 @@ function BottomPane() {
|
|
|
46902
47031
|
const tui = useTuiStore();
|
|
46903
47032
|
const exit = useExit();
|
|
46904
47033
|
const composer = useComposerControl();
|
|
47034
|
+
const dims = useTerminalDimensions();
|
|
46905
47035
|
const [elapsed, setElapsed] = createSignal(0);
|
|
46906
47036
|
let tick;
|
|
46907
47037
|
const frame = () => tui.store.ui.overlayStack.at(-1);
|
|
@@ -47001,10 +47131,10 @@ function BottomPane() {
|
|
|
47001
47131
|
return tui.store.ui.lastError;
|
|
47002
47132
|
},
|
|
47003
47133
|
children: (error) => (() => {
|
|
47004
|
-
var _el$
|
|
47005
|
-
insert(_el$
|
|
47006
|
-
effect((_$p) => setProp(_el$
|
|
47007
|
-
return _el$
|
|
47134
|
+
var _el$3 = createElement("text");
|
|
47135
|
+
insert(_el$3, () => `\u2022 error \xB7 ${truncateLine2(error(), Math.max(1, dims().width - 10))}`);
|
|
47136
|
+
effect((_$p) => setProp(_el$3, "fg", COLOR.error, _$p));
|
|
47137
|
+
return _el$3;
|
|
47008
47138
|
})()
|
|
47009
47139
|
}), null);
|
|
47010
47140
|
insert(_el$, createComponent2(Show, {
|
|
@@ -47021,7 +47151,7 @@ function BottomPane() {
|
|
|
47021
47151
|
},
|
|
47022
47152
|
get children() {
|
|
47023
47153
|
var _el$2 = createElement("text");
|
|
47024
|
-
|
|
47154
|
+
insert(_el$2, () => dims().width >= 64 ? " question pending \xB7 ctrl+q answer \xB7 chat input remains available" : " question pending \xB7 ctrl+q answer");
|
|
47025
47155
|
effect((_$p) => setProp(_el$2, "fg", COLOR.warning, _$p));
|
|
47026
47156
|
return _el$2;
|
|
47027
47157
|
}
|
|
@@ -47114,57 +47244,92 @@ function BottomPane() {
|
|
|
47114
47244
|
}
|
|
47115
47245
|
function ProxyTabFooter() {
|
|
47116
47246
|
const tui = useTuiStore();
|
|
47247
|
+
const dims = useTerminalDimensions();
|
|
47248
|
+
const layout = () => proxyTabFooterLayout(dims().width, tui.store.ui.proxyFilter);
|
|
47117
47249
|
return (() => {
|
|
47118
|
-
var _el$
|
|
47119
|
-
insertNode(_el$
|
|
47120
|
-
insertNode(_el$
|
|
47121
|
-
setProp(_el$
|
|
47250
|
+
var _el$4 = createElement("box"), _el$5 = createElement("text"), _el$6 = createElement("text");
|
|
47251
|
+
insertNode(_el$4, _el$5);
|
|
47252
|
+
insertNode(_el$4, _el$6);
|
|
47253
|
+
setProp(_el$4, "style", {
|
|
47122
47254
|
height: 1,
|
|
47123
47255
|
flexDirection: "row",
|
|
47124
47256
|
justifyContent: "space-between",
|
|
47125
47257
|
paddingLeft: 1,
|
|
47126
47258
|
paddingRight: 1
|
|
47127
47259
|
});
|
|
47128
|
-
|
|
47129
|
-
insert(_el$
|
|
47260
|
+
insert(_el$5, () => layout().left);
|
|
47261
|
+
insert(_el$6, () => layout().right);
|
|
47130
47262
|
effect((_p$) => {
|
|
47131
47263
|
var _v$ = COLOR.dim, _v$2 = COLOR.dim;
|
|
47132
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el$
|
|
47133
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$
|
|
47264
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$5, "fg", _v$, _p$.e));
|
|
47265
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$6, "fg", _v$2, _p$.t));
|
|
47134
47266
|
return _p$;
|
|
47135
47267
|
}, {
|
|
47136
47268
|
e: undefined,
|
|
47137
47269
|
t: undefined
|
|
47138
47270
|
});
|
|
47139
|
-
return _el$
|
|
47271
|
+
return _el$4;
|
|
47140
47272
|
})();
|
|
47141
47273
|
}
|
|
47142
47274
|
function CenterSurfaceFooter(props) {
|
|
47275
|
+
const dims = useTerminalDimensions();
|
|
47276
|
+
const layout = () => centerSurfaceFooterLayout(props.frame, dims().width);
|
|
47143
47277
|
return (() => {
|
|
47144
|
-
var _el$
|
|
47145
|
-
insertNode(_el$
|
|
47146
|
-
insertNode(_el$
|
|
47147
|
-
setProp(_el$
|
|
47278
|
+
var _el$7 = createElement("box"), _el$8 = createElement("text"), _el$9 = createElement("text");
|
|
47279
|
+
insertNode(_el$7, _el$8);
|
|
47280
|
+
insertNode(_el$7, _el$9);
|
|
47281
|
+
setProp(_el$7, "style", {
|
|
47148
47282
|
height: 1,
|
|
47149
47283
|
flexDirection: "row",
|
|
47150
47284
|
justifyContent: "space-between",
|
|
47151
47285
|
paddingLeft: 1,
|
|
47152
47286
|
paddingRight: 1
|
|
47153
47287
|
});
|
|
47154
|
-
insert(_el$
|
|
47155
|
-
insert(_el$
|
|
47288
|
+
insert(_el$8, () => layout().left);
|
|
47289
|
+
insert(_el$9, () => layout().right);
|
|
47156
47290
|
effect((_p$) => {
|
|
47157
47291
|
var _v$3 = COLOR.dim, _v$4 = COLOR.dim;
|
|
47158
|
-
_v$3 !== _p$.e && (_p$.e = setProp(_el$
|
|
47159
|
-
_v$4 !== _p$.t && (_p$.t = setProp(_el$
|
|
47292
|
+
_v$3 !== _p$.e && (_p$.e = setProp(_el$8, "fg", _v$3, _p$.e));
|
|
47293
|
+
_v$4 !== _p$.t && (_p$.t = setProp(_el$9, "fg", _v$4, _p$.t));
|
|
47160
47294
|
return _p$;
|
|
47161
47295
|
}, {
|
|
47162
47296
|
e: undefined,
|
|
47163
47297
|
t: undefined
|
|
47164
47298
|
});
|
|
47165
|
-
return _el$
|
|
47299
|
+
return _el$7;
|
|
47166
47300
|
})();
|
|
47167
47301
|
}
|
|
47302
|
+
function proxyTabFooterLayout(width, filter) {
|
|
47303
|
+
const hint = width >= 88 ? "\u2191\u2193 flow \xB7 tab detail \xB7 p/n ws msg \xB7 \u2190\u2192 filter \xB7 a/h/w tabs \xB7 alt+1 chat" : width >= 56 ? "alt+1 chat \xB7 \u2191\u2193 flow \xB7 tab detail \xB7 \u2190\u2192 filter" : width >= 32 ? "alt+1 chat \xB7 \u2191\u2193 flow" : "alt+1 chat";
|
|
47304
|
+
return fitFooterLine(hint, [{
|
|
47305
|
+
id: "proxy",
|
|
47306
|
+
kind: "message",
|
|
47307
|
+
text: `proxy \xB7 ${filter}`
|
|
47308
|
+
}], Math.max(0, width - 2));
|
|
47309
|
+
}
|
|
47310
|
+
function centerSurfaceFooterLayout(frame, width) {
|
|
47311
|
+
const hint = width >= 64 ? centerSurfaceFooter(frame).toLowerCase() : compactCenterSurfaceFooter(frame);
|
|
47312
|
+
return fitFooterLine(hint, [{
|
|
47313
|
+
id: "surface",
|
|
47314
|
+
kind: "message",
|
|
47315
|
+
text: frame.kind.toLowerCase()
|
|
47316
|
+
}], Math.max(0, width - 2));
|
|
47317
|
+
}
|
|
47318
|
+
function compactCenterSurfaceFooter(frame) {
|
|
47319
|
+
switch (frame.kind) {
|
|
47320
|
+
case "report":
|
|
47321
|
+
return "esc back \xB7 s save";
|
|
47322
|
+
case "container":
|
|
47323
|
+
return "esc back \xB7 t toggle \xB7 r refresh";
|
|
47324
|
+
case "confirm":
|
|
47325
|
+
return "esc cancel \xB7 enter confirm";
|
|
47326
|
+
case "proxy_flow":
|
|
47327
|
+
return "esc back \xB7 tab pane";
|
|
47328
|
+
case "alert":
|
|
47329
|
+
case "detail":
|
|
47330
|
+
return "esc back";
|
|
47331
|
+
}
|
|
47332
|
+
}
|
|
47168
47333
|
var init_bottom_pane = __esm(() => {
|
|
47169
47334
|
init_solid2();
|
|
47170
47335
|
init_solid2();
|
|
@@ -47251,6 +47416,9 @@ ${note.text}`).join(`
|
|
|
47251
47416
|
return [createComponent2(KeyboardController, {}), (() => {
|
|
47252
47417
|
var _el$ = createElement("box"), _el$2 = createElement("box");
|
|
47253
47418
|
insertNode(_el$, _el$2);
|
|
47419
|
+
setProp(_el$, "minHeight", 0);
|
|
47420
|
+
setProp(_el$, "overflow", "hidden");
|
|
47421
|
+
setProp(_el$, "flexDirection", "column");
|
|
47254
47422
|
insert(_el$, createComponent2(MainTabs, {}), _el$2);
|
|
47255
47423
|
setProp(_el$2, "id", "main-surface-viewport");
|
|
47256
47424
|
setProp(_el$2, "style", {
|
|
@@ -47284,13 +47452,17 @@ ${note.text}`).join(`
|
|
|
47284
47452
|
})
|
|
47285
47453
|
}));
|
|
47286
47454
|
insert(_el$, createComponent2(BottomPane, {}), null);
|
|
47287
|
-
effect((
|
|
47288
|
-
|
|
47289
|
-
|
|
47290
|
-
|
|
47291
|
-
|
|
47292
|
-
|
|
47293
|
-
},
|
|
47455
|
+
effect((_p$) => {
|
|
47456
|
+
var _v$ = dims().width, _v$2 = dims().height, _v$3 = COLOR.bg;
|
|
47457
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$, "width", _v$, _p$.e));
|
|
47458
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$, "height", _v$2, _p$.t));
|
|
47459
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$, "backgroundColor", _v$3, _p$.a));
|
|
47460
|
+
return _p$;
|
|
47461
|
+
}, {
|
|
47462
|
+
e: undefined,
|
|
47463
|
+
t: undefined,
|
|
47464
|
+
a: undefined
|
|
47465
|
+
});
|
|
47294
47466
|
return _el$;
|
|
47295
47467
|
})()];
|
|
47296
47468
|
}
|
|
@@ -47333,10 +47505,10 @@ function MainTabs() {
|
|
|
47333
47505
|
});
|
|
47334
47506
|
insert(_el$8, () => `[2] proxy${proxyCount() ? ` (${proxyCount()})` : ""}`);
|
|
47335
47507
|
effect((_p$) => {
|
|
47336
|
-
var _v$ = active() === "chat" ? COLOR.accent : COLOR.dim, _v$
|
|
47337
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el$4, "fg", _v
|
|
47338
|
-
_v$
|
|
47339
|
-
_v$
|
|
47508
|
+
var _v$4 = active() === "chat" ? COLOR.accent : COLOR.dim, _v$5 = COLOR.dim, _v$6 = active() === "proxy" ? COLOR.accent : COLOR.dim;
|
|
47509
|
+
_v$4 !== _p$.e && (_p$.e = setProp(_el$4, "fg", _v$4, _p$.e));
|
|
47510
|
+
_v$5 !== _p$.t && (_p$.t = setProp(_el$6, "fg", _v$5, _p$.t));
|
|
47511
|
+
_v$6 !== _p$.a && (_p$.a = setProp(_el$8, "fg", _v$6, _p$.a));
|
|
47340
47512
|
return _p$;
|
|
47341
47513
|
}, {
|
|
47342
47514
|
e: undefined,
|
|
@@ -47574,9 +47746,37 @@ __export(exports_agent_tui, {
|
|
|
47574
47746
|
formatResumeHint: () => formatResumeHint,
|
|
47575
47747
|
ensureSession: () => ensureSession,
|
|
47576
47748
|
createRuntimePort: () => createRuntimePort,
|
|
47749
|
+
createDeferredResizeHandler: () => createDeferredResizeHandler,
|
|
47577
47750
|
SessionResolutionError: () => SessionResolutionError
|
|
47578
47751
|
});
|
|
47579
|
-
import { createCliRenderer as createCliRenderer2 } from "@opentui/core";
|
|
47752
|
+
import { createCliRenderer as createCliRenderer2, RGBA } from "@opentui/core";
|
|
47753
|
+
function createDeferredResizeHandler(resize, readSize, schedule = (callback) => setTimeout(callback, 0), cancel = clearTimeout) {
|
|
47754
|
+
let timer;
|
|
47755
|
+
let disposed = false;
|
|
47756
|
+
const onResize2 = () => {
|
|
47757
|
+
if (disposed)
|
|
47758
|
+
return;
|
|
47759
|
+
if (timer !== undefined)
|
|
47760
|
+
cancel(timer);
|
|
47761
|
+
timer = schedule(() => {
|
|
47762
|
+
timer = undefined;
|
|
47763
|
+
if (disposed)
|
|
47764
|
+
return;
|
|
47765
|
+
const size = readSize();
|
|
47766
|
+
if (size)
|
|
47767
|
+
resize(size.width, size.height);
|
|
47768
|
+
});
|
|
47769
|
+
};
|
|
47770
|
+
return {
|
|
47771
|
+
onResize: onResize2,
|
|
47772
|
+
dispose: () => {
|
|
47773
|
+
disposed = true;
|
|
47774
|
+
if (timer !== undefined)
|
|
47775
|
+
cancel(timer);
|
|
47776
|
+
timer = undefined;
|
|
47777
|
+
}
|
|
47778
|
+
};
|
|
47779
|
+
}
|
|
47580
47780
|
async function runOpenTui(input) {
|
|
47581
47781
|
const capabilities = input.capabilities ?? {
|
|
47582
47782
|
compact: true,
|
|
@@ -47681,29 +47881,24 @@ async function destroyRenderer(renderer) {
|
|
|
47681
47881
|
} catch {}
|
|
47682
47882
|
}
|
|
47683
47883
|
async function createManagedRenderer(onDestroy) {
|
|
47684
|
-
const existingListeners = new Set(process.listeners("SIGWINCH"));
|
|
47685
47884
|
const renderer = await createCliRenderer2({
|
|
47686
47885
|
autoFocus: false,
|
|
47886
|
+
backgroundColor: COLOR.bg,
|
|
47687
47887
|
exitOnCtrlC: false,
|
|
47688
47888
|
onDestroy
|
|
47689
47889
|
});
|
|
47690
|
-
const
|
|
47691
|
-
|
|
47692
|
-
|
|
47693
|
-
|
|
47694
|
-
|
|
47695
|
-
|
|
47696
|
-
disposeResize: () => {}
|
|
47697
|
-
};
|
|
47698
|
-
const onResize2 = () => {
|
|
47699
|
-
const size = validTerminalSize(process.stdout.columns, process.stdout.rows);
|
|
47700
|
-
if (size)
|
|
47701
|
-
renderer.resize(size.width, size.height);
|
|
47702
|
-
};
|
|
47703
|
-
process.on("SIGWINCH", onResize2);
|
|
47890
|
+
const resize = createDeferredResizeHandler((width, height) => {
|
|
47891
|
+
renderer.resize(width, height);
|
|
47892
|
+
renderer.currentRenderBuffer.clear(RGBA.fromInts(1, 1, 1, 255));
|
|
47893
|
+
renderer.requestRender();
|
|
47894
|
+
}, () => validTerminalSize(process.stdout.columns, process.stdout.rows));
|
|
47895
|
+
process.on("SIGWINCH", resize.onResize);
|
|
47704
47896
|
return {
|
|
47705
47897
|
renderer,
|
|
47706
|
-
disposeResize: () =>
|
|
47898
|
+
disposeResize: () => {
|
|
47899
|
+
process.off("SIGWINCH", resize.onResize);
|
|
47900
|
+
resize.dispose();
|
|
47901
|
+
}
|
|
47707
47902
|
};
|
|
47708
47903
|
}
|
|
47709
47904
|
function validTerminalSize(columns, rows) {
|
|
@@ -47775,6 +47970,7 @@ var init_agent_tui = __esm(() => {
|
|
|
47775
47970
|
init_session_title();
|
|
47776
47971
|
init_session_catalog();
|
|
47777
47972
|
init_update_check();
|
|
47973
|
+
init_theme();
|
|
47778
47974
|
SessionResolutionError = class SessionResolutionError extends Error {
|
|
47779
47975
|
constructor(query, workspace, sessions2) {
|
|
47780
47976
|
const recent = sessions2.slice(0, 5).map((session) => ` ${session.id} ${session.title?.trim() || DEFAULT_SESSION_TITLE}`).join(`
|
|
@@ -50355,5 +50551,5 @@ Examples:
|
|
|
50355
50551
|
`);
|
|
50356
50552
|
}
|
|
50357
50553
|
|
|
50358
|
-
//# debugId=
|
|
50554
|
+
//# debugId=B089044398C9A98564756E2164756E21
|
|
50359
50555
|
//# sourceMappingURL=index.js.map
|